public class DefaultZone extends DefaultTraversableAmetysObject<DefaultZoneFactory> implements ModifiableZone, CopiableAmetysObject
Zone
.Modifier and Type | Field and Description |
---|---|
static String |
ZONEITEM_NODE_NAME
Constant for zone item node name
|
static String |
ZONEITEM_NODETYPE_NAME
Constant for zone items node type
|
static String |
ZONEITEMS_NODE_NAME
Constant for zone items node name
|
Constructor and Description |
---|
DefaultZone(Node node,
String parentPath,
DefaultZoneFactory factory)
Creates a
DefaultZone . |
Modifier and Type | Method and Description |
---|---|
ModifiableZoneItem |
addZoneItem()
Add a new zone item
|
ModifiableZone |
copyTo(ModifiableTraversableAmetysObject parent,
String name)
Copy the current
AmetysObject to the given object. |
AmetysObject |
copyTo(ModifiableTraversableAmetysObject parent,
String name,
List<String> restrictTo)
Copy the current
AmetysObject to the given object if it is not in the restriction list. |
Page |
getPage()
Get the parent page of the zone
|
AmetysObjectIterable<ModifiableZoneItem> |
getZoneItems()
Retrieve the list of used zone items
|
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, createChild, getAllowedGroups, getAllowedProfilesForAnonymous, getAllowedProfilesForAnyConnectedUser, getAllowedProfilesForGroups, getAllowedProfilesForUser, getAllowedProfilesForUsers, getAllowedUsers, getChild, getChildren, getDeniedGroups, getDeniedProfilesForAnonymous, getDeniedProfilesForAnyConnectedUser, getDeniedProfilesForGroups, getDeniedProfilesForUser, getDeniedProfilesForUsers, getDeniedUsers, hasChild, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers
_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
getMetadataHolder
needsSave, rename, revertChanges, saveChanges
equals, getId, getName, getParent, getParentPath, getPath, hashCode
remove
getNode
getChildAt, getChildPosition
public static final String ZONEITEMS_NODE_NAME
public static final String ZONEITEM_NODE_NAME
public static final String ZONEITEM_NODETYPE_NAME
public DefaultZone(Node node, String parentPath, DefaultZoneFactory factory)
DefaultZone
.node
- the node backing this AmetysObject
.parentPath
- the parent path in the Ametys hierarchy.factory
- the DefaultZoneFactory
which creates the AmetysObject.public AmetysObjectIterable<ModifiableZoneItem> getZoneItems() throws AmetysRepositoryException
ModifiableZone
getZoneItems
in interface ModifiableZone
getZoneItems
in interface Zone
AmetysRepositoryException
- if an error occuredpublic ModifiableZoneItem addZoneItem() throws AmetysRepositoryException
ModifiableZone
addZoneItem
in interface ModifiableZone
AmetysRepositoryException
- If an error occuredpublic Page getPage()
Zone
public ModifiableZone copyTo(ModifiableTraversableAmetysObject parent, String name) throws AmetysRepositoryException
CopiableAmetysObject
AmetysObject
to the given object. Be careful, this method save changes.copyTo
in interface CopiableAmetysObject
parent
- The parent of the new object. Can not be null.name
- Name of the new object. Can be null. If null, the new name will be get from the copied objectAmetysRepositoryException
- if an error occurs.public AmetysObject copyTo(ModifiableTraversableAmetysObject parent, String name, List<String> restrictTo) throws AmetysRepositoryException
CopiableAmetysObject
AmetysObject
to the given object if it is not in the restriction list. Be careful, this method save changes.copyTo
in interface CopiableAmetysObject
parent
- The parent of the new object. Can not be null.name
- Name of the new object. Can be null. If null, the new name will be get from the copied objectrestrictTo
- A restrict list of CopiableAmetysObject
authorized to be copiedAmetysRepositoryException
- if an error occurs.