public class UserPage extends Object implements Page, ACLAmetysObject
Page.LinkType, Page.PageType| Modifier and Type | Field and Description |
|---|---|
private static String |
__USER_PAGE_TEMPLATE |
private int |
_initialDepth |
private String |
_path |
private AmetysObjectResolver |
_resolver |
private Page |
_root |
private SkinsManager |
_skinsManager |
private Content |
_syncContent |
private SynchronizableContentsCollectionDAO |
_syncContentsCollectionDAO |
private String |
_title |
private UserDirectoryPageHandler |
_userDirectoryPageHandler |
| Constructor and Description |
|---|
UserPage(Page root,
Content syncContent,
String path,
AmetysObjectResolver resolver,
UserDirectoryPageHandler userDirectoryPageHandler,
SynchronizableContentsCollectionDAO syncContentsCollectionDAO,
SkinsManager skinsManager)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
private List<String> |
_getCollectionIds() |
private boolean |
_isContentRestricted(String metadataPath) |
Set<GroupIdentity> |
getAllowedGroups(String profileId)
Gets the groups that have the given allowed profile on this ametys object
|
Set<String> |
getAllowedProfilesForAnonymous()
Gets the allowed profiles an anonymous user has on this ametys object
|
Set<String> |
getAllowedProfilesForAnyConnectedUser()
Gets the allowed profiles any connected user has on this ametys object
|
Map<GroupIdentity,Set<String>> |
getAllowedProfilesForGroups()
Gets the groups that have allowed profiles assigned on this ametys object
|
Set<String> |
getAllowedProfilesForUser(UserIdentity user)
Gets the allowed profiles assigned on this ametys object for this user
|
Map<UserIdentity,Set<String>> |
getAllowedProfilesForUsers()
Gets the users that have allowed profiles assigned on this ametys object
|
Set<UserIdentity> |
getAllowedUsers(String profileId)
Gets the users that have the given allowed profile on this ametys object
|
<A extends AmetysObject> |
getChild(String path)
Retrieves a given child from its relative path.
|
Page |
getChildPageAt(int index)
Gets the child
Page at the given position |
AmetysObjectIterable<? extends AmetysObject> |
getChildren()
Retrieves children of the current object.
|
AmetysObjectIterable<? extends Page> |
getChildrenPages()
Retrieves child pages.
|
AmetysObjectIterable<? extends Page> |
getChildrenPages(boolean includeInvisiblePage)
Retrieves child pages.
|
Set<GroupIdentity> |
getDeniedGroups(String profileId)
Gets the groups that have the given allowed profile on this ametys object
|
Set<String> |
getDeniedProfilesForAnonymous()
Gets the denied profiles an anonymous user has on this ametys object
|
Set<String> |
getDeniedProfilesForAnyConnectedUser()
Gets the denied profiles any connected user has on this ametys object
|
Map<GroupIdentity,Set<String>> |
getDeniedProfilesForGroups()
Gets the groups that have allowed profiles assigned on this ametys object
|
Set<String> |
getDeniedProfilesForUser(UserIdentity user)
Gets the denied profiles assigned on this ametys object for this user
|
Map<UserIdentity,Set<String>> |
getDeniedProfilesForUsers()
Gets the users that have denied profiles assigned on this ametys object
|
Set<UserIdentity> |
getDeniedUsers(String profileId)
Gets the users that have the given denied profile on this ametys object
|
int |
getDepth()
Get the page depth
|
String |
getId()
Retrieves the unique identifier of this AmetysObject.
It must be unique in the whole repository and must never be null. It must conform to the URI syntax: <protocol>://<protocol-specific-part> |
static String |
getId(String path,
String rootId,
String contentId)
Compute a page id
|
String |
getLongTitle()
Retrieves the long title.
|
CompositeMetadata |
getMetadataHolder()
Returns the root
CompositeMetadata of this AmetysObject. |
String |
getName()
Retrieves the name of the current object.
|
Page |
getParent()
Returns the parent object in the Ametys hierarchy.
|
String |
getParentPath()
Returns the path of the parent object in the Ametys hierarchy.
|
String |
getPath()
Retrieves the path of the current object.
|
String |
getPathInSitemap()
Computes the path relative to the current sitemap.
|
Set<String> |
getReferers()
Retrieves all
AmetysObject ids referencing this page. |
ResourceCollection |
getRootAttachments()
Retrieves the attachments root node
|
Site |
getSite()
Returns this object's site.
|
Sitemap |
getSitemap()
Retrieves the sitemap containing the current sitemap.
|
String |
getSitemapName()
Returns this page's sitemap name
|
String |
getSiteName()
Returns this object's site name.
|
Content |
getSyncContent()
Returns the associated synchronizable
Content. |
Set<String> |
getTags()
Retrieves current tags.
|
String |
getTemplate()
Retrieves the template name.
|
String |
getTitle()
Retrieves the title.
|
Page.PageType |
getType()
Retrieves the type.
|
String |
getURL()
Retrieves the linked URL.
|
Page.LinkType |
getURLType()
Retrieves the linked URL type.
|
Zone |
getZone(String name)
Retrieves a given zone.
|
AmetysObjectIterable<? extends Zone> |
getZones()
Retrieves the zones.
|
boolean |
hasChild(String name)
Tests if this Object has at least one child with the given name.
|
boolean |
hasZone(String name)
Determine if a zone exists
|
boolean |
isVisible()
Determine if the page is visible into navigation elements
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChildAt, getChildPositionequals, hashCodeprivate static final String __USER_PAGE_TEMPLATE
private int _initialDepth
private AmetysObjectResolver _resolver
private UserDirectoryPageHandler _userDirectoryPageHandler
private SynchronizableContentsCollectionDAO _syncContentsCollectionDAO
private SkinsManager _skinsManager
private Content _syncContent
public UserPage(Page root, Content syncContent, String path, AmetysObjectResolver resolver, UserDirectoryPageHandler userDirectoryPageHandler, SynchronizableContentsCollectionDAO syncContentsCollectionDAO, SkinsManager skinsManager)
root - the root page.syncContent - the synchronized contentpath - the pathresolver - the AmetysObjectResolver.userDirectoryPageHandler - the user directory page handlersyncContentsCollectionDAO - The DAO for synchronizable collectionsskinsManager - the skins managerpublic static String getId(String path, String rootId, String contentId)
path - The pathrootId - The root page idcontentId - The content idpublic Content getSyncContent()
Content.Content.public int getDepth() throws AmetysRepositoryException
PagegetDepth in interface PageAmetysRepositoryException - if an error occurs.public Set<String> getReferers() throws AmetysRepositoryException
PageAmetysObject ids referencing this page.getReferers in interface PageAmetysObject ids referencing this page.AmetysRepositoryException - if an error occurs.public ResourceCollection getRootAttachments() throws AmetysRepositoryException
PagegetRootAttachments in interface PageAmetysRepositoryException - if an error occurs.public String getTemplate() throws AmetysRepositoryException
PagegetTemplate in interface Pagenull if none has
been set.AmetysRepositoryException - if an error occurs.public String getTitle() throws AmetysRepositoryException
PagegetTitle in interface PageAmetysRepositoryException - if an error occurs.public String getLongTitle() throws AmetysRepositoryException
PagegetLongTitle in interface PageAmetysRepositoryException - if an error occurs.public Page.PageType getType() throws AmetysRepositoryException
PagegetType in interface PageAmetysRepositoryException - if an error occurs.Page.PageTypepublic String getURL() throws AmetysRepositoryException
PagegetURL in interface PageAmetysRepositoryException - if an error occurs.public Page.LinkType getURLType() throws AmetysRepositoryException
PagegetURLType in interface PageAmetysRepositoryException - if an error occurs.public Zone getZone(String name) throws UnknownZoneException, AmetysRepositoryException
PagegetZone in interface Pagename - the name of the zone.UnknownZoneException - if there is no zone for the given name.AmetysRepositoryException - if an error occurs.public AmetysObjectIterable<? extends Zone> getZones() throws AmetysRepositoryException
PagegetZones in interface PageAmetysRepositoryException - if an error occurs.public boolean hasZone(String name) throws AmetysRepositoryException
PagehasZone in interface Pagename - The name of the zoneAmetysRepositoryException - If an error occuredpublic AmetysObjectIterable<? extends Page> getChildrenPages() throws AmetysRepositoryException
PagesContainergetChildrenPages in interface PagesContainerAmetysRepositoryException - if an error occurs.public String getPathInSitemap() throws AmetysRepositoryException
PagesContainergetPathInSitemap in interface PagesContainerAmetysRepositoryException - if an error occurs.public Site getSite() throws AmetysRepositoryException
SiteAwareAmetysObjectgetSite in interface SiteAwareAmetysObjectAmetysRepositoryException - if an error occurs.public String getSiteName() throws AmetysRepositoryException
SiteAwareAmetysObjectgetSiteName in interface SiteAwareAmetysObjectAmetysRepositoryException - if an error occurs.public Sitemap getSitemap() throws AmetysRepositoryException
PagesContainergetSitemap in interface PagesContainerAmetysRepositoryException - if an error occurs.public String getSitemapName() throws AmetysRepositoryException
PagesContainergetSitemapName in interface PagesContainerAmetysRepositoryException - if an error occurs.public <A extends AmetysObject> A getChild(String path) throws AmetysRepositoryException, UnknownAmetysObjectException
TraversableAmetysObjectnull, empty nor begin with a '/'.getChild in interface TraversableAmetysObjectA - the actual type of AmetysObject.path - the path of the child which can contains a position with.
[n] if same name sibling is allowed.AmetysRepositoryException - if an error occurs.UnknownAmetysObjectException - if the object does not exist.public AmetysObjectIterable<? extends AmetysObject> getChildren() throws AmetysRepositoryException
TraversableAmetysObjectgetChildren in interface TraversableAmetysObjectAmetysObjectIterable.AmetysRepositoryException - if an error occurs.public boolean hasChild(String name) throws AmetysRepositoryException
TraversableAmetysObjecthasChild in interface TraversableAmetysObjectname - the name to test. Cannot be null nor empty nor
begin with a '/' and it cannot contain '/'.true if the named child exists,
false otherwise.AmetysRepositoryException - if an error occurs.public String getId() throws AmetysRepositoryException
AmetysObject<protocol>://<protocol-specific-part>getId in interface AmetysObjectAmetysRepositoryException - if an error occurs.public String getName() throws AmetysRepositoryException
AmetysObjectgetName in interface AmetysObjectAmetysRepositoryException - if an error occurs.public Page getParent() throws AmetysRepositoryException
AmetysObjectgetParent in interface AmetysObjectnull if current object
is the root.AmetysRepositoryException - if an error occurs.public String getParentPath() throws AmetysRepositoryException
AmetysObjectgetParentPath in interface AmetysObjectAmetysRepositoryException - if an error occurs.public String getPath() throws AmetysRepositoryException
AmetysObjectgetPath in interface AmetysObjectAmetysRepositoryException - if an error occurs.public CompositeMetadata getMetadataHolder()
MetadataAwareAmetysObjectCompositeMetadata of this AmetysObject.getMetadataHolder in interface MetadataAwareAmetysObjectCompositeMetadata of this AmetysObjectpublic Set<String> getTags() throws AmetysRepositoryException
TagAwareAmetysObjectgetTags in interface TagAwareAmetysObjectAmetysRepositoryException - if an error occurs.public AmetysObjectIterable<? extends Page> getChildrenPages(boolean includeInvisiblePage) throws AmetysRepositoryException
PagesContainergetChildrenPages in interface PagesContainerincludeInvisiblePage - true to include invisible pagesAmetysRepositoryException - if an error occurs.public boolean isVisible() throws AmetysRepositoryException
PageisVisible in interface PageAmetysRepositoryException - if an error occurs.public Page getChildPageAt(int index) throws UnknownAmetysObjectException, AmetysRepositoryException
PagesContainerPage at the given positiongetChildPageAt in interface PagesContainerindex - the position of the Page within the ordered set of its sibling objects.Page if foundUnknownAmetysObjectException - if no child page was found at this positionAmetysRepositoryException - if an error occurspublic Set<String> getAllowedProfilesForAnyConnectedUser()
ACLAmetysObjectgetAllowedProfilesForAnyConnectedUser in interface ACLAmetysObjectpublic Set<String> getDeniedProfilesForAnyConnectedUser()
ACLAmetysObjectgetDeniedProfilesForAnyConnectedUser in interface ACLAmetysObjectpublic Set<String> getAllowedProfilesForAnonymous()
ACLAmetysObjectgetAllowedProfilesForAnonymous in interface ACLAmetysObjectpublic Set<String> getDeniedProfilesForAnonymous()
ACLAmetysObjectgetDeniedProfilesForAnonymous in interface ACLAmetysObjectpublic Set<String> getAllowedProfilesForUser(UserIdentity user)
ACLAmetysObjectgetAllowedProfilesForUser in interface ACLAmetysObjectuser - The user identitypublic Map<UserIdentity,Set<String>> getAllowedProfilesForUsers()
ACLAmetysObjectgetAllowedProfilesForUsers in interface ACLAmetysObjectpublic Set<UserIdentity> getAllowedUsers(String profileId)
ACLAmetysObjectgetAllowedUsers in interface ACLAmetysObjectprofileId - The id of the profilepublic Map<GroupIdentity,Set<String>> getAllowedProfilesForGroups()
ACLAmetysObjectgetAllowedProfilesForGroups in interface ACLAmetysObjectpublic Set<GroupIdentity> getAllowedGroups(String profileId)
ACLAmetysObjectgetAllowedGroups in interface ACLAmetysObjectprofileId - The id of the profilepublic Set<String> getDeniedProfilesForUser(UserIdentity user)
ACLAmetysObjectgetDeniedProfilesForUser in interface ACLAmetysObjectuser - The user identitypublic Map<UserIdentity,Set<String>> getDeniedProfilesForUsers()
ACLAmetysObjectgetDeniedProfilesForUsers in interface ACLAmetysObjectpublic Set<UserIdentity> getDeniedUsers(String profileId)
ACLAmetysObjectgetDeniedUsers in interface ACLAmetysObjectprofileId - The id of the profilepublic Map<GroupIdentity,Set<String>> getDeniedProfilesForGroups()
ACLAmetysObjectgetDeniedProfilesForGroups in interface ACLAmetysObjectpublic Set<GroupIdentity> getDeniedGroups(String profileId)
ACLAmetysObjectgetDeniedGroups in interface ACLAmetysObjectprofileId - The id of the profileprivate boolean _isContentRestricted(String metadataPath)
private List<String> _getCollectionIds() throws AmetysRepositoryException
AmetysRepositoryException