/*
 * JBoss, the OpenSource J2EE webOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.aspects.security;

import java.util.Set;

public class SecurityMethodConfig extends org.jboss.aop.metadata.MethodConfig
{
   /** The unchecked element specifies that a method is not checked for
    * authorization by the container prior to invocation of the method.
    * Used in: method-permission
    */
   private boolean unchecked = false;
   /** The exclude-list element defines a set of methods which the Assembler
    * marks to be uncallable. It contains one or more methods. If the method
    * permission relation contains methods that are in the exclude list, the
    * Deployer should consider those methods to be uncallable.
    */
   private boolean excluded = false;
   private Set permissions;

   // Static --------------------------------------------------------

   // Constructors --------------------------------------------------
   public SecurityMethodConfig()
   {
   }

   // Public --------------------------------------------------------

   public boolean isUnchecked()
   {
      return unchecked;
   }

   public boolean isExcluded()
   {
      return excluded;
   }

   public Set getRoles()
   {
      return permissions;
   }

   public void setRoles(Set perm)
   {
      permissions = perm;
   }

   public void setUnchecked()
   {
      unchecked = true;
   }

   public void setExcluded()
   {
      excluded = true;
   }
}
