com.plumtree.portalpages.rest.dojo
Class KDDocumentDataStoreModel

java.lang.Object
  extended by com.plumtree.portalpages.rest.ARESTModel
      extended by com.plumtree.portalpages.rest.dojo.AQueryStoreModel
          extended by com.plumtree.portalpages.rest.dojo.KDDocumentDataStoreModel
All Implemented Interfaces:
IManagedObject, IModel, IModelRO, IMVCObject

public class KDDocumentDataStoreModel
extends AQueryStoreModel
implements IModel

Model to retrieve KD documents in a specific KD folder

Author:
rozhang

Field Summary
static java.lang.String COL_AUTHOR
           
static java.lang.String COL_DOCUMENTPATH
          KD document specific property names
static java.lang.String COL_DOCUMENTURL
           
static java.lang.String COL_ICON
           
static int INVALIDFOLDER_ERROR
          folder id to return error
protected  AActivitySpace m_space
           
static int NOFOLDER_EMPTYRESPONSE
          folder id to return empty response (default behavior)
static java.lang.String STR_MVC_CLASS_NAME
           
 
Fields inherited from class com.plumtree.portalpages.rest.dojo.AQueryStoreModel
COL_CREATED, COL_DESCRIPTION, COL_LASTMODIFIED, COL_NAME, COL_OBJECTID, COLNAME_PREFIX, COLNAME_TO_PROPID_MAP, CUSTOMPROP_TYPE_SESSIONMAP_NAME, DATASTORE_PROP_IDENTIFIER, DATASTORE_PROP_ITEMS, DATASTORE_PROP_LABEL, DATASTORE_PROP_TOTALRESULTS, INVALID_PROPID, NO_PROPTYPE, PROP_GRIDTYPE_ICON, PROP_GRIDTYPE_URL, PROPID_PROPTYPE_MAP, PROPTYPE_LOCK
 
Fields inherited from class com.plumtree.portalpages.rest.ARESTModel
m_error
 
Constructor Summary
KDDocumentDataStoreModel()
           
 
Method Summary
 void CleanupAllData()
          This method is called when an ActivitySpace is removed from the cache.
 void CleanupTempData()
          This method is called at the end of every HTTP request by the Interpreter.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
protected  java.lang.String CreateGridLabelEntry(java.lang.String iconUrl, java.lang.String docUrl, java.lang.String docName)
          Create special entry for first column in the dojo datagrid widget.
 java.lang.String FormatPropertyDateString(double dateFromSearch)
           
 java.lang.String FormatPropertyDateString(XPDateTime date)
           
 int GetCurrFolderId()
           
 int GetDateFormat()
           
 XPHashtable GetFolderDocumentDataStoreObject(int folderId)
          Performs search request to retrieve documents
 XPLocale GetLocale()
           
 java.lang.String GetName()
          Return the name of the MVC object.
 int[] GetQueryPropIds()
           
 XPHashtable GetQueryStoreResult()
          Return the result from the current request.
 int GetTimeFormat()
           
 void Init(AActivitySpace parent)
          This method initializes the model.
 void SetCurrFolderId(int folderId)
           
 void SetDateFormat(int dateFormat)
           
 void SetLocale(java.lang.String localeStr)
           
 void SetQueryPropIds(int[] queryPropIds)
           
 void SetTimeFormat(int timeFormat)
           
 
Methods inherited from class com.plumtree.portalpages.rest.dojo.AQueryStoreModel
AddColNameToSearchPropIdMapping, AddDataStoreMetaData, AddPropIdToPropTypeMapping, GetCustomPropType, GetOrderById, GetPropType, GetQuery, GetResultSize, GetSearchPropIdFromColumnName, GetStartIndex, SetOrderById, SetQuery, SetResultSize, SetStartIndex
 
Methods inherited from class com.plumtree.portalpages.rest.ARESTModel
GetError, SetError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
See Also:
Constant Field Values

COL_DOCUMENTPATH

public static final java.lang.String COL_DOCUMENTPATH
KD document specific property names


COL_ICON

public static final java.lang.String COL_ICON

COL_DOCUMENTURL

public static final java.lang.String COL_DOCUMENTURL

COL_AUTHOR

public static final java.lang.String COL_AUTHOR
See Also:
Constant Field Values

NOFOLDER_EMPTYRESPONSE

public static final int NOFOLDER_EMPTYRESPONSE
folder id to return empty response (default behavior)

See Also:
Constant Field Values

INVALIDFOLDER_ERROR

public static final int INVALIDFOLDER_ERROR
folder id to return error

See Also:
Constant Field Values

m_space

protected AActivitySpace m_space
Constructor Detail

KDDocumentDataStoreModel

public KDDocumentDataStoreModel()
Method Detail

GetQueryStoreResult

public XPHashtable GetQueryStoreResult()
Return the result from the current request. This method is is called

Specified by:
GetQueryStoreResult in class AQueryStoreModel
Returns:

GetFolderDocumentDataStoreObject

public XPHashtable GetFolderDocumentDataStoreObject(int folderId)
Performs search request to retrieve documents

Parameters:
folderId -
Returns:
Empty DataStore response object if folderId is NOFOLDER_EMPTYRESPONSE or null if folder id is INVALIDFOLDER_ERROR

CreateGridLabelEntry

protected java.lang.String CreateGridLabelEntry(java.lang.String iconUrl,
                                                java.lang.String docUrl,
                                                java.lang.String docName)
Create special entry for first column in the dojo datagrid widget. The label columns displays the name of the document with an icon and url to the document. Need to pass in values for all 3 of the properties. The comma separated string list is parsed by the kdLabelFormatter javascript function

Parameters:
iconUrl -
docUrl -
docName -
Returns:

FormatPropertyDateString

public java.lang.String FormatPropertyDateString(double dateFromSearch)

FormatPropertyDateString

public java.lang.String FormatPropertyDateString(XPDateTime date)
Parameters:
date -
Returns:

SetCurrFolderId

public void SetCurrFolderId(int folderId)

GetCurrFolderId

public int GetCurrFolderId()

SetDateFormat

public void SetDateFormat(int dateFormat)

GetDateFormat

public int GetDateFormat()

SetTimeFormat

public void SetTimeFormat(int timeFormat)

GetTimeFormat

public int GetTimeFormat()

SetLocale

public void SetLocale(java.lang.String localeStr)

GetLocale

public XPLocale GetLocale()

SetQueryPropIds

public void SetQueryPropIds(int[] queryPropIds)

GetQueryPropIds

public int[] GetQueryPropIds()

CleanupAllData

public void CleanupAllData()
Description copied from interface: IModel
This method is called when an ActivitySpace is removed from the cache. The Interpreter calls AActivitySpace.CleanupAllData(), which calls this method on all IModels registered using AActivitySpace.RegisterModel(). This method is intended for releasing data stored in the server when the activity space is no longer needed, such as search objects that need to be maintained as long as the user is clicking through the search, but should be freed when the space can no longer be used. This can be used to prevent Java references to COM memory from hanging around in the long lived Java heap without cleaning up the underlying COM memory. The Java reference will still stay in the long lived heap until it gets garbage collected (which could be a while), but the COM memory should get released here. This method will not be called if an HTTPSession times out. CleanupTempData will be called before CleanupAllData.

Specified by:
CleanupAllData in interface IModel
See Also:
IModel.CleanupAllData()

CleanupTempData

public void CleanupTempData()
Description copied from interface: IModel
This method is called at the end of every HTTP request by the Interpreter. The Interpreter calls AActivitySpace.CleanupTempData(), which calls this method on all IModels registered using AActivitySpace.RegisterModel(). This method is intended for cleaning up temporary data that is only used for the lifetime of a single request, like DB query results.

Specified by:
CleanupTempData in interface IModel
See Also:
IModel.CleanupTempData()

Init

public void Init(AActivitySpace parent)
Description copied from interface: IModel
This method initializes the model. This is called automatically when AActivitySpace.RegisterModel() is called.

Specified by:
Init in interface IModel
Parameters:
parent - the parent Activity Space
See Also:
IModel.Init(com.plumtree.uiinfrastructure.activityspace.AActivitySpace)

GetName

public java.lang.String GetName()
Description copied from interface: IMVCObject
Return the name of the MVC object.

Specified by:
GetName in interface IMVCObject
Returns:
the name of the object.
See Also:
IMVCObject.GetName()

Create

public java.lang.Object Create()
Description copied from interface: IManagedObject
This method is used by the ASManager to return new instances of managed objects.

Specified by:
Create in interface IManagedObject
Returns:
A new instance of the managed class (i.e. return new Foo();)
See Also:
IManagedObject.Create()



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