MarkupView Interface
- public interface MarkupView
extends Serializable
"Views" are deep copy immutable objects. Unlike "Definitions" and "Instances" Views cannot be modified by the developer.
A Instance or a Definition however can always be obtained from the view. The persistence APIs provides course grain
and fine grain getters but only fine grain setters. If you are interested in an object and all its children then
retrieve the View, if you are only interested in the immediate object and don't care about its children then retrieve the
Definition.
View class for markup. Most resources in the portal framework have markup. Markup is a snippet of tokenized XML.
Each resource has a begin XML and an end XML. Child resource's markup make up the markup between the begin and end.
The tokens in the XML (example: $(title)) are replaced by values in the database colums when reassembled.
Related Topics
View
-
All Superinterfaces
-
Serializable
BOOK_TYPE
public static final String
BOOK_TYPE
- Constant for book markup.
DESKTOP_TYPE
public static final String
DESKTOP_TYPE
- Constant for desktop markup.
LAYOUT_TYPE
public static final String
LAYOUT_TYPE
- Constant for layout markup.
LOOK_AND_FEEL_TYPE
public static final String
LOOK_AND_FEEL_TYPE
- Constant for look-and-feel markup.
MENU_TYPE
public static final String
MENU_TYPE
- Constant for menu markup.
PAGE_TYPE
public static final String
PAGE_TYPE
- Constant for page markup.
PLACEHOLDER_TYPE
public static final String
PLACEHOLDER_TYPE
- Constant for placeholder markup.
PORTLET_TYPE
public static final String
PORTLET_TYPE
- Constant for portlet markup.
SHELL_TYPE
public static final String
SHELL_TYPE
- Constant for shell markup.
THEME_TYPE
public static final String
THEME_TYPE
- Constant for theme markup.
getBeginXml() Method
public String
getBeginXml()
Get the beginning XML fragment. This is a tokenized string, so it might not be valid
XML. The tokens will be populated by the assembler. The beginXml
and endXml
will prepend/append the XML for any children of the View
that owns this MarkupView
getEndXml() Method
public String
getEndXml()
Get the end XML fragment. This is a tokenized string, so it might not be valid
XML. The tokens will be populated by the assembler. The beginXml
and endXml
will prepend/append the XML for any children of the View
that owns this MarkupView
getMarkupDefinition() Method
public MarkupDefinition
getMarkupDefinition()
Retrieve the associated MarkupDefinition
from this Markup View. Markup Views are immutable but
Definitions are not. Therefore it is often necessary to retrieve the definition from the view in
order to update its values and then in turn call the persistence API. Most of the Markup Definitions (in the database)
are constructed and updated via "dot" files. If you create a new "dot" file then a new Markup Definition is created in the
database. If you edit the file the changes are automatically seen in the database. (during dev time we poll
the file system and in production we update the database whenever the webapp is redeployed.
Returns
- a non null Markup Definition
getMarkupDefinitionId() Method
public MarkupDefinitionId
getMarkupDefinitionId()
Getter for markup definition id. The markup definition id is the primary key value for the
definition in the PF_MARKUP_DEFINITION table.
Returns
- a non null unique definition id. This value should never be null as views are constructed
via the persistence API.
getMarkupFile() Method
public String
getMarkupFile()
Get the name of the file where this markup lives. This may be null for resources that are not created from
the dot files (example: cloned portlets, desktops, books and pages)
Returns
- The filename, relative to the webapp or null if this resource was not created via a file.
getName() Method
public String
getName()
Getter for the unique markup name. The markup name comes from the
markupName attribute in the XML.
Returns
- return the markup name.
getType() Method
public String
getType()
The type of markup:
Possible values:
- MarkupView.BOOK_TYPE
- MarkupView.PAGE_TYPE
- MarkupView.PLACEHOLDER_TYPE
- MarkupView.LAYOUT_TYPE
- MarkupView.PORTLET_TYPE
- MarkupView.SHELL_TYPE
- MarkupView.LOOK_AND_FEEL_TYPE
- MarkupView.THEME_TYPE
- MarkupView.DESKTOP_TYPE
- MarkupView.MENU_TYPE
getWebAppName() Method
public String
getWebAppName()
Return the name of the webapp that this markup is associated with. All resources in the portal framework database
are scoped to the webapp.
Returns
- a non null webapp name.