Package com.dotcms.repackage.com.sun.jersey.api.client.config

Examples of com.dotcms.repackage.com.sun.jersey.api.client.config.ClientConfig


      File bundle = new File(bundleRoot+File.separator+".."+File.separator+config.getId()+".tar.gz");
      PushUtils.compressFiles(list, bundle, bundleRoot.getAbsolutePath());

      List<Environment> environments = APILocator.getEnvironmentAPI().findEnvironmentsByBundleId(config.getId());

      ClientConfig cc = new DefaultClientConfig();

      if(Config.getStringProperty("TRUSTSTORE_PATH") != null && !Config.getStringProperty("TRUSTSTORE_PATH").trim().equals("")) {
        cc.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, new HTTPSProperties(tFactory.getHostnameVerifier(), tFactory.getSSLContext()));
            }
      Client client = Client.create(cc);

      //Updating audit table
      currentStatusHistory = pubAuditAPI.getPublishAuditStatus(config.getId()).getStatusPojo();
View Full Code Here


     * removing the current bundle from the Publish queue table
     * @throws DotDataException If fails retrieving end points
     */
    private void updateAuditStatus () throws DotPublisherException, DotDataException {

    ClientConfig clientConfig = new DefaultClientConfig();
    TrustFactory tFactory = new TrustFactory();

    if(Config.getStringProperty("TRUSTSTORE_PATH") != null && !Config.getStringProperty("TRUSTSTORE_PATH").trim().equals("")) {
        clientConfig.getProperties()
        .put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, new HTTPSProperties(tFactory.getHostnameVerifier(), tFactory.getSSLContext()));
    }
        Client client = Client.create(clientConfig);
        WebResource webResource;

View Full Code Here

    Boolean success = bundleFile.renameTo( newBundleFile );
    assertTrue( success );
    assertTrue( newBundleFile.exists() );

    //Prepare the post request
    ClientConfig cc = new DefaultClientConfig();
    Client client = Client.create( cc );

    FormDataMultiPart form = new FormDataMultiPart();
    form.field( "AUTH_TOKEN", PublicEncryptionFactory.encryptString( (PublicEncryptionFactory.decryptString( receivingFromEndpoint.getAuthKey().toString() )) ) );
    form.field( "GROUP_ID", UtilMethods.isSet( receivingFromEndpoint.getGroupId() ) ? receivingFromEndpoint.getGroupId() : receivingFromEndpoint.getId() );
View Full Code Here

    assertTrue( newBundleFile.exists() );

    /*
     * Prepare the post request
     */
    ClientConfig cc = new DefaultClientConfig();
    Client client = Client.create( cc );

    FormDataMultiPart form = new FormDataMultiPart();
    form.field( "AUTH_TOKEN", PublicEncryptionFactory.encryptString( (PublicEncryptionFactory.decryptString( receivingFromEndpoint.getAuthKey().toString() )) ) );
    form.field( "GROUP_ID", UtilMethods.isSet( receivingFromEndpoint.getGroupId() ) ? receivingFromEndpoint.getGroupId() : receivingFromEndpoint.getId() );
View Full Code Here

        return response( jsonResponse.toString(), false );
    }

    private Client getRESTClient() {
        TrustFactory tFactory = new TrustFactory();
        ClientConfig cc = new DefaultClientConfig();

        if(Config.getStringProperty("TRUSTSTORE_PATH") != null && !Config.getStringProperty("TRUSTSTORE_PATH").trim().equals("")) {
            cc.getProperties().put(HTTPSProperties.PROPERTY_HTTPS_PROPERTIES, new HTTPSProperties(tFactory.getHostnameVerifier(), tFactory.getSSLContext()));
        }
        final Client client = Client.create(cc);
        return client;
    }
View Full Code Here

TOP

Related Classes of com.dotcms.repackage.com.sun.jersey.api.client.config.ClientConfig

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.