com.plumtree.portalpages.browsing.editors.sitemap.sitemapfolderplugin
Class SiteMapFolderPlugInModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorHelperModel
      extended by com.plumtree.portalpages.browsing.editors.sitemap.sitemapfolderplugin.SiteMapFolderPlugInModel
All Implemented Interfaces:
ISiteMapFolderPlugInModelRO, IManagedObject, IModel, IModelRO, IMVCObject

public class SiteMapFolderPlugInModel
extends EditorHelperModel
implements ISiteMapFolderPlugInModelRO

This Model contains the state of the plug-in section.

Author:
Julie Fournier

Field Summary
static java.lang.String STR_MVC_CLASS_NAME
          The unique identifier for the class
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
m_asOwner
 
Constructor Summary
SiteMapFolderPlugInModel()
           
 
Method Summary
 void AddWebLink(XPHashtable _htFormData)
          Repost action method for adding a link being edited to the array of links being actively worked on.
 boolean AreCommunitiesEnabled()
          Are communities enabled for this subportal?
 void ClearDeletedLinks()
           
 void ClearLinks()
          This repost function clears the list of web links (in reverse order)
 void ClearNewlyAddedLinks()
           
 void ClearUpdatedWebLinks()
           
 void CopyLinks(IPTSiteMapFolder _siteMapFolderDest, IPTSiteMapFolder _siteMapFolderSrc)
          This function clones links from source site map folder to destination site map folder.
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void DeleteLinks()
          Deletes the links selected in the tree
 void DetachLinks()
          This function clones the site map folder that is attached to a subportal and replaces the working copy with the clone.
 void EditWebLink(XPHashtable _htFormData)
          This repost method sets the m_strEditedID member variable, which is read by the view.
 java.lang.String GetCommPageSubSpaceID()
          Returns the subspace ID used by the Community Page tree control.
 XPArrayList GetDeletedLinks()
           
 java.lang.String GetDocumentSubSpaceID()
          Returns the subspace ID used by the Document tree control.
 java.lang.String GetEditedID()
          Returns the unique identifier for the web link that the user is currently editing (if any).
 java.lang.String GetExpertSubSpaceID()
          Returns the subspace ID used by the Expert tree control.
 XPArrayList GetLinks()
          Returns a queryresult wrapper with the list of links associated with the object being edited
 PTSortedArrayWrapper GetLinksAlphaSorted()
          Returns the Links sorted alphabetically
 java.lang.String GetName()
          Returns the Class name.
 XPArrayList GetNewlyAddedLinks()
           
 int GetObjectID()
          Returns the objectID for the site map folder being edited
 IPTSiteMapFolder GetPTObject()
          Returns the IPTSiteMapFolder object being manipulated
 java.lang.String GetSelectedCommPagesAsString()
          Get the selected community pages for the tree in "communityid,pageid;communityid,pageid" format (this is how the comm page tree is set to display the locations)
 java.lang.String GetSelectedDirItemsAsString()
          Get the selected docs and folders for the tree in the "classid, objectid" format
 java.lang.String GetSelectedUsersString()
          Get the selected users for the tree in the "classid, object format"
 XPArrayList GetUpdatedWebLinks()
           
 int GetWebLinkCount()
          Helper method to return the number of links currently cached in the working list
 java.lang.String GetWebLinkDesc()
          Returns the description of the web link we are working on.
 java.lang.String GetWebLinkName()
          Returns the name of the web link we are working on.
 java.lang.String[][] GetWebLinks()
          Returns a 2D array of strings containing all of the web link information
 java.lang.String GetWebLinkURL()
          Returns the URL of the web link we are working on.
 void InitializePlugIn(IPTSiteMapFolder _SiteMapFolder)
          To initialize this plug-in you need to set the DP name and the default value of the plug-in setting.
 boolean IsDirectoryEnabled()
          Is the directory enabled for this subportal?
 boolean IsDuplicated()
          Returns true if the site map folder is used on multiple subportals
 void RefreshItemFromTree(int intObjectType, java.lang.String strSubSpaceID)
          This method gets the selected items from the tree, setting member variables for ObjectID and name of the object selected.
 void RemoveLinks(XPHashtable _htFormData)
          This repost function removes links from the temporary working set.
 int SaveSection(XPHashtable _htFormData)
          Saves the data on the Main page.
 void SaveWebLinks(XPHashtable _htFormData)
          This method commits the current working set of web links to the Plumtree object
 void SetCommPageSubSpaceID(java.lang.String _strCommPageSubSpaceID)
          Returns the subspace ID used by the Community Page tree control.
 void SetDocumentSubSpaceID(java.lang.String _strDocumentSubSpaceID)
          Returns the subspace ID used by the Document tree control.
 void SetEditedID(java.lang.String editedID)
          Sets the unique identifier for the web link that the user is currently editing (if any).
 void SetExpertSubSpaceID(java.lang.String _strExpertSubSpaceID)
          Returns the subspace ID used by the Expert tree control.
 void SetWebLinkDesc(java.lang.String desc)
          Sets the desccription of the URL we are working on.
 void SetWebLinkName(java.lang.String name)
          Sets the name of the link we are working on.
 void SetWebLinkURL(java.lang.String webURL)
          Sets the URL of the link we are working on.
 void StoreLinks()
           
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorHelperModel
CleanupAllData, CleanupTempData, Init
 
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
The unique identifier for the class

See Also:
Constant Field Values
Constructor Detail

SiteMapFolderPlugInModel

public SiteMapFolderPlugInModel()
Method Detail

DeleteLinks

public void DeleteLinks()
Deletes the links selected in the tree


RefreshItemFromTree

public void RefreshItemFromTree(int intObjectType,
                                java.lang.String strSubSpaceID)
This method gets the selected items from the tree, setting member variables for ObjectID and name of the object selected. It is called on repost.

Parameters:
intObjectType - intObjectType - equal to the corresponding repost action

DetachLinks

public void DetachLinks()
This function clones the site map folder that is attached to a subportal and replaces the working copy with the clone. This allows for the case where a subportal is copied, but the user does not wish to share the mandatory links.


CopyLinks

public void CopyLinks(IPTSiteMapFolder _siteMapFolderDest,
                      IPTSiteMapFolder _siteMapFolderSrc)
This function clones links from source site map folder to destination site map folder.


AddWebLink

public void AddWebLink(XPHashtable _htFormData)
Repost action method for adding a link being edited to the array of links being actively worked on.


SaveWebLinks

public void SaveWebLinks(XPHashtable _htFormData)
This method commits the current working set of web links to the Plumtree object


RemoveLinks

public void RemoveLinks(XPHashtable _htFormData)
This repost function removes links from the temporary working set. These changes are not committed until SaveWebLinks() is called.

Parameters:
_htFormData -

EditWebLink

public void EditWebLink(XPHashtable _htFormData)
This repost method sets the m_strEditedID member variable, which is read by the view. When the view displays the link row whose unique identifier matches this value, the row is displayed in 'Edit' mode, i.e. with an input text box rather than a span.

Parameters:
_htFormData - - The HTML data coming back from the view

GetNewlyAddedLinks

public XPArrayList GetNewlyAddedLinks()

ClearNewlyAddedLinks

public void ClearNewlyAddedLinks()

GetUpdatedWebLinks

public XPArrayList GetUpdatedWebLinks()

ClearUpdatedWebLinks

public void ClearUpdatedWebLinks()

GetDeletedLinks

public XPArrayList GetDeletedLinks()

ClearDeletedLinks

public void ClearDeletedLinks()

ClearLinks

public void ClearLinks()
This repost function clears the list of web links (in reverse order)


Create

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

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

GetName

public java.lang.String GetName()
Returns the Class name.

Specified by:
GetName in interface IMVCObject
Specified by:
GetName in class EditorHelperModel
Returns:
String

GetPTObject

public IPTSiteMapFolder GetPTObject()
Returns the IPTSiteMapFolder object being manipulated

Specified by:
GetPTObject in interface ISiteMapFolderPlugInModelRO

GetLinks

public XPArrayList GetLinks()
Returns a queryresult wrapper with the list of links associated with the object being edited

Specified by:
GetLinks in interface ISiteMapFolderPlugInModelRO
Returns:
ASQueryResultWrapper

GetLinksAlphaSorted

public PTSortedArrayWrapper GetLinksAlphaSorted()
Description copied from interface: ISiteMapFolderPlugInModelRO
Returns the Links sorted alphabetically

Specified by:
GetLinksAlphaSorted in interface ISiteMapFolderPlugInModelRO
Returns:
PTSortedArrayWrapper

InitializePlugIn

public void InitializePlugIn(IPTSiteMapFolder _SiteMapFolder)
To initialize this plug-in you need to set the DP name and the default value of the plug-in setting.

Parameters:
_sPlugInSetting -

SaveSection

public int SaveSection(XPHashtable _htFormData)
Saves the data on the Main page.

Specified by:
SaveSection in class EditorHelperModel
Parameters:
_htFormData -
Returns:
int Status for server side validation

StoreLinks

public void StoreLinks()

IsDirectoryEnabled

public boolean IsDirectoryEnabled()
Description copied from interface: ISiteMapFolderPlugInModelRO
Is the directory enabled for this subportal?

Specified by:
IsDirectoryEnabled in interface ISiteMapFolderPlugInModelRO
Returns:
boolean
See Also:
ISiteMapFolderPlugInModelRO.IsDirectoryEnabled()

AreCommunitiesEnabled

public boolean AreCommunitiesEnabled()
Description copied from interface: ISiteMapFolderPlugInModelRO
Are communities enabled for this subportal?

Specified by:
AreCommunitiesEnabled in interface ISiteMapFolderPlugInModelRO
Returns:
boolean
See Also:
ISiteMapFolderPlugInModelRO.AreCommunitiesEnabled()

GetObjectID

public int GetObjectID()
Returns the objectID for the site map folder being edited

Specified by:
GetObjectID in interface ISiteMapFolderPlugInModelRO
Returns:
int

GetSelectedUsersString

public java.lang.String GetSelectedUsersString()
Description copied from interface: ISiteMapFolderPlugInModelRO
Get the selected users for the tree in the "classid, object format"

Specified by:
GetSelectedUsersString in interface ISiteMapFolderPlugInModelRO
Returns:
String

GetSelectedDirItemsAsString

public java.lang.String GetSelectedDirItemsAsString()
Description copied from interface: ISiteMapFolderPlugInModelRO
Get the selected docs and folders for the tree in the "classid, objectid" format

Specified by:
GetSelectedDirItemsAsString in interface ISiteMapFolderPlugInModelRO
Returns:
String

GetSelectedCommPagesAsString

public java.lang.String GetSelectedCommPagesAsString()
Description copied from interface: ISiteMapFolderPlugInModelRO
Get the selected community pages for the tree in "communityid,pageid;communityid,pageid" format (this is how the comm page tree is set to display the locations)

Specified by:
GetSelectedCommPagesAsString in interface ISiteMapFolderPlugInModelRO
Returns:
String

IsDuplicated

public boolean IsDuplicated()
Returns true if the site map folder is used on multiple subportals

Specified by:
IsDuplicated in interface ISiteMapFolderPlugInModelRO
Returns:
boolean

GetExpertSubSpaceID

public java.lang.String GetExpertSubSpaceID()
Returns the subspace ID used by the Expert tree control. This is used to ensure that trees that already exist in memory are reused instead of recreated.

Specified by:
GetExpertSubSpaceID in interface ISiteMapFolderPlugInModelRO
Returns:
String

SetExpertSubSpaceID

public void SetExpertSubSpaceID(java.lang.String _strExpertSubSpaceID)
Returns the subspace ID used by the Expert tree control. This is used to ensure that trees that already exist in memory are reused instead of recreated.

Parameters:
__strExpertSubSpaceID - The subspace id being set

GetDocumentSubSpaceID

public java.lang.String GetDocumentSubSpaceID()
Returns the subspace ID used by the Document tree control. This is used to ensure that trees that already exist in memory are reused instead of recreated.

Specified by:
GetDocumentSubSpaceID in interface ISiteMapFolderPlugInModelRO
Returns:
String

SetDocumentSubSpaceID

public void SetDocumentSubSpaceID(java.lang.String _strDocumentSubSpaceID)
Returns the subspace ID used by the Document tree control. This is used to ensure that trees that already exist in memory are reused instead of recreated.

Parameters:
__strExpertSubSpaceID - The subspace id being set

GetCommPageSubSpaceID

public java.lang.String GetCommPageSubSpaceID()
Returns the subspace ID used by the Community Page tree control. This is used to ensure that trees that already exist in memory are reused instead of recreated.

Specified by:
GetCommPageSubSpaceID in interface ISiteMapFolderPlugInModelRO
Returns:
String

SetCommPageSubSpaceID

public void SetCommPageSubSpaceID(java.lang.String _strCommPageSubSpaceID)
Returns the subspace ID used by the Community Page tree control. This is used to ensure that trees that already exist in memory are reused instead of recreated.

Parameters:
__strCommPageSubSpaceID - The subspace id being set

GetWebLinks

public java.lang.String[][] GetWebLinks()
Returns a 2D array of strings containing all of the web link information

Specified by:
GetWebLinks in interface ISiteMapFolderPlugInModelRO
Returns:
String[][]

GetWebLinkCount

public int GetWebLinkCount()
Helper method to return the number of links currently cached in the working list

Specified by:
GetWebLinkCount in interface ISiteMapFolderPlugInModelRO
Returns:
int

GetWebLinkDesc

public java.lang.String GetWebLinkDesc()
Returns the description of the web link we are working on.

Specified by:
GetWebLinkDesc in interface ISiteMapFolderPlugInModelRO
Returns:
String

GetWebLinkName

public java.lang.String GetWebLinkName()
Returns the name of the web link we are working on.

Specified by:
GetWebLinkName in interface ISiteMapFolderPlugInModelRO
Returns:
String

GetWebLinkURL

public java.lang.String GetWebLinkURL()
Returns the URL of the web link we are working on.

Specified by:
GetWebLinkURL in interface ISiteMapFolderPlugInModelRO
Returns:
String

SetWebLinkDesc

public void SetWebLinkDesc(java.lang.String desc)
Sets the desccription of the URL we are working on.

Parameters:
desc - The description to set

SetWebLinkName

public void SetWebLinkName(java.lang.String name)
Sets the name of the link we are working on.

Parameters:
name - The name to Set

SetWebLinkURL

public void SetWebLinkURL(java.lang.String webURL)
Sets the URL of the link we are working on.

Parameters:
webURL - The URL to Set

GetEditedID

public java.lang.String GetEditedID()
Returns the unique identifier for the web link that the user is currently editing (if any). If no link is being edited, the member variable should contain an empty string.

Specified by:
GetEditedID in interface ISiteMapFolderPlugInModelRO
Returns:
String

SetEditedID

public void SetEditedID(java.lang.String editedID)
Sets the unique identifier for the web link that the user is currently editing (if any). If no link is being edited, the member variable should contain an empty string.

Parameters:
editedID - The editedID to set



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