org.silverpeas.admin.mock
Class OrganizationControllerMockWrapper
java.lang.Object
com.stratelia.webactiv.beans.admin.OrganizationController
org.silverpeas.admin.mock.OrganizationControllerMockWrapper
- All Implemented Interfaces:
- Serializable, OrganisationController
@Named(value="organizationController")
public class OrganizationControllerMockWrapper
- extends OrganizationController
A wrapper around an OrganizationController mock for testing purpose.
It is managed by the IoC container and it plays the role of an OrganizationController instance
for the business objects involved in a test. For doing, it delegates the invoked methods to
the wrapped mock.
You can get the wrapped mock for registering some behaviours an OrganizationController instance
should have in the tests.
- See Also:
- Serialized Form
|
Method Summary |
String[] |
getAdministratorUserIds(String fromUserId)
|
String[] |
getAllComponentIds(String sSpaceId)
|
String[] |
getAllComponentIdsRecur(String sSpaceId)
|
String[] |
getAllComponentIdsRecur(String sSpaceId,
String sUserId,
String sComponentRootName,
boolean inCurrentSpace,
boolean inAllSpaces)
|
Map<String,WAComponent> |
getAllComponents()
|
Map<String,String> |
getAllComponentsNames()
|
Domain[] |
getAllDomains()
|
String[] |
getAllGroupIdsOfUser(String userId)
|
Group[] |
getAllGroups()
|
String[] |
getAllowedComponentIds(String userId)
|
String[] |
getAllowedSubSpaceIds(String userId,
String spaceFatherId)
|
Group[] |
getAllRootGroups()
|
Group[] |
getAllRootGroupsInDomain(String domainId)
|
String[] |
getAllRootSpaceIds()
|
String[] |
getAllRootSpaceIds(String sUserId)
|
String[] |
getAllSpaceIds()
|
String[] |
getAllSpaceIds(String sUserId)
|
Group[] |
getAllSubGroups(String parentGroupId)
|
String[] |
getAllSubSpaceIds(String sSpaceId)
|
String[] |
getAllSubSpaceIds(String sSpaceId,
String sUserId)
|
int |
getAllSubUsersNumber(String sGroupId)
|
UserDetail[] |
getAllUsers()
|
UserDetail[] |
getAllUsers(String componentId)
|
String[] |
getAllUsersIds()
|
UserDetail[] |
getAllUsersInDomain(String domainId)
|
UserDetail[] |
getAllUsersOfGroup(String groupId)
|
String[] |
getAvailCompoIds(String sClientSpaceId,
String sUserId)
|
String[] |
getAvailCompoIdsAtRoot(String sClientSpaceId,
String sUserId)
|
List<ComponentInstLight> |
getAvailComponentInstLights(String userId,
String componentName)
|
String[] |
getAvailDriverCompoIds(String sClientSpaceId,
String sUserId)
|
CompoSpace[] |
getCompoForUser(String sUserId,
String sCompoName)
|
String[] |
getCompoId(String sCompoName)
|
String[] |
getComponentIdsForUser(String sUserId,
String sCompoName)
|
ComponentInst |
getComponentInst(String sComponentId)
|
ComponentInstLight |
getComponentInstLight(String sComponentId)
|
String |
getComponentParameterValue(String sComponentId,
String parameterName)
|
String[] |
getDirectGroupIdsOfUser(String userId)
|
Domain |
getDomain(String domainId)
|
UserDetail[] |
getFiltredDirectUsers(String sGroupId,
String sUserLastNameFilter)
|
String |
getGeneralSpaceId()
|
Group |
getGroup(String sGroupId)
|
Group[] |
getGroups(String[] groupsId)
|
OrganizationController |
getMock()
Gets the mock of the OrganizationController class wrapped by this instance. |
List<String> |
getPathToGroup(String groupId)
|
SpaceInstLight |
getRootSpace(String spaceId)
|
List<SpaceInstLight> |
getRootSpacesContainingComponent(String userId,
String componentName)
|
SpaceInst |
getSpaceInstById(String sSpaceId)
|
SpaceInstLight |
getSpaceInstLightById(String spaceId)
|
String[] |
getSpaceNames(String[] asSpaceIds)
|
List<SpaceInst> |
getSpacePath(String spaceId)
|
List<SpaceInst> |
getSpacePathToComponent(String componentId)
|
List<SpaceInstLight> |
getSpaceTreeview(String userId)
|
List<SpaceInstLight> |
getSubSpacesContainingComponent(String spaceId,
String userId,
String componentName)
|
int |
getUserDBId(String sUserId)
|
UserDetail |
getUserDetail(String sUserId)
|
String |
getUserDetailByDBId(int id)
|
UserDetail[] |
getUserDetails(String[] asUserIds)
|
UserFull |
getUserFull(String sUserId)
|
String[] |
getUserManageableSpaceIds(String sUserId)
|
Map<Integer,List<String>> |
getUserObjectProfiles(String userId,
String componentId,
ObjectType objectType)
|
ProfileInst |
getUserProfile(String profileId)
|
String[] |
getUserProfiles(String userId,
String componentId)
|
String[] |
getUserProfiles(String userId,
String componentId,
int objectId,
ObjectType objectType)
|
UserDetail[] |
getUsers(String sPrefixTableName,
String sComponentName,
String sProfile)
|
String[] |
getUsersIdsByRoleNames(String componentId,
List<String> profileNames)
|
String[] |
getUsersIdsByRoleNames(String componentId,
String objectId,
ObjectType objectType,
List<String> profileNames)
|
boolean |
isAnonymousAccessActivated()
|
boolean |
isComponentAvailable(String componentId,
String userId)
|
boolean |
isComponentExist(String componentId)
|
boolean |
isComponentManageable(String componentId,
String userId)
|
boolean |
isObjectAvailable(int objectId,
ObjectType objectType,
String componentId,
String userId)
|
boolean |
isSpaceAvailable(String spaceId,
String userId)
|
boolean |
isToolAvailable(String toolId)
|
void |
reloadAdminCache()
|
Group[] |
searchGroups(Group modelGroup,
boolean isAnd)
|
ListSlice<Group> |
searchGroups(GroupsSearchCriteria criteria)
|
String[] |
searchGroupsIds(boolean isRootGroup,
String componentId,
String[] profileId,
Group modelGroup)
|
UserDetail[] |
searchUsers(UserDetail modelUser,
boolean isAnd)
|
ListSlice<UserDetail> |
searchUsers(UserDetailsSearchCriteria criteria)
|
String[] |
searchUsersIds(String groupId,
String componentId,
String[] profileId,
UserDetail filterUser)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OrganizationControllerMockWrapper
public OrganizationControllerMockWrapper()
getMock
public OrganizationController getMock()
- Gets the mock of the OrganizationController class wrapped by this instance.
- Returns:
- an OrganizationController mock.
searchUsersIds
public String[] searchUsersIds(String groupId,
String componentId,
String[] profileId,
UserDetail filterUser)
- Specified by:
searchUsersIds in interface OrganisationController- Overrides:
searchUsersIds in class OrganizationController
searchUsers
public UserDetail[] searchUsers(UserDetail modelUser,
boolean isAnd)
- Specified by:
searchUsers in interface OrganisationController- Overrides:
searchUsers in class OrganizationController
searchUsers
public ListSlice<UserDetail> searchUsers(UserDetailsSearchCriteria criteria)
- Specified by:
searchUsers in interface OrganisationController- Overrides:
searchUsers in class OrganizationController
searchGroups
public ListSlice<Group> searchGroups(GroupsSearchCriteria criteria)
- Specified by:
searchGroups in interface OrganisationController- Overrides:
searchGroups in class OrganizationController
searchGroupsIds
public String[] searchGroupsIds(boolean isRootGroup,
String componentId,
String[] profileId,
Group modelGroup)
- Specified by:
searchGroupsIds in interface OrganisationController- Overrides:
searchGroupsIds in class OrganizationController
searchGroups
public Group[] searchGroups(Group modelGroup,
boolean isAnd)
- Specified by:
searchGroups in interface OrganisationController- Overrides:
searchGroups in class OrganizationController
reloadAdminCache
public void reloadAdminCache()
- Specified by:
reloadAdminCache in interface OrganisationController- Overrides:
reloadAdminCache in class OrganizationController
isSpaceAvailable
public boolean isSpaceAvailable(String spaceId,
String userId)
- Specified by:
isSpaceAvailable in interface OrganisationController- Overrides:
isSpaceAvailable in class OrganizationController
isObjectAvailable
public boolean isObjectAvailable(int objectId,
ObjectType objectType,
String componentId,
String userId)
- Specified by:
isObjectAvailable in interface OrganisationController- Overrides:
isObjectAvailable in class OrganizationController
isComponentManageable
public boolean isComponentManageable(String componentId,
String userId)
- Specified by:
isComponentManageable in interface OrganisationController- Overrides:
isComponentManageable in class OrganizationController
isComponentExist
public boolean isComponentExist(String componentId)
- Specified by:
isComponentExist in interface OrganisationController- Overrides:
isComponentExist in class OrganizationController
isComponentAvailable
public boolean isComponentAvailable(String componentId,
String userId)
- Specified by:
isComponentAvailable in interface OrganisationController- Overrides:
isComponentAvailable in class OrganizationController
isAnonymousAccessActivated
public boolean isAnonymousAccessActivated()
- Specified by:
isAnonymousAccessActivated in interface OrganisationController- Overrides:
isAnonymousAccessActivated in class OrganizationController
getUsersIdsByRoleNames
public String[] getUsersIdsByRoleNames(String componentId,
String objectId,
ObjectType objectType,
List<String> profileNames)
- Specified by:
getUsersIdsByRoleNames in interface OrganisationController- Overrides:
getUsersIdsByRoleNames in class OrganizationController
getUsersIdsByRoleNames
public String[] getUsersIdsByRoleNames(String componentId,
List<String> profileNames)
- Specified by:
getUsersIdsByRoleNames in interface OrganisationController- Overrides:
getUsersIdsByRoleNames in class OrganizationController
getUsers
public UserDetail[] getUsers(String sPrefixTableName,
String sComponentName,
String sProfile)
- Specified by:
getUsers in interface OrganisationController- Overrides:
getUsers in class OrganizationController
getUserProfiles
public String[] getUserProfiles(String userId,
String componentId,
int objectId,
ObjectType objectType)
- Specified by:
getUserProfiles in interface OrganisationController- Overrides:
getUserProfiles in class OrganizationController
getUserObjectProfiles
public Map<Integer,List<String>> getUserObjectProfiles(String userId,
String componentId,
ObjectType objectType)
- Specified by:
getUserObjectProfiles in interface OrganisationController- Overrides:
getUserObjectProfiles in class OrganizationController
getUserProfiles
public String[] getUserProfiles(String userId,
String componentId)
- Specified by:
getUserProfiles in interface OrganisationController- Overrides:
getUserProfiles in class OrganizationController
getUserProfile
public ProfileInst getUserProfile(String profileId)
- Specified by:
getUserProfile in interface OrganisationController- Overrides:
getUserProfile in class OrganizationController
getUserManageableSpaceIds
public String[] getUserManageableSpaceIds(String sUserId)
- Specified by:
getUserManageableSpaceIds in interface OrganisationController- Overrides:
getUserManageableSpaceIds in class OrganizationController
getUserFull
public UserFull getUserFull(String sUserId)
- Specified by:
getUserFull in interface OrganisationController- Overrides:
getUserFull in class OrganizationController
getUserDetails
public UserDetail[] getUserDetails(String[] asUserIds)
- Specified by:
getUserDetails in interface OrganisationController- Overrides:
getUserDetails in class OrganizationController
getUserDetailByDBId
public String getUserDetailByDBId(int id)
- Specified by:
getUserDetailByDBId in interface OrganisationController- Overrides:
getUserDetailByDBId in class OrganizationController
getUserDetail
public UserDetail getUserDetail(String sUserId)
- Specified by:
getUserDetail in interface OrganisationController- Overrides:
getUserDetail in class OrganizationController
getUserDBId
public int getUserDBId(String sUserId)
- Specified by:
getUserDBId in interface OrganisationController- Overrides:
getUserDBId in class OrganizationController
getSubSpacesContainingComponent
public List<SpaceInstLight> getSubSpacesContainingComponent(String spaceId,
String userId,
String componentName)
- Specified by:
getSubSpacesContainingComponent in interface OrganisationController- Overrides:
getSubSpacesContainingComponent in class OrganizationController
getSpaceTreeview
public List<SpaceInstLight> getSpaceTreeview(String userId)
- Specified by:
getSpaceTreeview in interface OrganisationController- Overrides:
getSpaceTreeview in class OrganizationController
getSpacePathToComponent
public List<SpaceInst> getSpacePathToComponent(String componentId)
- Specified by:
getSpacePathToComponent in interface OrganisationController- Overrides:
getSpacePathToComponent in class OrganizationController
getSpacePath
public List<SpaceInst> getSpacePath(String spaceId)
- Specified by:
getSpacePath in interface OrganisationController- Overrides:
getSpacePath in class OrganizationController
getSpaceNames
public String[] getSpaceNames(String[] asSpaceIds)
- Specified by:
getSpaceNames in interface OrganisationController- Overrides:
getSpaceNames in class OrganizationController
getSpaceInstLightById
public SpaceInstLight getSpaceInstLightById(String spaceId)
- Specified by:
getSpaceInstLightById in interface OrganisationController- Overrides:
getSpaceInstLightById in class OrganizationController
getSpaceInstById
public SpaceInst getSpaceInstById(String sSpaceId)
- Specified by:
getSpaceInstById in interface OrganisationController- Overrides:
getSpaceInstById in class OrganizationController
getRootSpacesContainingComponent
public List<SpaceInstLight> getRootSpacesContainingComponent(String userId,
String componentName)
- Specified by:
getRootSpacesContainingComponent in interface OrganisationController- Overrides:
getRootSpacesContainingComponent in class OrganizationController
getRootSpace
public SpaceInstLight getRootSpace(String spaceId)
- Specified by:
getRootSpace in interface OrganisationController- Overrides:
getRootSpace in class OrganizationController
getPathToGroup
public List<String> getPathToGroup(String groupId)
- Specified by:
getPathToGroup in interface OrganisationController- Overrides:
getPathToGroup in class OrganizationController
getGroups
public Group[] getGroups(String[] groupsId)
- Specified by:
getGroups in interface OrganisationController- Overrides:
getGroups in class OrganizationController
getGroup
public Group getGroup(String sGroupId)
- Specified by:
getGroup in interface OrganisationController- Overrides:
getGroup in class OrganizationController
getGeneralSpaceId
public String getGeneralSpaceId()
- Specified by:
getGeneralSpaceId in interface OrganisationController- Overrides:
getGeneralSpaceId in class OrganizationController
getFiltredDirectUsers
public UserDetail[] getFiltredDirectUsers(String sGroupId,
String sUserLastNameFilter)
- Specified by:
getFiltredDirectUsers in interface OrganisationController- Overrides:
getFiltredDirectUsers in class OrganizationController
getDomain
public Domain getDomain(String domainId)
- Specified by:
getDomain in interface OrganisationController- Overrides:
getDomain in class OrganizationController
getDirectGroupIdsOfUser
public String[] getDirectGroupIdsOfUser(String userId)
- Specified by:
getDirectGroupIdsOfUser in interface OrganisationController- Overrides:
getDirectGroupIdsOfUser in class OrganizationController
getComponentParameterValue
public String getComponentParameterValue(String sComponentId,
String parameterName)
- Specified by:
getComponentParameterValue in interface OrganisationController- Overrides:
getComponentParameterValue in class OrganizationController
getComponentInstLight
public ComponentInstLight getComponentInstLight(String sComponentId)
- Specified by:
getComponentInstLight in interface OrganisationController- Overrides:
getComponentInstLight in class OrganizationController
getComponentInst
public ComponentInst getComponentInst(String sComponentId)
- Specified by:
getComponentInst in interface OrganisationController- Overrides:
getComponentInst in class OrganizationController
getComponentIdsForUser
public String[] getComponentIdsForUser(String sUserId,
String sCompoName)
- Specified by:
getComponentIdsForUser in interface OrganisationController- Overrides:
getComponentIdsForUser in class OrganizationController
getCompoId
public String[] getCompoId(String sCompoName)
- Specified by:
getCompoId in interface OrganisationController- Overrides:
getCompoId in class OrganizationController
getCompoForUser
public CompoSpace[] getCompoForUser(String sUserId,
String sCompoName)
- Specified by:
getCompoForUser in interface OrganisationController- Overrides:
getCompoForUser in class OrganizationController
getAvailDriverCompoIds
public String[] getAvailDriverCompoIds(String sClientSpaceId,
String sUserId)
- Specified by:
getAvailDriverCompoIds in interface OrganisationController- Overrides:
getAvailDriverCompoIds in class OrganizationController
getAvailComponentInstLights
public List<ComponentInstLight> getAvailComponentInstLights(String userId,
String componentName)
- Specified by:
getAvailComponentInstLights in interface OrganisationController- Overrides:
getAvailComponentInstLights in class OrganizationController
getAvailCompoIdsAtRoot
public String[] getAvailCompoIdsAtRoot(String sClientSpaceId,
String sUserId)
- Specified by:
getAvailCompoIdsAtRoot in interface OrganisationController- Overrides:
getAvailCompoIdsAtRoot in class OrganizationController
getAvailCompoIds
public String[] getAvailCompoIds(String sClientSpaceId,
String sUserId)
- Specified by:
getAvailCompoIds in interface OrganisationController- Overrides:
getAvailCompoIds in class OrganizationController
getAllowedSubSpaceIds
public String[] getAllowedSubSpaceIds(String userId,
String spaceFatherId)
- Specified by:
getAllowedSubSpaceIds in interface OrganisationController- Overrides:
getAllowedSubSpaceIds in class OrganizationController
getAllowedComponentIds
public String[] getAllowedComponentIds(String userId)
- Specified by:
getAllowedComponentIds in interface OrganisationController- Overrides:
getAllowedComponentIds in class OrganizationController
getAllUsersOfGroup
public UserDetail[] getAllUsersOfGroup(String groupId)
- Specified by:
getAllUsersOfGroup in interface OrganisationController- Overrides:
getAllUsersOfGroup in class OrganizationController
getAllUsersInDomain
public UserDetail[] getAllUsersInDomain(String domainId)
- Specified by:
getAllUsersInDomain in interface OrganisationController- Overrides:
getAllUsersInDomain in class OrganizationController
getAllUsersIds
public String[] getAllUsersIds()
- Specified by:
getAllUsersIds in interface OrganisationController- Overrides:
getAllUsersIds in class OrganizationController
getAllUsers
public UserDetail[] getAllUsers()
- Specified by:
getAllUsers in interface OrganisationController- Overrides:
getAllUsers in class OrganizationController
getAllUsers
public UserDetail[] getAllUsers(String componentId)
- Specified by:
getAllUsers in interface OrganisationController- Overrides:
getAllUsers in class OrganizationController
getAllSubUsersNumber
public int getAllSubUsersNumber(String sGroupId)
- Specified by:
getAllSubUsersNumber in interface OrganisationController- Overrides:
getAllSubUsersNumber in class OrganizationController
getAllSubSpaceIds
public String[] getAllSubSpaceIds(String sSpaceId,
String sUserId)
- Specified by:
getAllSubSpaceIds in interface OrganisationController- Overrides:
getAllSubSpaceIds in class OrganizationController
getAllSubSpaceIds
public String[] getAllSubSpaceIds(String sSpaceId)
- Specified by:
getAllSubSpaceIds in interface OrganisationController- Overrides:
getAllSubSpaceIds in class OrganizationController
getAllSubGroups
public Group[] getAllSubGroups(String parentGroupId)
- Specified by:
getAllSubGroups in interface OrganisationController- Overrides:
getAllSubGroups in class OrganizationController
getAllSpaceIds
public String[] getAllSpaceIds(String sUserId)
- Specified by:
getAllSpaceIds in interface OrganisationController- Overrides:
getAllSpaceIds in class OrganizationController
getAllSpaceIds
public String[] getAllSpaceIds()
- Specified by:
getAllSpaceIds in interface OrganisationController- Overrides:
getAllSpaceIds in class OrganizationController
getAllRootSpaceIds
public String[] getAllRootSpaceIds(String sUserId)
- Specified by:
getAllRootSpaceIds in interface OrganisationController- Overrides:
getAllRootSpaceIds in class OrganizationController
getAllRootSpaceIds
public String[] getAllRootSpaceIds()
- Specified by:
getAllRootSpaceIds in interface OrganisationController- Overrides:
getAllRootSpaceIds in class OrganizationController
getAllRootGroupsInDomain
public Group[] getAllRootGroupsInDomain(String domainId)
- Specified by:
getAllRootGroupsInDomain in interface OrganisationController- Overrides:
getAllRootGroupsInDomain in class OrganizationController
getAllRootGroups
public Group[] getAllRootGroups()
- Specified by:
getAllRootGroups in interface OrganisationController- Overrides:
getAllRootGroups in class OrganizationController
getAllGroups
public Group[] getAllGroups()
- Specified by:
getAllGroups in interface OrganisationController- Overrides:
getAllGroups in class OrganizationController
getAllGroupIdsOfUser
public String[] getAllGroupIdsOfUser(String userId)
- Specified by:
getAllGroupIdsOfUser in interface OrganisationController- Overrides:
getAllGroupIdsOfUser in class OrganizationController
getAllDomains
public Domain[] getAllDomains()
- Specified by:
getAllDomains in interface OrganisationController- Overrides:
getAllDomains in class OrganizationController
getAllComponentsNames
public Map<String,String> getAllComponentsNames()
- Specified by:
getAllComponentsNames in interface OrganisationController- Overrides:
getAllComponentsNames in class OrganizationController
getAllComponents
public Map<String,WAComponent> getAllComponents()
- Specified by:
getAllComponents in interface OrganisationController- Overrides:
getAllComponents in class OrganizationController
getAllComponentIdsRecur
public String[] getAllComponentIdsRecur(String sSpaceId,
String sUserId,
String sComponentRootName,
boolean inCurrentSpace,
boolean inAllSpaces)
- Specified by:
getAllComponentIdsRecur in interface OrganisationController- Overrides:
getAllComponentIdsRecur in class OrganizationController
getAllComponentIdsRecur
public String[] getAllComponentIdsRecur(String sSpaceId)
- Specified by:
getAllComponentIdsRecur in interface OrganisationController- Overrides:
getAllComponentIdsRecur in class OrganizationController
getAllComponentIds
public String[] getAllComponentIds(String sSpaceId)
- Specified by:
getAllComponentIds in interface OrganisationController- Overrides:
getAllComponentIds in class OrganizationController
getAdministratorUserIds
public String[] getAdministratorUserIds(String fromUserId)
- Specified by:
getAdministratorUserIds in interface OrganisationController- Overrides:
getAdministratorUserIds in class OrganizationController
isToolAvailable
public boolean isToolAvailable(String toolId)
- Specified by:
isToolAvailable in interface OrganisationController- Overrides:
isToolAvailable in class OrganizationController
Copyright © 2016 Silverpeas. All Rights Reserved.