Examples of Provider


Examples of org.joda.time.tz.Provider

    //-----------------------------------------------------------------------
    public void testProvider() {
        try {
            assertNotNull(DateTimeZone.getProvider());
       
            Provider provider = DateTimeZone.getProvider();
            DateTimeZone.setProvider(null);
            assertEquals(provider.getClass(), DateTimeZone.getProvider().getClass());
       
            try {
                DateTimeZone.setProvider(new MockNullIDSProvider());
                fail();
            } catch (IllegalArgumentException ex) {}
            try {
                DateTimeZone.setProvider(new MockEmptyIDSProvider());
                fail();
            } catch (IllegalArgumentException ex) {}
            try {
                DateTimeZone.setProvider(new MockNoUTCProvider());
                fail();
            } catch (IllegalArgumentException ex) {}
            try {
                DateTimeZone.setProvider(new MockBadUTCProvider());
                fail();
            } catch (IllegalArgumentException ex) {}
       
            Provider prov = new MockOKProvider();
            DateTimeZone.setProvider(prov);
            assertSame(prov, DateTimeZone.getProvider());
            assertEquals(2, DateTimeZone.getAvailableIDs().size());
            assertTrue(DateTimeZone.getAvailableIDs().contains("UTC"));
            assertTrue(DateTimeZone.getAvailableIDs().contains("Europe/London"));
View Full Code Here

Examples of org.joda.time.tz.Provider

     * Then uses <code>UTCProvider</code>.
     *
     * @return the default name provider
     */
    private static Provider getDefaultProvider() {
        Provider provider = null;

        try {
            String providerClass = System.getProperty("org.joda.time.DateTimeZone.Provider");
            if (providerClass != null) {
                try {
View Full Code Here

Examples of org.ogce.gfac.provider.Provider

    preProcess(context);
   
    /*
     * Determine provider
     */
    Provider provider = getScheduler(context).schedule(context);

    /*
     * Load data necessary data
     */
    buildChains(getDataChains(context)).start(context);

    /*
     * Init
     */
    provider.initialize(context);

    /*
     * Pre-Execution
     */
    buildChains(getPreExecutionSteps(context)).start(context);

    /*
     * Execute
     */
    provider.execute(context);

    /*
     * Post-Execution
     */
    buildChains(getPostExecuteSteps(context)).start(context);

    /*
     * Destroy
     */
    provider.dispose(context);
   
    /*
     * Pre-Process
     */
    postProcess(context);
 
View Full Code Here

Examples of org.openmrs.Provider

   * @param context
   * @return
   * @throws ResponseException
   */
  public SimpleObject getRaxaAlertsByProvider(String providerUniqueId, RequestContext context) throws ResponseException {
    Provider provider = Context.getProviderService().getProviderByUuid(providerUniqueId);
    if (provider == null) {
      throw new ObjectNotFoundException();
    }
    List<RaxaAlert> raxaAlerts = Context.getService(RaxaAlertService.class).getRaxaAlertByProviderRecipientId(
        provider.getId(), false);
    return new NeedsPaging<RaxaAlert>(raxaAlerts, context).toSimpleObject();
  }
View Full Code Here

Examples of org.opensocial.providers.Provider

    client.send(requests);
  }

  @Test(expected = RequestException.class)
  public void testNoEndpointsSet() throws RequestException, IOException {
    Client client = new Client(new Provider(), new OAuth2LeggedScheme(
        CONSUMER_KEY, CONSUMER_SECRET, VIEWER_ID));

    Request request = PeopleService.getViewer();
    client.send(request);
  }
View Full Code Here

Examples of org.servicemix.jbi.deployment.Provider

            Connection[] connections = sa.getConnections().getConnection();
            if (connections != null) {
                for (int i = 0; i < connections.length; i++) {
                    Connection connection = connections[i];
                    Consumer consumer = connection.getConsumer();
                    Provider provider = connection.getProvider();
                    QName suName = consumer.getInterfaceName();
                    if (suName != null) {
                        LocalComponentConnector lcc = (LocalComponentConnector) container.getRegistry()
                                .getComponentConnector(suName);
                        if (lcc != null) {
                            lcc.getActivationSpec().setDestinationEndpoint(provider.getEndpointName());
                            lcc.getActivationSpec().setDestinationService(provider.getServiceName());
                        }
                        else {
                            throw new DeploymentException("Unable to build connections, can't find consumer interface "
                                    + suName);
                        }
                    }
                    else {
                        // We didn't have the interface so we will go after
                        // the service name and endpoint
                        InternalEndpoint endPoint = (InternalEndpoint) container.getRegistry().getEndpoint(
                                consumer.getServiceName(), consumer.getEndpointName());
                        if (endPoint != null) {
                            LocalComponentConnector lcc = (LocalComponentConnector) container.getRegistry()
                                    .getComponentConnector(endPoint.getComponentNameSpace());
                            if (lcc != null) {
                                lcc.getActivationSpec().setDestinationEndpoint(provider.getEndpointName());
                                lcc.getActivationSpec().setDestinationService(provider.getServiceName());
                            }
                            else {
                                throw new DeploymentException(
                                        "Unable to build connections, can't find consumer based on component name space "
                                                + endPoint.getComponentNameSpace());
View Full Code Here

Examples of pojo.Provider

  }

  // get infor of a provider by id
  public Provider getInfoProvider(int id) {
    logger.debug("getInfoProvider start");
    Provider sp = null;
    Session session = HibernateUtil.getSessionFactory().openSession();
    try {
      sp = (Provider) session.get(Provider.class, id);
      logger.debug("getInfoProvider success");
    } catch (HibernateException ex) {
View Full Code Here

Examples of xsul.wsif_xsul_soap_gsi.Provider

        WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
        WSIFService service = factory.getService(WSDLUtil.wsdlDefinitions5ToWsdlDefintions3(this.definitions));

        if (this.secureInvoker != null) {
            Provider secureProvider = new xsul.wsif_xsul_soap_gsi.Provider(this.secureInvoker);
            service.addLocalProvider(secureProvider);
        }

        this.client = WSIFRuntime.getDefault().newClientFor(service, null);
        // null selects the first port in the first service.
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.