portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwat...@apache.org
Subject svn commit: r747458 - in /portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets: custom/ profiler/ site/
Date Tue, 24 Feb 2009 17:44:58 GMT
Author: rwatler
Date: Tue Feb 24 17:44:58 2009
New Revision: 747458

URL: http://svn.apache.org/viewvc?rev=747458&view=rev
Log:
propagate API changes for JPA persistence integration

Modified:
    portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/custom/CustomConfigModePortlet.java
    portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/profiler/ProfileCriterionForm.java
    portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/profiler/ProfileRuleForm.java
    portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/site/JetspeedDocument.java
    portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java

Modified: portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/custom/CustomConfigModePortlet.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/custom/CustomConfigModePortlet.java?rev=747458&r1=747457&r2=747458&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/custom/CustomConfigModePortlet.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/custom/CustomConfigModePortlet.java
Tue Feb 24 17:44:58 2009
@@ -35,7 +35,7 @@
 
 import org.apache.jetspeed.CommonPortletServices;
 import org.apache.jetspeed.om.common.SecurityConstraint;
-import org.apache.jetspeed.om.common.SecurityConstraints;
+import org.apache.jetspeed.om.common.SecurityConstraintsContext;
 import org.apache.jetspeed.om.page.Fragment;
 import org.apache.jetspeed.om.page.Page;
 import org.apache.jetspeed.page.PageManager;
@@ -143,11 +143,11 @@
                 throw new IllegalStateException("Cannot find fragment: " + fragmentId);
             }
             
-            SecurityConstraints constraints = fragment.getSecurityConstraints();
+            SecurityConstraintsContext constraints = fragment.getSecurityConstraintsContext();
             
             if (constraints == null)
             {
-                constraints = fragment.newSecurityConstraints();
+                constraints = fragment.newSecurityConstraintsContext();
             }
             
             SecurityConstraint constraint = fragment.newSecurityConstraint();
@@ -181,7 +181,7 @@
             constraintList.add(constraint);
             
             constraints.setSecurityConstraints(constraintList);
-            fragment.setSecurityConstraints(constraints);
+            fragment.setSecurityConstraintsContext(constraints);
             this.pageManager.updatePage(page);
         }
         catch (Exception e)
@@ -209,7 +209,7 @@
                 throw new IllegalStateException("Cannot find fragment: " + fragmentId);
             }
             
-            SecurityConstraints constraints = fragment.getSecurityConstraints();
+            SecurityConstraintsContext constraints = fragment.getSecurityConstraintsContext();
             
             List constraintList = null;
             
@@ -247,7 +247,7 @@
                 constraints.setSecurityConstraints(constraintList);
             }
             
-            fragment.setSecurityConstraints(constraints.isEmpty() ? null : constraints);
+            fragment.setSecurityConstraintsContext(constraints.isEmpty() ? null : constraints);
             this.pageManager.updatePage(page);
         }
         catch (Exception e)
@@ -272,11 +272,11 @@
                 throw new IllegalStateException("Cannot find fragment: " + fragmentId);
             }
             
-            SecurityConstraints constraints = fragment.getSecurityConstraints();
+            SecurityConstraintsContext constraints = fragment.getSecurityConstraintsContext();
             
             if (constraints == null)
             {
-                constraints = fragment.newSecurityConstraints();
+                constraints = fragment.newSecurityConstraintsContext();
             }
             
             Set constraintRefSet = new HashSet();
@@ -293,7 +293,7 @@
             }
             
             constraints.setSecurityConstraintsRefs(constraintRefSet.isEmpty() ? null : new
ArrayList(constraintRefSet));
-            fragment.setSecurityConstraints(constraints.isEmpty() ? null : constraints);
+            fragment.setSecurityConstraintsContext(constraints.isEmpty() ? null : constraints);
             this.pageManager.updatePage(page);
         }
         catch (Exception e)
@@ -335,4 +335,4 @@
         }
     }
     
-}
\ No newline at end of file
+}

Modified: portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/profiler/ProfileCriterionForm.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/profiler/ProfileCriterionForm.java?rev=747458&r1=747457&r2=747458&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/profiler/ProfileCriterionForm.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/profiler/ProfileCriterionForm.java
Tue Feb 24 17:44:58 2009
@@ -258,7 +258,6 @@
         {
             if (isNew)
             {                
-                criterion.setRuleId(rule.getId());
                 rule.getRuleCriteria().add(criterion);
             }
             String value = criterion.getValue();

Modified: portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/profiler/ProfileRuleForm.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/profiler/ProfileRuleForm.java?rev=747458&r1=747457&r2=747458&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/profiler/ProfileRuleForm.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/profiler/ProfileRuleForm.java
Tue Feb 24 17:44:58 2009
@@ -97,17 +97,9 @@
         {
             return "{empty}";
         }
-        return rule.getClassname();
+        return rule.getClass().getName();
     }
 
-    public void setClassname(String classname)
-    {
-        if (rule != null)
-        {
-            this.rule.setClassname(classname);
-        }        
-    }
-    
     public String getId()
     {
         if (rule == null)
@@ -170,7 +162,6 @@
         }
         this.setId("");
         this.setTitle("");
-        this.setClassname("org.apache.jetspeed.profiler.rules.impl.StandardProfilingRule");
         isNew = true;
         return null;
     }

Modified: portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/site/JetspeedDocument.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/site/JetspeedDocument.java?rev=747458&r1=747457&r2=747458&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/site/JetspeedDocument.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/site/JetspeedDocument.java
Tue Feb 24 17:44:58 2009
@@ -21,7 +21,7 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.apache.jetspeed.om.common.SecurityConstraints;
+import org.apache.jetspeed.om.common.SecurityConstraintsContext;
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.page.Fragment;
 import org.apache.jetspeed.om.page.Link;
@@ -61,7 +61,7 @@
         this.hidden = folder.isHidden();
         this.page = folder.getDefaultPage();
         loadMetaData(folder.getMetadata());
-        loadSecurityData(folder.getSecurityConstraints());
+        loadSecurityData(folder.getSecurityConstraintsContext());
     }
 
     public JetspeedDocument(Page page)
@@ -74,7 +74,7 @@
         this.portletDecorator = page.getDefaultDecorator(Fragment.PORTLET);
         this.desktopTheme = page.getSkin();
         loadMetaData(page.getMetadata());
-        loadSecurityData(page.getSecurityConstraints());
+        loadSecurityData(page.getSecurityConstraintsContext());
     }
 
     public JetspeedDocument(Link link)
@@ -86,7 +86,7 @@
         this.target = link.getTarget();
         this.url = link.getUrl();
         loadMetaData(link.getMetadata());
-        loadSecurityData(link.getSecurityConstraints());
+        loadSecurityData(link.getSecurityConstraintsContext());
     }
 
     /**
@@ -292,7 +292,7 @@
         this.url = url;
     }
 
-    private void loadSecurityData(SecurityConstraints constraints)
+    private void loadSecurityData(SecurityConstraintsContext constraints)
     {
         this.securityConstraints = new ArrayList();
         if (constraints != null)

Modified: portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java?rev=747458&r1=747457&r2=747458&view=diff
==============================================================================
--- portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
(original)
+++ portals/jetspeed-2/applications/j2-admin/branches/JPA_BRANCH/src/main/java/org/apache/jetspeed/portlets/site/PortalSiteManager.java
Tue Feb 24 17:44:58 2009
@@ -42,7 +42,7 @@
 import org.apache.jetspeed.components.portletregistry.PortletRegistry;
 import org.apache.jetspeed.decoration.DecorationFactory;
 import org.apache.jetspeed.exception.JetspeedException;
-import org.apache.jetspeed.om.common.SecurityConstraints;
+import org.apache.jetspeed.om.common.SecurityConstraintsContext;
 import org.apache.jetspeed.om.folder.Folder;
 import org.apache.jetspeed.om.folder.FolderNotFoundException;
 import org.apache.jetspeed.om.folder.InvalidFolderException;
@@ -1519,18 +1519,18 @@
 
     protected void insertSecurityReference(String name, String kind, Node node) throws AJAXException
     {
-        if (node.getSecurityConstraints() == null)
+        if (node.getSecurityConstraintsContext() == null)
         {
-            SecurityConstraints cons = node.newSecurityConstraints();
-            node.setSecurityConstraints(cons);
+            SecurityConstraintsContext cons = node.newSecurityConstraintsContext();
+            node.setSecurityConstraintsContext(cons);
         }
         if (kind.equals("Owner"))
         {
-            node.getSecurityConstraints().setOwner(name);
+            node.getSecurityConstraintsContext().setOwner(name);
         }
         else
         {
-            List refs = node.getSecurityConstraints().getSecurityConstraintsRefs();
+            List refs = node.getSecurityConstraintsContext().getSecurityConstraintsRefs();
             if (refs.contains(name))
                 return;
             refs.add(name);
@@ -1540,12 +1540,12 @@
 
     protected void updateSecurityReference(String name, String oldName, String kind, Node
node) throws AJAXException
     {
-        if (node.getSecurityConstraints() == null)
+        if (node.getSecurityConstraintsContext() == null)
         {
-            SecurityConstraints cons = node.newSecurityConstraints();
-            node.setSecurityConstraints(cons);
+            SecurityConstraintsContext cons = node.newSecurityConstraintsContext();
+            node.setSecurityConstraintsContext(cons);
         }
-        List refs = node.getSecurityConstraints().getSecurityConstraintsRefs();
+        List refs = node.getSecurityConstraintsContext().getSecurityConstraintsRefs();
         if (refs == null || refs.size() == 0)
         {
             insertSecurityReference(name, kind, node);
@@ -1553,7 +1553,7 @@
         boolean found = false;
         if (kind.equals("Owner"))
         {
-            node.getSecurityConstraints().setOwner(name);
+            node.getSecurityConstraintsContext().setOwner(name);
             found = true;
         }
         else
@@ -1576,16 +1576,16 @@
 
     protected void removeSecurityReference(String name, Node node)
     {
-        if (node.getSecurityConstraints() != null)
+        if (node.getSecurityConstraintsContext() != null)
         {
             String kind = "";
             if (kind.equals("Owner"))
             {
-                node.getSecurityConstraints().setOwner(null);
+                node.getSecurityConstraintsContext().setOwner(null);
             }
             else
             {
-                List refs = node.getSecurityConstraints().getSecurityConstraintsRefs();
+                List refs = node.getSecurityConstraintsContext().getSecurityConstraintsRefs();
                 if (!refs.contains(name))
                     return; // nothing to do
                 refs.remove(name);



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