public class FrontEditionHelper extends AbstractLogEnabled implements Serviceable, Component, Contextualizable
| Modifier and Type | Field and Description |
|---|---|
private AmetysObjectResolver |
_ametysObjectResolver
The Ametys object resolver
|
private Context |
_context
Context
|
private ZoneDAO |
_zoneDAO |
static String |
ROLE
Avalon Role
|
| Constructor and Description |
|---|
FrontEditionHelper() |
| Modifier and Type | Method and Description |
|---|---|
void |
contextualize(Context context) |
String |
firstAvailableParentInLivePath(Page page)
Get the first available parent for the requested page, in the live version
|
String |
firstAvailableParentInLivePath(String pageId)
Get the first available parent for the current page, in the live workspace
|
Map<Integer,String> |
getWorkflowActionName(String contentId,
String workflowName,
List<Integer> actionIds)
Get the name of a workflow action by it's id
|
boolean |
hasWorkflowRight(int actionId,
String contentId,
boolean checkEditionMode)
Check if the action requested is available
|
boolean |
moveZoneItemId(String zoneItemId,
String zoneName,
String pageId,
int offset)
Move a zone item of a page before/after another zone item of the same page
|
void |
service(ServiceManager manager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprivate AmetysObjectResolver _ametysObjectResolver
public FrontEditionHelper()
public void service(ServiceManager manager) throws ServiceException
service in interface ServiceableServiceExceptionpublic void contextualize(Context context) throws ContextException
contextualize in interface ContextualizableContextExceptionpublic String firstAvailableParentInLivePath(String pageId)
pageId - id of the page that need to be checkedpublic String firstAvailableParentInLivePath(Page page)
page - page to checkpublic Map<Integer,String> getWorkflowActionName(String contentId, String workflowName, List<Integer> actionIds)
contentId - id of the content to check if action is availableworkflowName - name of the workflow checkedactionIds - actions where the name needs to be retreivedpublic boolean hasWorkflowRight(int actionId, String contentId, boolean checkEditionMode)
actionId - Action IdcontentId - Content IdcheckEditionMode - Check if we are in edition mode or notpublic boolean moveZoneItemId(String zoneItemId, String zoneName, String pageId, int offset) throws UnknownAmetysObjectException, AmetysRepositoryException, RepositoryException
zoneItemId - zone item to movezoneName - name of the zonepageId - page Idoffset - how many item back/forward to move ? (negative for up, positive to down)UnknownAmetysObjectException - If an error occurredAmetysRepositoryException - If an error occurredRepositoryException - If an error occurred