com.plumtree.uiinfrastructure.statichelpers
Class ImgSvrURLHelper

java.lang.Object
  extended by com.plumtree.uiinfrastructure.statichelpers.ImgSvrURLHelper

public class ImgSvrURLHelper
extends java.lang.Object

This class helps Plumtree products communicate with the Image Server. Mainly its purpose is to build URLs that enforce the rules of the Image Server. Special note: The LX characters in the folder name constants represent the level. So L3 means that the folder is three levels deep on the Image Server.

Author:
John Osborne

Field Summary
static java.lang.String STR_L1_DOMAIN_PLUMTREE
          This String constant represents the Peoplesoft Portlet Suite folder.
static java.lang.String STR_L2_PRODUCT_NAME_COMMON
          This String constant represents the common folder.
static java.lang.String STR_L3_SCOPE_CUSTOM
          This String constant represents the custom folder.
static java.lang.String STR_L3_SCOPE_PRIVATE
          This String constant represents the private folder.
static java.lang.String STR_L3_SCOPE_PUBLIC
          This String constant represents the public folder.
static java.lang.String STR_L4_FILE_TYPE_CSS
          This String constant represents the style sheets folder.
static java.lang.String STR_L4_FILE_TYPE_HELP
          This String constant represents the help files folder.
static java.lang.String STR_L4_FILE_TYPE_IMG
          This String constant represents the images folder.
static java.lang.String STR_L4_FILE_TYPE_JS
          This String constant represents the JavaScript folder.
 
Method Summary
 java.lang.String GetCustomURL(boolean _bIsSecure, java.lang.String _strProductName)
          This method is for PSO and customers.
 java.lang.String GetCustomURL(boolean _bIsSecure, java.lang.String _strDomainName, java.lang.String _strProductName)
          This method is for PSO and customers.
 java.lang.String GetDomainRootURL(boolean _bIsSecure)
          This method passes back the root Image Server URL.
static ImgSvrURLHelper GetInstance()
          This method returns an instance of the ImgSvrURLHelper.
 java.lang.String GetRootURL(boolean _bIsSecure)
          This method passes back the root Image Server URL.
 java.lang.String GetURL(boolean _bIsSecure, boolean _bIsPublic, java.lang.String _strFileType)
          Returns an Image Server URL.
 java.lang.String GetURL(boolean _bIsSecure, java.lang.String _strFileType)
          Returns an Image Server URL.
 java.lang.String GetURL(boolean _bIsSecure, java.lang.String _strProductName, boolean _bIsPublic, java.lang.String _strFileType)
          Returns an Image Server URL.
 java.lang.String GetURL(boolean _bIsSecure, java.lang.String _strDomainName, java.lang.String _strProductName, boolean _bIsPublic, java.lang.String _strFileType)
          Returns an Image Server URL.
static void Init(java.lang.String _strImageServerBaseURL, java.lang.String _strSecureImageServerBaseURL, java.lang.String _strDomainName, java.lang.String _strProductName, boolean _bUseTrailingSlashByDefault)
          Clients need to call this method only once per application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STR_L4_FILE_TYPE_IMG

public static final java.lang.String STR_L4_FILE_TYPE_IMG
This String constant represents the images folder.

See Also:
Constant Field Values

STR_L4_FILE_TYPE_CSS

public static final java.lang.String STR_L4_FILE_TYPE_CSS
This String constant represents the style sheets folder.

See Also:
Constant Field Values

STR_L4_FILE_TYPE_JS

public static final java.lang.String STR_L4_FILE_TYPE_JS
This String constant represents the JavaScript folder.

See Also:
Constant Field Values

STR_L4_FILE_TYPE_HELP

public static final java.lang.String STR_L4_FILE_TYPE_HELP
This String constant represents the help files folder.

See Also:
Constant Field Values

STR_L3_SCOPE_PRIVATE

public static final java.lang.String STR_L3_SCOPE_PRIVATE
This String constant represents the private folder. The private folder is intended to be a place where products can place files that they DO NOT wish to share with PSO and cstomers.

See Also:
Constant Field Values

STR_L3_SCOPE_PUBLIC

public static final java.lang.String STR_L3_SCOPE_PUBLIC
This String constant represents the public folder. The public folder is intended to be a place where products can place files that they DO wish to share with PSO and cstomers.

See Also:
Constant Field Values

STR_L3_SCOPE_CUSTOM

public static final java.lang.String STR_L3_SCOPE_CUSTOM
This String constant represents the custom folder. The custom folder is intended to be a place where PSO and customers can place their static content files.

See Also:
Constant Field Values

STR_L2_PRODUCT_NAME_COMMON

public static final java.lang.String STR_L2_PRODUCT_NAME_COMMON
This String constant represents the common folder. The public lives at the same level as the product folders (i.e. portal, content, collab, etc.). It is a place where Plumtree products can share static content.

See Also:
Constant Field Values

STR_L1_DOMAIN_PLUMTREE

public static final java.lang.String STR_L1_DOMAIN_PLUMTREE
This String constant represents the Peoplesoft Portlet Suite folder. This is where the Peoplesoft Portlet Suite places its static content.

See Also:
Constant Field Values
Method Detail

GetInstance

public static final ImgSvrURLHelper GetInstance()
This method returns an instance of the ImgSvrURLHelper. You will get back the same instance each time you call this method. You must also call the Init method first.

Returns:
An instance of the ImgSvrURLHelper.

Init

public static final void Init(java.lang.String _strImageServerBaseURL,
                              java.lang.String _strSecureImageServerBaseURL,
                              java.lang.String _strDomainName,
                              java.lang.String _strProductName,
                              boolean _bUseTrailingSlashByDefault)
Clients need to call this method only once per application. This method essentially allows you to set your Image Server default preferences. For example, by setting the product name, you don't have to specify it again each time you call GetURL.

Parameters:
_strImageServerBaseURL - -- The base Image Server URL (http://)
_strSecureImageServerBaseURL - -- The secure base Image Server URL (https://)
_strDomainName - -- The Domain namespace for the product (i.e. "plumtree")
_strProductName - -- The name of the product using the Image Server URL heloer. Examples include "portal" and "collab."
_bUseTrailingSlashByDefault - -- Mark tbis as true if you want your URLs to end with a "/".

GetRootURL

public java.lang.String GetRootURL(boolean _bIsSecure)
This method passes back the root Image Server URL. For example, "http: //myserver:80/ptimages/".

Parameters:
_bIsSecure - -- Do you want the secure (https://) URL back or the regular Image Server URL back?
Returns:
The root URL.

GetDomainRootURL

public java.lang.String GetDomainRootURL(boolean _bIsSecure)
This method passes back the root Image Server URL. For example, "http: //myserver:80/ptimages/".

Parameters:
_bIsSecure - -- Do you want the secure (https://) URL back or the regular Image Server URL back?
Returns:
The root URL.

GetCustomURL

public java.lang.String GetCustomURL(boolean _bIsSecure,
                                     java.lang.String _strProductName)
This method is for PSO and customers. It passes back a URL to the folder where they should be placing their static content. For a particular product. Here is a sample: "http://myserver:80/ptimages/portal/custom/".

Parameters:
_bIsSecure - -- Do you want the secure (https://) URL back or the regular Image Server URL back?
_strProductName - -- The product whose static content you want to access (i.e. "portal" or "collab").
Returns:
The root URL.

GetCustomURL

public java.lang.String GetCustomURL(boolean _bIsSecure,
                                     java.lang.String _strDomainName,
                                     java.lang.String _strProductName)
This method is for PSO and customers. It passes back a URL to the folder where they should be placing their static content. For a particular product. Here is a sample: "http://myserver:80/ptimages/portal/custom/".

Parameters:
_bIsSecure - -- Do you want the secure (https://) URL back or the regular Image Server URL back?
_strDomainName - -- The Domain namespace for the product (i.e. "plumtree")
_strProductName - -- The product whose static content you want to access (i.e. "portal" or "collab").
Returns:
The root URL.

GetURL

public java.lang.String GetURL(boolean _bIsSecure,
                               java.lang.String _strFileType)
Returns an Image Server URL.

Parameters:
_bIsSecure - -- Do you want the secure (https://) URL back or the regular Image Server URL back?
_strFileType - -- The kind of static content you want to access (i. e. Images, JavaScript files, Style Sheets. Seet the string constant enumerated at the top).
Returns:
An Image Server URL

GetURL

public java.lang.String GetURL(boolean _bIsSecure,
                               boolean _bIsPublic,
                               java.lang.String _strFileType)
Returns an Image Server URL.

Parameters:
_bIsSecure - -- Do you want the secure (https://) URL back or the regular Image Server URL back?
_bIsPublic - -- The scope of the folder you want to access (i.e. "public", "private", "custom".
_strFileType - -- The kind of static content you want to access (i. e. Images, JavaScript files, Style Sheets. Seet the string constant enumerated at the top).
Returns:
An Image Server URL

GetURL

public java.lang.String GetURL(boolean _bIsSecure,
                               java.lang.String _strProductName,
                               boolean _bIsPublic,
                               java.lang.String _strFileType)
Returns an Image Server URL.

Parameters:
_bIsSecure - -- Do you want the secure (https://) URL back or the regular Image Server URL back?
_strProductName - -- The product whose static content you want to access (i.e. "portal" or "collab").
_bIsPublic - -- The scope of the folder you want to access (i.e. "public", "private", "custom".
_strFileType - -- The kind of static content you want to access (i. e. Images, JavaScript files, Style Sheets. Seet the string constant enumerated at the top).
Returns:
An Image Server URL

GetURL

public java.lang.String GetURL(boolean _bIsSecure,
                               java.lang.String _strDomainName,
                               java.lang.String _strProductName,
                               boolean _bIsPublic,
                               java.lang.String _strFileType)
Returns an Image Server URL.

Parameters:
_bIsSecure - -- Do you want the secure (https://) URL back or the regular Image Server URL back?
_strDomainName - -- The Domain namespace for the product (i.e. "plumtree")
_strProductName - -- The product whose static content you want to access (i.e. "portal" or "collab").
_bIsPublic - -- The scope of the folder you want to access (i.e. "public", "private", "custom".
_strFileType - -- The kind of static content you want to access (i. e. Images, JavaScript files, Style Sheets. Seet the string constant enumerated at the top).
Returns:
An Image Server URL



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