com.ibm.portal.model.controller
Class CreationContextBuilderFactory
java.lang.Object
com.ibm.portal.model.controller.CreationContextBuilderFactory
public abstract class CreationContextBuilderFactory
- extends java.lang.Object
A factory for creating and combining CreationContexts.
The factory offers a set of methods (new...
) to create individual
contexts for all contexts which extend CreationContext.
In addition, the combine(CreationContext[]) method allows to create a
context which exposes all interfaces of the individual contexts provided to it.
Example use to create a context which supports both IdentifiableCreationContext
and ContentPageCreationContext:
final CreationContextBuilderFactory factory = CreationContextBuilderFactory.getInstance();
final CreationContext[] arr = new CreationContext[2];
arr[0] = factory.newContentPageCreationContext(false);
arr[1] = factory.newIdentifiableCreationContext(predefinedID);
return factory.combine(arr);
- Since:
- 6.1.0
Field Summary |
protected static java.lang.String
| COPYRIGHT
|
protected static Logger
| LOGGER
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
COPYRIGHT
protected static final java.lang.String COPYRIGHT
LOGGER
protected static final Logger LOGGER
CreationContextBuilderFactory
protected CreationContextBuilderFactory()
getInstance
public static CreationContextBuilderFactory getInstance()
- Returns an instance of the factory.
- Returns:
- an instance of the factory, never
null
- Throws:
- java.lang.IllegalStateException - in case the factory has not been initialized
setInstance
protected static void setInstance(CreationContextBuilderFactory aFactory)
- Initializes the factory with the given instance.
- Parameters:
- aFactory - an implementation of the factory, must not be
null
combine
public abstract CreationContext combine(CreationContext[] contexts)
- Combines the given contexts into one creation context which implements
all interfaces of the individual contexts.
- Parameters:
- contexts - an array of creation contexts, no context of the array
may implement more than one creation context, and the array must not
contain
null
objects.
- Returns:
- a creation context which combines all individual contexts
newContentNodeCreationContext
public abstract ContentNodeCreationContext newContentNodeCreationContext(boolean isPrivate)
- Creates a ContentNodeCreationContext.
- Parameters:
- isPrivate - indicates whether the resource is to be created as a private node
or a page that may be accessible to multiple users.
- Returns:
- a new creation context
newContentPageCreationContext
public abstract ContentPageCreationContext newContentPageCreationContext(boolean isPrivate)
- Creates a ContentPageCreationContext.
- Parameters:
- isPrivate - indicates whether the resource is to be created as a private page
or a page that may be accessible to multiple users.
- Returns:
- a new creation context
com.ibm.portal.content.ContentPage)">
newDerivedContentPageCreationContext
public abstract DerivedContentPageCreationContext newDerivedContentPageCreationContext(boolean isPrivate,
ContentPage aDerivationParent)
- Creates a DerivedContentPageCreationContext.
- Parameters:
- isPrivate - indicates whether the resource is to be created as a private page
or a page that may be accessible to multiple users.
- aDerivationParent - a content page which serves as the derivation parent for the page
to be created, must not be
null
.
- Returns:
- a new creation context
newIdentifiableCreationContext
public abstract IdentifiableCreationContext newIdentifiableCreationContext(ObjectID anObjectID)
- Creates a IdentifiableCreationContext.
- Parameters:
- anObjectID - the ID to use for the created resource, must not be
null
.
- Returns:
- a new creation context
newLayoutControlCreationContext
public abstract LayoutControlCreationContext newLayoutControlCreationContext(Identifiable portletDefinition,
Identifiable portletEntity)
- Creates a LayoutControlCreationContext.
- Parameters:
- portletDefinition - a portlet definition or its ID, must not be
null
.- portletEntity - a portlet entity or its ID, may be
null
.
- Returns:
- a new creation context
newPortletDefinitionCloningContext
public abstract PortletDefinitionCloningContext newPortletDefinitionCloningContext(ObjectID portletDefinitionID,
Identifiable domainProvider)
- Creates a PortletDefinitionCloningContext.
- Parameters:
- portletDefinitionID - an object id instance that provides the id of a portlet
definition which should be cloned, must not be
null
.- domainProvider - an identifiable object providing the target domain, can be
null
.
- Returns:
- a new creation context
newPortletEntityCreationContext
public abstract PortletEntityCreationContext newPortletEntityCreationContext(ObjectID parentID,
Identifiable domainProvider)
- Creates a PortletDefinitionCloningContext.
- Parameters:
- parentID - an object id instance that provides the id of a portlet
entity or definition which should be created and inserted,
must not be
null
.- domainProvider - an identifiable object providing the target domain, can be
null
.
- Returns:
- a new creation context
newWireCreationContext
public abstract WireCreationContext newWireCreationContext(Identifiable aTargetPage,
Identifiable aSourceLayoutControl,
Identifiable aTargetLayoutControl,
Identifiable aSourceEndpoint,
Identifiable aTargetEndpoint,
Identifiable aUser)
- Creates a WireCreationContext.
- Parameters:
- aTargetPage - the target page or null.
If null is passed, the wire to be created will be an in - page wire.
For itīs creation of which the ObjectID of the layout model that served
the wire model controller used for creation of wires is used as source and target page.
- aSourceLayoutControl - the source layout control, must not be
null
.- aTargetLayoutControl - the target layout control, must not be
null
.- aSourceEndpoint - the source end point, must not be
null
.- aTargetEndpoint - the target end point, must not be
null
.- aUser - the owner of the wire. For a public wire the anonymous user or
null
can be set.
- Returns:
- a new creation context