com.ibm.portal.cp
Class CPCreationContextBuilderFactory

java.lang.Object
  extended by com.ibm.portal.model.controller.CreationContextBuilderFactory
      extended by com.ibm.portal.cp.CPCreationContextBuilderFactory

public abstract class CPCreationContextBuilderFactory
extends CreationContextBuilderFactory

A factory special type of a CreationContextBuilderFactory allowing to generate CreationContext for tagging purposes.

Since:
7.0.0
See Also:
CreationContextBuilderFactory

Constructor Summary
CPCreationContextBuilderFactory()
           
 
Method Summary
static CPCreationContextBuilderFactory getCPCreationContextBuilderFactoryInstance()
          Returns an instance of the factory.
abstract  CustomResourceCreationContext newCustomResourceCreationContext(java.net.URI uri)
          Creates a CustomResourceCreationContext that allows to create custom resources.
abstract  CustomResourceCreationContext newCustomResourceCreationContext(java.net.URI uri, java.util.Set<java.lang.String> categories)
          Creates a CustomResourceCreationContext that allows to create custom resources.
abstract  RatingCreationContext<ObjectID> newRatingCreationContext(ObjectID resourceID, ObjectID ownerID, int ratingValue, boolean isPrivate, boolean preserveCategories)
          Creates a RatingCreationContext.
Note: This method requires that the given resource ObjectID must already exist in the database
abstract  RatingCreationContext<ObjectID> newRatingCreationContext(ObjectID resourceID, java.util.Set<java.lang.String> categories, ObjectID ownerID, int ratingValue, boolean isPrivate)
          Creates a RatingCreationContext.
Note: This method requires that the given resource ObjectID must already exist in the database
abstract  RatingCreationContext<java.net.URI> newRatingCreationContext(java.net.URI resourceUri, ObjectID ownerID, int ratingValue, boolean isPrivate, boolean preserveCategories)
          Creates a RatingCreationContext.
abstract  RatingCreationContext<java.net.URI> newRatingCreationContext(java.net.URI resourceUri, java.util.Set<java.lang.String> categories, ObjectID ownerID, int ratingValue, boolean isPrivate)
          Creates a RatingCreationContext.
abstract  UserTagCreationContext<ObjectID> newTagCreationContext(ObjectID resourceID, ObjectID ownerID, java.lang.String tagName, boolean isPrivate, java.util.Locale locale, boolean preserveCategories)
          Creates a UserTagCreationContext.
Note: This method requires that the given resource ObjectID must already exist in the database
abstract  UserTagCreationContext<ObjectID> newTagCreationContext(ObjectID resourceID, java.util.Set<java.lang.String> categories, ObjectID ownerID, java.lang.String tagName, boolean isPrivate, java.util.Locale locale)
          Creates a UserTagCreationContext.
Note: This method requires that the given resource ObjectID must already exist in the database
abstract  UserTagCreationContext<java.net.URI> newTagCreationContext(java.net.URI resourceUri, ObjectID ownerID, java.lang.String tagName, boolean isPrivate, java.util.Locale locale, boolean preserveCategories)
          Creates a UserTagCreationContext.
abstract  UserTagCreationContext<java.net.URI> newTagCreationContext(java.net.URI resourceUri, java.util.Set<java.lang.String> categories, ObjectID ownerID, java.lang.String tagName, boolean isPrivate, java.util.Locale locale)
          Creates a UserTagCreationContext.
 
Methods inherited from class com.ibm.portal.model.controller.CreationContextBuilderFactory
combine, getInstance, newContentNodeCopyCreationContext, newContentNodeCopyCreationContext, newContentNodeCreationContext, newContentPageCreationContext, newCopyCreationContext, newDecorationCreationContext, newDerivedContentPageCreationContext, newDerivedLayoutControlCreationContext, newIdentifiableCreationContext, newIWidgetWrapperURICreationContext, newIWidgetWrapperURLCreationContext, newIWidgetWrapperURLCreationContext, newLayoutControlCreationContext, newLayoutNodeCopyCreationContext, newMetaDataCopyCreationContext, newPortletDefinitionCloningContext, newPortletEntityCopyCreationContext, newPortletEntityCreationContext, newTemplatingCreationContext, newWireCreationContext, newWireCreationContext, setInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CPCreationContextBuilderFactory

public CPCreationContextBuilderFactory()
Method Detail

getCPCreationContextBuilderFactoryInstance

public static CPCreationContextBuilderFactory getCPCreationContextBuilderFactoryInstance()
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.

newCustomResourceCreationContext

public abstract CustomResourceCreationContext newCustomResourceCreationContext(java.net.URI uri)
Creates a CustomResourceCreationContext that allows to create custom resources.

Parameters:
uri - The URI identifying the resource.
Returns:
A new creation context.

newCustomResourceCreationContext

public abstract CustomResourceCreationContext newCustomResourceCreationContext(java.net.URI uri,
                                                                               java.util.Set<java.lang.String> categories)
Creates a CustomResourceCreationContext that allows to create custom resources.

Parameters:
uri - The URI identifying the resource.
categories - The set of categories the resource should be part of. Please note that categories are being ignored if the uri references a Portal resource such as a page or portlet since only custom resource are allowed to be categorized. *
Returns:
A new creation context.

newTagCreationContext

public abstract UserTagCreationContext<java.net.URI> newTagCreationContext(java.net.URI resourceUri,
                                                                           ObjectID ownerID,
                                                                           java.lang.String tagName,
                                                                           boolean isPrivate,
                                                                           java.util.Locale locale,
                                                                           boolean preserveCategories)
Creates a UserTagCreationContext.

Parameters:
resourceUri - The URI identifying the resource this tag should be associated with.
ownerID - The ObjectID of the owner of this tag.
tagName - The name of this tag.
isPrivate - if true the tag should be considered private, i. e. only the current will be able to see it.
locale - The locale of the tag name. May be null in which case the used TagModelController is free to choose a locale as a fallback.
preserveCategories - Flag to indicate if all categories which have been assigned to the resource should be preserved
Returns:
A new creation context.

newTagCreationContext

public abstract UserTagCreationContext<java.net.URI> newTagCreationContext(java.net.URI resourceUri,
                                                                           java.util.Set<java.lang.String> categories,
                                                                           ObjectID ownerID,
                                                                           java.lang.String tagName,
                                                                           boolean isPrivate,
                                                                           java.util.Locale locale)
Creates a UserTagCreationContext.

Parameters:
resourceUri - The URI identifying the resource this tag should be associated with.
categories - The categories the resource should belong to. Please note that categories are being ignored if the resourceUri references a Portal resource such as a page or portlet since only custom resource are allowed to be categorized.
ownerID - The ObjectID of the owner of this tag.
tagName - The name of this tag.
isPrivate - if true the tag should be considered private, i. e. only the current will be able to see it.
locale - The locale of the tag name. May be null in which case the used TagModelController is free to choose a locale as a fallback.
Returns:
A new creation context.

newTagCreationContext

public abstract UserTagCreationContext<ObjectID> newTagCreationContext(ObjectID resourceID,
                                                                       ObjectID ownerID,
                                                                       java.lang.String tagName,
                                                                       boolean isPrivate,
                                                                       java.util.Locale locale,
                                                                       boolean preserveCategories)
Creates a UserTagCreationContext.
Note: This method requires that the given resource ObjectID must already exist in the database

Parameters:
resourceID - The ObjectID identifying the resource this tag should be associated with.
ownerID - The ObjectID of the owner of this tag.
tagName - The name of this tag.
isPrivate - if true the tag should be considered private, i. e. only the current will be able to see it.
locale - The locale of the tag name. May be null in which case the used TagModelController is free to choose a locale as a fallback.
preserveCategories - Flag to indicate if all categories which have been assigned to the resource should be preserved
Returns:
A new creation context.

newTagCreationContext

public abstract UserTagCreationContext<ObjectID> newTagCreationContext(ObjectID resourceID,
                                                                       java.util.Set<java.lang.String> categories,
                                                                       ObjectID ownerID,
                                                                       java.lang.String tagName,
                                                                       boolean isPrivate,
                                                                       java.util.Locale locale)
Creates a UserTagCreationContext.
Note: This method requires that the given resource ObjectID must already exist in the database

Parameters:
resourceID - The ObjectID identifying the resource this tag should be associated with.
categories - The categories the resource should belong to. Please note that categories are being ignored if the resourceID references a Portal resource such as a page or portlet since only custom resource are allowed to be categorized.
ownerID - The ObjectID of the owner of this tag.
tagName - The name of this tag.
isPrivate - if true the tag should be considered private, i. e. only the current will be able to see it.
locale - The locale of the tag name. May be null in which case the used TagModelController is free to choose a locale as a fallback.
Returns:
A new creation context.

newRatingCreationContext

public abstract RatingCreationContext<java.net.URI> newRatingCreationContext(java.net.URI resourceUri,
                                                                             ObjectID ownerID,
                                                                             int ratingValue,
                                                                             boolean isPrivate,
                                                                             boolean preserveCategories)
Creates a RatingCreationContext.

Parameters:
resourceUri - The URI identifying the resource this rating should be associated with.
ownerID - The ObjectID of the owner of this rating.
ratingValue - The value of this rating.
isPrivate - if true the rating should be considered private, i. e. only the current will be able to see it.
preserveCategories - Flag to indicate if all categories which have been assigned to the resource should be preserved
Returns:
A new creation context.

newRatingCreationContext

public abstract RatingCreationContext<java.net.URI> newRatingCreationContext(java.net.URI resourceUri,
                                                                             java.util.Set<java.lang.String> categories,
                                                                             ObjectID ownerID,
                                                                             int ratingValue,
                                                                             boolean isPrivate)
Creates a RatingCreationContext.

Parameters:
resourceUri - The URI identifying the resource this rating should be associated with.
categories - The set of categories the resource should be part of. Please note that categories are being ignored if the resourceUri references a Portal resource such as a page or portlet since only custom resource are allowed to be categorized.
ownerID - The ObjectID of the owner of this rating.
ratingValue - The value of this rating.
isPrivate - if true the rating should be considered private, i. e. only the current will be able to see it.
Returns:
A new creation context.

newRatingCreationContext

public abstract RatingCreationContext<ObjectID> newRatingCreationContext(ObjectID resourceID,
                                                                         ObjectID ownerID,
                                                                         int ratingValue,
                                                                         boolean isPrivate,
                                                                         boolean preserveCategories)
Creates a RatingCreationContext.
Note: This method requires that the given resource ObjectID must already exist in the database

Parameters:
resourceID - The ObjectID identifying the resource this rating should be associated with.
ownerID - The ObjectID of the owner of this rating.
ratingValue - The value of this rating.
isPrivate - if true the rating should be considered private, i. e. only the current will be able to see it.
preserveCategories - Flag to indicate if all categories which have been assigned to the resource should be preserved
Returns:
A new creation context.

newRatingCreationContext

public abstract RatingCreationContext<ObjectID> newRatingCreationContext(ObjectID resourceID,
                                                                         java.util.Set<java.lang.String> categories,
                                                                         ObjectID ownerID,
                                                                         int ratingValue,
                                                                         boolean isPrivate)
Creates a RatingCreationContext.
Note: This method requires that the given resource ObjectID must already exist in the database

Parameters:
resourceID - The ObjectID identifying the resource this rating should be associated with.
categories - The set of categories the resource should be part of. Please note that categories are being ignored if the resourceID references a Portal resource such as a page or portlet since only custom resource are allowed to be categorized.
ownerID - The ObjectID of the owner of this rating.
ratingValue - The value of this rating.
isPrivate - if true the rating should be considered private, i. e. only the current will be able to see it.
Returns:
A new creation context.