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, saveChangesequals, hashCode, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetMetadataHolderneedsSave, rename, revertChanges, saveChangesequals, getId, getName, getParent, getParentPath, getPath, hashCoderemovegetNodegetChildAt, getChildPositionpublic 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
ModifiableZonegetZoneItems in interface ModifiableZonegetZoneItems in interface ZoneAmetysRepositoryException - if an error occuredpublic ModifiableZoneItem addZoneItem() throws AmetysRepositoryException
ModifiableZoneaddZoneItem in interface ModifiableZoneAmetysRepositoryException - If an error occuredpublic Page getPage()
Zonepublic ModifiableZone copyTo(ModifiableTraversableAmetysObject parent, String name) throws AmetysRepositoryException
CopiableAmetysObjectAmetysObject to the given object. Be careful, this method save changes.copyTo in interface CopiableAmetysObjectparent - 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
CopiableAmetysObjectAmetysObject to the given object if it is not in the restriction list. Be careful, this method save changes.copyTo in interface CopiableAmetysObjectparent - 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.