Examples of Operation


Examples of org.apache.qpid.server.security.access.Operation

            throw new ConfigurationException(String.format(NOT_ENOUGH_ACL_MSG, getLine()));
        }

        Permission permission = Permission.parse(args.get(0));
        String identity = args.get(1);
        Operation operation = Operation.parse(args.get(2));

        if (number != null && !getConfiguration().isValidNumber(number))
        {
            throw new ConfigurationException(String.format(BAD_ACL_RULE_NUMBER_MSG, getLine()));
        }
View Full Code Here

Examples of org.apache.servicemix.soap.api.model.Operation

    private void initServiceSideInfo(Set<QName> understoodQNames,
                                     Message message,
                                     Set<URI> serviceRoles) {
        // Retrieve soap headers bound to message parts
        Operation operation = message.get(Operation.class);
        if (operation instanceof Wsdl1SoapOperation) {
            Wsdl1SoapOperation soapOper = (Wsdl1SoapOperation) operation;
            for (Wsdl1SoapPart part : soapOper.getInput().getParts()) {
                if (part.isHeader()) {
                    understoodQNames.add(part.getElement());
View Full Code Here

Examples of org.apache.tapestry5.ioc.annotations.Operation

    public void addOperationAdvice(MethodAdviceReceiver receiver)
    {
        for (Method m : receiver.getInterface().getMethods())
        {

            Operation annotation = receiver.getMethodAnnotation(m, Operation.class);

            if (annotation != null)
            {
                String value = annotation.value();

                receiver.adviseMethod(m, createAdvice(value));
            }
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.interfacedef.Operation

    @SuppressWarnings("unchecked")
    public Object[] transform(Object[] source, TransformationContext context) {
        // Check if the source operation is wrapped
        DataType<List<DataType>> sourceType = context.getSourceDataType();
        Operation sourceOp = context.getSourceOperation();
        boolean sourceWrapped = sourceOp != null && sourceOp.isWrapperStyle() && sourceOp.getWrapper() != null;
        boolean sourceNotSubjectToWrapping = sourceOp != null && sourceOp.isNotSubjectToWrapping();

        // Find the wrapper handler for source data
        WrapperHandler sourceWrapperHandler = null;
        String sourceDataBinding = getDataBinding(sourceOp);
        sourceWrapperHandler = getWrapperHandler(sourceDataBinding, sourceWrapped);

        // Check if the target operation is wrapped
        DataType<List<DataType>> targetType = context.getTargetDataType();
        Operation targetOp = (Operation)context.getTargetOperation();
        boolean targetWrapped = targetOp != null && targetOp.isWrapperStyle() && targetOp.getWrapper() != null;
        boolean targetNotSubjectToWrapping = targetOp != null && targetOp.isNotSubjectToWrapping();

        // Find the wrapper handler for target data
        WrapperHandler targetWrapperHandler = null;
        String targetDataBinding = getDataBinding(targetOp);
        targetWrapperHandler = getWrapperHandler(targetDataBinding, targetWrapped);

        if ((!sourceWrapped && !sourceNotSubjectToWrapping) && targetWrapped) {
            // Unwrapped --> Wrapped
            WrapperInfo wrapper = targetOp.getWrapper();
            // ElementInfo wrapperElement = wrapper.getInputWrapperElement();

            // Class<?> targetWrapperClass = wrapper != null ? wrapper.getInputWrapperClass() : null;

            if (source == null) {
                // Empty child elements
                Object targetWrapper = targetWrapperHandler.create(targetOp, true);
                return new Object[] {targetWrapper};
            }

            // If the source can be wrapped, wrapped it first
            if (sourceWrapperHandler != null) {
                WrapperInfo sourceWrapperInfo = sourceOp.getWrapper();
                DataType sourceWrapperType = sourceWrapperInfo != null ? sourceWrapperInfo.getInputWrapperType() : null;

                // We only do wrapper to wrapper transformation if the source has a wrapper and both sides
                // match by XML structure
                if (sourceWrapperType != null && matches(sourceOp.getWrapper(), targetOp.getWrapper())) {
                    Class<?> sourceWrapperClass = sourceWrapperType.getPhysical();

                    // Create the source wrapper
                    Object sourceWrapper = sourceWrapperHandler.create(sourceOp, true);

                    // Populate the source wrapper
                    if (sourceWrapper != null) {
                        sourceWrapperHandler.setChildren(sourceWrapper,
                                                         source,
                                                         sourceOp,
                                                         true);

                        // Transform the data from source wrapper to target wrapper
                        Object targetWrapper =
                            mediator.mediate(sourceWrapper, sourceWrapperType, targetType.getLogical().get(0), context
                                .getMetadata());
                        return new Object[] {targetWrapper};
                    }
                }
            }
            // Fall back to child by child transformation
            Object targetWrapper = targetWrapperHandler.create(targetOp, true);
            List<DataType> argTypes = wrapper.getUnwrappedInputType().getLogical();
            Object[] targetChildren = new Object[source.length];
            for (int i = 0; i < source.length; i++) {
                // ElementInfo argElement = wrapper.getInputChildElements().get(i);
                DataType<XMLType> argType = argTypes.get(i);
                targetChildren[i] =
                    mediator.mediate(source[i], sourceType.getLogical().get(i), argType, context.getMetadata());
            }
            targetWrapperHandler.setChildren(targetWrapper,
                                             targetChildren,
                                             targetOp,
                                             true);
            return new Object[] {targetWrapper};

        } else if (sourceWrapped && (!targetWrapped && !targetNotSubjectToWrapping)) {
            // Wrapped to Unwrapped
            Object sourceWrapper = source[0];
            Object[] target = null;

            // List<ElementInfo> childElements = sourceOp.getWrapper().getInputChildElements();
            if (targetWrapperHandler != null) {
                // ElementInfo wrapperElement = sourceOp.getWrapper().getInputWrapperElement();
                // FIXME: This is a workaround for the wsdless support as it passes in child elements
                // under the wrapper that only matches by position
                if (sourceWrapperHandler.isInstance(sourceWrapper, sourceOp, true)) {

                    WrapperInfo targetWrapperInfo = targetOp.getWrapper();
                    DataType targetWrapperType =
                        targetWrapperInfo != null ? targetWrapperInfo.getInputWrapperType() : null;
                    if (targetWrapperType != null && matches(sourceOp.getWrapper(), targetOp.getWrapper())) {
                        Object targetWrapper =
                            mediator.mediate(sourceWrapper, sourceType.getLogical().get(0), targetWrapperType, context
                                .getMetadata());
                        target = targetWrapperHandler.getChildren(targetWrapper, targetOp, true).toArray();
                        return target;
View Full Code Here

Examples of org.apache.tuscany.spi.model.Operation

        assertEquals(0, method.getParameterTypes().length);
    }

    public void testNoParamsFindOperation() throws Exception {
        Method method = Foo.class.getMethod("foo");
        Operation ret = findOperation(method, operations);
        assertEquals("foo", ret.getName());
        assertEquals(0, method.getParameterTypes().length);
    }
View Full Code Here

Examples of org.broadleafcommerce.openadmin.server.service.artifact.image.Operation

    }

    public Operation[] buildOperations(Map<String, String> parameterMap, InputStream artifactStream, String mimeType) {
        List<Operation> operations = new ArrayList<Operation>();
        for (OperationBuilder builder : filters.values()) {
            Operation operation = builder.buildOperation(parameterMap, artifactStream, mimeType);
            if (operation != null) {
                operations.add(operation);
            }
        }
View Full Code Here

Examples of org.codehaus.plexus.redback.rbac.Operation

                    permission = manager.getPermission( permission.getName() );
                    permissionMap.put( permission.getName(), permission );
                }
                else
                {
                    Operation operation = permission.getOperation();
                    if ( operations.containsKey( operation.getName() ) )
                    {
                        operation = (Operation) operations.get( operation.getName() );
                    }
                    else if ( manager.operationExists( operation ) )
                    {
                        operation = manager.getOperation( operation.getName() );
                        operations.put( operation.getName(), operation );
                    }
                    else
                    {
                        operation = manager.saveOperation( operation );
                        operations.put( operation.getName(), operation );
                    }
                    permission.setOperation( operation );

                    Resource resource = permission.getResource();
                    if ( resources.containsKey( resource.getIdentifier() ) )
View Full Code Here

Examples of org.coweb.oe.Operation

      String type, int position) {

    /* Construct op, send it, then process it in the op engine. */
    String jsonValue = JSON.toString(value);
    ContextVector cv = null;
    Operation op = null;
    if (null != type) {
      try {
        op = this.engine.createOp(true, topic, jsonValue, type,
            position, -1, null, -1);
        cv = op.getContextVector();
      } catch (OperationEngineException e) {
        log.warning("Bad type: " + type + ", using null type instead.");
        type = null;
      }
    }
View Full Code Here

Examples of org.eclipse.bpmn2.Operation

            if (result == null)
                result = defaultCase(theEObject);
            return result;
        }
        case Bpmn2Package.OPERATION: {
            Operation operation = (Operation) theEObject;
            T result = caseOperation(operation);
            if (result == null)
                result = caseBaseElement(operation);
            if (result == null)
                result = defaultCase(theEObject);
View Full Code Here

Examples of org.eclipse.jgit.api.RebaseCommand.Operation

      throws ServletException, JSONException, AmbiguousObjectException, IOException {
    JSONObject result = new JSONObject();
    try {
      Git git = new Git(db);
      RebaseCommand rebase = git.rebase();
      Operation operation;
      if (rebaseOperation != null) {
        operation = Operation.valueOf(rebaseOperation);
      } else {
        operation = Operation.BEGIN;
      }
      if (commitToRebase != null && !commitToRebase.isEmpty()) {
        ObjectId objectId = db.resolve(commitToRebase);
        rebase.setUpstream(objectId);
      } else if (operation.equals(Operation.BEGIN)) {
        return statusHandler.handleRequest(request, response, new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_BAD_REQUEST,
            "Missing commit refId.", null));
      }
      rebase.setOperation(operation);
      RebaseResult rebaseResult = rebase.call();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.