Class PerspectiveHandler
java.lang.Object
com.orchestranetworks.ui.perspective.PerspectiveHandler
An instance of this class offers methods to retrieve the perspectives defined in the current
repository.
- Since:
- 6.0.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns all activated perspectives.Returns the advanced perspective.Returns a list of all defined perspectives.getCurrentPerspective
(boolean lookupInParentSession) Returns the perspective applied in the current session, or recursively in parent if lookupInParentSession is true.Returns the favorite perspective for a given user.getPerspective
(String aPerspectiveName) Returns the perspective for the given name.getPerspectives
(Profile aProfile) Returns all activated and allowed perspectives for a given profile.Returns the perspective to apply.Returns the recommended perspective for a given user.static PerspectiveHandler
newInstance
(Repository repository, Session aSession) Returns a new instance of the perspective handler.
-
Method Details
-
newInstance
Returns a new instance of the perspective handler. -
getAllPerspectives
Returns a list of all defined perspectives.- If session's locale exists, the list will be sorted by localized label.
- If session's locale is null, returns a non-sorted list.
-
getActivatedPerspectives
Returns all activated perspectives. -
getPerspectives
Returns all activated and allowed perspectives for a given profile.- Parameters:
aProfile
- identifies a user profile.
-
getRecommendedPerspective
Returns the recommended perspective for a given user. Returnsnull
if:- The user has no recommended perspective.
- The recommended perspective is disabled for the user.
- The recommended perspective is not allowed for the user's profile.
- Parameters:
aUser
- identifies a specific user.
-
getFavoritePerspective
Returns the favorite perspective for a given user. Returnsnull
if:- The user has no favorite perspective.
- the user's favorite perspective is disabled.
- the user's favorite perspective is not allowed for their profile.
- Parameters:
aUser
- identifies a specific user.
-
getPerspectiveToApply
Returns the perspective to apply.- Returns the favorite perspective for a given user.
- If the user has no favorite perspective, returns the recommended perspective.
- If there is no recommended perspective for a given user, returns the first available perspective for the given user.
- Parameters:
aUser
- identifies a specific user.- See Also:
-
getAdvancedPerspective
Returns the advanced perspective. -
getPerspective
Returns the perspective for the given name. Returnsnull
if no perspective is found. -
getCurrentPerspective
Returns the perspective applied in the current session, or recursively in parent if lookupInParentSession is true.- If the current session is the root session, always returns a perspective. As a last resort, the advanced perspective may be returned even if the user is not allowed to access it.
- If the current session is a sub session and lookupInParentSession is true, always returns a perspective. As a last resort, the advanced perspective may be returned even if the user is not allowed to access it.
- If the current session is a sub-session and
lookupInParentSession
is false, may returnnull
.
-