com.plumtree.portaluiinfrastructure.classtypedescriptors
Class APTClassTypeDesc

java.lang.Object
  extended by com.plumtree.portaluiinfrastructure.classtypedescriptors.APTClassTypeDesc
All Implemented Interfaces:
IPTClassTypeDesc, IClassTypeDesc
Direct Known Subclasses:
APTClassTypeDesc, APTExtClassTypeDesc, APTNonExtClassTypeDesc

public abstract class APTClassTypeDesc
extends java.lang.Object
implements IPTClassTypeDesc

Parent implementation for PTClassTypeDesc. This class will be extended by classes which define extensible and non-extensible PTClassTypeDescs. This class implements GetRedirectViewObjectMetaData (standard for most, to be overriden by some), GetRedirectViewObject (which defers to GetRedirectOpenObject), and provides some helper methods for retrieving arguments. If a specific class type needs to be supported by the Object Lock Manager / "Admin UI->Release Item Locks" page, extending class should simply implement a default constructor and set the values of hasObjectLockManager, objectLockManagerMsgID and objectLockManagerMsgFileName fields accordingly. By default, this abstract class will set these values to not support Object Lock Manager

Author:
John Osborne

Field Summary
protected  boolean hasObjectLockManager
           
protected  java.lang.String objectLockManagerMsgFileName
           
protected  int objectLockManagerMsgID
           
 
Constructor Summary
APTClassTypeDesc()
           
 
Method Summary
 boolean AppearsInGlobalObjPropMap()
          Returns a boolean that tells the client if this class type appears in the global object property map utility.
abstract  boolean AppearsInMainCreateNewClassMenu()
          Returns a boolean that tells the client if this class type should appear in the main create new object menu.
 java.lang.String ConstructFriendlyURL(FriendlyURL url, AActivitySpace space)
          Generates a friendly URL to the implementing class type.
abstract  int GetClassID()
          Returns the class ID of the class type.
 java.lang.String GetClassKey()
          Returns the key for this class type.
 ClassTypeEnum GetClassType()
          Returns the class type.
abstract  java.lang.String GetClassTypeLocalizedName(java.lang.String _strLangID)
          Returns the localized name for the class type.
abstract  int GetCreateActivityID()
          This method returns the Activity Rights ID that the user needs to have in order to have access to make changes to this class type.
abstract  HTMLImg GetDefaultIcon()
          Returns the default icon for items of this class type.
 int GetDefaultOpenerMode()
          Returns the default opener mode for this class type.
 int[] GetDependentClassTypeIDs()
          This method lets you specify what kind of PTClassTypes depend on this PTClassType.
 java.lang.String GetObjectLockManagerLocalizedName(java.lang.String strLangID)
          Returns the localized name that will be displayed on the left navigation menu of "Admin UI->Release Item Locks" page.
abstract  Redirect GetRedirectCreateNew(XPHashtable _htArguments, AActivitySpace _asParent, java.lang.Object _userSession)
          This method is called by the Common Opener in the create mode.
abstract  Redirect GetRedirectOpenObject(XPHashtable _htArguments, AActivitySpace _asParent, java.lang.Object _userSession)
          This method is called by the Common Opener in the edit mode.
 Redirect GetRedirectSearchBrowse(XPHashtable _htArguments, AActivitySpace _asParent, java.lang.Object _userSession)
          This method is called by the Common Opener in the search basic mode.
 Redirect GetRedirectSearchEdit(XPHashtable _htArguments, AActivitySpace _asParent, java.lang.Object _userSession)
          This method is called by the Common Opener in the search basic mode.
 Redirect GetRedirectViewObject(XPHashtable _htArguments, AActivitySpace _asParent, java.lang.Object _userSession)
          This method is called by the Common Opener in the view mode.
 Redirect GetRedirectViewObjectMetaData(XPHashtable _htArguments, AActivitySpace _asParent, java.lang.Object _userSession)
          This method is called by the Common Opener in the meta mode.
abstract  int[] GetRelatedClassTypeIDs()
          This method lets you associate the class ID for this PTClassType with other class IDs.
 boolean HasCreateActivityRight(IPTSession _ptSession)
          Returns a boolean indicating whether the user has enough rights to make changes to this class type.
abstract  boolean HasGlobalClassTypeMap()
          Returns a boolean that tells the client if this class type is on the global class type map.
 boolean HasObjectLockManager()
          Returns a boolean that tells the client if this class included/supported on the "Admin UI->Release Item Locks" page.
abstract  boolean IsExtensible()
          Returns a boolean that tells the client if this class type is extensible.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hasObjectLockManager

protected boolean hasObjectLockManager

objectLockManagerMsgID

protected int objectLockManagerMsgID

objectLockManagerMsgFileName

protected java.lang.String objectLockManagerMsgFileName
Constructor Detail

APTClassTypeDesc

public APTClassTypeDesc()
Method Detail

AppearsInMainCreateNewClassMenu

public abstract boolean AppearsInMainCreateNewClassMenu()
Description copied from interface: IPTClassTypeDesc
Returns a boolean that tells the client if this class type should appear in the main create new object menu.

Specified by:
AppearsInMainCreateNewClassMenu in interface IPTClassTypeDesc
Returns:
A boolean that tells the client if this class type should appear in the main create new object menu.

AppearsInGlobalObjPropMap

public boolean AppearsInGlobalObjPropMap()
Description copied from interface: IPTClassTypeDesc
Returns a boolean that tells the client if this class type appears in the global object property map utility.

Specified by:
AppearsInGlobalObjPropMap in interface IPTClassTypeDesc
Returns:
A boolean that tells the client if this class type appears in the global object property map utility

GetClassID

public abstract int GetClassID()
Description copied from interface: IPTClassTypeDesc
Returns the class ID of the class type. Use the PT_CLASSIDS constant to determine/reference IDs.

Specified by:
GetClassID in interface IPTClassTypeDesc
Returns:
The class ID of the class type.

GetClassKey

public java.lang.String GetClassKey()
Description copied from interface: IClassTypeDesc
Returns the key for this class type.

Specified by:
GetClassKey in interface IClassTypeDesc
Returns:
The key for this class type.

GetClassType

public ClassTypeEnum GetClassType()
Description copied from interface: IClassTypeDesc
Returns the class type.

Specified by:
GetClassType in interface IClassTypeDesc
Returns:
The class type.

GetClassTypeLocalizedName

public abstract java.lang.String GetClassTypeLocalizedName(java.lang.String _strLangID)
Description copied from interface: IPTClassTypeDesc
Returns the localized name for the class type. For example, the name for users is "User" in English.

Specified by:
GetClassTypeLocalizedName in interface IPTClassTypeDesc
Parameters:
_strLangID - The language to retrieve the name for.
Returns:
The localized name for the class type.

GetCreateActivityID

public abstract int GetCreateActivityID()
This method returns the Activity Rights ID that the user needs to have in order to have access to make changes to this class type. Use the PT_ACTIVITY_RIGHTS constant to specify/compare rights.

Returns:
The Activity Rights ID necessary for changes to this class type.

GetDefaultIcon

public abstract HTMLImg GetDefaultIcon()
Description copied from interface: IPTClassTypeDesc
Returns the default icon for items of this class type.

Specified by:
GetDefaultIcon in interface IPTClassTypeDesc
Returns:
The default icon for items of this class type.

GetDefaultOpenerMode

public int GetDefaultOpenerMode()
Description copied from interface: IClassTypeDesc
Returns the default opener mode for this class type.

Specified by:
GetDefaultOpenerMode in interface IClassTypeDesc
Returns:
The default opener mode for this class type.

GetRedirectCreateNew

public abstract Redirect GetRedirectCreateNew(XPHashtable _htArguments,
                                              AActivitySpace _asParent,
                                              java.lang.Object _userSession)
Description copied from interface: IClassTypeDesc
This method is called by the Common Opener in the create mode. Depending on what class type you are dealing with, the Common Opener will invoke the correct implemented method. Some class types may need to override this so that they can put additional control arguments in.

Specified by:
GetRedirectCreateNew in interface IClassTypeDesc
Parameters:
_htArguments - Arguments to reach the new space.
_asParent - The parent activity space.
_userSession - The current session.
Returns:
A redirect that will bring you to the create activity space for the particular class/object.

GetRedirectOpenObject

public abstract Redirect GetRedirectOpenObject(XPHashtable _htArguments,
                                               AActivitySpace _asParent,
                                               java.lang.Object _userSession)
Description copied from interface: IClassTypeDesc
This method is called by the Common Opener in the edit mode. Depending on what class type you are dealing with, the Common Opener will invoke the correct implemented method. Some class types may need to override this so that they can put additional control arguments in.

Specified by:
GetRedirectOpenObject in interface IClassTypeDesc
Parameters:
_htArguments - Arguments to reach the new space.
_asParent - The parent activity space.
_userSession - The current session.
Returns:
A redirect that will bring you to the edit activity space for the particular class/object.

GetRedirectSearchBrowse

public Redirect GetRedirectSearchBrowse(XPHashtable _htArguments,
                                        AActivitySpace _asParent,
                                        java.lang.Object _userSession)
Description copied from interface: IClassTypeDesc
This method is called by the Common Opener in the search basic mode. This is a helper method that will return one of the four main modes.

Specified by:
GetRedirectSearchBrowse in interface IClassTypeDesc
Parameters:
_htArguments - Arguments to reach the new space.
_asParent - The parent activity space.
_userSession - The current session.
Returns:
A redirect that will bring you to the meta activity space for the particular class/object.

GetRedirectSearchEdit

public Redirect GetRedirectSearchEdit(XPHashtable _htArguments,
                                      AActivitySpace _asParent,
                                      java.lang.Object _userSession)
Description copied from interface: IClassTypeDesc
This method is called by the Common Opener in the search basic mode. This is a helper method that will return one of the four main modes.

Specified by:
GetRedirectSearchEdit in interface IClassTypeDesc
Parameters:
_htArguments - Arguments to reach the new space.
_asParent - The parent activity space.
_userSession - The current session.
Returns:
A redirect that will bring you to the meta activity space for the particular class/object.

GetRedirectViewObject

public Redirect GetRedirectViewObject(XPHashtable _htArguments,
                                      AActivitySpace _asParent,
                                      java.lang.Object _userSession)
Description copied from interface: IPTClassTypeDesc
This method is called by the Common Opener in the view mode. Depending on what class type you are dealing with, the Common Opener will invoke the correct implemented method. Some class types may need to override this so that they can put additional control arguments in.

Specified by:
GetRedirectViewObject in interface IPTClassTypeDesc
Specified by:
GetRedirectViewObject in interface IClassTypeDesc
Parameters:
_htArguments - contains the URL path.
_asParent - The parent activity space.
_userSession - The current session.
Returns:
A redirect that will bring you to the view activity space for the particular class/object.

GetRedirectViewObjectMetaData

public Redirect GetRedirectViewObjectMetaData(XPHashtable _htArguments,
                                              AActivitySpace _asParent,
                                              java.lang.Object _userSession)
Description copied from interface: IClassTypeDesc
This method is called by the Common Opener in the meta mode. Depending on what class type you are dealing with, the Common Opener will invoke the correct implemented method. Some class types may need to override this so that they can put additional control arguments in.

Specified by:
GetRedirectViewObjectMetaData in interface IClassTypeDesc
Parameters:
_htArguments - Arguments to reach the new space.
_asParent - The parent activity space.
_userSession - The current session.
Returns:
A redirect that will bring you to the meta activity space for the particular class/object.

GetRelatedClassTypeIDs

public abstract int[] GetRelatedClassTypeIDs()
Description copied from interface: IPTClassTypeDesc
This method lets you associate the class ID for this PTClassType with other class IDs. One application for this is at the end of the editor creation wizard, it provides shortcut links to create related objets. Return NULL if there are no related class types.

Specified by:
GetRelatedClassTypeIDs in interface IPTClassTypeDesc
Returns:
An array of related class IDs. May be NULL.

GetDependentClassTypeIDs

public int[] GetDependentClassTypeIDs()
Description copied from interface: IPTClassTypeDesc
This method lets you specify what kind of PTClassTypes depend on this PTClassType. One application for this is to make sure to try to delete dependent items before deleting the main item, otherwise the delete may fail because there are dependent items. This method should only return class types that are directly dependent on this class type. For example, Remote Servers should return Web Services, but not Portlets. Web Services should return Portlets. Return NULL if there are no related class types. NOTE: This does not support circular loops of dependencies (I.E. A -> B -> C -> A). This behavior is undefined, and will mostly likely cause deletes of those objects to fail.

Specified by:
GetDependentClassTypeIDs in interface IPTClassTypeDesc
Returns:
An array of dependent class IDs. May be NULL.

HasCreateActivityRight

public boolean HasCreateActivityRight(IPTSession _ptSession)
Returns a boolean indicating whether the user has enough rights to make changes to this class type.

Parameters:
_ptSession - The current Plumtree session.
Returns:
Boolean indicating whether the user has rights to make changes to this class type.

HasGlobalClassTypeMap

public abstract boolean HasGlobalClassTypeMap()
Description copied from interface: IPTClassTypeDesc
Returns a boolean that tells the client if this class type is on the global class type map.

Specified by:
HasGlobalClassTypeMap in interface IPTClassTypeDesc
Returns:
A boolean that tells the client if this class type is on the global class type map.

IsExtensible

public abstract boolean IsExtensible()
Description copied from interface: IPTClassTypeDesc
Returns a boolean that tells the client if this class type is extensible.

Specified by:
IsExtensible in interface IPTClassTypeDesc
Returns:
A boolean that tells the client if this class type is extensible.

HasObjectLockManager

public boolean HasObjectLockManager()
Description copied from interface: IPTClassTypeDesc
Returns a boolean that tells the client if this class included/supported on the "Admin UI->Release Item Locks" page.

Specified by:
HasObjectLockManager in interface IPTClassTypeDesc
Returns:
A boolean that tells the client if this class included/supported on the "Admin UI->Release Item Locks" page.

GetObjectLockManagerLocalizedName

public java.lang.String GetObjectLockManagerLocalizedName(java.lang.String strLangID)
Description copied from interface: IPTClassTypeDesc
Returns the localized name that will be displayed on the left navigation menu of "Admin UI->Release Item Locks" page.

Specified by:
GetObjectLockManagerLocalizedName in interface IPTClassTypeDesc
Returns:
The localized name for the class type.

ConstructFriendlyURL

public java.lang.String ConstructFriendlyURL(FriendlyURL url,
                                             AActivitySpace space)
Description copied from interface: IPTClassTypeDesc
Generates a friendly URL to the implementing class type. Ideally the object name is provided, otherwise if only the object id is provided, the method has to look up the object name. If both are provided, both the object name and object id is used in the friendly url.

Specified by:
ConstructFriendlyURL in interface IPTClassTypeDesc
Parameters:
url - FriendlyURL containing the information for the url
Returns:
Returns the friendly part of the friendly Url, that is, just the part of the Url after server.pt including leading slash.
See Also:
IPTClassTypeDesc#ConstructFriendlyURL(String, int, String)



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.