Examples of OperationDefinition


Examples of com.betfair.cougar.core.api.ev.OperationDefinition

    this.bev = bev;
  }

  @Override
  public InterceptorResult invoke(ExecutionContext ctx, OperationKey key, Object[] args) {
    OperationDefinition operationDefinition = bev.getOperationDefinition(key);
    Parameter[] parms = operationDefinition.getParameters();

    for (int i = 0 ; i < args.length; i++) {

        if (args[i] == null) {
              if (parms[i].isMandatory()) {
View Full Code Here

Examples of oracle.binding.meta.OperationDefinition

     * @param operations Operatings within a StructureDef
     * @see StructureDef#getOperationDefinitions
     */
    private void customizeMethodReturns(final DefinitionContainer operations) {
        for (Iterator iterator = operations.iterator(); iterator.hasNext();) {
            OperationDefinition operation = (OperationDefinition) iterator.next();
            OperationReturnDefinition returnDef = operation.getOperationReturnType();
            if (returnDef instanceof MethodReturnDef) {
                MethodReturnDef mrd = (MethodReturnDef) returnDef;
                StructureDefinition definition = mrd.getStructure();
                if (definition instanceof StructureDef) {
                    customize((StructureDef) definition);
View Full Code Here

Examples of org.jboss.as.controller.OperationDefinition

                throw ControllerMessages.MESSAGES.nullVar("pathManager");
            }
            if (operationName == null) {
                throw ControllerMessages.MESSAGES.nullVar("operationName");
            }
            final OperationDefinition operationDefinition = new SimpleOperationDefinitionBuilder(operationName, new ResolvePathResourceDescriptionResolver(operationName))
                    .addParameter(ResolvePathHandler.RELATIVE_TO_ONLY)
                    .setReplyType(ModelType.STRING)
                    .build();
            return new Builder(operationDefinition, pathManager);
        }
View Full Code Here

Examples of org.jibx.ws.server.OperationDefinition

     * @throws JiBXException on any error accessing JiBX bindings or error in configuration
     * @throws WsConfigurationException
     */
    private static ServiceDefinition getServiceDefinition(String serviceMethodName) throws NoSuchMethodException,
        JiBXException, WsConfigurationException {
        OperationDefinition odef = new OperationDefinition();
        odef.setMethodName(serviceMethodName);
        odef.setInputClassName(Person.class.getName());
        odef.setOutputClassName(Customer.class.getName());

        ServiceDefinition sdef = new ServiceDefinition();
        // sdef.setBindingFactory(BindingDirectory.getFactory(Customer.class));
        sdef.setServiceClassName(SoapServiceTestHelper.class.getName());
        sdef.setOperationDefinitions(Arrays.asList(new OperationDefinition[] { odef }));
View Full Code Here

Examples of org.rhq.core.domain.operation.OperationDefinition

    fieldNameList = new LinkedList();

    Iterator operationsIter = operationDefinitionSet.iterator();

    while (operationsIter.hasNext()) {
      OperationDefinition opDef = (OperationDefinition) operationsIter
          .next();
      if (opDef.getName().equals(operationName)) {
        if (opDef.getResultsConfigurationDefinition()==null) break;
         
        Map propDefs = opDef.getResultsConfigurationDefinition()
            .getPropertyDefinitions();
        PropertyDefinition listPropDefinition = (PropertyDefinition) propDefs
            .get(LISTNAME);
       
        if (listPropDefinition == null) {
View Full Code Here

Examples of org.rhq.core.domain.operation.OperationDefinition

*/
public class OperationsMetadataParser {
    public static OperationDefinition parseOperationDescriptor(OperationDescriptor operationDescriptor)
        throws InvalidPluginDescriptorException {
        String name = operationDescriptor.getName();
        OperationDefinition operationDefinition = new OperationDefinition(operationDescriptor.getName(), // TODO display name
            "", ///operationDescriptor.getVersion().getMatch(), // TODO build the version embedded object
            operationDescriptor.getDescription());

        operationDefinition.setParametersConfigurationDefinition(ConfigurationMetadataParser.parse(operationDescriptor
            .getName(), operationDescriptor.getParameters()));

        operationDefinition.setResultsConfigurationDefinition(ConfigurationMetadataParser.parse(operationDescriptor
            .getName(), operationDescriptor.getResults()));

        operationDefinition.setTimeout(operationDescriptor.getTimeout());

        String displayName = operationDescriptor.getDisplayName();

        if ((displayName == null) || displayName.equals("")) {
            displayName = StringUtils.deCamelCase(name);
        }

        operationDefinition.setDisplayName(displayName);

        return operationDefinition;
    }
View Full Code Here

Examples of org.rhq.core.domain.operation.OperationDefinition

     */
    @NotNull
    protected OperationResult invokeOperation(Resource resource, String operationName, @Nullable
    Configuration params) throws PluginContainerException {
        ResourceType resourceType = resource.getResourceType();
        OperationDefinition operationDefinition = ResourceTypeUtility.getOperationDefinition(resourceType,
            operationName);
        assertNotNull(operationDefinition, "No operation named [" + operationName + "] is defined for ResourceType {"
            + resourceType.getPlugin() + "}" + resourceType.getName() + ".");

        long timeout = getDefaultTimeout(resource.getResourceType(), operationName);
View Full Code Here

Examples of org.rhq.core.domain.operation.OperationDefinition

        assertOperationSucceeded(operationName, params, result);
        return result;
    }

    private long getDefaultTimeout(ResourceType resourceType, String operationName) {
        OperationDefinition operationDefinition = ResourceTypeUtility.getOperationDefinition(resourceType,
            operationName);
        // Note: The PC's default timeout is 10 minutes.
        return (operationDefinition.getTimeout() != null) ? operationDefinition.getTimeout()
            : this.pluginContainerConfiguration.getOperationInvocationTimeout();
    }
View Full Code Here

Examples of org.rhq.core.domain.operation.OperationDefinition

            platform = em.find(ResourceType.class, platform.getId());

            Set<OperationDefinition> opDefs = platform.getOperationDefinitions();
            assert opDefs != null;
            assert opDefs.size() == 1;
            OperationDefinition def = opDefs.iterator().next();
            assert def.getName().equals("sleep");
            assert def.getParametersConfigurationDefinition() == null;
            getTransactionManager().rollback();

            System.out.println("==> Done with v1");

            registerPlugin("operation1-2.xml");
View Full Code Here

Examples of org.rhq.core.domain.operation.OperationDefinition

        );
    }

    @Test(groups = {"plugin.metadata", "Operations.UpgradePlugin"}, dependsOnMethods = {"upgradeOperationsPlugin"})
    public void removeParamsFromUpgradedOperationDef() {
        OperationDefinition operationDef = loadOperationDefinition("OperationServer22.Operation1", "OperationServer22",
        "OperationMetadataManagerBeanTestPlugin");

        assertNull("Operation parameters should have been removed", operationDef.getParametersConfigurationDefinition());
    }
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.