com.ibm.workplace.wcm.api
Interface DocumentType<T extends WCMApiObject>

Type Parameters:
T - The WCM API type
All Superinterfaces:
java.io.Serializable

public interface DocumentType<T extends WCMApiObject>
extends java.io.Serializable

This interface is used to define the types of WCMApiObjects that are available to the API. Each specific instance can be obtained through the DocumentTypes interface. Note that these apply to all WCMApiObjects, not just Documents.

See Also:
DocumentTypes

Method Summary
 boolean equals(java.lang.Object object)
          Indicates if this object is equals to the one passed in.
 java.lang.Class<T> getApiType()
          Returns the WCM API type for this document type.
 java.lang.String getTitle(java.util.Locale p_locale)
          Get the translated title for the document type.
 int hashCode()
          Answers an integer hash code for the receiver.
 boolean isAuthoringTemplateType()
          Checks if the DocumentType is an Authoring Template type.
 boolean isContentComponentType()
          Checks if the DocumentType is a Content Component type.
 boolean isLibraryComponentType()
          Checks if the current DocumentType is a Library Component type.
 boolean isOfEquivalentType(DocumentType<? extends WCMApiObject> type)
          Indicates if this DocumentType is 'equivalent' to the DocumentType passed in.
 boolean isOfType(DocumentType<? extends WCMApiObject> type)
          Indicates if this DocumentType is of the exact same type of the DocumentType passed in.
 boolean isWorkflowAction()
          Checks if the current DocumentType is a Workflow Action type
 java.lang.String toString()
          Returns a String representation of this object.
 

Method Detail

getApiType

java.lang.Class<T> getApiType()
Returns the WCM API type for this document type.

Returns:
the WCM API type class object
Since:
7.0 CF33

isOfEquivalentType

boolean isOfEquivalentType(DocumentType<? extends WCMApiObject> type)
Indicates if this DocumentType is 'equivalent' to the DocumentType passed in. This DocumentType is equivalent to the DocumentType passed in if they represent the same DocumentType, or if they have an 'abstract type' relationship. For instance, DocumentTypes.AuthoringTemplate DocumentTypes.SiteAreaTemplate are of type DocumentTypes.AbstractAuthoringTemplate, and DocumentTypes.LibraryTextComponent and the other library components are all of type DocumentTypes.LibraryComponent.

Parameters:
type - the DocumentType with which to compare.
Returns:
true if this DocumentType is of the type of the DocumentType argument; false otherwise.
Since:
8.0

isOfType

boolean isOfType(DocumentType<? extends WCMApiObject> type)
Indicates if this DocumentType is of the exact same type of the DocumentType passed in.

Parameters:
type - the DocumentType with which to compare.
Returns:
true if this DocumentType is of the exact same type of the DocumentType argument; false otherwise.
Since:
8.0

isContentComponentType

boolean isContentComponentType()
Checks if the DocumentType is a Content Component type.

Returns:
true if the current DocumentType is a Content Component type, false otherwise
Since:
8.0

isAuthoringTemplateType

boolean isAuthoringTemplateType()
Checks if the DocumentType is an Authoring Template type.

Returns:
true the current DocumentType is an Authoring Template type, false otherwise
Since:
8.0

isLibraryComponentType

boolean isLibraryComponentType()
Checks if the current DocumentType is a Library Component type.

Returns:
true the current DocumentType is a Library Component type, false otherwise
Since:
8.0

isWorkflowAction

boolean isWorkflowAction()
Checks if the current DocumentType is a Workflow Action type

Returns:
true the current DocumentType is a Workflow Action type, false otherwise
Since:
8.0

toString

java.lang.String toString()
Returns a String representation of this object. Currently this returns the class name of the implementing class for the WCM API Interface, though this should not be relied upon. Use getApiType() in preference to this method, since the return type of getApiType() can be relied upon not to change.

Overrides:
toString in class java.lang.Object
Returns:
a String version of this object.
Since:
8.0

getTitle

java.lang.String getTitle(java.util.Locale p_locale)
Get the translated title for the document type.

Parameters:
p_locale - locale
Returns:
the translated title

equals

boolean equals(java.lang.Object object)
Indicates if this object is equals to the one passed in. Two DocumentTypes are equal if they represent the same DocumentType, except for that special case that DocumentTypes.Site is treated as equal to DocumentTypes.SiteArea.

Overrides:
equals in class java.lang.Object
Parameters:
object - the reference object with which to compare.
Returns:
true if this object is the same as the object argument; false otherwise.

hashCode

int hashCode()
Answers an integer hash code for the receiver. Any two objects which answer true when passed to .equals must answer the same value for this method.

Overrides:
hashCode in class java.lang.Object
Returns:
the receiver's hash.
See Also:
equals(java.lang.Object)