|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.portal.PortletConfigurationImpl
public class PortletConfigurationImpl
Represents the configuration for a portlet. This is the state that is saved to the database. This implmentation uses a passed in PropertySet to store the configurable properties. It is recommended that an in memory PropertySet is used as the store now persists this manually.
Constructor Summary | |
---|---|
PortletConfigurationImpl(Long id,
Long dashboardPageId,
String portletKey,
Portlet portlet,
Integer column,
Integer row,
com.opensymphony.module.propertyset.PropertySet configuration,
URI gadgetUri,
com.atlassian.gadgets.dashboard.Color color,
Map<String,String> userPrefs)
|
Method Summary | |
---|---|
int |
compareTo(PortletConfiguration that)
|
com.atlassian.gadgets.dashboard.Color |
getColor()
Returns the color to use when rendering the Chrome of this gadget. |
Integer |
getColumn()
Represents the column that the configured portlet resides in. |
Long |
getDashboardPageId()
Provides the dashboard page id. |
String |
getDefaultProperty(String propertyKey)
Returns the default property value for a key |
URI |
getGadgetURI()
Returns the URI pointing to the Gadget XML for this particular portlet. |
Long |
getId()
Return the id of the PortletConfiguration. |
String |
getKey()
Return the key of this object |
Long |
getLongProperty(String propertyKey)
Returns a property of this object with the specified key as a long |
ObjectConfiguration |
getObjectConfiguration()
Retrieves an object configuration object with properties that can be set |
Portlet |
getPortlet()
Returns the portlet implementation that this PortletConfiguration is for. |
com.opensymphony.module.propertyset.PropertySet |
getProperties()
Retrieve all the specified Properties for this object |
String |
getProperty(String propertyKey)
Return the property if it is found, else return the default property |
Integer |
getRow()
Represents the row that the configured portlet resides in. |
String |
getTextProperty(String propertyKey)
Returns a property of this object with the specified key, the property is of type text |
Map<String,String> |
getUserPrefs()
An unmodifiable map of user preferences stored for this gadget. |
boolean |
hasProperty(String propertyKey)
Checks if this object has a particular property |
boolean |
isResourcesProvided()
Normal rendition of the Portlet should have JavaScript and CSS etc. |
void |
setColor(com.atlassian.gadgets.dashboard.Color color)
Set the color of the chrome for a gadget. |
void |
setColumn(Integer column)
Sets the column for the Portlet, effectively moving the portlet left or right on the page. |
void |
setDashboardPageId(Long dashboardPageId)
Sets the dashboard page id. |
void |
setRow(Integer row)
Sets the row for the Portlet, effectively moving the portlet up or down on the page. |
void |
setUserPrefs(Map<String,String> userPrefs)
Sets the userPreferences for this portletconfig. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public PortletConfigurationImpl(Long id, Long dashboardPageId, String portletKey, Portlet portlet, Integer column, Integer row, com.opensymphony.module.propertyset.PropertySet configuration, URI gadgetUri, com.atlassian.gadgets.dashboard.Color color, Map<String,String> userPrefs)
Method Detail |
---|
public Long getId()
PortletConfiguration
getId
in interface PortletConfiguration
public Portlet getPortlet()
PortletConfiguration
getPortlet
in interface PortletConfiguration
public Integer getColumn()
PortletConfiguration
getColumn
in interface PortletConfiguration
public String getKey()
ObjectConfigurable
getKey
in interface ObjectConfigurable
public void setColumn(Integer column)
PortletConfiguration
setColumn
in interface PortletConfiguration
column
- the column number starting from 1.public Integer getRow()
PortletConfiguration
getRow
in interface PortletConfiguration
public Long getDashboardPageId()
PortletConfiguration
getDashboardPageId
in interface PortletConfiguration
public void setDashboardPageId(Long dashboardPageId)
PortletConfiguration
setDashboardPageId
in interface PortletConfiguration
dashboardPageId
- the dashboard page id.public void setRow(Integer row)
PortletConfiguration
setRow
in interface PortletConfiguration
row
- the row number starting from 1.public boolean isResourcesProvided()
isResourcesProvided
in interface PortletConfiguration
public URI getGadgetURI()
PortletConfiguration
getGadgetURI
in interface PortletConfiguration
http://code.google.com/apis/gadgets/docs/reference.html
public Map<String,String> getUserPrefs()
PortletConfiguration
getUserPrefs
in interface PortletConfiguration
http://code.google.com/apis/gadgets/docs/reference.html#Userprefs_Ref
public void setUserPrefs(Map<String,String> userPrefs)
PortletConfiguration
setUserPrefs
in interface PortletConfiguration
userPrefs
- A map of key value pairspublic com.atlassian.gadgets.dashboard.Color getColor()
PortletConfiguration
getColor
in interface PortletConfiguration
public void setColor(com.atlassian.gadgets.dashboard.Color color)
PortletConfiguration
setColor
in interface PortletConfiguration
color
- the color of the chrome for a gadget.public ObjectConfiguration getObjectConfiguration() throws ObjectConfigurationException
ObjectConfigurable
getObjectConfiguration
in interface ObjectConfigurable
ObjectConfigurationException
public boolean hasProperty(String propertyKey) throws ObjectConfigurationException
ObjectConfigurable
hasProperty
in interface ObjectConfigurable
propertyKey
- to look for
ObjectConfigurationException
public String getProperty(String propertyKey) throws ObjectConfigurationException
getProperty
in interface ObjectConfigurable
propertyKey
- The key to look up from the PropertySet
ObjectConfigurationException
public String getTextProperty(String propertyKey) throws ObjectConfigurationException
ObjectConfigurable
getTextProperty
in interface ObjectConfigurable
propertyKey
- String key used to retrieve the property value
ObjectConfigurationException
public Long getLongProperty(String propertyKey) throws ObjectConfigurationException
ObjectConfigurable
getLongProperty
in interface ObjectConfigurable
propertyKey
- String key used to retrieve the property value
ObjectConfigurationException
public String getDefaultProperty(String propertyKey) throws ObjectConfigurationException
ObjectConfigurable
getDefaultProperty
in interface ObjectConfigurable
propertyKey
- String key used to retrieve the properties default value
ObjectConfigurationException
public com.opensymphony.module.propertyset.PropertySet getProperties()
ObjectConfigurable
getProperties
in interface ObjectConfigurable
public int compareTo(PortletConfiguration that)
compareTo
in interface Comparable<PortletConfiguration>
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |