Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.MethodPermissionDescriptor


       if (newDescriptor instanceof EjbDescriptor) {
           descriptor.addEjb((EjbDescriptor) newDescriptor);
       } else if (newDescriptor instanceof RelationshipDescriptor) {
           descriptor.addRelationship((RelationshipDescriptor) newDescriptor);
       } else if (newDescriptor instanceof MethodPermissionDescriptor) {
           MethodPermissionDescriptor   nd = (MethodPermissionDescriptor) newDescriptor;
           MethodDescriptor[] array = nd.getMethods();
           for (int i=0;i<array.length;i++) {
                EjbDescriptor target  = descriptor.getEjbByName(array[i].getEjbName());          
                MethodPermission[] mps = nd.getMethodPermissions();
                for (int j=0;j<mps.length;j++) {
                    DOLUtils.getDefaultLogger().fine("Adding mp " + mps[j] + " to " + array[i] + " for ejb " + array[i].getEjbName());
                    target.addPermissionedMethod(mps[j], array[i]);
                }
            }
View Full Code Here


           Node excludeListNode = this.appendChild(assemblyNode, EjbTagNames.EXCLUDE_LIST);
           for (Iterator ejbs = excludedMethodsByEjb.keySet().iterator(); ejbs.hasNext();) {
               EjbDescriptor ejbDesc = (EjbDescriptor) ejbs.next();
               Vector excludedMethods = (Vector) excludedMethodsByEjb.get(ejbDesc);
              
               MethodPermissionDescriptor mpd = new MethodPermissionDescriptor();
               mpd.addMethodPermission(MethodPermission.getExcludedMethodPermission());
               mpd.addMethods(excludedMethods);
               mpNode.writeDescriptorInNode(excludeListNode, mpd, ejbDesc);
           }
       }
      
       for(EjbApplicationExceptionInfo next :
View Full Code Here

            if (mp.isExcluded()) {
                // we need to be sure the method descriptors knows who owns them
                Set methods = (Set) mpToMethods.get(mp);
                excludedMethods.addAll(methods);
            } else {
                MethodPermissionDescriptor mpd = new MethodPermissionDescriptor();
                mpd.addMethodPermission(mp);
                mpd.addMethods((Set) mpToMethods.get(mp));
                mpNode.writeDescriptor(assemblyNode, EjbTagNames.METHOD_PERMISSION, mpd, ejb);
            }
        }
    }
View Full Code Here

       if (newDescriptor instanceof EjbDescriptor) {
           descriptor.addEjb((EjbDescriptor) newDescriptor);
       } else if (newDescriptor instanceof RelationshipDescriptor) {
           descriptor.addRelationship((RelationshipDescriptor) newDescriptor);
       } else if (newDescriptor instanceof MethodPermissionDescriptor) {
           MethodPermissionDescriptor   nd = (MethodPermissionDescriptor) newDescriptor;
           MethodDescriptor[] array = nd.getMethods();
           for (int i=0;i<array.length;i++) {
                EjbDescriptor target  = descriptor.getEjbByName(array[i].getEjbName());          
                MethodPermission[] mps = nd.getMethodPermissions();
                for (int j=0;j<mps.length;j++) {
                    DOLUtils.getDefaultLogger().fine("Adding mp " + mps[j] + " to " + array[i] + " for ejb " + array[i].getEjbName());
                    target.addPermissionedMethod(mps[j], array[i]);
                }
            }
View Full Code Here

           for (Object o : excludedMethodsByEjb.entrySet()) {
               Map.Entry entry = (Map.Entry) o;
               EjbDescriptor ejbDesc = (EjbDescriptor) entry.getKey();
               Vector excludedMethods = (Vector) entry.getValue();
              
               MethodPermissionDescriptor mpd = new MethodPermissionDescriptor();
               mpd.addMethodPermission(MethodPermission.getExcludedMethodPermission());
               mpd.addMethods(excludedMethods);
               mpNode.writeDescriptorInNode(excludeListNode, mpd, ejbDesc);
           }
       }
      
       for(EjbApplicationExceptionInfo next :
View Full Code Here

            if (mp.isExcluded()) {
                // we need to be sure the method descriptors knows who owns them
                Set methods = (Set) entry.getValue();
                excludedMethods.addAll(methods);
            } else {
                MethodPermissionDescriptor mpd = new MethodPermissionDescriptor();
                mpd.addMethodPermission(mp);
                mpd.addMethods((Set) mpToMethods.get(mp));
                mpNode.writeDescriptor(assemblyNode, EjbTagNames.METHOD_PERMISSION, mpd, ejb);
            }
        }
    }
View Full Code Here

    }

    @Override
    public MethodPermissionDescriptor getDescriptor() {
       if (descriptor==null) {
            descriptor = new MethodPermissionDescriptor();
        }
        return descriptor;
    }
View Full Code Here

    }

    @Override
    public MethodPermissionDescriptor getDescriptor() {
        if (descriptor==null) {
            descriptor = new MethodPermissionDescriptor();
            descriptor.addMethodPermission(MethodPermission.getExcludedMethodPermission());
        }
        return descriptor;
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.MethodPermissionDescriptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.