站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.4 API 英文版文档

InstanceContainer - JBOSS Portal 2.4 API 英文版文档


org.jboss.portal.core.model.instance
Interface InstanceContainer

All Known Implementing Classes:
PersistentInstanceContainer

public interface InstanceContainer

A container for instances of component.


Method Summary
 Instance createInstance(java.lang.String id, java.lang.String portletId)
          Create a new instance of the specified portlet.
 Instance createInstance(java.lang.String id, java.lang.String portletId, boolean clone)
          Create a new instance of the specified portlet.
 void destroyInstance(java.lang.String id)
          Destroy the specified instance.
 AuthorizationDomain getAuthorizationDomain()
          Return the AuthorizationDomain
 Instance getInstance(java.lang.String id)
          Return the specified instance from its id or null if it does not exist.
 java.util.Collection getInstances()
          Return all the instances in the container.
 PortletInvoker getPortletInvoker()
          Return the underlying portlet invoker for the instance container.
 

Method Detail

getPortletInvoker

public PortletInvoker getPortletInvoker()
Return the underlying portlet invoker for the instance container.

Returns:
the portlet invoker

getInstance

public Instance getInstance(java.lang.String id)
                     throws java.lang.IllegalArgumentException
Return the specified instance from its id or null if it does not exist.

Parameters:
id - the instance id
Throws:
java.lang.IllegalArgumentException - if the instance id is null

createInstance

public Instance createInstance(java.lang.String id,
                               java.lang.String portletId)
                        throws DuplicateInstanceException,
                               java.lang.IllegalArgumentException,
                               PortletInvokerException
Create a new instance of the specified portlet.

Parameters:
id -
portletId - the portlet id
Returns:
the newly created instance
Throws:
DuplicateInstanceException - if the instance already exist
java.lang.IllegalArgumentException - if the instance id is null
PortletInvokerException

createInstance

public Instance createInstance(java.lang.String id,
                               java.lang.String portletId,
                               boolean clone)
                        throws DuplicateInstanceException,
                               java.lang.IllegalArgumentException,
                               PortletInvokerException
Create a new instance of the specified portlet.

Parameters:
id -
portletId - the portlet id
clone - force a clone of the portlet
Returns:
the newly created instance
Throws:
DuplicateInstanceException - if the instance already exist
java.lang.IllegalArgumentException - if the instance id is null
PortletInvokerException

destroyInstance

public void destroyInstance(java.lang.String id)
                     throws NoSuchInstanceException,
                            PortletInvokerException,
                            java.lang.IllegalArgumentException
Destroy the specified instance.

Parameters:
id -
Throws:
java.lang.IllegalArgumentException - if the instance id is null
NoSuchInstanceException
PortletInvokerException

getInstances

public java.util.Collection getInstances()
Return all the instances in the container.

Returns:
a collection containing the instances in the container

getAuthorizationDomain

public AuthorizationDomain getAuthorizationDomain()
Return the AuthorizationDomain

Returns:
the authorization domain