Skip to content

Commit

Permalink
LEP-2853
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.liferay.com/repos/public/portal/trunk@6572 05bdf26c-840f-0410-9ced-eb539d925f36
  • Loading branch information
brianchandotcom committed May 29, 2007
1 parent d3cddc6 commit d97c98c
Show file tree
Hide file tree
Showing 20 changed files with 219 additions and 72 deletions.
7 changes: 6 additions & 1 deletion definitions/liferay-portlet-app_4_3_0.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ a Liferay portlet application.
<!--
The portlet element contains the declarative data of a portlet.
-->
<!ELEMENT portlet (portlet-name, struts-path?, configuration-path?,
<!ELEMENT portlet (portlet-name, icon?, struts-path?, configuration-path?,
indexer-class?, open-search-class?, scheduler-class?, portlet-url-class?,
friendly-url-mapper-class?, url-encoder-class?, portlet-data-handler-class?,
smtp-message-listener-class?, preferences-company-wide?,
Expand All @@ -33,6 +33,11 @@ match the portlet-name specified in portlet.xml.
-->
<!ELEMENT portlet-name (#PCDATA)>

<!--
The icon element specifies an image that represents the portlet.
-->
<!ELEMENT icon (#PCDATA)>

<!--
Supppose the struts-path value is "mail". This tells the portal that all
requests with the path mail/* are considered part of this portlet's scope. Users
Expand Down
28 changes: 26 additions & 2 deletions portal-impl/src/com/liferay/portal/model/impl/PortletImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public PortletImpl(long companyId, String portletId) {
*/
public PortletImpl(String portletId, PluginPackage pluginPackage,
PluginSetting pluginSetting, long companyId,
String strutsPath, String configurationPath,
String icon, String strutsPath, String configurationPath,
String displayName, String portletClass,
String indexerClass, String openSearchClass,
String schedulerClass, String portletURLClass,
Expand Down Expand Up @@ -188,6 +188,7 @@ public PortletImpl(String portletId, PluginPackage pluginPackage,
_pluginPackage = pluginPackage;
_defaultPluginSetting = pluginSetting;
setCompanyId(companyId);
_icon = icon;
_strutsPath = strutsPath;
_configurationPath = configurationPath;
_displayName = displayName;
Expand Down Expand Up @@ -316,6 +317,24 @@ public void setDefaultPluginSetting(PluginSetting pluginSetting) {
_defaultPluginSetting = pluginSetting;
}

/**
* Gets the icon of the portlet.
*
* @return the icon of the portlet
*/
public String getIcon() {
return _icon;
}

/**
* Sets the icon of the portlet.
*
* @param icon the icon of the portlet
*/
public void setIcon(String icon) {
_icon = icon;
}

/**
* Gets the struts path of the portlet.
*
Expand Down Expand Up @@ -1893,7 +1912,7 @@ public void setServletURLPatterns(List servletURLPatterns) {
public Object clone() {
return new PortletImpl(
getPortletId(), getPluginPackage(), getDefaultPluginSetting(),
getCompanyId(), getStrutsPath(), getConfigurationPath(),
getCompanyId(), getIcon(), getStrutsPath(), getConfigurationPath(),
getDisplayName(), getPortletClass(), getIndexerClass(),
getOpenSearchClass(), getSchedulerClass(), getPortletURLClass(),
getFriendlyURLMapperClass(), getURLEncoderClass(),
Expand Down Expand Up @@ -1944,6 +1963,11 @@ public int compareTo(Object obj) {
*/
private PluginSetting _defaultPluginSetting;

/**
* The icon of the portlet.
*/
private String _icon;

/**
* The struts path of the portlet.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,8 @@ private Set _readLiferayPortletXML(
Portlet portletModel = (Portlet)portletsPool.get(portletId);

if (portletModel != null) {
portletModel.setIcon(GetterUtil.getString(
portlet.elementText("icon"), portletModel.getIcon()));
portletModel.setStrutsPath(GetterUtil.getString(
portlet.elementText("struts-path"),
portletModel.getStrutsPath()));
Expand Down
2 changes: 1 addition & 1 deletion portal-impl/src/com/liferay/portal/util/ReleaseInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class ReleaseInfo {

static String codeName = "Owen";

static String build = "4105";
static String build = "4107";

static String date = "May 29, 2007";

Expand Down
4 changes: 4 additions & 0 deletions portal-service/src/com/liferay/portal/model/Portlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ public void setPluginPackage(
public void setDefaultPluginSetting(
com.liferay.portal.model.PluginSetting pluginSetting);

public java.lang.String getIcon();

public void setIcon(java.lang.String icon);

public java.lang.String getStrutsPath();

public void setStrutsPath(java.lang.String strutsPath);
Expand Down
24 changes: 24 additions & 0 deletions portal-service/src/com/liferay/portal/theme/PortletDisplay.java
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,14 @@ public void setShowMoveIcon(boolean showMoveIcon) {
_showMoveIcon = showMoveIcon;
}

public boolean isShowPortletIcon() {
return _showPortletIcon;
}

public void setShowPortletIcon(boolean showPortletIcon) {
_showPortletIcon = showPortletIcon;
}

public boolean isShowPrintIcon() {
return _showPrintIcon;
}
Expand Down Expand Up @@ -386,6 +394,14 @@ public void setURLMin(String urlMin) {
_urlMin = urlMin;
}

public String getURLPortlet() {
return _urlPortlet;
}

public void setURLPortlet(String urlPortlet) {
_urlPortlet = urlPortlet;
}

public String getURLPrint() {
return _urlPrint;
}
Expand Down Expand Up @@ -454,6 +470,7 @@ public void recycle() {
_showMaxIcon = false;
_showMinIcon = false;
_showMoveIcon = false;
_showPortletIcon = false;
_showPrintIcon = false;
_showRefreshIcon = false;
_urlBack = StringPool.BLANK;
Expand All @@ -464,6 +481,7 @@ public void recycle() {
_urlHelp = StringPool.BLANK;
_urlMax = StringPool.BLANK;
_urlMin = StringPool.BLANK;
_urlPortlet = StringPool.BLANK;
_urlPrint = StringPool.BLANK;
_urlRefresh = StringPool.BLANK;
_restoreCurrentView = false;
Expand Down Expand Up @@ -502,6 +520,7 @@ public void copyFrom(PortletDisplay master) {
_showMaxIcon = master.isShowMaxIcon();
_showMinIcon = master.isShowMinIcon();
_showMoveIcon = master.isShowMoveIcon();
_showPortletIcon = master.isShowPortletIcon();
_showPrintIcon = master.isShowPrintIcon();
_showRefreshIcon = master.isShowRefreshIcon();
_urlBack = master.getURLBack();
Expand All @@ -512,6 +531,7 @@ public void copyFrom(PortletDisplay master) {
_urlHelp = master.getURLHelp();
_urlMax = master.getURLMax();
_urlMin = master.getURLMin();
_urlPortlet = master.getURLPortlet();
_urlPrint = master.getURLPrint();
_urlRefresh = master.getURLRefresh();
_restoreCurrentView = master.isRestoreCurrentView();
Expand Down Expand Up @@ -550,6 +570,7 @@ public void copyTo(PortletDisplay slave) {
slave.setShowMaxIcon(_showMaxIcon);
slave.setShowMinIcon(_showMinIcon);
slave.setShowMoveIcon(_showMoveIcon);
slave.setShowPortletIcon(_showPortletIcon);
slave.setShowPrintIcon(_showPrintIcon);
slave.setShowRefreshIcon(_showRefreshIcon);
slave.setURLBack(_urlBack);
Expand All @@ -560,6 +581,7 @@ public void copyTo(PortletDisplay slave) {
slave.setURLHelp(_urlHelp);
slave.setURLMax(_urlMax);
slave.setURLMin(_urlMin);
slave.setURLPortlet(_urlPortlet);
slave.setURLPrint(_urlPrint);
slave.setURLRefresh(_urlRefresh);
slave.setRestoreCurrentView(_restoreCurrentView);
Expand Down Expand Up @@ -601,6 +623,7 @@ public void copyTo(PortletDisplay slave) {
private boolean _showMaxIcon;
private boolean _showMinIcon;
private boolean _showMoveIcon;
private boolean _showPortletIcon;
private boolean _showPrintIcon;
private boolean _showRefreshIcon;
private String _urlBack = StringPool.BLANK;
Expand All @@ -611,6 +634,7 @@ public void copyTo(PortletDisplay slave) {
private String _urlHelp = StringPool.BLANK;
private String _urlMax = StringPool.BLANK;
private String _urlMin = StringPool.BLANK;
private String _urlPortlet = StringPool.BLANK;
private String _urlPrint = StringPool.BLANK;
private String _urlRefresh = StringPool.BLANK;
private boolean _restoreCurrentView;
Expand Down
2 changes: 2 additions & 0 deletions portal-web/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@
<arg value="${jspc.classpath}" />
<arg value="${jspc.classes.dir}" />
</java>

<delete file="alfresco.log" />
</target>

<target name="compile-jboss-jetty">
Expand Down
Loading

0 comments on commit d97c98c

Please sign in to comment.