You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by do...@apache.org on 2002/09/15 23:13:08 UTC

cvs commit: jakarta-avalon-excalibur/loader/src/java/org/apache/excalibur/policy/metadata PermissionMetaData.java

donaldp     2002/09/15 14:13:08

  Added:       loader/src/java/org/apache/excalibur/policy/metadata
                        PermissionMetaData.java
  Log:
  Add meta data for permission
  
  Revision  Changes    Path
  1.1                  jakarta-avalon-excalibur/loader/src/java/org/apache/excalibur/policy/metadata/PermissionMetaData.java
  
  Index: PermissionMetaData.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.excalibur.policy.metadata;
  
  /**
   * This class defines a keystore that is used when locating
   * signers of a codebase.
   *
   * @author <a href="mailto:peter at apache.org">Peter Donald</a>
   * @version $Revision: 1.1 $ $Date: 2002/09/15 21:13:08 $
   */
  public class PermissionMetaData
  {
      /**
       * The class name of permission.
       */
      private final String m_classname;
  
      /**
       * The target of permission. The interpretation of this is
       * determined by underlying permission classname.
       */
      private final String m_target;
  
      /**
       * The action(s) associated with permission.
       * The interpretation of this field is relative to
       * the permission and target.
       */
      private final String m_action;
  
      /**
       * Construct the permission meta data.
       *
       * @param classname the name of permission class
       * @param target the target of permission (may be null)
       * @param action the action of permission (may be null)
       */
      public PermissionMetaData( final String classname,
                                 final String target,
                                 final String action )
      {
          if( null == classname )
          {
              throw new NullPointerException( "classname" );
          }
  
          m_classname = classname;
          m_target = target;
          m_action = action;
      }
  
      /**
       * Return the name of permission class.
       *
       * @return the name of permission class.
       */
      public String getClassname()
      {
          return m_classname;
      }
  
      /**
       * Return the action of permission (may be null).
       *
       * @return the action of permission (may be null).
       */
      public String getTarget()
      {
          return m_target;
      }
  
      /**
       * Return the action of permission (may be null).
       *
       * @return the action of permission (may be null)
       */
      public String getAction()
      {
          return m_action;
      }
  }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>