Class UGCContentModerationClientSideElement
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.core.ui.StaticFileImportsClientSideElement
org.ametys.core.ui.StaticClientSideElement
org.ametys.plugins.ugc.clientsideelement.UGCContentModerationClientSideElement
- All Implemented Interfaces:
- ClientSideElement,- LogEnabled,- PluginAware,- Configurable,- Serviceable
Client side element for UGC content moderation
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElementClientSideElement.Script, ClientSideElement.ScriptFile
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected ContentWorkflowHelperThe content workflow helperprotected ObservationManagerThe observation managerprotected PageDAOThe page DAOprotected AmetysObjectResolverThe Ametys resolverprotected SiteManagerThe site managerprotected SkinsManagerThe skins managerFields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionacceptUGCContent(List<String> contentIds, String targetContentType, String targetWorkflowName, int initActionId, String mode, String pageId) Accept a UGC contentprotected ContentcreateContent(Content initialContent, String workflowName, int actionId, String cTypeId) Create the content from the proposed contentprotected ModifiablePagecreatePage(String parentId, DefaultWebContent content) Create page under a parent pageprotected voiddeleteContent(Content content) Delete the contentprotected StringgetZoneName(Page page) Get the name of zone where to insert contentrefuseUGCContent(List<String> contentIds, String comment, boolean withNotification) Refuse UGC contentvoidservice(ServiceManager smanager) Methods inherited from class org.ametys.core.ui.StaticClientSideElement_configureClass, _configureParameters, _configureScript, configureInitialParametersMethods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toStringMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabledgetLogger, setLogger
- 
Field Details- 
_resolverThe Ametys resolver
- 
_pageDAOThe page DAO
- 
_siteManagerThe site manager
- 
_skinsManagerThe skins manager
- 
_observationManagerThe observation manager
- 
_contentWorkflowHelperThe content workflow helper
 
- 
- 
Constructor Details- 
UGCContentModerationClientSideElement
 
- 
- 
Method Details- 
service- Specified by:
- servicein interface- Serviceable
- Overrides:
- servicein class- StaticFileImportsClientSideElement
- Throws:
- ServiceException
 
- 
acceptUGCContentpublic Map<String,Object> acceptUGCContent(List<String> contentIds, String targetContentType, String targetWorkflowName, int initActionId, String mode, String pageId) throws ProcessingException Accept a UGC content- Parameters:
- contentIds- The id of UGC contents
- targetContentType- The id of target content type. Can be null or empty to not change content type
- targetWorkflowName- The workflow name for contents to create
- initActionId- The id of workflow init action
- mode- The insertion mode ('new' to insert contents in a new page, 'affect' to insert contents on a existing page or 'none' to keep content as orphan).
- pageId- The page id. Can be null for mode 'none'
- Returns:
- the result
- Throws:
- ProcessingException- if failed to transform UGC contents
 
- 
refuseUGCContentpublic Map<String,Object> refuseUGCContent(List<String> contentIds, String comment, boolean withNotification) throws ProcessingException Refuse UGC content- Parameters:
- contentIds- The id of UGC contents to refuse
- comment- The reject's comment
- withNotification- True to notify UGC author of the refuse
- Returns:
- the result
- Throws:
- ProcessingException- if failed to transform UGC contents
 
- 
createPageCreate page under a parent page- Parameters:
- parentId- the parent page id or empty for the sitemap root
- content- the UGC content
- Returns:
- the new created page
 
- 
getZoneNameGet the name of zone where to insert content- Parameters:
- page- The page
- Returns:
- the zone's name
 
- 
createContentprotected Content createContent(Content initialContent, String workflowName, int actionId, String cTypeId) throws com.opensymphony.workflow.WorkflowException Create the content from the proposed content- Parameters:
- initialContent- The initial content
- workflowName- the workflow name
- actionId- The init action id
- cTypeId- the content type
- Returns:
- the created content
- Throws:
- com.opensymphony.workflow.WorkflowException- if failed to create content
 
- 
deleteContentDelete the content- Parameters:
- content- the content to delete
 
 
-