com.plumtree.portalpages.ext.providers.www.datasource
Class DataSourceModel

java.lang.Object
  extended by com.plumtree.uiinfrastructure.editor.EditorModel
      extended by com.plumtree.portaluiinfrastructure.editor.ObjEditorModel
          extended by com.plumtree.portalpages.admin.editors.datasource.DSModel
              extended by com.plumtree.portalpages.ext.providers.www.datasource.DataSourceModel
All Implemented Interfaces:
IDSModelRO, IDataSourceModelRO, IDescriptionModelRO, IMigrationModelRO, IObjEditorModelRO, IManagedObject, IModel, IModelRO, IMVCObject, IEditorModelRO, IRepostModel

public class DataSourceModel
extends DSModel
implements IDataSourceModelRO

This class contains the IPTDatasource server object, as well as the set and get methods on that object. This class is called by the DataSourceRepostControl class to perform the changes on the Object and by the View classes to display the latest values on the page.

Author:
JohnH

Field Summary
static int COOKIELIST_NUMCOLUMNS
          The number of columns in the cookie list multicolumn list control
static int LOGINFORMLIST_NUMCOLUMNS
          The number of columns in the login form multicolumn list control
static java.lang.String STR_MVC_CLASS_NAME
          The unique identifier for the activity space
 
Fields inherited from class com.plumtree.portalpages.admin.editors.datasource.DSModel
m_intURLType, m_intWebServiceID, PMODE_CREATE, PMODE_EDIT, PMODE_INVALID
 
Fields inherited from class com.plumtree.portaluiinfrastructure.editor.ObjEditorModel
EDITOR_CLASSID_UNKNOWN, EDITOR_FOLDERID_UNKNOWN, EDITOR_OBJECTID_UNKNOWN, EDITOR_QS_BOL_QS_FORCESAVEINFOLDER, EDITOR_QS_INT_CLASS_ID, EDITOR_QS_INT_QS_FOLDER_ID, EDITOR_QS_INT_QS_OBJECT_ID, m_bDisableDescription, m_bDisableSecurity, m_bForceSavedInSuppliedFolder, m_bIsSysAdmin, m_nClassID, m_nFolderID, m_nFolderType, m_nObjectID, m_ptObject, m_Session, m_sFolderName, OBJECT_NAME_TRUNCATE
 
Fields inherited from class com.plumtree.uiinfrastructure.editor.EditorModel
isReadAccessAvailable, m_asOwner, m_bCloseOnDone, m_bDeleteOnCancel, m_bEnableApplyButton, m_bEnableCancelButton, m_bHideLeftNav, m_bIsEditorReadOnly, m_bUserHasAccessToEditor, m_nEditorType
 
Constructor Summary
DataSourceModel()
           
 
Method Summary
 java.lang.Object Create()
          This method is used by the ASManager to return new instances of managed objects.
 void DoTaskAfterStore()
          Code executed after the object is stored.
 void DoTaskBeforeStore()
          Code executed before the object is stored.
 void DoTaskOnStartEditor(XPHashtable _htFormData)
          Code executed when the Editor is starting.
 int GetBypassProxy()
          Returns the bypass proxy setting for the data source, 0 for false, non- zero for true.
 java.lang.String GetCaptureLoginURL()
          Returns the URL pointing to the login form that has been captured with this data source.
 java.lang.String GetCapturePostURL()
          Returns the URL that a captured login form should post to in completing the login action.
 java.lang.Object[][] GetCookieInfo()
          Returns a 2D array of cookie information.
 java.lang.String GetHeaders()
          Returns any additional header information to be sent by the data source to the target site
 java.lang.Object[][] GetLoginFormInfo()
          Returns an array of name value pairs captured from a login form.
 java.lang.String GetName()
          Returns the Class name.
 java.lang.String GetProxyExceptions()
          Returns a string of addresses for which the proxy is not to be used.
 java.lang.String GetProxyPass()
          Returns the proxy password.
 int GetProxyPort()
          Returns the port part of the proxy address.
 java.lang.String GetProxyURL()
          Returns the URL part of the proxy address.
 java.lang.String GetProxyUser()
          Returns the proxy user.
 java.lang.String GetTargetSitePass()
          Returns the target site password.
 java.lang.String GetTargetSiteUser()
          Returns the target site user.
 int GetURLType()
          Returns the URL type for the data source.
protected  void InitPTObject(XPHashtable _htFormData)
          Initializes the data source property bag.
 boolean IsWebServiceChangeable()
          Returns whether the WebService is changeable from the DataSource Editor.
 boolean IsWebServiceRemovable()
          Returns whether the WebService is removable from the DataSource Editor.
 int SaveMainPage(XPHashtable _htFormData)
          Saves the data on the Main page.
 int SavePage(java.lang.String _sPageName, XPHashtable _htFormData)
          Calls the right save function according to the page name passed in argument.
 void SetBypassProxy(int bypassProxy)
          Sets the bypass proxy setting for the data source, 0 for false, non- zero for true.
 void SetCaptureLoginURL(java.lang.String captureLoginURL)
          Sets the URL pointing to the login form that has been captured with this data source.
 void SetCapturePostURL(java.lang.String capturePostURL)
          Sets the URL that a captured login form should post to in completing the login action.
 void SetCookieInfo(java.lang.Object[][] cookieInfo)
          Sets a 2D array of cookie information.
 void SetHeaders(java.lang.String headers)
          Sets any additional header information to be sent by the data source to the target site
 void SetLoginFormInfo(java.lang.Object[][] loginFormInfo)
          Sets an array of name value pairs captured from a login form.
 void SetProxyExceptions(java.lang.String noProxy)
          Sets a string of addresses for which the proxy is not to be used.
 void SetProxyPass(java.lang.String proxyPass)
          Sets the proxy password.
 void SetProxyPort(int proxyPort)
          Sets the port part of the proxy address.
 void SetProxyURL(java.lang.String proxyURL)
          Sets the URL part of the proxy address.
 void SetProxyUser(java.lang.String proxyUser)
          Sets the proxy user.
 void SetTargetSitePass(java.lang.String targetSitePass)
          Sets the target site password.
 void SetTargetSiteUser(java.lang.String targetSiteUser)
          Sets the target site user.
 void StartMultiColumnList()
          Helper method to start the multicolumn List.
 
Methods inherited from class com.plumtree.portalpages.admin.editors.datasource.DSModel
GetCreatorID, GetPMode, GetWebServiceID, SetMemberVariablesFromQS, SetURLType, SetWebServiceID
 
Methods inherited from class com.plumtree.portaluiinfrastructure.editor.ObjEditorModel
CheckEditorAccess, CheckEditorAccessAndStart, CheckFolderType, DisableSecurity, DoTaskOnComeBackFromSubEditor, Finish, ForceSaveInFolder, GetClassID, GetFolderID, GetFolderName, GetIsSysAdmin, GetMigrationStatus, GetObject, GetObjectDescription, GetObjectID, GetObjectName, GetParentFolderPath, GetPTSession, Init, InitIsSysAdminFlag, IsDescriptionDisabled, IsMigrationApproved, SaveMigrationStatus, SetDisableDescription, SetEditorToReadOnly, SetMigrationStatus, StartKeywords, StartLocNamesList, StartMigrationHistory, StartObjectProp, StartSecurityList, StoreObject
 
Methods inherited from class com.plumtree.uiinfrastructure.editor.EditorModel
Cancel, CleanupAllData, CleanupTempData, DoTaskOnChangePage, GetAccessToEditorPriviledges, GetCloseOnDone, GetCurrentRepostAction, GetDeleteOnCancel, GetEditorType, GetEnableApplyButton, GetEnableCancelButton, GetHideLeftNav, GetIsEditorReadOnly, GetRedirectAfterFinish, GetUserHasAccessToEditor, SetCloseOnDone, SetDeleteOnCancel, SetEditorType, SetEnableApplyButton, SetHideLeftNav, SetPageStatus, SetUserHasAccessToEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.plumtree.portaluiinfrastructure.editor.IObjEditorModelRO
GetClassID, GetObject, GetObjectDescription, GetObjectID, GetObjectName, GetParentFolderPath, GetPTSession
 
Methods inherited from interface com.plumtree.uiinfrastructure.editor.IEditorModelRO
GetEditorType, GetEnableApplyButton, GetEnableCancelButton, GetHideLeftNav, GetIsEditorReadOnly
 

Field Detail

STR_MVC_CLASS_NAME

public static final java.lang.String STR_MVC_CLASS_NAME
The unique identifier for the activity space

See Also:
Constant Field Values

LOGINFORMLIST_NUMCOLUMNS

public static final int LOGINFORMLIST_NUMCOLUMNS
The number of columns in the login form multicolumn list control

See Also:
Constant Field Values

COOKIELIST_NUMCOLUMNS

public static final int COOKIELIST_NUMCOLUMNS
The number of columns in the cookie list multicolumn list control

See Also:
Constant Field Values
Constructor Detail

DataSourceModel

public DataSourceModel()
Method Detail

Create

public java.lang.Object Create()
Description copied from class: EditorModel
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 EditorModel
Returns:
A new instance of the managed class (i.e. return new Foo();)
See Also:
com.plumtree.xpshared.infrastructure.activityspace.IManagedObject#Create()

DoTaskAfterStore

public void DoTaskAfterStore()
Code executed after the object is stored.

Overrides:
DoTaskAfterStore in class DSModel

DoTaskBeforeStore

public void DoTaskBeforeStore()
Code executed before the object is stored.

Overrides:
DoTaskBeforeStore in class DSModel
Throws:
XPException

InitPTObject

protected void InitPTObject(XPHashtable _htFormData)
Initializes the data source property bag.

Overrides:
InitPTObject in class ObjEditorModel
Parameters:
_htFormData -
Throws:
XPException

DoTaskOnStartEditor

public void DoTaskOnStartEditor(XPHashtable _htFormData)
Code executed when the Editor is starting.

Overrides:
DoTaskOnStartEditor in class DSModel
Parameters:
_htFormData -
Throws:
XPException

GetBypassProxy

public int GetBypassProxy()
Returns the bypass proxy setting for the data source, 0 for false, non- zero for true.

Specified by:
GetBypassProxy in interface IDataSourceModelRO
Returns:
int

GetCaptureLoginURL

public java.lang.String GetCaptureLoginURL()
Returns the URL pointing to the login form that has been captured with this data source.

Specified by:
GetCaptureLoginURL in interface IDataSourceModelRO
Returns:
String

GetCapturePostURL

public java.lang.String GetCapturePostURL()
Returns the URL that a captured login form should post to in completing the login action.

Specified by:
GetCapturePostURL in interface IDataSourceModelRO
Returns:
String

GetCookieInfo

public java.lang.Object[][] GetCookieInfo()
Returns a 2D array of cookie information. The data format is as follows for 0 to n rows: 0,n = Cookie 1,n = Cookie Value 2,n = login URL

Specified by:
GetCookieInfo in interface IDataSourceModelRO
Returns:
Object[][]

GetHeaders

public java.lang.String GetHeaders()
Returns any additional header information to be sent by the data source to the target site

Specified by:
GetHeaders in interface IDataSourceModelRO
Returns:
String

GetLoginFormInfo

public java.lang.Object[][] GetLoginFormInfo()
Returns an array of name value pairs captured from a login form.

Specified by:
GetLoginFormInfo in interface IDataSourceModelRO
Returns:
Object[][]

GetName

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

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

GetProxyExceptions

public java.lang.String GetProxyExceptions()
Returns a string of addresses for which the proxy is not to be used.

Specified by:
GetProxyExceptions in interface IDataSourceModelRO
Returns:
String

GetProxyPass

public java.lang.String GetProxyPass()
Returns the proxy password.

Specified by:
GetProxyPass in interface IDataSourceModelRO
Returns:
String

GetProxyPort

public int GetProxyPort()
Returns the port part of the proxy address.

Specified by:
GetProxyPort in interface IDataSourceModelRO
Returns:
int

GetProxyURL

public java.lang.String GetProxyURL()
Returns the URL part of the proxy address.

Specified by:
GetProxyURL in interface IDataSourceModelRO
Returns:
String

GetProxyUser

public java.lang.String GetProxyUser()
Returns the proxy user.

Specified by:
GetProxyUser in interface IDataSourceModelRO
Returns:
String

GetTargetSitePass

public java.lang.String GetTargetSitePass()
Returns the target site password.

Specified by:
GetTargetSitePass in interface IDataSourceModelRO
Returns:
String

GetTargetSiteUser

public java.lang.String GetTargetSiteUser()
Returns the target site user.

Specified by:
GetTargetSiteUser in interface IDataSourceModelRO
Returns:
String

GetURLType

public int GetURLType()
Returns the URL type for the data source. This value is either PT_URL_TYPES.PT_URL_TYPE_SIMPLE_FIELD_MAPPING or PT_URL_TYPES. PT_URL_TYPE_DATASOURCE_GENERATED

Specified by:
GetURLType in interface IDSModelRO
Overrides:
GetURLType in class DSModel
Returns:
int

SaveMainPage

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

Overrides:
SaveMainPage in class DSModel
Parameters:
_htFormData -
Returns:
int Page status for server side validation
Throws:
XPException

SavePage

public int SavePage(java.lang.String _sPageName,
                    XPHashtable _htFormData)
Calls the right save function according to the page name passed in argument.

Specified by:
SavePage in interface IRepostModel
Overrides:
SavePage in class DSModel
Parameters:
_sPageName -
_htFormData -
Returns:
int Page status for server side validation

SetBypassProxy

public void SetBypassProxy(int bypassProxy)
Sets the bypass proxy setting for the data source, 0 for false, non- zero for true.

Parameters:
bypassProxy - The bypassProxy to set

SetCaptureLoginURL

public void SetCaptureLoginURL(java.lang.String captureLoginURL)
Sets the URL pointing to the login form that has been captured with this data source.

Parameters:
captureLoginURL - The captureLoginURL to set

SetCapturePostURL

public void SetCapturePostURL(java.lang.String capturePostURL)
Sets the URL that a captured login form should post to in completing the login action.

Parameters:
capturePostURL - The capturePostURL to set

SetCookieInfo

public void SetCookieInfo(java.lang.Object[][] cookieInfo)
Sets a 2D array of cookie information. The data format is as follows for 0 to n rows: 0,n = Cookie 1,n = Cookie Value 2,n = login URL

Parameters:
cookieInfo - The cookieInfo to set

SetHeaders

public void SetHeaders(java.lang.String headers)
Sets any additional header information to be sent by the data source to the target site

Parameters:
headers - The headers to set

SetLoginFormInfo

public void SetLoginFormInfo(java.lang.Object[][] loginFormInfo)
Sets an array of name value pairs captured from a login form.

Parameters:
loginFormInfo - The loginFormInfo to set

SetProxyExceptions

public void SetProxyExceptions(java.lang.String noProxy)
Sets a string of addresses for which the proxy is not to be used.

Parameters:
noProxy - The string of addresses to set

SetProxyPass

public void SetProxyPass(java.lang.String proxyPass)
Sets the proxy password.

Parameters:
proxyPass - The proxy password to set

SetProxyPort

public void SetProxyPort(int proxyPort)
Sets the port part of the proxy address.

Parameters:
proxyPort - The proxyPort to set

SetProxyURL

public void SetProxyURL(java.lang.String proxyURL)
Sets the URL part of the proxy address.

Parameters:
proxyURL - The proxyURL to set

SetProxyUser

public void SetProxyUser(java.lang.String proxyUser)
Sets the proxy user.

Parameters:
proxyUser - The proxy user to set

SetTargetSitePass

public void SetTargetSitePass(java.lang.String targetSitePass)
Sets the target site password.

Parameters:
targetSitePass - The targetSitePass to set

SetTargetSiteUser

public void SetTargetSiteUser(java.lang.String targetSiteUser)
Sets the target site user.

Parameters:
targetSiteUser - The targetSiteUser to set

StartMultiColumnList

public void StartMultiColumnList()
Helper method to start the multicolumn List.


IsWebServiceChangeable

public boolean IsWebServiceChangeable()
Description copied from class: DSModel
Returns whether the WebService is changeable from the DataSource Editor.

Specified by:
IsWebServiceChangeable in class DSModel
Returns:
boolean

IsWebServiceRemovable

public boolean IsWebServiceRemovable()
Description copied from class: DSModel
Returns whether the WebService is removable from the DataSource Editor.

Specified by:
IsWebServiceRemovable in class DSModel
Returns:
boolean



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