public class ZoneDAO extends AbstractLogEnabled implements Serviceable, Component
Modifier and Type | Field and Description |
---|---|
private ContentTypeExtensionPoint |
_cTypeEP |
private ContentTypesAssignmentHandler |
_cTypesAssignmentHandler |
private CurrentUserProvider |
_currentUserProvider |
private ObservationManager |
_observationManager |
private AmetysObjectResolver |
_resolver |
private RightManager |
_rightManager |
private ServicesAssignmentHandler |
_serviceAssignmentHandler |
private ServiceExtensionPoint |
_serviceEP |
private SharedContentManager |
_sharedContentManager |
private WorkflowProvider |
_workflowProvider |
static String |
ROLE
Avalon Role
|
Constructor and Description |
---|
ZoneDAO() |
Modifier and Type | Method and Description |
---|---|
private void |
_checkArguments(String zoneItemId,
String zoneName,
String pageId,
UserIdentity user,
ModifiablePage page,
Zone zone,
ZoneItem zoneItem) |
protected void |
_checkZoneItem(ModifiablePage page,
String zoneName,
ZoneItem zoneItem,
UserIdentity user)
Check if the zone item can be moved to the given zone of the given page.
|
private boolean |
_isNew(Content content) |
private boolean |
_isReferenced(Content content) |
protected ZoneItem |
addContentReference(ModifiableZone zone,
Content content,
String metadataSetName)
Add the given content as a zone item in the given zone.
|
Map<String,Object> |
addSharedContent(String pageId,
String zoneName,
String contentId,
String metadataSetName)
Insert a shared content into a zone
|
protected ZoneItem |
createSharedContent(ModifiableZone zone,
DefaultContent originalContent,
String metadataSetName)
Create a shared content referencing the given content and add the shared one to the zone.
|
Content |
getContent(ZoneItem zoneItem)
Get the content of a zone item.
|
Service |
getService(ZoneItem zoneItem)
Get the service of a zone item.
|
Map<String,Object> |
getZoneItemElementInfo(String id)
|
boolean |
moveZoneItemTo(String zoneItemId,
String zoneName,
boolean beforeOrAfter,
String beforeOrAfterItemId,
String pageId)
Move a zone item of a page before/after another zone item of the same page
|
void |
removeZoneItem(String zoneItemId)
Remove a zone item from page
|
void |
service(ServiceManager smanager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
private AmetysObjectResolver _resolver
private ObservationManager _observationManager
private CurrentUserProvider _currentUserProvider
private WorkflowProvider _workflowProvider
private SharedContentManager _sharedContentManager
private ContentTypesAssignmentHandler _cTypesAssignmentHandler
private ServicesAssignmentHandler _serviceAssignmentHandler
private ContentTypeExtensionPoint _cTypeEP
private ServiceExtensionPoint _serviceEP
private RightManager _rightManager
public ZoneDAO()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
ServiceException
public Map<String,Object> addSharedContent(String pageId, String zoneName, String contentId, String metadataSetName)
pageId
- The page idzoneName
- The zone namecontentId
- The content id to insertmetadataSetName
- The metadata set nameprotected ZoneItem addContentReference(ModifiableZone zone, Content content, String metadataSetName)
zone
- the zone to add the content in.content
- the content to add.metadataSetName
- the metadata set name.protected ZoneItem createSharedContent(ModifiableZone zone, DefaultContent originalContent, String metadataSetName)
zone
- the zone to create the shared content in.originalContent
- the original content.metadataSetName
- the metadata set name.public void removeZoneItem(String zoneItemId)
zoneItemId
- The id of zone item to deletepublic Map<String,Object> getZoneItemElementInfo(String id)
id
- The id of page or zone itempublic Content getContent(ZoneItem zoneItem)
zoneItem
- The zone itemprivate boolean _isReferenced(Content content)
public Service getService(ZoneItem zoneItem)
zoneItem
- The zone itempublic boolean moveZoneItemTo(String zoneItemId, String zoneName, boolean beforeOrAfter, String beforeOrAfterItemId, String pageId) throws UnknownAmetysObjectException, AmetysRepositoryException, RepositoryException
zoneItemId
- The identifier of the zone item to movezoneName
- The destination zone namebeforeOrAfter
- true if before or false afterbeforeOrAfterItemId
- The target zone item can be nullpageId
- The concerned page idUnknownAmetysObjectException
- If an error occurredAmetysRepositoryException
- If an error occurredRepositoryException
- If an error occurredprotected void _checkZoneItem(ModifiablePage page, String zoneName, ZoneItem zoneItem, UserIdentity user)
page
- the page.zoneName
- the zone name.zoneItem
- the zone item to move.user
- the userprivate void _checkArguments(String zoneItemId, String zoneName, String pageId, UserIdentity user, ModifiablePage page, Zone zone, ZoneItem zoneItem)