F - the actual type of factory.public class DefaultTraversableAmetysObject<F extends DefaultTraversableAmetysObjectFactory> extends SimpleAmetysObject<F> implements JCRTraversableAmetysObject, ModifiableACLAmetysObject
TraversableAmetysObject, backed by a JCR node.DefaultTraversableAmetysObjectFactory counterpart.| Modifier and Type | Field and Description |
|---|---|
private DefaultTraversableAmetysObjectFactory |
_traversableFactory |
| Constructor and Description |
|---|
DefaultTraversableAmetysObject(Node node,
String parentPath,
F factory)
Creates a DefaultTraversableAmetysObject.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAllowedGroups(Set<GroupIdentity> groups,
String profileId)
Associates some groups with an allowed profile on this ametys object
|
void |
addAllowedProfilesForAnonymous(Set<String> profileIds)
Adds allowed profiles an anonymous user has on this ametys object
|
void |
addAllowedProfilesForAnyConnectedUser(Set<String> profileIds)
Adds allowed profiles any connected user has on this ametys object
|
void |
addAllowedUsers(Set<UserIdentity> users,
String profileId)
Associates some users with an allowed profile on this ametys object
|
void |
addDeniedGroups(Set<GroupIdentity> groups,
String profileId)
Associates some groups with an allowed profile on this ametys object
|
void |
addDeniedProfilesForAnonymous(Set<String> profileIds)
Adds denied profiles an anonymous user has on this ametys object
|
void |
addDeniedProfilesForAnyConnectedUser(Set<String> profileIds)
Adds denied profiles any connected user has on this ametys object
|
void |
addDeniedUsers(Set<UserIdentity> users,
String profileId)
Associates some users with a denied profile on this ametys object
|
<A extends AmetysObject> |
createChild(String name,
String type)
Creates a child below current object.
|
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.
|
<A extends AmetysObject> |
getChildren()
Retrieves children of the current object.
|
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
|
boolean |
hasChild(String name)
Tests if this Object has at least one child with the given name.
|
void |
removeAllowedGroups(Set<GroupIdentity> groups)
Removes the association between some groups and all allowed profiles on this ametys object
|
void |
removeAllowedGroups(Set<GroupIdentity> groups,
String profileId)
Removes the association between some groups and an allowed profile on this ametys object
|
void |
removeAllowedProfilesForAnonymous(Set<String> profileIds)
Removes allowed profiles an anonymous user has on this ametys object
|
void |
removeAllowedProfilesForAnyConnectedUser(Set<String> profileIds)
Removes allowed profiles any connected user has on this ametys object
|
void |
removeAllowedUsers(Set<UserIdentity> users)
Removes the association between some users and all allowed profiles on this ametys object
|
void |
removeAllowedUsers(Set<UserIdentity> users,
String profileId)
Removes the association between some users and an allowed profile on this ametys object
|
void |
removeDeniedGroups(Set<GroupIdentity> groups)
Removes the association between some groups and all allowed profiles on this ametys object
|
void |
removeDeniedGroups(Set<GroupIdentity> groups,
String profileId)
Removes the association between some groups and an allowed profile on this ametys object
|
void |
removeDeniedProfilesForAnonymous(Set<String> profileIds)
Removes denied profiles an anonymous user has on this ametys object
|
void |
removeDeniedProfilesForAnyConnectedUser(Set<String> profileIds)
Removes denied profiles any connected user has on this ametys object
|
void |
removeDeniedUsers(Set<UserIdentity> users)
Removes the association between some users and all denied profiles on this ametys object
|
void |
removeDeniedUsers(Set<UserIdentity> users,
String profileId)
Removes the association between some users and an denied profile on this ametys object
|
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChangesequals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetNodegetMetadataHolderneedsSave, rename, revertChanges, saveChangesequals, getId, getName, getParent, getParentPath, getPath, hashCoderemovegetChildAt, getChildPositionprivate DefaultTraversableAmetysObjectFactory _traversableFactory
public DefaultTraversableAmetysObject(Node node, String parentPath, F factory)
node - the node backing this AmetysObject.parentPath - the parent path in the Ametys hierarchy.factory - the DefaultTraversableAmetysObjectFactory which creates the AmetysObject.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 <A extends AmetysObject> A createChild(String name, String type) throws AmetysRepositoryException, RepositoryIntegrityViolationException
ModifiableTraversableAmetysObjectcreateChild in interface ModifiableTraversableAmetysObjectA - the actual type of AmetysObject.name - the name of the child, position ([n]) are not supported for
same name sibling, the child will be added at the end of the children list.type - the type of the object.AmetysRepositoryException - if an error occurs.RepositoryIntegrityViolationException - if an object with the same name already
exists and same name siblings is not allowed.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 <A extends AmetysObject> AmetysObjectIterable<A> getChildren() throws AmetysRepositoryException
TraversableAmetysObjectgetChildren in interface TraversableAmetysObjectA - the actual type of AmetysObjects.AmetysObjectIterable.AmetysRepositoryException - if an error occurs.public Set<String> getAllowedProfilesForAnyConnectedUser()
ACLAmetysObjectgetAllowedProfilesForAnyConnectedUser in interface ACLAmetysObjectpublic void addAllowedProfilesForAnyConnectedUser(Set<String> profileIds)
ModifiableACLAmetysObjectaddAllowedProfilesForAnyConnectedUser in interface ModifiableACLAmetysObjectprofileIds - The profiles to addpublic void removeAllowedProfilesForAnyConnectedUser(Set<String> profileIds)
ModifiableACLAmetysObjectremoveAllowedProfilesForAnyConnectedUser in interface ModifiableACLAmetysObjectprofileIds - The profiles to removepublic Set<String> getDeniedProfilesForAnyConnectedUser()
ACLAmetysObjectgetDeniedProfilesForAnyConnectedUser in interface ACLAmetysObjectpublic void addDeniedProfilesForAnyConnectedUser(Set<String> profileIds)
ModifiableACLAmetysObjectaddDeniedProfilesForAnyConnectedUser in interface ModifiableACLAmetysObjectprofileIds - The profiles to addpublic void removeDeniedProfilesForAnyConnectedUser(Set<String> profileIds)
ModifiableACLAmetysObjectremoveDeniedProfilesForAnyConnectedUser in interface ModifiableACLAmetysObjectprofileIds - The profiles to removepublic Set<String> getAllowedProfilesForAnonymous()
ACLAmetysObjectgetAllowedProfilesForAnonymous in interface ACLAmetysObjectpublic void addAllowedProfilesForAnonymous(Set<String> profileIds)
ModifiableACLAmetysObjectaddAllowedProfilesForAnonymous in interface ModifiableACLAmetysObjectprofileIds - The profiles to addpublic void removeAllowedProfilesForAnonymous(Set<String> profileIds)
ModifiableACLAmetysObjectremoveAllowedProfilesForAnonymous in interface ModifiableACLAmetysObjectprofileIds - The profiles to removepublic Set<String> getDeniedProfilesForAnonymous()
ACLAmetysObjectgetDeniedProfilesForAnonymous in interface ACLAmetysObjectpublic void addDeniedProfilesForAnonymous(Set<String> profileIds)
ModifiableACLAmetysObjectaddDeniedProfilesForAnonymous in interface ModifiableACLAmetysObjectprofileIds - The profiles to addpublic void removeDeniedProfilesForAnonymous(Set<String> profileIds)
ModifiableACLAmetysObjectremoveDeniedProfilesForAnonymous in interface ModifiableACLAmetysObjectprofileIds - The profiles to removepublic 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 void addAllowedUsers(Set<UserIdentity> users, String profileId)
ModifiableACLAmetysObjectaddAllowedUsers in interface ModifiableACLAmetysObjectusers - The users to addprofileId - The id of the profilepublic void removeAllowedUsers(Set<UserIdentity> users, String profileId)
ModifiableACLAmetysObjectremoveAllowedUsers in interface ModifiableACLAmetysObjectusers - The users to removeprofileId - The id of the profilepublic void removeAllowedUsers(Set<UserIdentity> users)
ModifiableACLAmetysObjectremoveAllowedUsers in interface ModifiableACLAmetysObjectusers - The users to removepublic Map<GroupIdentity,Set<String>> getAllowedProfilesForGroups()
ACLAmetysObjectgetAllowedProfilesForGroups in interface ACLAmetysObjectpublic Set<GroupIdentity> getAllowedGroups(String profileId)
ACLAmetysObjectgetAllowedGroups in interface ACLAmetysObjectprofileId - The id of the profilepublic void addAllowedGroups(Set<GroupIdentity> groups, String profileId)
ModifiableACLAmetysObjectaddAllowedGroups in interface ModifiableACLAmetysObjectgroups - The groups to addprofileId - The id of the profilepublic void removeAllowedGroups(Set<GroupIdentity> groups, String profileId)
ModifiableACLAmetysObjectremoveAllowedGroups in interface ModifiableACLAmetysObjectgroups - The groups to removeprofileId - The id of the profilepublic void removeAllowedGroups(Set<GroupIdentity> groups)
ModifiableACLAmetysObjectremoveAllowedGroups in interface ModifiableACLAmetysObjectgroups - The groups to removepublic 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 void addDeniedUsers(Set<UserIdentity> users, String profileId)
ModifiableACLAmetysObjectaddDeniedUsers in interface ModifiableACLAmetysObjectusers - The users to addprofileId - The id of the profilepublic void removeDeniedUsers(Set<UserIdentity> users, String profileId)
ModifiableACLAmetysObjectremoveDeniedUsers in interface ModifiableACLAmetysObjectusers - The users to removeprofileId - The id of the profilepublic void removeDeniedUsers(Set<UserIdentity> users)
ModifiableACLAmetysObjectremoveDeniedUsers in interface ModifiableACLAmetysObjectusers - The users to removepublic Map<GroupIdentity,Set<String>> getDeniedProfilesForGroups()
ACLAmetysObjectgetDeniedProfilesForGroups in interface ACLAmetysObjectpublic Set<GroupIdentity> getDeniedGroups(String profileId)
ACLAmetysObjectgetDeniedGroups in interface ACLAmetysObjectprofileId - The id of the profilepublic void addDeniedGroups(Set<GroupIdentity> groups, String profileId)
ModifiableACLAmetysObjectaddDeniedGroups in interface ModifiableACLAmetysObjectgroups - The groups to addprofileId - The id of the profilepublic void removeDeniedGroups(Set<GroupIdentity> groups, String profileId)
ModifiableACLAmetysObjectremoveDeniedGroups in interface ModifiableACLAmetysObjectgroups - The groups to removeprofileId - The id of the profilepublic void removeDeniedGroups(Set<GroupIdentity> groups)
ModifiableACLAmetysObjectremoveDeniedGroups in interface ModifiableACLAmetysObjectgroups - The groups to remove