portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/om JetspeedRolePrincipal.java JetspeedUserPrincipal.java JetspeedCredential.java package.html JetspeedGroupPrincipal.java JetspeedPrincipal.java JetspeedPermission.java
Date Fri, 16 Jul 2004 19:31:24 GMT
weaver      2004/07/16 12:31:24

  Added:       jetspeed-api/src/java/org/apache/jetspeed/security/om
                        JetspeedRolePrincipal.java
                        JetspeedUserPrincipal.java JetspeedCredential.java
                        package.html JetspeedGroupPrincipal.java
                        JetspeedPrincipal.java JetspeedPermission.java
  Removed:     components/security/src/java/org/apache/jetspeed/security/om
                        JetspeedGroupPrincipal.java JetspeedPermission.java
                        JetspeedCredential.java JetspeedUserPrincipal.java
                        package.html JetspeedPrincipal.java
                        JetspeedRolePrincipal.java
  Log:
  security interfaces moved to jetspeed-api
  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/om/JetspeedRolePrincipal.java
  
  Index: JetspeedRolePrincipal.java
  ===================================================================
  /* Copyright 2004 Apache Software Foundation
   *
   * Licensed 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.om;
  
  import java.util.Collection;
  
  /**
   * <p>Interface representing Jetspeed security role principal object model.</p>
   * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
   */
  public interface JetspeedRolePrincipal extends JetspeedPrincipal
  {
      /**
       * <p>Getter for the user principals.</p>
       * @return The user principals.
       */
      Collection getUserPrincipals();
  
      /**
       * <p>Setter for the user principals.</p>
       * @param userPrincipals The user principals.
       */
      void setUserPrincipals(Collection userPrincipals);
  
      /**
       * <p>Getter for the group principals.</p>
       * @return The group principals.
       */
      Collection getGroupPrincipals();
  
      /**
       * <p>Setter for the group principals.</p>
       * @param groupPrincipals The group principals.
       */
      void setGroupPrincipals(Collection groupPrincipals);
  }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/om/JetspeedUserPrincipal.java
  
  Index: JetspeedUserPrincipal.java
  ===================================================================
  /* Copyright 2004 Apache Software Foundation
   *
   * Licensed 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.om;
  
  import java.util.Collection;
  
  /**
   * <p>Interface representing Jetspeed security user principal object model.</p>
   * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
   */
  public interface JetspeedUserPrincipal extends JetspeedPrincipal
  {
      /**
       * <p>Getter for the security credentials.</p>
       * @return The credentials.
       */
      Collection getCredentials();
  
      /**
       * <p>Setter for the security credentials.</p>
       * @param credentials The credentials.
       */
      void setCredentials(Collection credentials);
  
      /**
       * <p>Getter for the role principals.</p>
       * @return The role principals.
       */
      Collection getRolePrincipals();
  
      /**
       * <p>Setter for the role principals.</p>
       * @param rolePrincipals The role principals.
       */
      void setRolePrincipals(Collection rolePrincipals);
  
      /**
       * <p>Getter for the group principals.</p>
       * @return The group principals.
       */
      Collection getGroupPrincipals();
  
      /**
       * <p>Setter for the group principals.</p>
       * @param groupPrincipals The group principals.
       */
      void setGroupPrincipals(Collection groupPrincipals);
  }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/om/JetspeedCredential.java
  
  Index: JetspeedCredential.java
  ===================================================================
  /* Copyright 2004 Apache Software Foundation
   *
   * Licensed 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.om;
  
  import java.io.Serializable;
  import java.sql.Timestamp;
  
  /**
   * <p>Interface representing a security credential.</p>
   * <p>The credential value represents the value of the credential
   * such as a password.</p>
   * <p>For now, we do not have custom credentials classes and 
   * credentials support only 1 credential (i.e. 1 password).<p>
   * <p>The credential type represents whether a credential is private or
   * public:</p>
   * <ul>
   *  <li>Private credential: type == 0</li>
   *  <li>Public credential: type == 1</li>
   * </ul>
   * <p>The credential classname represent the class of credential.  For password
   * this field is null.
   * </p>
   * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
   * TODO Add multiple credentials support.
   */
  public interface JetspeedCredential extends Serializable, Cloneable
  {
      /**
       * <p>Getter for the credential id.</p>
       * @return The credential id.
       */
      long getCredentialId();
  
      /**
       * <p>Setter for the credential id.</p>
       * @param credentialId The credential id.
       */
      void setCredentialId(long credentialId);
  
      /**
       * <p>Getter for the principal id.</p>
       * @return The principal id.
       */
      long getPrincipalId();
  
      /**
       * <p>Setter for the principal id.</p>
       * @param principalId The principal id.
       */
      void setPrincipalId(long principalId);
  
      /**
       * <p>Getter for the credential value.</p>
       * @return The credential value.
       */
      String getValue();
  
      /**
       * <p>Setter for the credential value.</p>
       * @param value The credential value.
       */
      void setValue(String value);
  
      /**
       * <p>Getter for the credential type.</p>
       * <ul>
       *  <li>Private credential: type == 0</li>
       *  <li>Public credential: type == 1</li>
       * </ul>
       * @return The credential type.
       */
      int getType();
  
      /**
       * <p>Setter for the credential type.</p>
       * <ul>
       *  <li>Private credential: type == 0</li>
       *  <li>Public credential: type == 1</li>
       * </ul>
       * @param type The credential type.
       */
      void setType(int type);
  
      /**
       * <p>Getter for the principal classname.</p>
       * @return The principal classname.
       */
      String getClassname();
  
      /**
       * <p>Setter for the principal classname.</p>
       * @param classname The principal classname.
       */
      void setClassname(String classname);
  
      /**
       * <p>Getter for creation date.</p>
       * @return The creation date.
       */
      Timestamp getCreationDate();
  
      /**
       * <p>Setter for the creation date.</p>
       * @param creationDate The creation date.
       */
      void setCreationDate(Timestamp creationDate);
  
      /**
       * <p>Getter for the modified date.</p>
       * @return The modified date.
       */
      Timestamp getModifiedDate();
  
      /**
       * <p>Setter for the modified date.</p>
       * @param modifiedDate The modified date.
       */
      void setModifiedDate(Timestamp modifiedDate);
  
  }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/om/package.html
  
  Index: package.html
  ===================================================================
  <html>
  <head>
    <title>org.apache.jetspeed.security.auth.om</title>
  </head>
  <body>
  
    <p>Interface used for the object model for Jetspeed security service and
    JAAS providers implementation.</p>
    
  </body>
  </html>
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/om/JetspeedGroupPrincipal.java
  
  Index: JetspeedGroupPrincipal.java
  ===================================================================
  /* Copyright 2004 Apache Software Foundation
   *
   * Licensed 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.om;
  
  import java.util.Collection;
  
  /**
   * <p>Interface representing a Jetspeed security group principal object model.</p>
   * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
   */
  public interface JetspeedGroupPrincipal extends JetspeedPrincipal
  {
      /**
       * <p>Getter for the user principals.</p>
       * @return The user principals.
       */
      Collection getUserPrincipals();
  
      /**
       * <p>Setter for the user principals.</p>
       * @param userPrincipals The user principals.
       */
      void setUserPrincipals(Collection userPrincipals);
  
      /**
       * <p>Getter for the role principals.</p>
       * @return The role principals.
       */
      Collection getRolePrincipals();
  
      /**
       * <p>Setter for the role principals.</p>
       * @param rolePrincipals The role principals.
       */
      void setRolePrincipals(Collection rolePrincipals);
  }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/om/JetspeedPrincipal.java
  
  Index: JetspeedPrincipal.java
  ===================================================================
  /* Copyright 2004 Apache Software Foundation
   *
   * Licensed 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.om;
  
  import java.io.Serializable;
  import java.util.Collection;
  import java.sql.Timestamp;
  
  /**
   * <p>Interface representing a policy principal.  This will be used by the 
   * {@link org.apache.jetspeed.security.impl.RdbmsPolicy} to retrieve specify
   * which permissions are applied on which principal according to the JAAS policy:</p>
   * <pre>
   * <code>grant [SignedBy "signer_names"] [, CodeBase "URL"]
   *             [, JetspeedPrincipal [principal_class_name] "principal_name"]
   *             [, JetspeedPrincipal [principal_class_name] "principal_name"] ... 
   *       {
   *                  permission permission_class_name [ "target_name" ] 
   *                                                   [, "action"] [, SignedBy "signer_names"];
   *                  permission ...
   *       };
   * </code>
   * </pre>
   * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
   */
  public interface JetspeedPrincipal extends Serializable, Cloneable
  {
  
      /**
       * <p>Getter for the principal id.</p>
       * @return The principal id.
       */
      long getPrincipalId();
  
      /**
       * <p>Setter for the principal id.</p>
       * @param principalId The principal id.
       */
      void setPrincipalId(long principalId);
  
      /**
       * <p>Getter for the principal classname.</p>
       * @return The principal classname.
       */
      String getClassname();
  
      /**
       * <p>Setter for the principal classname.</p>
       * @param classname The principal classname.
       */
      void setClassname(String classname);
  
   
      /**
       * <p>Getter for the principal full path.</p>
       * <p>The full path allows to retrieve the principal preferences from
       * the preferences services.</p>
       * @return The principal full path.
       */
      String getFullPath();
  
      /**
       * <p>Setter for the principal name.</p>
       * <p>The full path allows to retrieve the principal preferences from
       * the preferences services.</p>
       * @param fullPath The principal full path.
       */
      void setFullPath(String fullPath);
  
      /**
       * <p>Getter for the principal permissions.</p>
       * @return The principal permissions.
       */
      Collection getPermissions();
  
      /**
       * <p>Setter for the principal permissions.</p>
       * @param permissions The principal permissions.
       */
      void setPermissions(Collection permissions);
  
      /**
       * <p>Getter for creation date.</p>
       * @return The creation date.
       */
      Timestamp getCreationDate();
  
      /**
       * <p>Setter for the creation date.</p>
       * @param creationDate The creation date.
       */
      void setCreationDate(Timestamp creationDate);
  
      /**
       * <p>Getter for the modified date.</p>
       * @return The modified date.
       */
      Timestamp getModifiedDate();
  
      /**
       * <p>Setter for the modified date.</p>
       * @param modifiedDate The modified date.
       */
      void setModifiedDate(Timestamp modifiedDate);
  
  }
  
  
  
  1.1                  jakarta-jetspeed-2/jetspeed-api/src/java/org/apache/jetspeed/security/om/JetspeedPermission.java
  
  Index: JetspeedPermission.java
  ===================================================================
  /* Copyright 2004 Apache Software Foundation
   *
   * Licensed 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.om;
  
  import java.io.Serializable;
  import java.sql.Timestamp;
  import java.util.Collection;
  
  /**
   * <p>Interface representing a policy permission.  This will be used by the 
   * {@link org.apache.jetspeed.security.impl.RdbmsPolicy} to retrieve a permission
   * policy according to JAAS where permission are used in JAAS:</p>
   * <pre>
   * <code>grant [SignedBy "signer_names"] [, CodeBase "URL"]
   *             [, JetspeedPrincipal [principal_class_name] "principal_name"]
   *             [, JetspeedPrincipal [principal_class_name] "principal_name"] ... 
   *       {
   *                  permission permission_class_name [ "target_name" ] 
   *                                                   [, "action"] [, SignedBy "signer_names"];
   *                  permission ...
   *       };
   * </code>
   * </pre>
   * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
   */
  public interface JetspeedPermission extends Serializable, Cloneable
  {
  
      /**
       * <p>Getter for the permission id.</p>
       * @return The permission id.
       */
      long getPermissionId();
  
      /**
       * <p>Setter for the permission id.</p>
       * @param permissionId The permission id.
       */
      void setPermissionId(long permissionId);
  
      /**
       * <p>Getter for the permission classname.</p>
       * @return The permission classname.
       */
      String getClassname();
  
      /**
       * <p>Setter for the permission classname.</p>
       * @param classname The permission classname.
       */
      void setClassname(String classname);
  
      /**
       * <p>Getter for the permission resource name.</p>
       * @return The permission resource name.
       */
      String getName();
  
      /**
       * <p>Setter for the permission resource name.</p>
       * @param name The permission resource name.
       */
      void setName(String name);
      
      /**
       * <p>Getter for the permission actions.</p>
       * @return The permission actions.
       */
      String getActions();
  
      /**
       * <p>Setter for the permission actions.</p>
       * @param actions The permission actions.
       */
      void setActions(String actions);
  
      /**
       * <p>Getter for the permission principals.</p>
       * @return The permission principals.
       */
      Collection getPrincipals();
  
      /**
       * <p>Setter for the permission principals.</p>
       * @param principals The permission principals.
       */
      void setPrincipals(Collection principals);
  
      /**
       * <p>Getter for creation date.</p>
       * @return The creation date.
       */
      Timestamp getCreationDate();
  
      /**
       * <p>Setter for the creation date.</p>
       * @param creationDate The creation date.
       */
      void setCreationDate(Timestamp creationDate);
  
      /**
       * <p>Getter for the modified date.</p>
       * @return The modified date.
       */
      Timestamp getModifiedDate();
  
      /**
       * <p>Setter for the modified date.</p>
       * @param modifiedDate The modified date.
       */
      void setModifiedDate(Timestamp modifiedDate);
  
      /**
       * <p>Equals method used to appropriately compare 2 {@link JetspeedPermission}
objects.</p>
       * @param object The object to compare with.
       * @return The comparison result.
       */
      boolean equals(Object object);
  }
  
  
  

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


Mime
View raw message