org.jboss.portal.cms.workflow
Class ApprovePublishImpl
java.lang.Object
org.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.portal.jems.as.system.AbstractJBossService
org.jboss.portal.cms.workflow.ApprovePublishImpl
- All Implemented Interfaces:
- javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, ApprovePublish, org.jboss.system.Service, org.jboss.system.ServiceMBean
public class ApprovePublishImpl
- extends AbstractJBossService
- implements ApprovePublish
Created on : Dec 19, 2006
- Author:
- Sohil Shah - sohil.shah@jboss.com
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
createService, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ApprovePublishImpl
public ApprovePublishImpl()
startService
public void startService()
throws java.lang.Exception
- Overrides:
startService
in class org.jboss.system.ServiceMBeanSupport
- Throws:
java.lang.Exception
stopService
public void stopService()
throws java.lang.Exception
- Overrides:
stopService
in class org.jboss.system.ServiceMBeanSupport
- Throws:
java.lang.Exception
getWorkflowService
public WorkflowService getWorkflowService()
- Returns:
setWorkflowService
public void setWorkflowService(WorkflowService workflowService)
- Parameters:
workflowService
-
getProcess
public java.lang.String getProcess()
- Returns:
setProcess
public void setProcess(java.lang.String process)
- Parameters:
process
-
getManagerRoles
public java.lang.String getManagerRoles()
- Returns:
- the managerRoles
setManagerRoles
public void setManagerRoles(java.lang.String managerRoles)
- Parameters:
managerRoles
- the manager managerRoles to set
isOverwrite
public boolean isOverwrite()
- Returns:
- the overwrite
setOverwrite
public void setOverwrite(boolean overwrite)
- Parameters:
overwrite
- the overwrite to set
getJNDIName
public java.lang.String getJNDIName()
- Returns:
setJNDIName
public void setJNDIName(java.lang.String jndiName)
- Parameters:
jndiName
-
getIdentityServiceController
public IdentityServiceController getIdentityServiceController()
setIdentityServiceController
public void setIdentityServiceController(IdentityServiceController identityServiceController)
- Parameters:
identityServiceController
-
getBody
public java.lang.String getBody()
- Returns:
- the body
setBody
public void setBody(java.lang.String body)
- Parameters:
body
- the body to set
getFrom
public java.lang.String getFrom()
- Returns:
- the from
setFrom
public void setFrom(java.lang.String from)
- Parameters:
from
- the from to set
getSubject
public java.lang.String getSubject()
- Returns:
- the subject
setSubject
public void setSubject(java.lang.String subject)
- Parameters:
subject
- the subject to set
requestApproval
public long requestApproval(Content content)
throws WorkflowException
- Called when content is added to the CMS, and needs to be approved by the managers
before it can be published to go live
- Specified by:
requestApproval
in interface ApprovePublish
- Parameters:
content
-
- Returns:
- returns the process id of the workflow process set in motion
- Throws:
WorkflowException
processManagerResponse
public void processManagerResponse(long processId,
java.lang.String manager,
boolean approved)
throws WorkflowException
- Called when a manager either approves or rejects the publishing of a specific content to
go live
- Specified by:
processManagerResponse
in interface ApprovePublish
- Parameters:
processId
- manager
- userId of the managerapproved
- true if approved, false if rejected
- Throws:
WorkflowException
getPendingQueue
public java.util.Collection getPendingQueue(java.lang.String filePath)
throws WorkflowException
- Retrieves a queue of unapproved content associated with the specified file in the CMS
- Specified by:
getPendingQueue
in interface ApprovePublish
- Parameters:
filePath
-
- Returns:
-
- Throws:
WorkflowException
getAllPendingInQueue
public java.util.Collection getAllPendingInQueue()
throws WorkflowException
- Retrieves a queue of unapproved content for everything in the CMS.
- Specified by:
getAllPendingInQueue
in interface ApprovePublish
- Returns:
-
- Throws:
WorkflowException
getManagers
public java.util.Set getManagers()
- Description copied from interface:
ApprovePublish
- Returns role names of Roles that are designated to be Managers in this workflow.
Managers approve/deny all content publish requests before the content goes live in the
CMS
- Specified by:
getManagers
in interface ApprovePublish
- Returns: