portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woon...@apache.org
Subject svn commit: r1089286 - in /portals/jetspeed-2/applications/j2-admin/trunk/src/main: java/org/apache/jetspeed/portlets/prm/ resources/org/apache/jetspeed/portlets/prm/resources/
Date Wed, 06 Apr 2011 00:38:57 GMT
Author: woonsan
Date: Wed Apr  6 00:38:56 2011
New Revision: 1089286

URL: http://svn.apache.org/viewvc?rev=1089286&view=rev
Log:
JS2-1247: Adding clone removing link.
TODO: refresh the page after removal

Modified:
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/ApplicationsListHome.java
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources.properties
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ca.properties
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_en.properties
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_es.properties
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_hu.properties
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_it.properties
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ja.properties
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ko.properties
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ua.properties
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_zh.properties
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_zh_TW.properties

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/ApplicationsListHome.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/ApplicationsListHome.java?rev=1089286&r1=1089285&r2=1089286&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/ApplicationsListHome.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/prm/ApplicationsListHome.java
Wed Apr  6 00:38:56 2011
@@ -22,6 +22,7 @@ import java.util.Locale;
 import org.apache.jetspeed.audit.AuditActivity;
 import org.apache.jetspeed.components.portletregistry.PortletRegistry;
 import org.apache.jetspeed.om.portlet.PortletApplication;
+import org.apache.jetspeed.om.portlet.PortletDefinition;
 import org.apache.jetspeed.portlets.AdminPortletWebPage;
 import org.apache.jetspeed.portlets.JetspeedServiceLocator;
 import org.apache.jetspeed.portlets.prm.ApplicationDataProvider.AppOrderBy;
@@ -600,6 +601,20 @@ public class ApplicationsListHome extend
                 {
                     PortletDefinitionBean pdb = (PortletDefinitionBean) model.getObject();
                     FeedbackPanel feed = (FeedbackPanel) getPage().get("feedback");
+                    
+                    try
+                    {
+                        JetspeedServiceLocator locator = ((AbstractAdminWebApplication) getApplication()).getServiceLocator();
+                        PortletRegistry registry = locator.getPortletRegistry();
+                        PortletDefinition def = registry.getPortletDefinitionByUniqueName(pdb.getUniqueName());
+                        // TODO: pop up window to clone a portlet
+                    }
+                    catch (Exception e) 
+                    {
+                        logger.error("Failed to remove a cloned portlet, {}. {}", pdb.getUniqueName(),
e);
+                        StringResourceModel resModel = new StringResourceModel("pam.details.action.status.clonePortletFailure",
this, null, new Object [] { pdb.getUniqueName(), e.getMessage() } );
+                        feed.error(resModel.getString());
+                    }
                 }
             };
 
@@ -613,6 +628,23 @@ public class ApplicationsListHome extend
                 {
                     PortletDefinitionBean pdb = (PortletDefinitionBean) model.getObject();
                     FeedbackPanel feed = (FeedbackPanel) getPage().get("feedback");
+                    
+                    try
+                    {
+                        JetspeedServiceLocator locator = ((AbstractAdminWebApplication) getApplication()).getServiceLocator();
+                        PortletRegistry registry = locator.getPortletRegistry();
+                        PortletDefinition def = registry.getPortletDefinitionByUniqueName(pdb.getUniqueName());
+                        
+                        if (def != null && def.isClone()) {
+                            registry.removeClone(def);
+                        }
+                    }
+                    catch (Exception e) 
+                    {
+                        logger.error("Failed to remove a cloned portlet, {}. {}", pdb.getUniqueName(),
e);
+                        StringResourceModel resModel = new StringResourceModel("pam.details.action.status.removeCloneFailure",
this, null, new Object [] { pdb.getUniqueName(), e.getMessage() } );
+                        feed.error(resModel.getString());
+                    }
                 }
             };
 

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources.properties?rev=1089286&r1=1089285&r2=1089286&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources.properties
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources.properties
Wed Apr  6 00:38:56 2011
@@ -167,6 +167,8 @@ pam.details.action.status.portlet.cloneF
 pam.details.action.clone.title = Clone Portlet
 pam.details.message.clone.portlet.name = Name of cloned portlet:
 pam.details.action.clone.emptyPortletName = Please enter a valid portlet name.
+pam.details.action.status.clonePortletFailure = Failed to clone a portlet: {0}, message:
{1}
+pam.details.action.status.removeCloneFailure = Failed to remove a cloned portlet: {0}, message:
{1}
 
 pam.details.filter.portlet = Portlet
 pam.details.filter.clone = Clone

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ca.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ca.properties?rev=1089286&r1=1089285&r2=1089286&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ca.properties
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ca.properties
Wed Apr  6 00:38:56 2011
@@ -165,6 +165,8 @@ pam.details.action.status.portlet.cloneF
 pam.details.action.clone.title = Clone Portlet
 pam.details.message.clone.portlet.name = Name of cloned portlet:
 pam.details.action.clone.emptyPortletName = Please enter a valid portlet name.
+pam.details.action.status.clonePortletFailure = Failed to clone a portlet: {0}, message:
{1}
+pam.details.action.status.removeCloneFailure = Failed to remove a cloned portlet: {0}, message:
{1}
 
 pam.details.filter.portlet = Portlet
 pam.details.filter.clone = Clone

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_en.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_en.properties?rev=1089286&r1=1089285&r2=1089286&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_en.properties
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_en.properties
Wed Apr  6 00:38:56 2011
@@ -167,6 +167,8 @@ pam.details.action.status.portlet.cloneF
 pam.details.action.clone.title = Clone Portlet
 pam.details.message.clone.portlet.name = Name of cloned portlet:
 pam.details.action.clone.emptyPortletName = Please enter a valid portlet name.
+pam.details.action.status.clonePortletFailure = Failed to clone a portlet: {0}, message:
{1}
+pam.details.action.status.removeCloneFailure = Failed to remove a cloned portlet: {0}, message:
{1}
 
 pam.details.filter.portlet = Portlet
 pam.details.filter.clone = Clone

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_es.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_es.properties?rev=1089286&r1=1089285&r2=1089286&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_es.properties
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_es.properties
Wed Apr  6 00:38:56 2011
@@ -167,6 +167,8 @@ pam.details.action.status.portlet.cloneF
 pam.details.action.clone.title = Clonar Portlet
 pam.details.message.clone.portlet.name = Nombre del portlet clonado:
 pam.details.action.clone.emptyPortletName = Por Favor, introduzca un nombre de portlet v\u00e1lido.
+pam.details.action.status.clonePortletFailure = Failed to clone a portlet: {0}, message:
{1}
+pam.details.action.status.removeCloneFailure = Failed to remove a cloned portlet: {0}, message:
{1}
 
 pam.details.filter.portlet = Portlet
 pam.details.filter.clone = Clone

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_hu.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_hu.properties?rev=1089286&r1=1089285&r2=1089286&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_hu.properties
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_hu.properties
Wed Apr  6 00:38:56 2011
@@ -167,6 +167,8 @@ pam.details.action.status.portlet.cloneF
 pam.details.action.clone.title = Clone Portlet
 pam.details.message.clone.portlet.name = Name of cloned portlet:
 pam.details.action.clone.emptyPortletName = Please enter a valid portlet name.
+pam.details.action.status.clonePortletFailure = Failed to clone a portlet: {0}, message:
{1}
+pam.details.action.status.removeCloneFailure = Failed to remove a cloned portlet: {0}, message:
{1}
 
 pam.details.filter.portlet = Portlet
 pam.details.filter.clone = Clone

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_it.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_it.properties?rev=1089286&r1=1089285&r2=1089286&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_it.properties
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_it.properties
Wed Apr  6 00:38:56 2011
@@ -167,6 +167,8 @@ pam.details.action.status.portlet.cloneF
 pam.details.action.clone.title = Clone Portlet
 pam.details.message.clone.portlet.name = Name of cloned portlet:
 pam.details.action.clone.emptyPortletName = Please enter a valid portlet name.
+pam.details.action.status.clonePortletFailure = Failed to clone a portlet: {0}, message:
{1}
+pam.details.action.status.removeCloneFailure = Failed to remove a cloned portlet: {0}, message:
{1}
 
 pam.details.filter.portlet = Portlet
 pam.details.filter.clone = Clone

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ja.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ja.properties?rev=1089286&r1=1089285&r2=1089286&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ja.properties
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ja.properties
Wed Apr  6 00:38:56 2011
@@ -166,6 +166,8 @@ pam.details.action.status.portlet.cloneF
 pam.details.action.clone.title = Clone Portlet
 pam.details.message.clone.portlet.name = Name of cloned portlet:
 pam.details.action.clone.emptyPortletName = Please enter a valid portlet name.
+pam.details.action.status.clonePortletFailure = Failed to clone a portlet: {0}, message:
{1}
+pam.details.action.status.removeCloneFailure = Failed to remove a cloned portlet: {0}, message:
{1}
 
 pam.details.filter.portlet = Portlet
 pam.details.filter.clone = Clone

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ko.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ko.properties?rev=1089286&r1=1089285&r2=1089286&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ko.properties
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ko.properties
Wed Apr  6 00:38:56 2011
@@ -169,6 +169,8 @@ pam.details.action.status.portlet.cloneF
 pam.details.action.clone.title = Clone Portlet
 pam.details.message.clone.portlet.name = Name of cloned portlet:
 pam.details.action.clone.emptyPortletName = Please enter a valid portlet name.
+pam.details.action.status.clonePortletFailure = Failed to clone a portlet: {0}, message:
{1}
+pam.details.action.status.removeCloneFailure = Failed to remove a cloned portlet: {0}, message:
{1}
 
 pam.details.filter.portlet = Portlet
 pam.details.filter.clone = Clone

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ua.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ua.properties?rev=1089286&r1=1089285&r2=1089286&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ua.properties
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_ua.properties
Wed Apr  6 00:38:56 2011
@@ -167,6 +167,8 @@ pam.details.action.status.portlet.cloneF
 pam.details.action.clone.title = Clone Portlet
 pam.details.message.clone.portlet.name = Name of cloned portlet:
 pam.details.action.clone.emptyPortletName = Please enter a valid portlet name.
+pam.details.action.status.clonePortletFailure = Failed to clone a portlet: {0}, message:
{1}
+pam.details.action.status.removeCloneFailure = Failed to remove a cloned portlet: {0}, message:
{1}
 
 pam.details.filter.portlet = Portlet
 pam.details.filter.clone = Clone

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_zh.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_zh.properties?rev=1089286&r1=1089285&r2=1089286&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_zh.properties
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_zh.properties
Wed Apr  6 00:38:56 2011
@@ -163,6 +163,8 @@ pam.details.action.status.portlet.saveOK
 pam.details.action.status.portlet.saveFailure = Failed to save portlet definition : {0} ,
message: {1}
 pam.details.action.status.portlet.cloneOK = Saved portlet definition successfully: {0}
 pam.details.action.status.portlet.cloneFailure = Failed to save portlet definition : {0}
, message: {1}
+pam.details.action.status.clonePortletFailure = Failed to clone a portlet: {0}, message:
{1}
+pam.details.action.status.removeCloneFailure = Failed to remove a cloned portlet: {0}, message:
{1}
 
 pam.details.action.clone.title = Clone Portlet
 pam.details.message.clone.portlet.name = Name of cloned portlet:

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_zh_TW.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_zh_TW.properties?rev=1089286&r1=1089285&r2=1089286&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_zh_TW.properties
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/resources/org/apache/jetspeed/portlets/prm/resources/PRMResources_zh_TW.properties
Wed Apr  6 00:38:56 2011
@@ -167,6 +167,8 @@ pam.details.action.status.portlet.cloneF
 pam.details.action.clone.title = Clone Portlet
 pam.details.message.clone.portlet.name = Name of cloned portlet:
 pam.details.action.clone.emptyPortletName = Please enter a valid portlet name.
+pam.details.action.status.clonePortletFailure = Failed to clone a portlet: {0}, message:
{1}
+pam.details.action.status.removeCloneFailure = Failed to remove a cloned portlet: {0}, message:
{1}
 
 pam.details.filter.portlet = Portlet
 pam.details.filter.clone = Clone



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message