|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jstore.BasicStorable com.jalios.jcms.Data com.jalios.jcms.Publication com.jalios.jcms.portlet.PortalElement
public abstract class PortalElement
Nested Class Summary | |
---|---|
static class |
PortalElement.AbilitySelector
AbilitySelector selects all the publications with the given ability |
Nested classes/interfaces inherited from class com.jalios.jcms.Data |
---|
Data.AuthorSelector, Data.CdateSelector, Data.DataNameComparator<T extends Data>, Data.DeletableSelector, Data.ImportSelector, Data.MdateSelector, Data.OpAuthorComparator<T extends Data>, Data.RowIdComparator<T extends Data>, Data.StrongLockSelector |
Nested classes/interfaces inherited from class com.jalios.jstore.BasicStorable |
---|
BasicStorable.CdateComparator<T extends Storable>, BasicStorable.IdComparator<T extends Storable>, BasicStorable.MdateComparator<T extends Storable> |
Field Summary | |
---|---|
protected String[] |
abilities
|
protected static String[] |
allAbilities
|
protected static Map |
allAbilityMap
|
protected static Map<String,List<String>> |
allAbilityMapUI
|
protected List |
cachedAbilities
|
static String |
ICON_PORTLET
|
static String |
ICON_STATS
|
static String |
REVISION
|
protected static TypeTemplateEntry |
tteDefault
|
Fields inherited from class com.jalios.jcms.Data |
---|
author, authorDBID, channel, DISPLAY_URL_EXTRA_INFO, extension, extraDataMap, extraDBDataMapToSaveOnOp, importMap, opAuthor, opDelegate |
Fields inherited from class com.jalios.jstore.BasicStorable |
---|
cdate, ddate, id, mdate, store |
Fields inherited from interface com.jalios.jcms.mashup.ImportConstants |
---|
IMPORT_ALARM_MGR, IMPORT_AUTHOR_PROP, IMPORT_CATEGORY_DEFAULT, IMPORT_DC_ATTR, IMPORT_DC_STEP, IMPORT_DIR, IMPORT_ENABLED, IMPORT_JDOM_ELEMENT, IMPORT_LOG_FILE, IMPORT_LOG_MAX, IMPORT_OPTIONS, IMPORT_OPTIONS_DC_CONTEXT, IMPORT_ROOT_PROP, IMPORT_SOURCE_FILE, IMPORT_SOURCE_PREFIX_PROP, IMPORT_SOURCES_DIR, IMPORT_STEP_CLEAN, IMPORT_STEP_IMPORT, IMPORT_STEP_UPDATE_REF, IMPORT_WS_PROP |
Fields inherited from interface com.jalios.jcms.mashup.MashupConstants |
---|
DATA_TAG, DATASET_TAG, FIELD_CLASS, FIELD_ENTRY, FIELD_ITEM, FIELD_KEY, FIELD_NAME, FIELD_TAG, FIELD_VALUE, FILE_FIELD, FILE_ID, FILE_MTIME, FILE_SIZE, FILE_TAG, FILE_TICKET, FILESET_TAG, RELATED_TAG |
Fields inherited from interface com.jalios.util.JaliosConstants |
---|
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR |
Constructor Summary | |
---|---|
PortalElement()
|
|
PortalElement(PortalElement other)
|
Method Summary | |
---|---|
void |
addAbility(String ability)
Add the given ability to this portal abilities |
boolean |
containsTreeDescendant(TreeNode tn)
Same as getAllTreeChildren() but stop when there is a match. |
PortalElement |
duplicate(Member author)
Duplicate a PortalElement using one of its default constructor, and create it in the store. |
PortalElement |
duplicate(String prefix,
Member author)
Duplicates a PortalElement and add a Prefix to the title. |
PortalElement |
duplicate(String prefix,
Member author,
boolean deep)
Performs a deep duplicate. |
PortalElement |
duplicate(String prefix,
Member author,
boolean deep,
Workspace wkspc,
Map catMap,
Map groupMap)
Deprecated. Used instead duplicate(WizardContext, boolean) |
PortalElement |
duplicate(WizardContext context,
boolean deep)
Performs a deep duplicate. |
protected void |
duplicateDeep(PortalElement parent,
String prefix,
Member author,
Workspace wkspc,
Map catMap,
Map groupMap)
Deprecated. Used instead duplicateDeep(WizardContext, PortalElement) |
protected void |
duplicateDeep(WizardContext context,
PortalElement parent)
Performs a deep duplicate of the PortalElement in a WizardContext. |
String[] |
getAbilities()
|
String[] |
getAbilities(String lang)
|
String[] |
getAbilities(String lang,
boolean useDefault)
|
String |
getAbilityLabel(String userLang,
String ability)
Returns the label of a given ability |
static PortalElement.AbilitySelector |
getAbilitySelector(String ability)
Retrieves a new instance of PortalElement.AbilitySelector using the specified
ability String . |
String |
getAbstract()
Returns the abstract of this publication in the channel's main language. |
String |
getAbstract(String lang,
boolean useDefault)
Returns the abstract of this publication. |
static String[] |
getAllAbilities()
Returns an Array of all available abilities declared for the given class. |
static String[] |
getAllAbilities(Class clazz)
Returns an Array of all available abilities declared for the given class |
static Map |
getAllAbilityMap()
Returns a Map (key1/key2) of all available abilities declared. |
static Map<String,List<String>> |
getAllAbilityMapUI()
Retrieve all abilities in map easy to use for User Interface listing of abilities. |
Collection<PortalElement> |
getAllTreeChildren()
Retrieve a new collection containing all PortalElement children of this PortalElement |
abstract String |
getBehaviorCopy()
|
abstract String |
getCacheSensibility()
|
abstract String |
getCacheType()
|
int |
getCacheTypeInt()
|
String |
getContentTitle(String lang)
|
abstract String |
getCssClasses()
|
abstract String |
getCssId()
|
String |
getDefaultTemplateUsage()
Returns the default template usage used to display the publication. |
abstract String |
getDescription(String lang)
|
abstract String |
getDescription(String lang,
boolean b)
|
abstract HashMap<String,String> |
getDescriptionML()
|
String |
getIcon()
|
abstract String[] |
getInvalidClass()
|
abstract long |
getInvalidTime()
|
abstract String |
getPortletImage(String lang)
|
abstract String |
getPortletImage(String lang,
boolean b)
|
abstract HashMap<String,String> |
getPortletImageML()
|
String |
getPreview(JcmsJspContext ctxt,
int width,
int height,
String defaultImagePath)
Retrieve the preview image of this Portlet in the specified context and dimensions. |
Class[] |
getResolvedInvalidClass()
|
String |
getSkinPath(JcmsJspContext ctxt)
Returns the template skin path for the given usage |
String |
getSkinPath(String usage,
boolean devModeChecks)
Returns the template skin path for the given usage |
TypeTemplateEntry |
getSkinTemplateEntry(String usage,
boolean devModeChecks)
Returns the TypeTemplateEntry Skin matching the given parameters. |
Collection<? extends TreeNode> |
getTreeChildren()
Returns a Collection of TreeNode children of the current node |
TreeNode |
getTreeParent()
Returns parent of the current node |
TreeNode |
getTreeParent(TreeNode node)
|
boolean |
hasAbility()
Returns true if the portlet has an ability |
boolean |
hasAbility(String ability)
Returns true if the portlet have the given ability Or if the ability is empty and the portlet have no ability |
boolean |
hasCacheGroups()
|
boolean |
hasCacheMembers()
|
boolean |
hasCacheServer()
|
boolean |
hasCacheSession()
|
boolean |
hasCacheSessionAndVisitors()
|
boolean |
hasCacheVisitorsOnly()
|
boolean |
hasCurrentCategoryCacheSensibility()
|
boolean |
hasNoCache()
|
boolean |
hasNoCacheSensibility()
|
boolean |
hasPortalCategoryCacheSensibility()
|
boolean |
isChildTreeNode(TreeNode child)
|
boolean |
isCopy()
|
boolean |
isReference()
|
boolean |
isTreeLeaf()
Returns boolean true if the TreeNode is a leaf |
boolean |
isTreeNode()
Returns boolean true if the TreeNode is a node |
boolean |
isWorkspaceReference()
|
void |
performUpdate(Member mbr,
Map context)
Performs data update |
void |
setAbilities(String[] v)
|
abstract void |
setBehaviorCopy(String b)
|
abstract void |
setCacheSensibility(String v)
|
abstract void |
setCacheType(String v)
|
abstract void |
setCssClasses(String v)
|
abstract void |
setCssId(String v)
|
abstract void |
setDescription(String s)
|
abstract void |
setDescriptionML(HashMap<String,String> s)
|
abstract void |
setInvalidClass(String[] v)
|
abstract void |
setInvalidTime(long v)
|
abstract void |
setPortletImage(String s)
|
abstract void |
setPortletImageML(HashMap<String,String> s)
|
Methods inherited from class com.jalios.jstore.BasicStorable |
---|
clearId, compareTo, equals, getAttribute, getAttributes, getCdate, getCdateComparator, getDdate, getId, getIdComparator, getMdate, getMdateComparator, getStore, getUrid, hasBeenUpdated, isStored, resolveAtt, resolveVal, setAttributes, setDdate, setId, setStore, toXml |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.jalios.util.TreeNode |
---|
getTreeRoot |
Field Detail |
---|
public static final String REVISION
protected static TypeTemplateEntry tteDefault
protected String[] abilities
protected static transient String[] allAbilities
protected static transient Map allAbilityMap
protected static transient Map<String,List<String>> allAbilityMapUI
protected transient List cachedAbilities
public static final String ICON_PORTLET
public static final String ICON_STATS
Constructor Detail |
---|
public PortalElement()
public PortalElement(PortalElement other)
Method Detail |
---|
public String getContentTitle(String lang)
public String getAbstract()
Publication
getAbstract
in class Publication
public String getAbstract(String lang, boolean useDefault)
Publication
getAbstract
in class Publication
lang
- the user language (ISO-639 language code)useDefault
- should the default language be used
public abstract HashMap<String,String> getDescriptionML()
public abstract String getDescription(String lang)
public abstract String getDescription(String lang, boolean b)
public abstract void setDescription(String s)
public abstract void setDescriptionML(HashMap<String,String> s)
public abstract HashMap<String,String> getPortletImageML()
public abstract String getPortletImage(String lang)
public abstract String getPortletImage(String lang, boolean b)
public abstract void setPortletImage(String s)
public abstract void setPortletImageML(HashMap<String,String> s)
public String getPreview(JcmsJspContext ctxt, int width, int height, String defaultImagePath)
Current implementation is as follow :
If the portlet image of this portlet has been defined, it is used as the
source image for the preview. Otherwise the preview of the template being
use for the specified context is used.
Then, the thumbnail tag is used to create the image in the appropriate dimension, from this source, if the source image file could no be found, the default image specified in parameters is used.
Warning : This method create a thumbnail when it does not exists, this process can be a little time consumming, make sure you do not need immediate response time when using it, as it might slow down your jsp access time (on first call only).
ctxt
- the current JcmsJspContextwidth
- target max width (if a value of 0 or less is specified, 200 will be used)height
- target max height (if a value of 0 or less is specified, 150 will be used)defaultImagePath
- the default image to use if thumbnail do not exists
public abstract String getCssId()
public abstract void setCssId(String v)
public abstract String getCssClasses()
public abstract void setCssClasses(String v)
public String getDefaultTemplateUsage()
getDefaultTemplateUsage
in class Publication
Publication.getDefaultTemplateUsage()
public String getSkinPath(String usage, boolean devModeChecks)
usage
- the template usagedevModeChecks
- perform developement checks on template
public String getSkinPath(JcmsJspContext ctxt)
ctxt
- the JcmsJspContext
public TypeTemplateEntry getSkinTemplateEntry(String usage, boolean devModeChecks)
usage
- the template usagedevModeChecks
- perform developement checks on template
public abstract String getCacheType()
public abstract void setCacheType(String v)
public abstract String getCacheSensibility()
public abstract void setCacheSensibility(String v)
public abstract String[] getInvalidClass()
public abstract void setInvalidClass(String[] v)
public abstract long getInvalidTime()
public abstract void setInvalidTime(long v)
public Class[] getResolvedInvalidClass()
public boolean hasNoCacheSensibility()
public boolean hasPortalCategoryCacheSensibility()
public boolean hasCurrentCategoryCacheSensibility()
public int getCacheTypeInt()
public boolean hasNoCache()
public boolean hasCacheSession()
public boolean hasCacheServer()
public boolean hasCacheGroups()
public boolean hasCacheMembers()
public boolean hasCacheSessionAndVisitors()
public boolean hasCacheVisitorsOnly()
public abstract String getBehaviorCopy()
public abstract void setBehaviorCopy(String b)
public boolean isCopy()
public boolean isReference()
public boolean isWorkspaceReference()
public PortalElement duplicate(Member author)
author
- the Member to be used for store operation (create).
public PortalElement duplicate(String prefix, Member author)
prefix
- the title prefixauthor
- the Member to be used for store operation (create).
public PortalElement duplicate(String prefix, Member author, boolean deep)
prefix
- the title prefixauthor
- the Member to be used for store operation (create).deep
- boolean indicating if it is a deep copy
@Deprecated public PortalElement duplicate(String prefix, Member author, boolean deep, Workspace wkspc, Map catMap, Map groupMap)
duplicate(WizardContext, boolean)
prefix
- the title prefixauthor
- the author who perform the actiondeep
- boolean indicate if it is a deep copywkspc
- the workspace to setcatMap
- the binding map of old/new categoriesgroupMap
- the binding map of old/new groups
public PortalElement duplicate(WizardContext context, boolean deep)
context
- WizardContext describe the dupliate contextdeep
- boolean indicating if it is a deep copy
@Deprecated protected void duplicateDeep(PortalElement parent, String prefix, Member author, Workspace wkspc, Map catMap, Map groupMap)
duplicateDeep(WizardContext, PortalElement)
parent
- the duplicated parent (Not already created in JCMS)prefix
- the title prefixauthor
- the author who perform the actionwkspc
- the workspace to setcatMap
- the binding map of old/new categoriesgroupMap
- the binding map of old/new groupsprotected void duplicateDeep(WizardContext context, PortalElement parent)
context
- WizardContext describe the dupliate contextparent
- PortalElement parent of portlets to deeply duplicatepublic String[] getAbilities()
public String[] getAbilities(String lang)
public String[] getAbilities(String lang, boolean useDefault)
public void setAbilities(String[] v)
public boolean hasAbility(String ability)
ability
- Strign representing the ability
public void addAbility(String ability)
ability
- the ability to be added.public boolean hasAbility()
public static Map getAllAbilityMap()
This method uses a cached Map of abilities.
Return a map like this one :
{ "portlet.ability.virtualdesktop" : { "service" : "PortletSkinable" }, "portlet.ability.internal" : { "stat" : "AbstractPortletStat AbstractPortletStatReport" }, "portlet.ability.jcmsplugin" : { "foobar" : "Portlet" "collaborativespace.application" : "Portlet" "collaborativespace.dashboard" : "Portlet" } }
public static Map<String,List<String>> getAllAbilityMapUI()
Help fix bug JCMS-2653 - Bad optgroup label in ability list.
The map computed by getAllAbilityMap()
matches a complex structure
not suitable for presentation purpose.
In order to properly and easily list abilities without losing backward compatibility,
this method converts the map returned by getAllAbilityMap()
into a simpler
representation like this one :
{ "portlet.ability.virtualdesktop" : [ "service" ], "portlet.ability.internal" : [ "stat" ], "portlet.ability.jcmsplugin" : [ "foobar" ], "portlet.ability.jcmsplugin.collaborativespace" : [ "application", "dashboard" ] }The key match a "parent ability" suitable for use in a optgroup label.
public static String[] getAllAbilities()
public static String[] getAllAbilities(Class clazz)
clazz
- the class used to filter abilities
public String getAbilityLabel(String userLang, String ability)
userLang
- the user languageability
- the ability
public String getIcon()
public Collection<? extends TreeNode> getTreeChildren()
TreeNode
getTreeChildren
in interface TreeNode
getTreeChildren
in class Publication
TreeNode.getTreeChildren()
public boolean isTreeLeaf()
TreeNode
isTreeLeaf
in interface TreeNode
isTreeLeaf
in class Publication
TreeNode.isTreeLeaf()
public boolean isTreeNode()
TreeNode
isTreeNode
in interface TreeNode
isTreeNode
in class Publication
TreeNode.isTreeNode()
public TreeNode getTreeParent()
TreeNode
getTreeParent
in interface TreeNode
getTreeParent
in class Publication
TreeNode.getTreeParent()
public TreeNode getTreeParent(TreeNode node)
public boolean isChildTreeNode(TreeNode child)
public Collection<PortalElement> getAllTreeChildren()
public boolean containsTreeDescendant(TreeNode tn)
tn
- the treenode
public void performUpdate(Member mbr, Map context)
Publication
performUpdate
in class Publication
mbr
- the member which requests the write operationcontext
- a map which contains context parameters (may be null)public static PortalElement.AbilitySelector getAbilitySelector(String ability)
PortalElement.AbilitySelector
using the specified
ability String
.
ability
- an ability choosen from values returned by
getAllAbilities()
, or
"noabilities"
for portlet without any ability, or
"hasabilities"
for portlet with any ability.
PortalElement.AbilitySelector
using the given
ability String
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |