Examples of downloadPackageBitsForChildResource()


Examples of org.rhq.core.clientapi.server.content.ContentServerService.downloadPackageBitsForChildResource()

        ContentContextImpl contextImpl = (ContentContextImpl) context;
        ContentServerService serverService = getContentServerService();
        outputStream = remoteOutputStream(outputStream);

        long count = serverService.downloadPackageBitsForChildResource(contextImpl.getResourceId(),
            childResourceTypeName, key, outputStream);

        return count;
    }
View Full Code Here

Examples of org.rhq.core.pluginapi.content.ContentServices.downloadPackageBitsForChildResource()

            File contentCopy = new File(tempDir, userSpecifedName);

            os = new BufferedOutputStream(new FileOutputStream(contentCopy));
            ContentContext contentContext = resourceContext.getContentContext();
            ContentServices contentServices = contentContext.getContentServices();
            contentServices.downloadPackageBitsForChildResource(contentContext, resourceType.getName(), key, os);

            return contentCopy;
        } catch (IOException e) {
            throw new IllegalStateException("Failed to copy the deployed archive to destination.", e);
        } finally {
View Full Code Here

Examples of org.rhq.core.pluginapi.content.ContentServices.downloadPackageBitsForChildResource()

              File tempFile = new File(tempDir.getAbsolutePath(), "esb.bin");
              OutputStream osForTempDir = new BufferedOutputStream(new FileOutputStream(tempFile));

              contentContext = resourceContext.getContentContext();
              ContentServices contentServices = contentContext.getContentServices();
              contentServices
                      .downloadPackageBitsForChildResource(contentContext, resourceTypeName, key, osForTempDir);

              osForTempDir.close();

              InputStream isForTempDir = new BufferedInputStream(new FileInputStream(tempFile));
View Full Code Here

Examples of org.rhq.core.pluginapi.content.ContentServices.downloadPackageBitsForChildResource()

            return report;
        }
       
        ContentContext contentContext = getResourceContext().getContentContext();
        ContentServices contentServices = contentContext.getContentServices();
        contentServices.downloadPackageBitsForChildResource(contentContext, JobJarComponent.RESOURCE_TYPE_NAME, packageDetails.getKey(), jobJarStream);
       
        try {
            jobJarStream.close();
        } catch (IOException e) {
            //hmmm, do I care?
View Full Code Here

Examples of org.rhq.core.pluginapi.content.ContentServices.downloadPackageBitsForChildResource()

            return report;
        }

        long size;
        try {
            size = contentServices.downloadPackageBitsForChildResource(cctx, resourceTypeName, details.getKey(), out);
        } catch (Exception e) {
            uploadConnection.cancelUpload();
            report.setStatus(CreateResourceStatus.FAILURE);
            LOG.debug("Failed to pull package from server", e);
            report.setErrorMessage("An error occured while the agent was uploading the content for ["
View Full Code Here

Examples of org.rhq.core.pluginapi.content.ContentServices.downloadPackageBitsForChildResource()

        ContentServices contentServices = contentContext.getContentServices();
        OutputStream osForTempDir = null;

        try {
            osForTempDir = new BufferedOutputStream(new FileOutputStream(tempFile));
            contentServices.downloadPackageBitsForChildResource(contentContext, TomcatWarComponent.RESOURCE_TYPE_NAME,
                key, osForTempDir);
        } finally {
            if (null != osForTempDir) {
                try {
                    osForTempDir.close();
View Full Code Here

Examples of org.rhq.core.pluginapi.content.ContentServices.downloadPackageBitsForChildResource()

        File tempDir = resourceContext.getTemporaryDirectory();
        File tempFile = new File(tempDir.getAbsolutePath(), "ear_war.bin");
        OutputStream osForTempDir = new BufferedOutputStream(new FileOutputStream(tempFile));

        ContentServices contentServices = contentContext.getContentServices();
        contentServices.downloadPackageBitsForChildResource(contentContext, resourceTypeName, key, osForTempDir);

        osForTempDir.close();

        // check for content
        boolean valid = isOfType(tempFile, resourceTypeName);
View Full Code Here

Examples of org.rhq.core.pluginapi.content.ContentServices.downloadPackageBitsForChildResource()

            ContentServices contentServices = contentContext.getContentServices();
           
            if (resourceExists) {
                contentServices.downloadPackageBits(contentContext, key, os, true);
            } else {
                contentServices.downloadPackageBitsForChildResource(contentContext, resourceType.getName(), key, os);
            }
           
            return contentCopy;
        } catch (IOException e) {
            throw new IllegalStateException("Failed to copy the deployed archive to destination.", e);
View Full Code Here

Examples of org.rhq.core.pluginapi.content.ContentServices.downloadPackageBitsForChildResource()

            ContentServices contentServices = contentContext.getContentServices();
            ResourceType newChildResourceType = report.getResourceType();
            FileOutputStream fos = new FileOutputStream(newFile);
            BufferedOutputStream outputStream = new BufferedOutputStream(fos);
            try {
                contentServices.downloadPackageBitsForChildResource(contentContext, newChildResourceType.getName(),
                    newDetails.getKey(), outputStream);
            } finally {
                outputStream.close();
            }
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.