com.ibm.portal.admin
Interface Markup

All Superinterfaces:
ActiveFlag, Identifiable, Localized, TimeStamped

public interface Markup
extends TimeStamped, Identifiable, Localized, ActiveFlag

Model interface for portal markups. A Markup object identifies the markup language in that a client device (such as a web browser, a wap device, or an i-mode device) expects to get its result. This is, for example

A markup in the portal contains the following data:

Name (required)
The name of the markup (such as html). This identifies a markup.
Activation flag (required)
Indicates whether or not the markup should be used. Inactive markups can be administered but cannot be used.
Title (optional)
The title of the markup. This is the name that should be displayed by administrative portlets to identify a markup
Character set list (optional)
a collection of character sets for each portal language. A character set denotes the character encoding in which the generated output should be produced. For example, the generated output for HTML devices is utf-8 for most western languages, while for Japanese it could be s-jis This list does not need to identify all character sets for all portal languages.
Default Character Set (required)
The character encoding that should be used for those languages that do not have a setting in the character set list.
Mime Type (required)
The mime type representation of the denoted markup (for example, the mime type of the markup html is normally text/html).
Objects implementing this interface are returned by the MarkupList model.

Since:
5.1.0.1

Method Summary
 java.lang.String getCharset(Language aLanguage)
          Returns the character set of the markup, dependent on the selected language
 java.lang.String getCharset(java.util.Locale aLocale)
          Returns the character set of the markup, dependent on the selected locale
 java.lang.String getDefaultCharset()
          Returns the default character set of the markup.
 java.lang.String getMimeType()
          Returns the MIME type of the markup
 java.lang.String getName()
          Returns the markup name.
 boolean isActive()
          Returns the activation state of the markup.
 
Methods inherited from interface com.ibm.portal.TimeStamped
getCreated, getLastModified
 
Methods inherited from interface com.ibm.portal.Identifiable
getObjectID
 
Methods inherited from interface com.ibm.portal.Localized
getDescription, getLocales, getTitle
 

Method Detail

isActive

boolean isActive()
                 throws ModelException
Returns the activation state of the markup.

Specified by:
isActive in interface ActiveFlag
Returns:
true if the markup is active, false if the markup is inactive
Throws:
ModelException - if an error occured while accessing model information

getCharset

java.lang.String getCharset(java.util.Locale aLocale)
                            throws ModelException
Returns the character set of the markup, dependent on the selected locale

Parameters:
aLanguage - the locale for which the character set is to be returned.
Returns:
the selected character set (i.e. "utf-8"), or null if there is no language specific character set for that language.
Throws:
ModelException - if an error occured while accessing model information

getCharset

java.lang.String getCharset(Language aLanguage)
                            throws ModelException
Returns the character set of the markup, dependent on the selected language

Parameters:
aLanguage - the language for which the character set is to be returned.
Returns:
the selected character set (i.e. "utf-8"), or null if there is no language specific character set for that language.
Throws:
ModelException - if an error occured while accessing model information

getMimeType

java.lang.String getMimeType()
                             throws ModelException
Returns the MIME type of the markup

Returns:
the mime type of the markup, e.g. "text/html"
Throws:
ModelException - if an error occured while accessing model information

getDefaultCharset

java.lang.String getDefaultCharset()
                                   throws ModelException
Returns the default character set of the markup.

Returns:
the default character set (such as "utf-8").
Throws:
ModelException - if an error occured while accessing model information

getName

java.lang.String getName()
                         throws ModelException
Returns the markup name.

Returns:
the markup name. Valid return values are "html", "chtml", "wml" and custom defined markup names.
Throws:
ModelException - if an error occured while accessing model information