|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.plumtree.portaluiinfrastructure.statichelpers.PlumtreeHelpers
public class PlumtreeHelpers
This class contains static helper functions to be used with the Plumtree API.
| Field Summary | |
|---|---|
static java.lang.String |
DPROFILE_EDITOR_SESSION_FLAG
Name of the session flag indicating being in the default profile editor. |
static java.lang.String |
GIF_TYPE
Gif type |
static java.lang.String |
LARGE_IMAGE
Large Image |
static java.lang.String |
PORTAL_IMAGE_PAGE
Portal image page |
static java.lang.String |
s_strDefaultStyleSheet
The default style sheet should only be used by the common code that determines style sheets. |
static java.lang.String |
SMALL_IMAGE
Small Image |
static java.lang.String |
STR_JS_FUNC_NAME_EXECUTE_VIA_ENTER
To execute a javascript function when you press enter in a input field, set the onkeypress attribute of the input equal to "return executeViaEnter(event)". |
static java.lang.String |
STYLE_PREFIX_508
508 mode style sheet prefix |
| Constructor Summary | |
|---|---|
PlumtreeHelpers()
|
|
| Method Summary | |
|---|---|
static boolean |
CheckCurrentUserIsAdmin(IPTSession _ptSession)
Checks to see whether or not the user is in the Administrators group, using cached session's list of groups. |
static boolean |
EveryoneHasAccess(IPTServerContext ptObject)
Returns true if the everyone group is on the ACL for the object passed in, false otherwise |
static HTMLScript |
GetExecuteViaEnterJScript(java.lang.String strValidateFunction)
To execute a javascript function when you press enter in a input field, set the onkeypress attribute of the input equal to "return executeViaEnter(event)". |
static HTMLImg |
GetHTMLImage(java.lang.String strImageName,
boolean bSmallImage)
Helper function to retrieve an HTML image, large or small. |
static HTMLImg |
GetHTMLImage(java.lang.String strImageName,
boolean bSmallImage,
java.lang.String strAlt)
Helper function to retrieve an image and specify the Alt |
static java.lang.String |
GetNewObjectName(int intClassID,
AActivitySpace asOwner)
This helper function returns a localized new object name based on a classID. |
static java.lang.Object[][] |
GetQueryFilter(int nOperand,
int nOperator,
java.lang.Object objValue)
Returns a simple queryfilter based on three parameters |
static HTMLImg |
GetSpacerImage(java.lang.String strWidth,
java.lang.String strHeight)
Helper function to retrieve the spacer image with specified dimensions |
static HTMLElementCollection |
GetStyleSheetLinks(IPTSession ptSession,
AActivitySpace asOwner)
Deprecated. Use AActivitySpace.GetStyleSheetLinks() or LoginHelper.INSTANCE.GetStyleSheetLinks instead. This method is just here for backwards compatibility. AActivitySpace now has a base implementation that returns the appropriate style sheets, and LoginHelper also has a method that returns the style sheets. |
static boolean |
IsEditingDefaultProfile(AActivitySpace space)
This method checks whether or not the current session is editing a default profile user. |
static boolean |
IsEditingDefaultProfile(ISessionManager _persistentSubSession)
This method checks whether or not the current session is editing a default profile user. |
static boolean |
IsGuestSession(AActivitySpace asOwner)
Determines if this is a gues session or not as part of checking basic access. |
static HTMLElement |
MakeCreateObjectLink(int nCLASSID,
java.lang.String strProviderCLSID,
int nObjectID,
java.lang.String strLink,
AActivitySpace asOwner,
int intOpenerMode,
java.lang.String strArgs,
boolean bCloseWindowOnExit)
Makes a simple link that creates an object in the parent window - passing in the added arguments. |
static HTMLElement |
MakeCreateObjectLink(int nCLASSID,
java.lang.String strProviderCLSID,
int nFolderID,
java.lang.String strLink,
AActivitySpace asOwner,
java.lang.String strArgs,
boolean bCloseWindowOnExit)
Makes a simple link that creates an object in the parent window - passing in the added arguments. |
static java.lang.String |
PBReadString(IXPPropertyBag ptPropBag,
java.lang.String sPropID,
java.lang.String strDefault)
Reads a String value from a property bag. |
static void |
SetUIError(AActivitySpace asOwner,
OpenLogComponent uiComponent,
java.lang.String strFunctionName,
java.lang.Exception e,
boolean bThrow,
UIErrorLevel uiErrorLevel,
java.lang.String strErrorMessage)
This helper function sets a UI Error with the messages specified, and optionally throws an exception. |
static void |
StaticInit(PTConfigVarPack varpack)
Initializes global language and stylesheet settings using the given config settings. |
static java.lang.String |
TrimCardLanguage(java.lang.String strLanguage)
Inxight languages are specified as a two character string (like "en" or "fr"), with the exception of the chinese languages which can be "zh-TW" or "zh-CN" |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String s_strDefaultStyleSheet
public static final java.lang.String SMALL_IMAGE
public static final java.lang.String LARGE_IMAGE
public static final java.lang.String GIF_TYPE
public static final java.lang.String PORTAL_IMAGE_PAGE
public static final java.lang.String STYLE_PREFIX_508
public static final java.lang.String DPROFILE_EDITOR_SESSION_FLAG
public static final java.lang.String STR_JS_FUNC_NAME_EXECUTE_VIA_ENTER
| Constructor Detail |
|---|
public PlumtreeHelpers()
| Method Detail |
|---|
public static HTMLImg GetHTMLImage(java.lang.String strImageName,
boolean bSmallImage)
strImageName - - The image namebSmallImage - - True for a small image
public static HTMLImg GetHTMLImage(java.lang.String strImageName,
boolean bSmallImage,
java.lang.String strAlt)
strImageName - - The image namebSmallImage - - True if a small imagestrAlt - - The alt tag
public static final HTMLImg GetSpacerImage(java.lang.String strWidth,
java.lang.String strHeight)
strWidth - Width of the spacer imagestrHeight - Height of the spacer image
public static HTMLElement MakeCreateObjectLink(int nCLASSID,
java.lang.String strProviderCLSID,
int nObjectID,
java.lang.String strLink,
AActivitySpace asOwner,
int intOpenerMode,
java.lang.String strArgs,
boolean bCloseWindowOnExit)
nCLASSID - - The classID for the objecdtstrProviderCLSID - - If it is an extensibility object the CLSIDnObjectID - - The parent admin folder id in create mode, or the
objectID in Edit modestrLink - - The text for the anchorasOwner - - The activity space ownerintOpenerMode - - The opener mode - IPTOpenerConstants.
OPENER_MODE_CREATE or IPTOpenerConstants.OPENER_MODE_EDITstrArgs - - Optional querystring argumentsbCloseWindowOnExit - - Close the window on exit?
HTMLException
public static HTMLElement MakeCreateObjectLink(int nCLASSID,
java.lang.String strProviderCLSID,
int nFolderID,
java.lang.String strLink,
AActivitySpace asOwner,
java.lang.String strArgs,
boolean bCloseWindowOnExit)
nCLASSID - - The classID for the objecdtstrProviderCLSID - - If it is an extensibility object the CLSIDnFolderID - - The parent admin folder idstrLink - - The text for the anchorasOwner - - The activity space ownerstrArgs - - Optional querystring argumentsbCloseWindowOnExit - - Close the window on exit?
HTMLExceptionpublic static boolean EveryoneHasAccess(IPTServerContext ptObject)
ptObject -
public static java.lang.Object[][] GetQueryFilter(int nOperand,
int nOperator,
java.lang.Object objValue)
int - nOperand - the Plumtree PropID operand (of type PT_PROPIDS)int - nOperator - the Plumtree Operator (of type PT_FILTEROPS)Object - objValue - the value to be filtered on (Integer, String, [], etc...)
public static HTMLElementCollection GetStyleSheetLinks(IPTSession ptSession,
AActivitySpace asOwner)
Pass - in the ptSession, this function will look up the stylesheet name
from the user's subportal.Pass - in the ActivitySpace, this function will look up the current
user's language.public static void StaticInit(PTConfigVarPack varpack)
varpack - a PTConfigVarPackpublic static java.lang.String TrimCardLanguage(java.lang.String strLanguage)
public static boolean CheckCurrentUserIsAdmin(IPTSession _ptSession)
_ptSession - Current session
public static HTMLScript GetExecuteViaEnterJScript(java.lang.String strValidateFunction)
public static boolean IsGuestSession(AActivitySpace asOwner)
AActivitySpace - current space
public static void SetUIError(AActivitySpace asOwner,
OpenLogComponent uiComponent,
java.lang.String strFunctionName,
java.lang.Exception e,
boolean bThrow,
UIErrorLevel uiErrorLevel,
java.lang.String strErrorMessage)
asOwner - - The activity space in which the error was thrownstrFunctionName - - The function that trapped the error (e.g. MyModel::CheckEditorAccessAndStart)uiComponent - - The UI component in which the error occurred, e.g. OpenLogService.GetComponent("Portal_UI_Infrastructure")e - - The exception that has been thrownbThrow - - Throw an XPException in addition to setting the error?uiErrorLevel - - The error level (e.g. UIErrorLevel.SERIOUS)strErrorMessage - - The error message string to be displayed
public static java.lang.String GetNewObjectName(int intClassID,
AActivitySpace asOwner)
intClassID - - The classID of the objectasOwner - - The activity space this is being called from
public static java.lang.String PBReadString(IXPPropertyBag ptPropBag,
java.lang.String sPropID,
java.lang.String strDefault)
sPropID - ptPropBag - strDefault -
public static boolean IsEditingDefaultProfile(AActivitySpace space)
space -
public static boolean IsEditingDefaultProfile(ISessionManager _persistentSubSession)
_persistentSubSession -
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||