FileDocCategorySizeDatePackage
MethodPermissionDescriptor.javaAPI DocGlassfish v2 API4036Fri May 04 22:31:22 BST 2007com.sun.enterprise.deployment

MethodPermissionDescriptor

public class MethodPermissionDescriptor extends DescribableDescriptor
This class defines a method permission information in the assembly descriptor
author
Jerome Dochez
version

Fields Summary
Vector
methods
Vector
mps
Constructors Summary
public MethodPermissionDescriptor()
Creates new MethodPermissionDescriptor

    
        
              
    
Methods Summary
public voidaddMethod(MethodDescriptor aMethod)

        methods.add(aMethod);
    
public voidaddMethodPermission(MethodPermission mp)

        mps.add(mp);
    
public voidaddMethods(java.util.Collection methods)

        this.methods.addAll(methods);
    
public MethodPermission[]getMethodPermissions()

        MethodPermission[] array = new MethodPermission[mps.size()];
        mps.copyInto(array);
        return array;        
    
public MethodDescriptor[]getMethods()

        MethodDescriptor[] array = new MethodDescriptor[methods.size()];
        methods.copyInto(array);
        return array;        
    
public voidprint(java.lang.StringBuffer toStringBuffer)

        StringBuffer buffer = toStringBuffer;
        buffer.append("Method Permission " + (getDescription()==null?"":getDescription()) );
        buffer.append("\nFor the following Permissions ");
        for (Iterator mpsIterator = mps.iterator();mpsIterator.hasNext();) {
            MethodPermission mp = (MethodPermission) mpsIterator.next();
            mp.print(buffer);
            buffer.append("\n");
        }
        buffer.append("\nFor the following ").append(methods.size()).append(" methods\n");
        for (Iterator methodsIterator = methods.iterator();methodsIterator.hasNext();) {
            MethodDescriptor md = (MethodDescriptor) methodsIterator.next();
            md.print(buffer);
            buffer.append("\n");
        }