public class DefaultZone extends DefaultTraversableAmetysObject<DefaultZoneFactory> implements ModifiableZone, CopiableAmetysObject
Zone
.Modifier and Type | Field and Description |
---|---|
private static Logger |
__LOGGER |
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
|
ZONEITEM_DATA_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. |
ModifiableModelLessDataHolder |
getDataHolder()
Returns the
DataHolder of this AmetysObject . |
ModifiableCompositeMetadata |
getMetadataHolder()
Returns the root
CompositeMetadata of this AmetysObject . |
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, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChanges
equals, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getComposite, getComposite, getRepeater, getRepeater, removeValue, setValue, setValue
getType, getValue, getValue, getValueOfType, getValueOfType, hasValue, isMultiple
copyTo, getDataNames
equals, getId, getName, getParent, getParentPath, getPath, hashCode
toSAX, toSAX
dataToSAX, dataToSAX, dataToSAX, dataToSAX
needsSave, rename, revertChanges, saveChanges
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.public ModifiableModelLessDataHolder getDataHolder()
DataAwareAmetysObject
DataHolder
of this AmetysObject
.getDataHolder
in interface DataAwareAmetysObject
getDataHolder
in interface ModelLessDataAwareAmetysObject
getDataHolder
in interface ModifiableModelLessDataAwareAmetysObject
DataHolder
of this AmetysObject
public ModifiableCompositeMetadata getMetadataHolder()
SimpleAmetysObject
CompositeMetadata
of this AmetysObject
.getMetadataHolder
in interface MetadataAwareAmetysObject
getMetadataHolder
in interface ModifiableMetadataAwareAmetysObject
getMetadataHolder
in class SimpleAmetysObject<DefaultZoneFactory>
CompositeMetadata
of this AmetysObject