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, saveChanges
equals, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getNode
getMetadataHolder
needsSave, rename, revertChanges, saveChanges
equals, getId, getName, getParent, getParentPath, getPath, hashCode
remove
getChildAt, getChildPosition
private 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
TraversableAmetysObject
hasChild
in interface TraversableAmetysObject
name
- 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
ModifiableTraversableAmetysObject
createChild
in interface ModifiableTraversableAmetysObject
A
- 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
TraversableAmetysObject
null
, empty nor begin with a '/'
.getChild
in interface TraversableAmetysObject
A
- 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
TraversableAmetysObject
getChildren
in interface TraversableAmetysObject
A
- the actual type of AmetysObject
s.AmetysObjectIterable
.AmetysRepositoryException
- if an error occurs.public Set<String> getAllowedProfilesForAnyConnectedUser()
ACLAmetysObject
getAllowedProfilesForAnyConnectedUser
in interface ACLAmetysObject
public void addAllowedProfilesForAnyConnectedUser(Set<String> profileIds)
ModifiableACLAmetysObject
addAllowedProfilesForAnyConnectedUser
in interface ModifiableACLAmetysObject
profileIds
- The profiles to addpublic void removeAllowedProfilesForAnyConnectedUser(Set<String> profileIds)
ModifiableACLAmetysObject
removeAllowedProfilesForAnyConnectedUser
in interface ModifiableACLAmetysObject
profileIds
- The profiles to removepublic Set<String> getDeniedProfilesForAnyConnectedUser()
ACLAmetysObject
getDeniedProfilesForAnyConnectedUser
in interface ACLAmetysObject
public void addDeniedProfilesForAnyConnectedUser(Set<String> profileIds)
ModifiableACLAmetysObject
addDeniedProfilesForAnyConnectedUser
in interface ModifiableACLAmetysObject
profileIds
- The profiles to addpublic void removeDeniedProfilesForAnyConnectedUser(Set<String> profileIds)
ModifiableACLAmetysObject
removeDeniedProfilesForAnyConnectedUser
in interface ModifiableACLAmetysObject
profileIds
- The profiles to removepublic Set<String> getAllowedProfilesForAnonymous()
ACLAmetysObject
getAllowedProfilesForAnonymous
in interface ACLAmetysObject
public void addAllowedProfilesForAnonymous(Set<String> profileIds)
ModifiableACLAmetysObject
addAllowedProfilesForAnonymous
in interface ModifiableACLAmetysObject
profileIds
- The profiles to addpublic void removeAllowedProfilesForAnonymous(Set<String> profileIds)
ModifiableACLAmetysObject
removeAllowedProfilesForAnonymous
in interface ModifiableACLAmetysObject
profileIds
- The profiles to removepublic Set<String> getDeniedProfilesForAnonymous()
ACLAmetysObject
getDeniedProfilesForAnonymous
in interface ACLAmetysObject
public void addDeniedProfilesForAnonymous(Set<String> profileIds)
ModifiableACLAmetysObject
addDeniedProfilesForAnonymous
in interface ModifiableACLAmetysObject
profileIds
- The profiles to addpublic void removeDeniedProfilesForAnonymous(Set<String> profileIds)
ModifiableACLAmetysObject
removeDeniedProfilesForAnonymous
in interface ModifiableACLAmetysObject
profileIds
- The profiles to removepublic Set<String> getAllowedProfilesForUser(UserIdentity user)
ACLAmetysObject
getAllowedProfilesForUser
in interface ACLAmetysObject
user
- The user identitypublic Map<UserIdentity,Set<String>> getAllowedProfilesForUsers()
ACLAmetysObject
getAllowedProfilesForUsers
in interface ACLAmetysObject
public Set<UserIdentity> getAllowedUsers(String profileId)
ACLAmetysObject
getAllowedUsers
in interface ACLAmetysObject
profileId
- The id of the profilepublic void addAllowedUsers(Set<UserIdentity> users, String profileId)
ModifiableACLAmetysObject
addAllowedUsers
in interface ModifiableACLAmetysObject
users
- The users to addprofileId
- The id of the profilepublic void removeAllowedUsers(Set<UserIdentity> users, String profileId)
ModifiableACLAmetysObject
removeAllowedUsers
in interface ModifiableACLAmetysObject
users
- The users to removeprofileId
- The id of the profilepublic void removeAllowedUsers(Set<UserIdentity> users)
ModifiableACLAmetysObject
removeAllowedUsers
in interface ModifiableACLAmetysObject
users
- The users to removepublic Map<GroupIdentity,Set<String>> getAllowedProfilesForGroups()
ACLAmetysObject
getAllowedProfilesForGroups
in interface ACLAmetysObject
public Set<GroupIdentity> getAllowedGroups(String profileId)
ACLAmetysObject
getAllowedGroups
in interface ACLAmetysObject
profileId
- The id of the profilepublic void addAllowedGroups(Set<GroupIdentity> groups, String profileId)
ModifiableACLAmetysObject
addAllowedGroups
in interface ModifiableACLAmetysObject
groups
- The groups to addprofileId
- The id of the profilepublic void removeAllowedGroups(Set<GroupIdentity> groups, String profileId)
ModifiableACLAmetysObject
removeAllowedGroups
in interface ModifiableACLAmetysObject
groups
- The groups to removeprofileId
- The id of the profilepublic void removeAllowedGroups(Set<GroupIdentity> groups)
ModifiableACLAmetysObject
removeAllowedGroups
in interface ModifiableACLAmetysObject
groups
- The groups to removepublic Set<String> getDeniedProfilesForUser(UserIdentity user)
ACLAmetysObject
getDeniedProfilesForUser
in interface ACLAmetysObject
user
- The user identitypublic Map<UserIdentity,Set<String>> getDeniedProfilesForUsers()
ACLAmetysObject
getDeniedProfilesForUsers
in interface ACLAmetysObject
public Set<UserIdentity> getDeniedUsers(String profileId)
ACLAmetysObject
getDeniedUsers
in interface ACLAmetysObject
profileId
- The id of the profilepublic void addDeniedUsers(Set<UserIdentity> users, String profileId)
ModifiableACLAmetysObject
addDeniedUsers
in interface ModifiableACLAmetysObject
users
- The users to addprofileId
- The id of the profilepublic void removeDeniedUsers(Set<UserIdentity> users, String profileId)
ModifiableACLAmetysObject
removeDeniedUsers
in interface ModifiableACLAmetysObject
users
- The users to removeprofileId
- The id of the profilepublic void removeDeniedUsers(Set<UserIdentity> users)
ModifiableACLAmetysObject
removeDeniedUsers
in interface ModifiableACLAmetysObject
users
- The users to removepublic Map<GroupIdentity,Set<String>> getDeniedProfilesForGroups()
ACLAmetysObject
getDeniedProfilesForGroups
in interface ACLAmetysObject
public Set<GroupIdentity> getDeniedGroups(String profileId)
ACLAmetysObject
getDeniedGroups
in interface ACLAmetysObject
profileId
- The id of the profilepublic void addDeniedGroups(Set<GroupIdentity> groups, String profileId)
ModifiableACLAmetysObject
addDeniedGroups
in interface ModifiableACLAmetysObject
groups
- The groups to addprofileId
- The id of the profilepublic void removeDeniedGroups(Set<GroupIdentity> groups, String profileId)
ModifiableACLAmetysObject
removeDeniedGroups
in interface ModifiableACLAmetysObject
groups
- The groups to removeprofileId
- The id of the profilepublic void removeDeniedGroups(Set<GroupIdentity> groups)
ModifiableACLAmetysObject
removeDeniedGroups
in interface ModifiableACLAmetysObject
groups
- The groups to remove