com.silverpeas.web.mock
Class UserDetailWithProfiles

java.lang.Object
  extended by com.stratelia.webactiv.beans.admin.UserDetail
      extended by com.silverpeas.web.mock.UserDetailWithProfiles
All Implemented Interfaces:
Serializable, Comparable<UserDetail>

public class UserDetailWithProfiles
extends UserDetail

Author:
emmanuel.hugonnet@silverpeas.org
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.stratelia.webactiv.beans.admin.UserDetail
CURRENT_REQUESTER_KEY
 
Constructor Summary
UserDetailWithProfiles()
           
 
Method Summary
 void addProfile(String componentId, SilverpeasRole profile)
          Adds a new profile for tests.
 void addProfiles(String componentId, List<SilverpeasRole> roles)
          Defines the profiles for tests.
 void clearAll()
          Clears all of the data used in tests.
 String[] getAccessibleComponentIds()
          Gets the identifier of the Silverpeas components this user can access.
 String[] getUserProfiles(String componentId)
           
 
Methods inherited from class com.stratelia.webactiv.beans.admin.UserDetail
compareTo, equals, getAccessLevel, getAll, getAllInDomain, getAnonymousUser, getAnonymousUserId, getAvatar, getAvatarFileName, getById, getCreationDate, getCurrentRequester, getDisplayedName, getDomain, getDomainId, getDurationOfCurrentSession, geteMail, getExpirationDate, getFirstName, getId, getLastLoginCredentialUpdateDate, getLastLoginDate, getLastName, getLogin, getLoginAnswer, getLoginQuestion, getNbSuccessfulLoginAttempts, getNotifManualReceiverLimit, getOrganisationController, getSaveDate, getSmallAvatar, getSpecificId, getState, getStateSaveDate, getStatus, getTosAcceptanceDate, getUserManualNotificationUserReceiverLimitValue, getUserPreferences, getVersion, hashCode, isAccessAdmin, isAccessDomainManager, isAccessGuest, isAccessPdcManager, isAccessSpaceManager, isAccessUnknown, isAccessUser, isActivatedState, isActivatedStateFor, isAnonymous, isAnonymousUser, isAnonymousUserExist, isAvatarPersonnalized, isBackOfficeVisible, isBlockedState, isConnected, isDeactivatedState, isDeletedState, isDomainAdminRestricted, isDomainRestricted, isExpiredState, isFullyDefined, isInRelationWithOrInvitedBy, isUserManualNotificationUserReceiverLimit, isValidState, setAccessLevel, setCreationDate, setDomainId, seteMail, setExpirationDate, setFirstName, setId, setLastLoginCredentialUpdateDate, setLastLoginDate, setLastName, setLogin, setLoginAnswer, setLoginQuestion, setNbSuccessfulLoginAttempts, setNotifManualReceiverLimit, setSaveDate, setSpecificId, setState, setStateSaveDate, setTosAcceptanceDate, setUserManualNotificationUserReceiverLimit, setVersion, traceUser
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserDetailWithProfiles

public UserDetailWithProfiles()
Method Detail

addProfile

public void addProfile(String componentId,
                       SilverpeasRole profile)
Adds a new profile for tests.

Parameters:
componentId -
profile -

addProfiles

public void addProfiles(String componentId,
                        List<SilverpeasRole> roles)
Defines the profiles for tests.

Parameters:
componentId -
roles -

clearAll

public void clearAll()
Clears all of the data used in tests.


getUserProfiles

public String[] getUserProfiles(String componentId)

getAccessibleComponentIds

public String[] getAccessibleComponentIds()
Gets the identifier of the Silverpeas components this user can access. A user can access a given component when it plays a defined role in this component; if it has a profile defined for this component.

Returns:
an array with the identifier of all of its accessible components.


Copyright © 2016 Silverpeas. All Rights Reserved.