portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vku...@apache.org
Subject svn commit: r771995 - in /portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets: rpad/RPADEditor.java rpad/RemotePortletAppDeployer.java security/JetspeedPrincipalManagementPortlet.java
Date Tue, 05 May 2009 22:32:16 GMT
Author: vkumar
Date: Tue May  5 22:32:16 2009
New Revision: 771995

URL: http://svn.apache.org/viewvc?rev=771995&view=rev
Log:
small code clean up

Modified:
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/rpad/RPADEditor.java
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/rpad/RemotePortletAppDeployer.java
    portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/JetspeedPrincipalManagementPortlet.java

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/rpad/RPADEditor.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/rpad/RPADEditor.java?rev=771995&r1=771994&r2=771995&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/rpad/RPADEditor.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/rpad/RPADEditor.java
Tue May  5 22:32:16 2009
@@ -56,8 +56,6 @@
 
     private RepositoryManager repositoryManager;
 
-    private static final String REPO_PREFIX = "repo_";
-
     public RPADEditor()
     {
         final PortletDeployer deployer = new JetspeedPortletDeployer();
@@ -100,12 +98,12 @@
                     {
                         try
                         {
-                            getPortletRequest().getPreferences().reset(REPO_PREFIX + repo.getName());
+                            getPortletRequest().getPreferences().reset(repo.getName());
                             getRepositoryManager().reload(RemotePortletAppDeployer.getReposList(getPortletRequest()));
                             target.addComponent(tableGroup);
                         } catch (ReadOnlyException e)
                         {
-                            logger.error("The preference is read-only: {}", REPO_PREFIX +
repo.getName());
+                            logger.error("The preference is read-only: {}", repo.getName());
                         }
                     }                    
                 });
@@ -229,17 +227,17 @@
     {
         try
         {
-            getPortletRequest().getPreferences().setValue(REPO_PREFIX + name, repoUrl);
+            getPortletRequest().getPreferences().setValue(name, repoUrl);
             getPortletRequest().getPreferences().store();
             getRepositoryManager().reload(RemotePortletAppDeployer.getReposList(getPortletRequest()));
         }
         catch (ReadOnlyException e)
         {
-            logger.error("The preference is read-only: {}", REPO_PREFIX + name);
+            logger.error("The preference is read-only: {}", name);
         }
         catch (ValidatorException e)
         {
-            logger.error("The preference value of {} is invalid: {}", REPO_PREFIX + name,
repoUrl);
+            logger.error("The preference value of {} is invalid: {}", name, repoUrl);
         }
         catch (IOException e)
         {

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/rpad/RemotePortletAppDeployer.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/rpad/RemotePortletAppDeployer.java?rev=771995&r1=771994&r2=771995&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/rpad/RemotePortletAppDeployer.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/rpad/RemotePortletAppDeployer.java
Tue May  5 22:32:16 2009
@@ -244,11 +244,7 @@
         while(repoNames.hasMoreElements())
         {
             repoName = (String)repoNames.nextElement();
-            if(repoName.startsWith("repo_"))
-            {
-                portletRepositry.put(repoName.split("_")[1],new SimpleRepository(repoName.split("_")[1],request.getPreferences().getValue(repoName,"")));
              
-            }
-                
+            portletRepositry.put(repoName,new SimpleRepository(repoName,request.getPreferences().getValue(repoName,"")));
              
         }
         return portletRepositry;
     }

Modified: portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/JetspeedPrincipalManagementPortlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/JetspeedPrincipalManagementPortlet.java?rev=771995&r1=771994&r2=771995&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/JetspeedPrincipalManagementPortlet.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/trunk/src/main/java/org/apache/jetspeed/portlets/security/JetspeedPrincipalManagementPortlet.java
Tue May  5 22:32:16 2009
@@ -978,10 +978,6 @@
 
                 protected void onSubmit()
                 {
-                    ResourceBundle bundle = ResourceBundle
-                            .getBundle(
-                                    "org.apache.jetspeed.portlets.security.resources.UsersResources",
-                                    getPortletRequest().getLocale());
                     try
                     {
                         boolean passwordSet = false;
@@ -1007,8 +1003,6 @@
                         if (getCredentialUpdateRequired() != credential
                                 .isUpdateRequired())
                         {
-                            // getUserManager().setPasswordUpdateRequired(getUserName(),
-                            // getCredentialUpdateRequired());
                             credential
                                     .setUpdateRequired(getCredentialUpdateRequired());
                             getServiceLocator()
@@ -1024,8 +1018,6 @@
                         }
                         if (getCredentialEnabled() != credential.isEnabled())
                         {
-                            // getUserManager().setPasswordEnabled(getUserName(),
-                            // getCredentialEnabled());
                             credential.setEnabled(getCredentialEnabled());
                             String activity = (getCredentialEnabled() ? AuditActivity.PASSWORD_ENABLED
                                     : AuditActivity.PASSWORD_DISABLED);
@@ -1048,8 +1040,6 @@
                             {
                                 java.sql.Date today = new java.sql.Date(
                                         new Date().getTime());
-                                // getUserManager().setPasswordExpiration(getUserName(),
-                                // today);
                                 credential.setExpirationDate(today);
                                 getServiceLocator()
                                         .getAuditActivity()
@@ -1079,8 +1069,6 @@
                                                 AdminPortletWebPage.USER_ADMINISTRATION);
                             } else if (expiredFlagStr.equals("unlimited"))
                             {
-                                // getUserManager().setPasswordExpiration(getUserName(),
-                                // User.MAX_DATE);
                                 credential.setExpirationDate(MAX_DATE);
                                 getServiceLocator()
                                         .getAuditActivity()



---------------------------------------------------------------------
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