Class SubscriptionContext
- java.lang.Object
-
- org.silverpeas.core.web.subscription.SubscriptionContext
-
public class SubscriptionContext extends Object
User: Yohann Chastagnier Date: 04/03/13
-
-
Constructor Summary
Constructors Constructor Description SubscriptionContext(UserDetail user, UserPreferences userPreferences)
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubscriptionContext
atLocation(Location location)
Indicates the location from which the context is initialized.String
getDestinationUrl()
Optional<Location>
getLocation()
Collection<SubscriptionResourcePath>
getPath()
SubscriptionResource
getResource()
UserDetail
getUser()
SubscriptionContext
initialize(SubscriptionResource resource)
Initializing all context data excepted ones of the user.SubscriptionContext
withNodePath(Collection<NodeDetail> nodePath)
Indicates the node path of the resource as subscription side.SubscriptionContext
withPath(Collection<SubscriptionResourcePath> path)
Indicates the path of the resource as subscription side.
-
-
-
Constructor Detail
-
SubscriptionContext
public SubscriptionContext(UserDetail user, UserPreferences userPreferences)
Default constructor
-
-
Method Detail
-
initialize
public SubscriptionContext initialize(SubscriptionResource resource)
Initializing all context data excepted ones of the user.- Parameters:
resource
- a subscription resource- Returns:
- itself.
-
atLocation
public SubscriptionContext atLocation(Location location)
Indicates the location from which the context is initialized.- Parameters:
location
- aLocation
instance.- Returns:
- itself.
-
withNodePath
public SubscriptionContext withNodePath(Collection<NodeDetail> nodePath)
Indicates the node path of the resource as subscription side.- Parameters:
nodePath
- a collection ofNodeDetail
representing a path.- Returns:
- itself.
-
withPath
public SubscriptionContext withPath(Collection<SubscriptionResourcePath> path)
Indicates the path of the resource as subscription side.- Parameters:
path
- a collection ofSubscriptionResourcePath
.- Returns:
- itself.
-
getUser
public UserDetail getUser()
- Returns:
- the current user.
-
getResource
public SubscriptionResource getResource()
- Returns:
- the resource aimed by the subscription.
-
getLocation
public Optional<Location> getLocation()
- Returns:
- the location from which the context is initialized.
-
getPath
public Collection<SubscriptionResourcePath> getPath()
- Returns:
- the path aimed by the subscription. (Path for browse bar)
-
getDestinationUrl
public String getDestinationUrl()
- Returns:
- the destination URL.
-
-