org.apache.jetspeed.om.registry
Interface PortletEntry

All Superinterfaces:
PortletInfoEntry, RegistryEntry
All Known Implementing Classes:
BasePortletEntry

public interface PortletEntry
extends PortletInfoEntry

This entry describes all the properties that should be present in a RegistryEntry describing a Portlet.

Each PortletEntry must have a type, which may be:

abstract
The entry description is unsuitable for instanciating a Portlet
instance
This entry may be used to create a Portlet and does not depend on any other portlet entries
ref
This entry may be used to instanciate Portlets but depends on another PortletEntry definition whose registry name can be retrieved by getParent()

Version:
$Id: PortletEntry.java,v 1.6 2005/03/21 18:21:37 sgala Exp $
Author:
RaphaŽl Luta

Field Summary
static java.lang.String DEFAULT_CATEGORY_ABSTRACT
           
static java.lang.String DEFAULT_CATEGORY_REF
           
static java.lang.String DEFAULT_GROUP
           
static java.lang.String TYPE_ABSTRACT
           
static java.lang.String TYPE_INSTANCE
           
static java.lang.String TYPE_REF
           
 
Method Summary
 void addCategory(java.lang.String name)
          Add a new category to this portlet entry in the default group.
 void addCategory(java.lang.String name, java.lang.String group)
          Add a new category to this portlet entry.
 CachedParameter getCachedParameter(java.lang.String name)
          helper to get an instance of a cached parameter.
 java.lang.String getParent()
           
 java.lang.String getType()
           
 java.lang.String getURL()
           
 ContentURL getURLEntry()
          Gets the URL entry record for this portlet entry
 boolean hasCategory(java.lang.String name)
          Test if a given category exists for this entry
 boolean hasCategory(java.lang.String name, java.lang.String group)
          Test if a given category exists for this entry, in the specified group of categories.
 boolean isAdmin()
           
 boolean isApplication()
           
 boolean isCachedOnURL()
          Determines whether to use the URL as part of the unique id to the portlet cache.
 java.util.Iterator listCategories()
          Returns a list of the categories
 void removeCategory(java.lang.String name)
          Remove a category from this portlet entry in the default group.
 void removeCategory(java.lang.String name, java.lang.String group)
          Remove a category from this portlet entry in the specified group.
 void setApplication(boolean application)
          Sets the application status of this portlet entry.
 void setCachedOnURL(boolean cached)
          Determines whether to use the URL as part of the unique id to the portlet cache.
 void setParent(java.lang.String parent)
          Sets the ancestor for this PortletEntry.
 void setType(java.lang.String type)
          Sets the type of this entry.
 void setURL(java.lang.String url)
          Sets the URL for this PortletEntry
 
Methods inherited from interface org.apache.jetspeed.om.registry.PortletInfoEntry
addMediaType, addParameter, addParameter, addTool, getClassname, getParameter, getParameterMap, getParameterNames, getTool, getToolMap, getToolNames, hasMediaType, listMediaTypes, removeMediaType, removeParameter, removeTool, setClassname
 
Methods inherited from interface org.apache.jetspeed.om.registry.RegistryEntry
getDescription, getId, getMetaInfo, getName, getSecurity, getSecurityRef, getTitle, isHidden, setDescription, setHidden, setMetaInfo, setName, setSecurity, setSecurityRef, setTitle
 

Field Detail

TYPE_REF

public static final java.lang.String TYPE_REF
See Also:
Constant Field Values

TYPE_INSTANCE

public static final java.lang.String TYPE_INSTANCE
See Also:
Constant Field Values

TYPE_ABSTRACT

public static final java.lang.String TYPE_ABSTRACT
See Also:
Constant Field Values

DEFAULT_GROUP

public static final java.lang.String DEFAULT_GROUP
See Also:
Constant Field Values

DEFAULT_CATEGORY_REF

public static final java.lang.String DEFAULT_CATEGORY_REF
See Also:
Constant Field Values

DEFAULT_CATEGORY_ABSTRACT

public static final java.lang.String DEFAULT_CATEGORY_ABSTRACT
See Also:
Constant Field Values
Method Detail

getURL

public java.lang.String getURL()
Returns:
the URL associated with this portlet or null

setURL

public void setURL(java.lang.String url)
Sets the URL for this PortletEntry

Parameters:
url - the new PortletEntry URL

isCachedOnURL

public boolean isCachedOnURL()
Determines whether to use the URL as part of the unique id to the portlet cache. This can be used to control the lifetime of the portlet. The URL is used in combination with the parameter names and values for this portlet to uniquely identify to portlet. Parameters may also be optionally included in the cache key. This value can be set in the portlet registry.

Returns:
true if the URL is to be part of the cache key.

setCachedOnURL

public void setCachedOnURL(boolean cached)
Determines whether to use the URL as part of the unique id to the portlet cache. This can be used to control the lifetime of the portlet. The URL is used in combination with the parameter names and values for this portlet to uniquely identify to portlet. Parameters may also be optionally included in the cache key. This value can be set in the portlet registry.

Returns:
cached set to true if want this portlet to be cached based on the url

getURLEntry

public ContentURL getURLEntry()
Gets the URL entry record for this portlet entry

Returns:
ContentURL the URL entry object

getCachedParameter

public CachedParameter getCachedParameter(java.lang.String name)
helper to get an instance of a cached parameter.

Parameters:
name - The parameter name.
Returns:
The cached parameter entry.

getParent

public java.lang.String getParent()
Returns:
the entry name from which this one is derived

setParent

public void setParent(java.lang.String parent)
Sets the ancestor for this PortletEntry.

Parameters:
parent - the new ancestor entry name. This name should be defined in the system registry

isAdmin

public boolean isAdmin()
Returns:
true is this entry is only accessible by the portal administrators.

isApplication

public boolean isApplication()
Returns:
true is the PortletEntry is marked as an application

setApplication

public void setApplication(boolean application)
Sets the application status of this portlet entry. If an entry is maked as application, the associated portlet will only be displayed in Maximized mode and can be retrieved specifically

Parameters:
application - the new application status

getType

public java.lang.String getType()
Returns:
the type of this entry

setType

public void setType(java.lang.String type)
Sets the type of this entry. The type specifies whether it is abstract, instance or ref

Parameters:
type - the new type for the PortletEntry

listCategories

public java.util.Iterator listCategories()
Returns a list of the categories

Returns:
an iterator on the categories

hasCategory

public boolean hasCategory(java.lang.String name)
Test if a given category exists for this entry

Parameters:
name - the category name
Returns:
true is the category exists in the default group

hasCategory

public boolean hasCategory(java.lang.String name,
                           java.lang.String group)
Test if a given category exists for this entry, in the specified group of categories.

Parameters:
name - the category name
group - the category group
Returns:
true is the category exists in the specified group

addCategory

public void addCategory(java.lang.String name)
Add a new category to this portlet entry in the default group.

Parameters:
name - the category name

addCategory

public void addCategory(java.lang.String name,
                        java.lang.String group)
Add a new category to this portlet entry.

Parameters:
name - the category name
group - the category group name

removeCategory

public void removeCategory(java.lang.String name)
Remove a category from this portlet entry in the default group.

Parameters:
name - the category name

removeCategory

public void removeCategory(java.lang.String name,
                           java.lang.String group)
Remove a category from this portlet entry in the specified group.

Parameters:
name - the media type name to remove.
group - the category group name


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.