Author: vkumar
Date: Fri Aug 29 11:39:17 2008
New Revision: 690363

URL: http://svn.apache.org/viewvc?rev=690363&view=rev
Log:
Refactoring of the security model and Api

Added:
    
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAccessManager.java
    
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociation.java
    
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationHandler.java
    
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationRef.java
    
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationReference.java
    
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationStorageManager.java
    
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationType.java
    
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java
    
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManagerProvider.java
    
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalPermission.java
    
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalPermissionStorageManager.java
    
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalStorageManager.java
    
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalTypeImpl.java

Added: 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAccessManager.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAccessManager.java?rev=690363&view=auto
==============================================================================
--- 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAccessManager.java
 (added)
+++ 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAccessManager.java
 Fri Aug 29 11:39:17 2008
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.security;
+
+import java.util.List;
+
+public interface JetspeedPrincipalAccessManager {
+    boolean principalExists(String principalName, JetspeedPrincipalType type);
+    JetspeedPrincipal getPrincipal(Long id);
+    JetspeedPrincipal getPrincipal(String principalName, JetspeedPrincipalType 
type);
+    List<JetspeedPrincipal> getPrincipals(String nameFilter, 
List<SecurityAttributes> attributes, JetspeedPrincipalType type);
+    List<String> getPrincipalNames(String nameFilter, List<SecurityAttributes> 
attributes, JetspeedPrincipalType type);
+    List<JetspeedPrincipal> getAssociatedFrom(String principalName, 
JetspeedPrincipalType type, String associationName);
+    List<JetspeedPrincipal> getAssociatedFrom(Long principalId, 
JetspeedPrincipalType type, String associationName);
+    List<JetspeedPrincipal> getAssociatedTo(String principalName, 
JetspeedPrincipalType type, String associationName);
+    List<JetspeedPrincipal> getAssociatedTo(Long principalId, 
JetspeedPrincipalType type, String associationName);
+    List<String> getAssociatedNamesFrom(String principalName, 
JetspeedPrincipalType type, String associationName);
+    List<String> getAssociatedNamesFrom(Long principalId, 
JetspeedPrincipalType type, String associationName);
+    List<String> getAssociatedNamesTo(String principalName, 
JetspeedPrincipalType type, String associationName);
+    List<String> getAssociatedNamesTo(Long principalId, JetspeedPrincipalType 
type, String associationName);
+    List<String> getPrincipals(JetspeedPermission permission);
+    List<String> getPrincipals(JetspeedPermission permission, 
JetspeedPrincipalType type);
+}

Added: 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociation.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociation.java?rev=690363&view=auto
==============================================================================
--- 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociation.java
 (added)
+++ 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociation.java
 Fri Aug 29 11:39:17 2008
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.security;
+
+public interface JetspeedPrincipalAssociation {
+       String getAssociationName();
+
+       JetspeedPrincipal getPrincipalFrom();
+
+       JetspeedPrincipal getPrincipalTo();
+}

Added: 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationHandler.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationHandler.java?rev=690363&view=auto
==============================================================================
--- 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationHandler.java
 (added)
+++ 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationHandler.java
 Fri Aug 29 11:39:17 2008
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.security;
+
+
+public interface JetspeedPrincipalAssociationHandler {
+       JetspeedPrincipalAssociationType getAssociationType();
+         void setManagerFrom(JetspeedPrincipalManager pm);
+         void setManagerTo(JetspeedPrincipalManager pm);
+         void setStorageManager(JetspeedPrincipalAssociationStorageManager sm);
+         void add(JetspeedPrincipal from, JetspeedPrincipal to) throws 
PrincipalNotFoundException, PrincipalAssociationNotAllowedException;
+         void remove(JetspeedPrincipal from, JetspeedPrincipal to) throws 
PrincipalNotFoundException, RequiredPrincipalAssociationException;
+         void removeAllFrom(JetspeedPrincipal from) throws 
PrincipalNotFoundException, PrincipalNotRemovableException; // may only be 
called when removing the principal itself
+         void removeAllTo(JetspeedPrincipal to) throws 
PrincipalNotFoundException, PrincipalNotRemovableException; // may only be 
called when removing the principal itself
+}

Added: 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationRef.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationRef.java?rev=690363&view=auto
==============================================================================
--- 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationRef.java
 (added)
+++ 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationRef.java
 Fri Aug 29 11:39:17 2008
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.security;
+
+import org.apache.jetspeed.exception.JetspeedException;
+
+public class JetspeedPrincipalAssociationRef extends JetspeedException {
+
+}

Added: 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationReference.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationReference.java?rev=690363&view=auto
==============================================================================
--- 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationReference.java
 (added)
+++ 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationReference.java
 Fri Aug 29 11:39:17 2008
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.security;
+
+public final class JetspeedPrincipalAssociationReference {
+        public enum Type { FROM, TO };
+         
+         public final Type type;
+         public final JetspeedPrincipal ref;
+         public final String associationName;  
+         
+         public JetspeedPrincipalAssociationReference(Type type, 
JetspeedPrincipal ref, String associationName)
+         {
+           this.type = type;
+           this.ref = ref;
+           this. associationName = associationName;
+           if (type == null || ref.getId() == null || ref.getName() == null || 
associationName == null )
+           {
+             throw new NullPointerException();
+           }
+         }
+         
+         public boolean equals(JetspeedPrincipalAssociationReference jar)
+         {
+           return (jar != null && jar.type == this.type && jar.ref.getClass() 
== ref.getClass() && jar.ref.getName() == ref.getName());
+         }
+}

Added: 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationStorageManager.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationStorageManager.java?rev=690363&view=auto
==============================================================================
--- 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationStorageManager.java
 (added)
+++ 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationStorageManager.java
 Fri Aug 29 11:39:17 2008
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.security;
+
+
+public interface JetspeedPrincipalAssociationStorageManager {
+       void addAssociation(JetspeedPrincipal from, JetspeedPrincipal to, 
String associationName) throws PrincipalNotFoundException, 
UnsupportedPrincipalAssociationException, 
PrincipalAssociationNotAllowedException;
+    void removeAssociation(JetspeedPrincipal from, JetspeedPrincipal to, 
String associationName) throws PrincipalNotFoundException, 
UnsupportedPrincipalAssociationException, RequiredPrincipalAssociationException;
+}

Added: 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationType.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationType.java?rev=690363&view=auto
==============================================================================
--- 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationType.java
 (added)
+++ 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationType.java
 Fri Aug 29 11:39:17 2008
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.security;
+
+public interface JetspeedPrincipalAssociationType {
+         String getAssociationName();
+         JetspeedPrincipalType getFromPrincipalType();
+         JetspeedPrincipalType getToPrincipalType();
+         boolean isReadonlyMapping(); // mapped associations cannot be added 
or removed other then by removal of the Principal(s) itself
+}

Added: 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java?rev=690363&view=auto
==============================================================================
--- 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java
 (added)
+++ 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManager.java
 Fri Aug 29 11:39:17 2008
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.security;
+
+import java.util.List;
+
+
+public interface JetspeedPrincipalManager {
+    JetspeedPrincipalType getPrincipalType();
+    void setAccessManager(JetspeedPrincipalAccessManager pm);
+    void setStorageManager(JetspeedPrincipalStorageManager sm);
+    void setPermissionStorageManager(JetspeedPrincipalPermissionStorageManager 
sm);
+    JetspeedCredentialManager getCredentialManager();
+    void addAssociationHandler(JetspeedPrincipalAssociationHandler ah);
+    JetspeedPrincipal newPrincipal(String name);
+    boolean principalExists(String name);
+    JetspeedPrincipal getPrincipal(String name);
+    List<String> getPrincipalNames(String nameFilter, List<SecurityAttributes> 
attributes);
+    List<JetspeedPrincipal> getPrincipals(String nameFilter, 
List<SecurityAttributes> attributes);
+    void removePrincipal(String name) throws PrincipalNotFoundException, 
PrincipalNotRemovableException, DependentPrincipalException;
+    List <JetspeedPrincipal> getAssociatedFrom(String principalName, String 
associationName);
+    List <JetspeedPrincipal> getAssociatedTo(String principalName, String 
associationName);
+    List <String> getAssociatedNamesFrom(String principalName, String 
associationName);
+    List <String> getAssociatedNamesTo(String principalName, String 
associationName);
+}

Added: 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManagerProvider.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManagerProvider.java?rev=690363&view=auto
==============================================================================
--- 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManagerProvider.java
 (added)
+++ 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalManagerProvider.java
 Fri Aug 29 11:39:17 2008
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.security;
+
+import java.util.Set;
+
+public interface JetspeedPrincipalManagerProvider {
+    Set<JetspeedPrincipalType> getPrincipalTypes();
+    JetspeedPrincipalType getPrincipalType(String name);
+    JetspeedPrincipalType getPrincipalTypeByClassName(String className);
+    JetspeedPrincipalManager getManager(JetspeedPrincipalType type);
+}

Added: 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalPermission.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalPermission.java?rev=690363&view=auto
==============================================================================
--- 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalPermission.java
 (added)
+++ 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalPermission.java
 Fri Aug 29 11:39:17 2008
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.security;
+
+public interface JetspeedPrincipalPermission {
+         JetspeedPrincipal principal = null;;
+         JetspeedPermission permmission = null;
+}

Added: 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalPermissionStorageManager.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalPermissionStorageManager.java?rev=690363&view=auto
==============================================================================
--- 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalPermissionStorageManager.java
 (added)
+++ 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalPermissionStorageManager.java
 Fri Aug 29 11:39:17 2008
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.security;
+
+public interface JetspeedPrincipalPermissionStorageManager {
+         void grantPermission(JetspeedPrincipal principal, JetspeedPermission 
permission);
+         void revokePermission(JetspeedPrincipal principal, JetspeedPermission 
permission);
+         void revokeAll(JetspeedPrincipal principal);
+}

Added: 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalStorageManager.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalStorageManager.java?rev=690363&view=auto
==============================================================================
--- 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalStorageManager.java
 (added)
+++ 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalStorageManager.java
 Fri Aug 29 11:39:17 2008
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.security;
+
+import java.util.Set;
+
+
+public interface JetspeedPrincipalStorageManager {
+          void addPrincipal(JetspeedPrincipal principal, 
Set<JetspeedPrincipalAssociationRef> associations) throws 
PrincipalAlreadyExistsException, RequiredPrincipalAssociationException;
+           void updatePrincipal(JetspeedPrincipal principal) throws 
PrincipalUpdateException, PrincipalNotFoundException;
+           void removePrincipal(JetspeedPrincipal principal) throws 
PrincipalNotFoundException, PrincipalNotRemovableException, 
DependentPrincipalException;
+}

Added: 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalTypeImpl.java
URL: 
http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalTypeImpl.java?rev=690363&view=auto
==============================================================================
--- 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalTypeImpl.java
 (added)
+++ 
portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalTypeImpl.java
 Fri Aug 29 11:39:17 2008
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jetspeed.security;
+
+
+public class JetspeedPrincipalTypeImpl implements JetspeedPrincipalType{
+
+       private String typeName;
+       private String typeClassName;
+
+       public JetspeedPrincipalTypeImpl() {
+       }
+
+
+       public SecurityAttributeTypes getAttributeTypes() {
+               // TODO Auto-generated method stub
+               return null;
+       }
+
+       
+       public String getClassName() {
+               return typeClassName;
+       }
+
+       
+       public String getName() {
+               return typeName;
+       }
+
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to