org.jboss.portal.core.impl.model
Class CustomizationManagerService

java.lang.Object
  extended by org.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended by org.jboss.system.ServiceMBeanSupport
          extended by org.jboss.portal.jems.as.system.AbstractJBossService
              extended by org.jboss.portal.core.impl.model.CustomizationManagerService
All Implemented Interfaces:
javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, CustomizationManager, org.jboss.system.Service, org.jboss.system.ServiceMBean

public class CustomizationManagerService
extends AbstractJBossService
implements CustomizationManager

Version:
$Revision: 8786 $
Author:
Julien Viet

Field Summary
 
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
 
Constructor Summary
CustomizationManagerService()
           
 
Method Summary
protected  void createService()
           
 void destroyDashboard(java.lang.String userId)
          Destroys the user dashboard if any
protected  void destroyService()
           
 Portal getDashboard(User user)
          Returns the dashboard of a specific user.
 java.lang.String getDashboardContextId()
           
 Instance getInstance(Window window)
          Returns a top level named portlet instance.
 Instance getInstance(Window window, User user)
          Returns a contextualized portlet instance for the specified user id.
 InstanceContainer getInstanceContainer()
           
 PortalAuthorizationManagerFactory getPortalAuthorizationManagerFactory()
           
 PortalObjectContainer getPortalObjectContainer()
           
 RoleModule getRoleModule()
           
 UserModule getUserModule()
           
 boolean isDashboard(PortalObject object, User user)
          Return true if the portal object is in a dashboard context for the current authenticated user.
 void setDashboardContextId(java.lang.String dashboardContextId)
           
 void setInstanceContainer(InstanceContainer instanceContainer)
           
 void setPortalAuthorizationManagerFactory(PortalAuthorizationManagerFactory portalAuthorizationManagerFactory)
           
 void setPortalObjectContainer(PortalObjectContainer portalObjectContainer)
           
 void setRoleModule(RoleModule roleModule)
           
 void setUserModule(UserModule userModule)
           
 
Methods inherited from class org.jboss.portal.jems.as.system.AbstractJBossService
create, destroy, getState, getStateString, start, stop
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, startService, stopService
 
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
 

Constructor Detail

CustomizationManagerService

public CustomizationManagerService()
Method Detail

getPortalObjectContainer

public PortalObjectContainer getPortalObjectContainer()

setPortalObjectContainer

public void setPortalObjectContainer(PortalObjectContainer portalObjectContainer)

getDashboardContextId

public java.lang.String getDashboardContextId()

setDashboardContextId

public void setDashboardContextId(java.lang.String dashboardContextId)

getInstanceContainer

public InstanceContainer getInstanceContainer()

setInstanceContainer

public void setInstanceContainer(InstanceContainer instanceContainer)

getPortalAuthorizationManagerFactory

public PortalAuthorizationManagerFactory getPortalAuthorizationManagerFactory()

setPortalAuthorizationManagerFactory

public void setPortalAuthorizationManagerFactory(PortalAuthorizationManagerFactory portalAuthorizationManagerFactory)

getUserModule

public UserModule getUserModule()

setUserModule

public void setUserModule(UserModule userModule)

getRoleModule

public RoleModule getRoleModule()

setRoleModule

public void setRoleModule(RoleModule roleModule)

createService

protected void createService()
                      throws java.lang.Exception
Overrides:
createService in class org.jboss.system.ServiceMBeanSupport
Throws:
java.lang.Exception

destroyService

protected void destroyService()
                       throws java.lang.Exception
Overrides:
destroyService in class org.jboss.system.ServiceMBeanSupport
Throws:
java.lang.Exception

getInstance

public Instance getInstance(Window window)
                     throws java.lang.IllegalArgumentException
Description copied from interface: CustomizationManager
Returns a top level named portlet instance.

Specified by:
getInstance in interface CustomizationManager
Parameters:
window - the window of the portlet instance
Returns:
the target instance or null if it cannot be found
Throws:
java.lang.IllegalArgumentException - if the window is null

getInstance

public Instance getInstance(Window window,
                            User user)
                     throws java.lang.IllegalArgumentException
Description copied from interface: CustomizationManager
Returns a contextualized portlet instance for the specified user id. If the window is in the context of a dashboard then the portlet instance is further customized for that specific window.

Specified by:
getInstance in interface CustomizationManager
Parameters:
window - the window of the portlet instance
user - the user that can be null
Returns:
the target instance or null if it cannot be found
Throws:
java.lang.IllegalArgumentException - if the window is null

isDashboard

public boolean isDashboard(PortalObject object,
                           User user)
Return true if the portal object is in a dashboard context for the current authenticated user.

Specified by:
isDashboard in interface CustomizationManager
Parameters:
object -
Returns:

getDashboard

public Portal getDashboard(User user)
                    throws java.lang.IllegalArgumentException
Description copied from interface: CustomizationManager
Returns the dashboard of a specific user.

Specified by:
getDashboard in interface CustomizationManager
Returns:
Throws:
java.lang.IllegalArgumentException

destroyDashboard

public void destroyDashboard(java.lang.String userId)
Destroys the user dashboard if any

Specified by:
destroyDashboard in interface CustomizationManager