Package org.apache.axis2.phaseresolver

Examples of org.apache.axis2.phaseresolver.PhaseResolver


            isEngagable = org.apache.axis2.util.Utils.checkVersion(moduleName, modu);
            if (!isEngagable) {
                return new ArrayList();
            }
        }
        PhaseResolver phaseResolver = new PhaseResolver(axisConfig);
        phaseResolver.engageModuleToOperation(this, moduleref);
        Module module = moduleref.getModule();
        if (module != null) {
            module.engageNotify(this);
        }
        engagedModules.add(moduleref);
View Full Code Here


    public void disengageModule(AxisModule module) {
        if (module != null) {
            if (getParent() != null) {
                AxisService service = (AxisService) getParent();
                AxisConfiguration axiConfiguration = service.getAxisConfiguration();
                PhaseResolver phaseResolver = new PhaseResolver(axiConfiguration);
                if (service.isEngaged(module.getName())) {
                    phaseResolver.disengageModuleFromOperationChain(module, this);
                } else if (axiConfiguration != null &&
                        axiConfiguration.isEngaged(module.getName())) {
                    phaseResolver.disengageModuleFromOperationChain(module, this);
                } else {
                    if (axiConfiguration != null) {
                        phaseResolver.disengageModuleFromGlobalChains(module);
                    }
                    phaseResolver.disengageModuleFromOperationChain(module, this);
                    //removing operations added at the time of module engagemnt
                    HashMap moduleOperations = module.getOperations();
                    if (moduleOperations != null) {
                        Iterator moduleOperations_itr = moduleOperations.values().iterator();
                        while (moduleOperations_itr.hasNext()) {
View Full Code Here

    public ArrayList addModuleOperations(AxisModule module, AxisConfiguration axisConfig,
                                         AxisService service)
            throws AxisFault {
        HashMap map = module.getOperations();
        Collection col = map.values();
        PhaseResolver phaseResolver = new PhaseResolver(axisConfig);
        //this array list is return , to avoid concurrent modifications , in the deployment engine
        ArrayList ops = new ArrayList();
        for (Iterator iterator = col.iterator(); iterator.hasNext();) {
            AxisOperation axisOperation = copyOperation((AxisOperation) iterator.next());
            axisOperation.setParent(service);
            ArrayList wsamappings = axisOperation.getWsamappingList();
            if (service.getOperation(axisOperation.getName()) == null) {
                // this operation is a control operation.
                axisOperation.setControlOperation(true);
                Module moduleclazz = module.getModule();
                if (moduleclazz != null) {
                    moduleclazz.engageNotify(axisOperation);
                }
                phaseResolver.engageModuleToOperation(axisOperation, module);
                ops.add(axisOperation);
                if (wsamappings != null) {
                    for (int j = 0; j < wsamappings.size(); j++) {
                        String mapping = (String) wsamappings.get(j);
View Full Code Here

    }

    public void disengageModule(AxisModule module) {
        AxisConfiguration axisConfig = getAxisConfiguration();
        if (axisConfig != null) {
            PhaseResolver phaseResolver = new PhaseResolver(axisConfig);
            if (axisConfig.isEngaged(module.getName())) {
                removeModuleOperations(module);
                Iterator operations = getChildren();
                while (operations.hasNext()) {
                    AxisOperation axisOperation = (AxisOperation) operations.next();
                    phaseResolver.disengageModuleFromOperationChain(module, axisOperation);
                    axisOperation.removeFromEngagedModuleList(module);
                }
            } else {
                if (isEngaged(module.getName())) {
                    phaseResolver.disengageModuleFromGlobalChains(module);
                    removeModuleOperations(module);
                    Iterator operations = getChildren();
                    while (operations.hasNext()) {
                        AxisOperation axisOperation = (AxisOperation) operations.next();
                        phaseResolver.disengageModuleFromOperationChain(module, axisOperation);
                        axisOperation.removeFromEngagedModuleList(module);
                    }
                }
            }
        }
View Full Code Here

   *             if a problem occurs
   */
  void addModuleOperations(AxisModule module) throws AxisFault {
    HashMap<QName, AxisOperation> map = module.getOperations();
    Collection<AxisOperation> col = map.values();
    PhaseResolver phaseResolver = new PhaseResolver(getAxisConfiguration());
    for (Iterator<AxisOperation> iterator = col.iterator(); iterator.hasNext();) {
      AxisOperation axisOperation = copyOperation((AxisOperation) iterator
          .next());
      if (this.getOperation(axisOperation.getName()) == null) {
        ArrayList<String> wsamappings = axisOperation.getWSAMappingList();
        if (wsamappings != null) {
          for (int j = 0, size = wsamappings.size(); j < size; j++) {
            String mapping = (String) wsamappings.get(j);
                        //If there is already an operation with this action
            //mapping (e.g. if the service has a matching operation)
            //then we're going to check to see if the module's
            //operation says that it's OK to be overridden and
            //if so, we'll simply ignore the mapping, otherwise
            //we continue as before
            AxisOperation mappedOperation = getOperationByAction(mapping);
            if ((mappedOperation != null)
                && (axisOperation.isParameterTrue(DeploymentConstants.TAG_ALLOWOVERRIDE))) {
              if (log.isDebugEnabled()) {
                log
                .debug("addModuleOperations: Mapping already exists for action: "
                       + mapping
                       + " to operation: "
                       + axisOperation
                       + " named: "
                       + axisOperation.getName()
                       + " and an override is allowed, so the module mapping for module: "
                       + module.getName()
                       + " is being ignored.");
                log.debug(JavaUtils.callStackToString());
              }
            } else {
              mapActionToOperation(mapping, axisOperation);
            }
          }
        }
        // If we've set the "expose" parameter for this operation, it's
        // normal (non-
        // control) and therefore it will appear in generated WSDL. If
        // we haven't,
        // it's a control operation and will be ignored at WSDL-gen
        // time.
        if (axisOperation
            .isParameterTrue(DeploymentConstants.TAG_EXPOSE)) {
          axisOperation.setControlOperation(false);
        } else {
          axisOperation.setControlOperation(true);
        }

        phaseResolver.engageModuleToOperation(axisOperation, module);

        this.addOperation(axisOperation);
      }
    }
  }
View Full Code Here

      AxisOperation axisOperation = (AxisOperation) operations.next();
      axisOperation.disengageModule(module);
    }
    AxisConfiguration config = getAxisConfiguration();
    if (!config.isEngaged(module.getName())) {
      PhaseResolver phaseResolver = new PhaseResolver(config);
      phaseResolver.disengageModuleFromGlobalChains(module);
    }
  }
View Full Code Here

     * belonging to this module from all the handler chains.
     *
     * @param module module to disengage
     */
    public void onDisengage(AxisModule module) throws AxisFault {
        PhaseResolver phaseResolver = new PhaseResolver(this);
        phaseResolver.disengageModuleFromGlobalChains(module);

        Iterator<AxisServiceGroup> serviceGroups = getServiceGroups();
        while (serviceGroups.hasNext()) {
            AxisServiceGroup axisServiceGroup = serviceGroups.next();
            axisServiceGroup.disengageModule(module);
View Full Code Here

   *             if a problem occurs
   */
  void addModuleOperations(AxisModule module) throws AxisFault {
    HashMap<QName, AxisOperation> map = module.getOperations();
    Collection<AxisOperation> col = map.values();
    PhaseResolver phaseResolver = new PhaseResolver(getAxisConfiguration());
    for (Iterator<AxisOperation> iterator = col.iterator(); iterator.hasNext();) {
      AxisOperation axisOperation = copyOperation((AxisOperation) iterator
          .next());
      if (this.getOperation(axisOperation.getName()) == null) {
        ArrayList<String> wsamappings = axisOperation.getWSAMappingList();
        if (wsamappings != null) {
          for (int j = 0, size = wsamappings.size(); j < size; j++) {
            String mapping = (String) wsamappings.get(j);
                        //If there is already an operation with this action
            //mapping (e.g. if the service has a matching operation)
            //then we're going to check to see if the module's
            //operation says that it's OK to be overridden and
            //if so, we'll simply ignore the mapping, otherwise
            //we continue as before
            AxisOperation mappedOperation = getOperationByAction(mapping);
            if ((mappedOperation != null)
                && (axisOperation.isParameterTrue(DeploymentConstants.TAG_ALLOWOVERRIDE))) {
              if (log.isDebugEnabled()) {
                log
                .debug("addModuleOperations: Mapping already exists for action: "
                       + mapping
                       + " to operation: "
                       + axisOperation
                       + " named: "
                       + axisOperation.getName()
                       + " and an override is allowed, so the module mapping for module: "
                       + module.getName()
                       + " is being ignored.");
                log.debug(JavaUtils.callStackToString());
              }
            } else {
              mapActionToOperation(mapping, axisOperation);
            }
          }
        }
        // If we've set the "expose" parameter for this operation, it's
        // normal (non-
        // control) and therefore it will appear in generated WSDL. If
        // we haven't,
        // it's a control operation and will be ignored at WSDL-gen
        // time.
        if (axisOperation
            .isParameterTrue(DeploymentConstants.TAG_EXPOSE)) {
          axisOperation.setControlOperation(false);
        } else {
          axisOperation.setControlOperation(true);
        }

        phaseResolver.engageModuleToOperation(axisOperation, module);

        this.addOperation(axisOperation);
      }
    }
  }
View Full Code Here

      AxisOperation axisOperation = (AxisOperation) operations.next();
      axisOperation.disengageModule(module);
    }
    AxisConfiguration config = getAxisConfiguration();
    if (!config.isEngaged(module.getName())) {
      PhaseResolver phaseResolver = new PhaseResolver(config);
      phaseResolver.disengageModuleFromGlobalChains(module);
    }
  }
View Full Code Here

     * @param axisModule AxisModule to engage
     * @param engager
     * @throws AxisFault something went wrong
     */
    public void onEngage(AxisModule axisModule, AxisDescription engager) throws AxisFault {
        PhaseResolver phaseResolver = new PhaseResolver(getAxisConfiguration());
        phaseResolver.engageModuleToMessage(this, axisModule);
    }
View Full Code Here

TOP

Related Classes of org.apache.axis2.phaseresolver.PhaseResolver

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.