com.plumtree.portalpages.common.helpers
Class CreatedHelper

java.lang.Object
  extended by com.plumtree.portalpages.common.helpers.CreatedHelper

public class CreatedHelper
extends java.lang.Object

Author:
OlegS

Field Summary
static int BREAK_DEFAULT
          Default number of lines skipped in a line break
protected  AActivitySpace m_asOwner
           
protected  HTMLList m_myList
           
protected  IObjEditorModelRO m_myModel
           
static int OFFSET_DEFAULT
          Indentation offset for displaying indented HTML
 
Constructor Summary
CreatedHelper(AActivitySpace asOwner)
          Creates a new CreatedHelper object.
CreatedHelper(AActivitySpace asOwner, IObjEditorModelRO myModel)
          Creates a new CreatedHelper object.
 
Method Summary
 void addJobJavascript(HTMLScript myScript)
           
 void beginList(HTMLElementCollection result)
           
 void displayEmptyRow(HTMLElementCollection result)
           
 void displayEmptyRow(HTMLElementCollection result, int breaks)
           
 void displayEveryoneWarning(HTMLElementCollection result, IModelRO objectModel, java.lang.String strObjectType)
          This function adds a warning message to the HTMLElementCollection passed in if the everyone group has access to the object whose editor model is passed in.
 void displayJobList(HTMLElementCollection result, ISelectPTObjectModelRO jobmodel)
           
 void displayJobRows(HTMLElementCollection result, java.lang.String ifhasjobs, java.lang.String ifnojobs)
           
 void displayListRow(HTMLElement content)
          Displays an element in a list formatted as content (no label)
 void displayListRow(java.lang.String label)
          Displays an element in a list formatted as a label (no content)
 void displayListRow(java.lang.String label, HTMLElement content)
          Displays a row in a list with optional label and content
 void displayListRowAnchor(HTMLElementCollection result, java.lang.String strText, java.lang.String strOnClick)
          Displays an arbitrary anchor link as part of a list.
 void displayNoJobsAnchors(HTMLElementCollection result)
          Displays the links for adding to an existing job and creating a new job
 void displaySuccessMessage(HTMLElementCollection result, java.lang.String strObjectType, java.lang.String strObjectName, java.lang.String strParentPath)
          This function displays the standard successfully created message, adding the object name and its parent folder path
 void displayTextRow(HTMLElementCollection result, int offset, java.lang.String label, java.lang.String value)
          Displays a row of text containing a label and a value with an optional indentation offset
 void displayTextRow(HTMLElementCollection result, int offset, java.lang.String label, java.lang.String value, int breaks)
           
 void displayTextRow(HTMLElementCollection result, java.lang.String label, java.lang.String value)
          Displays a row of text containing a label and a value (e.g.
 void displayTextRow(HTMLElementCollection result, java.lang.String label, java.lang.String value, int breaks)
          Displays a row of text containing a label and a value with optional line breaks
 void displayWarning(HTMLElementCollection result, java.lang.String strWarningText)
          Displays the string "Warning:", then a line break, then some text
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OFFSET_DEFAULT

public static final int OFFSET_DEFAULT
Indentation offset for displaying indented HTML

See Also:
Constant Field Values

BREAK_DEFAULT

public static final int BREAK_DEFAULT
Default number of lines skipped in a line break

See Also:
Constant Field Values

m_asOwner

protected AActivitySpace m_asOwner

m_myList

protected HTMLList m_myList

m_myModel

protected IObjEditorModelRO m_myModel
Constructor Detail

CreatedHelper

public CreatedHelper(AActivitySpace asOwner)
Creates a new CreatedHelper object.

Parameters:
asOwner -

CreatedHelper

public CreatedHelper(AActivitySpace asOwner,
                     IObjEditorModelRO myModel)
Creates a new CreatedHelper object.

Parameters:
asOwner -
myModel -
Method Detail

addJobJavascript

public void addJobJavascript(HTMLScript myScript)
Parameters:
myScript -
Throws:
HTMLException

beginList

public void beginList(HTMLElementCollection result)
Parameters:
result -
Throws:
HTMLException

displayEmptyRow

public void displayEmptyRow(HTMLElementCollection result)
Parameters:
result -
Throws:
HTMLException

displayEmptyRow

public void displayEmptyRow(HTMLElementCollection result,
                            int breaks)
Parameters:
result -
breaks -
Throws:
HTMLException

displayJobList

public void displayJobList(HTMLElementCollection result,
                           ISelectPTObjectModelRO jobmodel)
Parameters:
result -
jobmodel -
Throws:
HTMLException

displayJobRows

public void displayJobRows(HTMLElementCollection result,
                           java.lang.String ifhasjobs,
                           java.lang.String ifnojobs)
Parameters:
result -
ifhasjobs -
ifnojobs -
Throws:
HTMLException

displaySuccessMessage

public void displaySuccessMessage(HTMLElementCollection result,
                                  java.lang.String strObjectType,
                                  java.lang.String strObjectName,
                                  java.lang.String strParentPath)
This function displays the standard successfully created message, adding the object name and its parent folder path

Parameters:
result - - The HTML being displayed on the page
strObjectType - - The type of object being created
strObjectName - - The name of the object that has been created
strParentPath - - The parent folder path for the object that has been created

displayEveryoneWarning

public void displayEveryoneWarning(HTMLElementCollection result,
                                   IModelRO objectModel,
                                   java.lang.String strObjectType)
This function adds a warning message to the HTMLElementCollection passed in if the everyone group has access to the object whose editor model is passed in.

Parameters:
result - - The HTML being displayed
objectModel - - The model for the object being created
strObjectType - - The type of the object being created (e.g. Data Source)

displayWarning

public void displayWarning(HTMLElementCollection result,
                           java.lang.String strWarningText)
Displays the string "Warning:", then a line break, then some text

Parameters:
result - - The HTMLElementCollection being modified
strWarningText - - The warning text to display

displayListRow

public void displayListRow(java.lang.String label)
Displays an element in a list formatted as a label (no content)

Parameters:
label -
Throws:
HTMLException

displayListRow

public void displayListRow(HTMLElement content)
Displays an element in a list formatted as content (no label)

Parameters:
content - The content to display
Throws:
HTMLException

displayListRow

public void displayListRow(java.lang.String label,
                           HTMLElement content)
Displays a row in a list with optional label and content

Parameters:
label -
content -
Throws:
HTMLException

displayNoJobsAnchors

public void displayNoJobsAnchors(HTMLElementCollection result)
Displays the links for adding to an existing job and creating a new job

Parameters:
result - - the HTMLElementCollection being modified
Throws:
HTMLException

displayListRowAnchor

public void displayListRowAnchor(HTMLElementCollection result,
                                 java.lang.String strText,
                                 java.lang.String strOnClick)
Displays an arbitrary anchor link as part of a list. beginList must be called before this function

Parameters:
result - - the HTMLElementCollection being modified
strText - - The text of the link to display
strOnClick - - The javascript function name (including arguments) to call in the OnClick event
Throws:
HTMLException

displayTextRow

public void displayTextRow(HTMLElementCollection result,
                           java.lang.String label,
                           java.lang.String value)
Displays a row of text containing a label and a value (e.g. Name: Oleg)

Parameters:
result - The HTMLElementCollection being modified
label - The label
value - The value
Throws:
HTMLException

displayTextRow

public void displayTextRow(HTMLElementCollection result,
                           int offset,
                           java.lang.String label,
                           java.lang.String value)
Displays a row of text containing a label and a value with an optional indentation offset

Parameters:
result - The HTMLElementCollection being modified
offset - The offset (indent spaces)
label - The label
value - The value
Throws:
HTMLException

displayTextRow

public void displayTextRow(HTMLElementCollection result,
                           java.lang.String label,
                           java.lang.String value,
                           int breaks)
Displays a row of text containing a label and a value with optional line breaks

Parameters:
result - The HTMLElementCollection being modified
label - The label
value - The value
breaks - The number of line breaks
Throws:
HTMLException

displayTextRow

public void displayTextRow(HTMLElementCollection result,
                           int offset,
                           java.lang.String label,
                           java.lang.String value,
                           int breaks)
Parameters:
offset - # of left  , <0 use default, 0 none, >0 use specified
label - 1st non bold part of text, null OK
value - 2nd bold part of text, null OK
breaks - # of trailing
, <0 use default, 0 none, >0 use specified



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