Examples of Service


Examples of org.wso2.carbon.governance.api.services.dataobjects.Service

                                            newResource.setContent(new String(serviceElement.toString().getBytes()));
                                            newResource.setMediaType(org.wso2.carbon.registry.extensions.utils.CommonConstants.SERVICE_MEDIA_TYPE);
                                            Properties properties = new Properties(resource.getProperties());
                                            newResource.setProperties(properties);

                                            Service service = manager.newService(serviceElement);
                                            manager.addService(service);
                                            resourcePath = CommonUtil.computeServicePathWithVersion(resourcePath, parameterMap.get(currentResourcePath));
                                            changed = true;

                                        } else if (action.equals("Demote")) {
View Full Code Here

Examples of org.wso2.carbon.jarservices.stub.types.Service

        Map<String, Service> services = new HashMap<String, Service>();
        String[] methods = request.getParameterValues(paramName);
        for (String method : methods) { // service_class#service_name#deployment_scope#use_original_wsdl#operation_name
            String[] strings = method.split("#");
            String className = strings[0];
            Service service = services.get(className);
            if (service == null) {
                service = new Service();
                service.setClassName(strings[0]);
                service.setDeploymentScope(strings[2]);
                service.setServiceName(strings[1]);
                service.setUseOriginalWsdl(Boolean.valueOf(strings[3]));
                services.put(className, service);
            }
            if (strings.length == 5) {
                Operation operation = new Operation();
                operation.setOperationName(strings[4]);
                Operation[] operations = service.getOperations();
                if (operations != null && operations.length > 0) {
                    Operation[] newOperations = new Operation[operations.length + 1];
                    System.arraycopy(operations, 0, newOperations, 0, operations.length);
                    Operation newOperation = new Operation();
                    newOperation.setOperationName(strings[4]);
                    newOperations[newOperations.length -1] = newOperation;
                    operations = newOperations;
                } else {
                    operations = new Operation[1];
                    operations[0] = new Operation();
                    operations[0].setOperationName(strings[4]);
                }
                service.setOperations(operations);
            }
        }
        return services.values().toArray(new Service[services.size()]);
    }
View Full Code Here

Examples of org.xmldb.api.base.Service

    *  method has been called on the <code>Collection</code><br />
    */
     public org.xmldb.api.base.Service getService(String name, String version) throws XMLDBException {
        checkOpen();

        Service result = (Service) services.get(name + version);

        return result;
     }
View Full Code Here

Examples of ru.runa.af.service.impl.interfaces.Service

    }

    private <T extends Service> T getService(String jndiName, Class<? extends ServiceHome> homeClass) throws Exception {
        Object homeRef = remoteContext.lookup(jndiName);
        ServiceHome home = (ServiceHome) PortableRemoteObject.narrow(homeRef, homeClass);
        Service service = (Service) home.getClass().getMethod("create", new Class[0]).invoke(home, new Object[0]);
        return (T) service;
    }
View Full Code Here

Examples of samples.Service

        final int numberOfTimes = 2;
        final String expected = "used";

        ExpectNewDemo tested = new ExpectNewDemo();
        ExpectNewServiceUser expectNewServiceImplMock = createMock(ExpectNewServiceUser.class);
        Service serviceMock = createMock(Service.class);

        expectNew(ExpectNewServiceUser.class, serviceMock, numberOfTimes).andReturn(expectNewServiceImplMock);
        expect(expectNewServiceImplMock.useService()).andReturn(expected);

        replay(expectNewServiceImplMock, serviceMock, ExpectNewServiceUser.class);
View Full Code Here

Examples of thredds.catalog2.Service

    BuilderIssues issues = this.allService.getIssues();
    assertTrue( issues.toString(), issues.isValid());
    assertTrue( issues.toString(), issues.isEmpty());

    // Build
    Service s = this.allService.build();

    assertNotNull( s);
    assertTrue( this.allService.isBuilt() );

    assertEquals( allName, s.getName() );
    assertEquals( allType, s.getType() );
    assertEquals( allBaseUri, s.getBaseUri() );

    assertEquals( odapService, s.getServiceByName( odapName ) );
    assertEquals( wcsService, s.getServiceByName( wcsName ) );
    assertEquals( wmsService, s.getServiceByName( wmsName ) );

    assertEquals( odapService, s.findServiceByNameGlobally( odapName ) );
    assertEquals( wcsService, s.findServiceByNameGlobally( wcsName ) );
    assertEquals( wmsService, s.findServiceByNameGlobally( wmsName ) );

    List<Service> services = s.getServices();
    assertFalse( services.isEmpty() );
    assertEquals( 3, services.size() );

    assertEquals( odapService, services.get( 0 ) );
    assertEquals( wcsService, services.get( 1 ) );
    assertEquals( wmsService, services.get( 2 ) );

    // Test that Service methods succeed after build.
    List<Property> propList = s.getProperties();
    assertEquals( 2, propList.size() );
    Property prop1 = propList.get( 0 );
    Property prop2 = propList.get( 1 );

    assertEquals( "propName1", prop1.getName() );
View Full Code Here

Examples of trams.data.Service

   
    private void createAndStoreService() {
        Session session = HibernateUtil.getSessionFactory().getCurrentSession();
        session.beginTransaction();

        Service theService = new Service();
        theService.addStop(new Stop("Rathaus Pankow", Calendar.getInstance()));
        theService.addStop(new Stop("Pankow Kirche", Calendar.getInstance()));
        theService.addStop(new Stop("S + U Pankow", Calendar.getInstance()));
        session.save(theService);

        session.getTransaction().commit();
    }
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.