com.plumtree.portaluiinfrastructure.ptlink
Class APTURL

java.lang.Object
  extended by com.plumtree.portaluiinfrastructure.ptlink.PTURLConstants
      extended by com.plumtree.portaluiinfrastructure.ptlink.APTURL
All Implemented Interfaces:
IPTURL, IDataObject
Direct Known Subclasses:
ACommonOpenerURL, FullURL

public abstract class APTURL
extends PTURLConstants
implements IPTURL

Abstract PTURL class with common functionality for all URLs, i.e. URL title, URL icon, icon width and height, Icon Alt and Current marker.


Field Summary
protected  java.lang.String m_ClassID
           
protected  java.lang.String m_IconAlt
           
protected  java.lang.String m_IconHeight
           
protected  java.lang.String m_IconImg
           
protected  java.lang.String m_IconWidth
           
protected  java.lang.String m_jsaction
           
protected  XPArrayList m_listParamNames
           
protected  XPArrayList m_listParamValues
           
protected  java.lang.String m_MarkedAsCurrent
           
protected  XPArrayList m_nonControlParamNames
           
protected  XPArrayList m_nonControlParamValues
           
protected  java.lang.String m_ObjectID
           
protected  java.lang.String m_Title
           
 
Fields inherited from class com.plumtree.portaluiinfrastructure.ptlink.PTURLConstants
KEY_CLASSID, KEY_CURRENTMARKER, KEY_FULLURL, KEY_ICONIMG, KEY_ICONIMGALT, KEY_ICONIMGHEIGHT, KEY_ICONIMGWIDTH, KEY_JAVASCRIPT_ACTION, KEY_OBJECTID, KEY_PARAMS, KEY_TITLE, KEY_URI, KEY_URLTYPE
 
Constructor Summary
protected APTURL(java.lang.String strTitle)
           
protected APTURL(java.lang.String strTitle, java.lang.String strIconImg)
           
 
Method Summary
 void AddControlParameter(java.lang.String strKey, int nValue)
          Adds a integer parameter to the querystring on this URL.
 void AddControlParameter(java.lang.String strKey, java.lang.String strValue)
          Adds a string parameter to the querystring on this URL.
 void AddNonControlParameter(java.lang.String strKey, java.lang.String strValue)
          Adds a string parameter to the URL.
 java.lang.String GetData(java.lang.String strKey)
          Supports the following keys (although not all keys might be set on every URL): PTURLConstants.KEY_FULLURL PTURLConstants.KEY_URI PTURLConstants.KEY_TITLE PTURLConstants.KEY_ICONIMG PTURLConstants.KEY_ICONIMGWIDTH PTURLConstants.KEY_ICONIMGHEIGHT PTURLConstants.KEY_ICONIMGALT PTURLConstants.KEY_CURRENTMARKER PTURLConstants.KEY_OBJECTID PTURLConstants.KEY_CLASSID KEY_PARAMS It is also possible to retrieve the value of specific querystring or non-control parameters by passing in the name of the parameter as the key E.g.
abstract  java.lang.String GetFullURL()
          Returns the entire URL with http:// and server name E.g http://portalserver/portal/server.pt
abstract  java.lang.String GetURI()
          Returns the URI, the part of the URL after sever name E.g /portal/server.pt
 void SetURLData(java.lang.String strKey, java.lang.String strValue)
          Sets data on the URL.
 void SetURLImageType(PTImageType image, java.lang.String strImageServerBaseURL)
          Helper function to set URL Image with the width and height component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_listParamNames

protected XPArrayList m_listParamNames

m_listParamValues

protected XPArrayList m_listParamValues

m_nonControlParamNames

protected XPArrayList m_nonControlParamNames

m_nonControlParamValues

protected XPArrayList m_nonControlParamValues

m_Title

protected java.lang.String m_Title

m_IconImg

protected java.lang.String m_IconImg

m_IconWidth

protected java.lang.String m_IconWidth

m_IconHeight

protected java.lang.String m_IconHeight

m_IconAlt

protected java.lang.String m_IconAlt

m_MarkedAsCurrent

protected java.lang.String m_MarkedAsCurrent

m_jsaction

protected java.lang.String m_jsaction

m_ObjectID

protected java.lang.String m_ObjectID

m_ClassID

protected java.lang.String m_ClassID
Constructor Detail

APTURL

protected APTURL(java.lang.String strTitle)
Parameters:
strTitle -

APTURL

protected APTURL(java.lang.String strTitle,
                 java.lang.String strIconImg)
Parameters:
strTitle -
strIconImg -
Method Detail

GetFullURL

public abstract java.lang.String GetFullURL()
Returns the entire URL with http:// and server name E.g http://portalserver/portal/server.pt

Specified by:
GetFullURL in interface IPTURL

GetURI

public abstract java.lang.String GetURI()
Returns the URI, the part of the URL after sever name E.g /portal/server.pt

Specified by:
GetURI in interface IPTURL

GetData

public java.lang.String GetData(java.lang.String strKey)
Supports the following keys (although not all keys might be set on every URL): PTURLConstants.KEY_FULLURL PTURLConstants.KEY_URI PTURLConstants.KEY_TITLE PTURLConstants.KEY_ICONIMG PTURLConstants.KEY_ICONIMGWIDTH PTURLConstants.KEY_ICONIMGHEIGHT PTURLConstants.KEY_ICONIMGALT PTURLConstants.KEY_CURRENTMARKER PTURLConstants.KEY_OBJECTID PTURLConstants.KEY_CLASSID KEY_PARAMS It is also possible to retrieve the value of specific querystring or non-control parameters by passing in the name of the parameter as the key E.g. To get the value of param1 in the URL below, pass in 'param1' (without the quotes )as the key. http://www.servername.com/portal/server.pt?param1=value1¶m2=value2¶m3=value3

Specified by:
GetData in interface IDataObject
Parameters:
strKey - The key for the requested data
Returns:
String The requested data
See Also:
IDataObject.GetData(java.lang.String)

SetURLData

public void SetURLData(java.lang.String strKey,
                       java.lang.String strValue)
Sets data on the URL. Supports the following keys: PTURLConstants.KEY_TITLE PTURLConstants.KEY_ICONIMG PTURLConstants.KEY_ICONIMGWIDTH PTURLConstants.KEY_ICONIMGHEIGHT PTURLConstants.KEY_ICONIMGALT PTURLConstants.KEY_CURRENTMARKER

Specified by:
SetURLData in interface IPTURL
Parameters:
strKey - Key of the data
strValue - Value of the data
See Also:
PTURLConstants

AddNonControlParameter

public void AddNonControlParameter(java.lang.String strKey,
                                   java.lang.String strValue)
Adds a string parameter to the URL. This parameter is not reflected in the URL itself but can be used to store arbitrary name/value combinations on the URL object for use in PT tags (i.e., a community link tag could contain a page name and id as well)

Specified by:
AddNonControlParameter in interface IPTURL
Parameters:
strKey - Name of the parameter.
strValue - Value of the parameter as a String.

AddControlParameter

public void AddControlParameter(java.lang.String strKey,
                                java.lang.String strValue)
Adds a string parameter to the querystring on this URL. E.g. param=value

Specified by:
AddControlParameter in interface IPTURL
Parameters:
strKey - Name of the parameter.
strValue - Value of the parameter as a String.

AddControlParameter

public void AddControlParameter(java.lang.String strKey,
                                int nValue)
Adds a integer parameter to the querystring on this URL. E.g. param=1

Specified by:
AddControlParameter in interface IPTURL
Parameters:
strKey - Name of the parameter.
nValue - Value of the parameter as an integer.

SetURLImageType

public void SetURLImageType(PTImageType image,
                            java.lang.String strImageServerBaseURL)
Helper function to set URL Image with the width and height component. Equivalent to setting PTURLConstants.KEY_ICONIMG, PTURLConstants.KEY_ICONIMGWIDTH and PTURLConstants.KEY_ICONIMGHEIGHT manually.

Parameters:
image - PTImageType of the image to use.
See Also:
PTImageType



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