|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.meshcms.core.ModuleDescriptor
Stores the description of a module when read from the page.
Field Summary | |
static java.lang.String |
ARGUMENT_ID
Argument parameter. |
static java.lang.String |
LOCATION_ID
Location parameter. |
static java.lang.String |
PARAMETERS_ID
Advanced parameters. |
static java.lang.String |
TEMPLATE_ID
Template parameter. |
static java.lang.String |
TITLE_ID
|
Constructor Summary | |
ModuleDescriptor()
Creates a new empty instance. |
|
ModuleDescriptor(java.lang.String data)
Creates a new instance and calls init(java.lang.String) . |
Method Summary | |
java.lang.String |
getAdvancedParam(java.lang.String paramName,
java.lang.String defaultValue)
Returns the value of the requested advanced parameter. |
java.util.Properties |
getAdvancedParams()
Returns the advanced parameters as a Properties object. |
java.lang.String |
getArgument()
Returns the name of the module argument. |
java.lang.String |
getCSSAttribute(java.lang.String paramName)
|
java.lang.String |
getDateFormat()
Returns the date format of the module. |
java.text.DateFormat |
getDateFormat(java.util.Locale locale,
java.lang.String paramName)
Returns format to be used to display the date. |
java.lang.String |
getFullCSSAttribute(java.lang.String paramName)
Convenience method to get full HTML class attribute (e.g. |
java.lang.String |
getLocation()
Returns the name of the module location. |
Path |
getModuleArgumentDirectoryPath(WebSite webSite,
boolean allowCurrentPath)
Returns the folder path to be used as argument for the module. |
Path |
getModuleArgumentPath(boolean allowCurrentPath)
Returns the path passed as argument. |
Path |
getModuleDataPath(WebSite webSite)
|
java.io.File[] |
getModuleFiles(WebSite webSite,
boolean allowCurrentDir)
Returns the files to be passed to the module. |
Path |
getModulePath()
Returns the path of the module. |
Path |
getPagePath()
Returns the path of the page that contains the module. |
java.lang.String |
getStyle()
Returns the CSS style to be applied to the module. |
java.lang.String |
getTemplate()
Returns the name of the module template. |
java.lang.String |
getTitle()
|
void |
init(java.lang.String data)
Parses the given String to get location, template and argument. |
boolean |
isValid()
Checks if this module descriptor has been initialized correctly. |
void |
parseParameters(java.lang.String data)
Parses the given string using the new format (version 3.0). |
void |
setAdvancedParam(java.lang.String paramName,
java.lang.String value)
|
void |
setAdvancedParams(java.util.Properties advancedParams)
Sets the advanced parameters values. |
void |
setArgument(java.lang.String s)
Sets the name of the module argument. |
void |
setDateFormat(java.lang.String dateFormat)
Sets the date format of the module. |
void |
setLocation(java.lang.String location)
Sets the name of the module location. |
void |
setModulePath(Path modulePath)
Sets the path of the module. |
void |
setPagePath(Path pagePath)
Sets the path of the page that contains the module. |
void |
setStyle(java.lang.String style)
Sets the CSS style to be applied to the module. |
void |
setTemplate(java.lang.String template)
Sets the name of the module template. |
void |
setTitle(java.lang.String title)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String LOCATION_ID
public static final java.lang.String ARGUMENT_ID
public static final java.lang.String TEMPLATE_ID
public static final java.lang.String PARAMETERS_ID
public static final java.lang.String TITLE_ID
Constructor Detail |
public ModuleDescriptor()
public ModuleDescriptor(java.lang.String data)
init(java.lang.String)
.
Method Detail |
public void init(java.lang.String data)
public void parseParameters(java.lang.String data)
public boolean isValid()
public java.lang.String getLocation()
setLocation(java.lang.String)
public void setLocation(java.lang.String location)
public java.lang.String getTemplate()
public void setTemplate(java.lang.String template)
public java.lang.String getArgument()
setArgument(String)
public void setArgument(java.lang.String s)
PageAssembler.EMPTY
.
public java.util.Properties getAdvancedParams()
Properties
object.
public java.lang.String getAdvancedParam(java.lang.String paramName, java.lang.String defaultValue)
public void setAdvancedParam(java.lang.String paramName, java.lang.String value)
public void setAdvancedParams(java.util.Properties advancedParams)
public Path getPagePath()
public void setPagePath(Path pagePath)
public Path getModulePath()
public Path getModuleDataPath(WebSite webSite)
public void setModulePath(Path modulePath)
public java.lang.String getDateFormat()
public void setDateFormat(java.lang.String dateFormat)
public java.lang.String getStyle()
public void setStyle(java.lang.String style)
public java.io.File[] getModuleFiles(WebSite webSite, boolean allowCurrentDir)
allowCurrentDir
- if true and the argument parameter is null, the
files included in the same folder of the page are returnedpublic Path getModuleArgumentPath(boolean allowCurrentPath)
allowCurrentPath
- if true and the argument parameter is null, the
page path is returnedpublic Path getModuleArgumentDirectoryPath(WebSite webSite, boolean allowCurrentPath)
allowCurrentPath
- if true and the argument parameter is null, the
path of the page is returnedpublic java.lang.String getFullCSSAttribute(java.lang.String paramName)
class="stylename"
. The value is searched in the
given advanced parameter or, alternatively, in the
value of the "style" tag attribute. If both are unavailable,
an empty string is returned.
public java.lang.String getCSSAttribute(java.lang.String paramName)
public java.text.DateFormat getDateFormat(java.util.Locale locale, java.lang.String paramName)
public java.lang.String getTitle()
public void setTitle(java.lang.String title)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |