Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.MethodDescriptor


      ArrayList mDs = msd.getMessageDescriptors();

      for (int j=0; mDs != null && j < mDs.size(); j++) {
   
    MessageDescriptor mD = (MessageDescriptor) mDs.get(j);
    MethodDescriptor methD = mD.getMethodDescriptor();

    // if any msd covers all methods and operations.
    if ((mD.getOperationName() == null && methD == null) ||
                        (methD != null && methD.getStyle() == 1)) {

        if (onePolicy_) {
      // if there is only one policy make it the default.
      defaultContext_ = contexts_.get(i);
      if (defaultContext_ == null) {
View Full Code Here


  }

  for (int i=0; i<messageDescriptors.size(); i++) {
      MessageDescriptor nextMD =
    (MessageDescriptor) messageDescriptors.get(i);
      MethodDescriptor mD = nextMD.getMethodDescriptor();
      String opName = nextMD.getOperationName();

      if (opName == null && (mD == null || mD.implies(targetMD))){
    return true;
      }
  }

  return false;
View Full Code Here

    return rvalue;
      }
  }
  if (m != null) {
      int match = -1;
      MethodDescriptor targetMD = new MethodDescriptor(m);
      for (int i = 0; i < messageSecurityDescriptors_.size(); i++) {
    if (isMatchingMSD(targetMD,(MessageSecurityDescriptor)
          messageSecurityDescriptors_.get(i))) {
        if (match < 0) {
      match = i;
View Full Code Here

    // determine if all methods are covered by an AuthCOntext (i.e policy)
    // so that we can tell if there is one policy that covers all.
    private boolean methodIsCovered(Method m) {
  boolean rvalue = true;
  if (messageSecurityDescriptors_ != null) {
      MethodDescriptor targetMD = new MethodDescriptor(m);
      for (int i = 0; i < messageSecurityDescriptors_.size(); i++) {
    if (i == 0) {
        rvalue = false;
    }
    if (isMatchingMSD(targetMD,(MessageSecurityDescriptor)
View Full Code Here

                Set methods = ejb.getMethodDescriptors();
                Iterator si = methods.iterator();
               
                while (si.hasNext()) {
                   
                    MethodDescriptor md = (MethodDescriptor)si.next();
                    logger.finest("   "+md.getFormattedString());

                    Set perms = ejb.getMethodPermissionsFor(md);
                    StringBuffer rbuf = new StringBuffer();
                    rbuf.append("     can only be invoked by: ");
                    Iterator sip = perms.iterator();
                    boolean unchecked=false,excluded=false,roleBased=false;
                   
                    while (sip.hasNext()) {
                        MethodPermission p = (MethodPermission)sip.next();
                        if (p.isExcluded()) {
                            excluded=true;
                            logger.finest("     excluded - can not "+
                                               "be invoked");
                        } else if (p.isUnchecked()) {
                            unchecked=true;
                            logger.finest("     unchecked - can be "+
                                               "invoked by all");
                        } else if (p.isRoleBased()) {
                            roleBased = true;
                            Role r = p.getRole();
                            rbuf.append(r.getName());
                            rbuf.append(" ");
                                // add to role's accessible list
                            HashSet ram = (HashSet)allRoleMap.get(r.getName());
                            ram.add(bundle.getName() + ":" +
                                    ejb.getEjbClassName() + "." +
                                    md.getFormattedString());
                        }
                    }

                    if (roleBased) {
                        logger.finest(rbuf.toString());
                        if (excluded || unchecked) {
                            logger.finest("*** Configuration error!");
                        }
                    } else if (unchecked) {
                        if (excluded) {
                            logger.finest("*** Configuration error!");
                        }
                        Set rks = allRoleMap.keySet();
                        Iterator rksi = rks.iterator();
                        while (rksi.hasNext()) {
                            HashSet ram = (HashSet)allRoleMap.get(rksi.next());
                            ram.add(bundle.getName() + ":" +
                                    ejb.getEjbClassName() + "." +
                                    md.getFormattedString());
                        }
                    } else if (!excluded) {
                        logger.finest("*** Configuration error!");
                    }
                }
View Full Code Here

            binding.setExcludeDefaultInterceptors(true);
           
            if(ElementType.METHOD.equals(ainfo.getElementType())) {
                Method m = (Method) ainfo.getAnnotatedElement();
                MethodDescriptor md =
                    new MethodDescriptor(m, MethodDescriptor.EJB_BEAN);
                binding.setBusinessMethod(md);
            }

            ejbBundle.prependInterceptorBinding(binding);
        }
View Full Code Here

                binding.appendInterceptorClass(interceptor.getName());
            }
           
            if(ElementType.METHOD.equals(ainfo.getElementType())) {
                Method m = (Method) ainfo.getAnnotatedElement();
                MethodDescriptor md =
                    new MethodDescriptor(m, MethodDescriptor.EJB_BEAN);
                binding.setBusinessMethod(md);
            }

            // All binding information processed from annotations should go
            // before the binding information processed from the descriptors.
View Full Code Here

            EjbDescriptor ejbDesc) {
        Set methodAlls = new HashSet();
        if (ejbDesc.isRemoteInterfacesSupported() ||
            ejbDesc.isRemoteBusinessInterfacesSupported()) {
            methodAlls.add(
                    new MethodDescriptor(MethodDescriptor.ALL_METHODS,
                    "", MethodDescriptor.EJB_REMOTE));
            if (ejbDesc.isRemoteInterfacesSupported()) {
                methodAlls.add(
                    new MethodDescriptor(MethodDescriptor.ALL_METHODS,
                    "", MethodDescriptor.EJB_HOME));
            }
        }

        if (ejbDesc.isLocalInterfacesSupported() ||
                ejbDesc.isLocalBusinessInterfacesSupported()) {
            methodAlls.add(
                    new MethodDescriptor(MethodDescriptor.ALL_METHODS,
                    "", MethodDescriptor.EJB_LOCAL));
            if (ejbDesc.isLocalInterfacesSupported()) {
                methodAlls.add(
                    new MethodDescriptor(MethodDescriptor.ALL_METHODS,
                    "", MethodDescriptor.EJB_LOCALHOME));
            }
        }

        if (ejbDesc.hasWebServiceEndpointInterface()) {
            methodAlls.add(
                    new MethodDescriptor(MethodDescriptor.ALL_METHODS,
                    "", MethodDescriptor.EJB_WEB_SERVICE));
        }

        return methodAlls;
    }
View Full Code Here

            Set allMethods = ejbDesc.getMethodDescriptors();
            String ejbClassSymbol = methodDesc.getEjbClassSymbol();
            for (Object mdObjsObj : methodPermissionsFromDD.values()) {
                List mdObjs = (List)mdObjsObj;
                for (Object mdObj : mdObjs) {
                    MethodDescriptor md = (MethodDescriptor)mdObj;
                    for (Object style3MdObj :
                            md.doStyleConversion(ejbDesc, allMethods)) {
                        MethodDescriptor style3Md = (MethodDescriptor)style3MdObj;
                        if (methodDesc.equals(style3Md)) {
                            return true;
                        }
                    }
                }
View Full Code Here

            prefetchDisabledDescriptor.getConvertedMethodDescs();
        if (!methodDescs.isEmpty()) {
            MethodNode methodNode = new MethodNode();
            for (Iterator methodIterator = methodDescs.iterator();
                methodIterator.hasNext();) {
                MethodDescriptor methodDesc =
                    (MethodDescriptor) methodIterator.next();
                methodNode.writeQueryMethodDescriptor(prefetchDisabledNode,
                    RuntimeTagNames.QUERY_METHOD, methodDesc);
            }
        }
View Full Code Here

TOP

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

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.