Package org.gatein.management.api.controller

Examples of org.gatein.management.api.controller.ManagementController.execute()


        ManagementController controller = (ManagementController) PortalContainer.getComponent(ManagementController.class);
        PathAddress address = PathAddress.pathAddress("mop", type + "sites", name);

        ManagedRequest request = ManagedRequest.Factory.create(OperationNames.EXPORT_RESOURCE, address, ContentType.ZIP);
        ManagedResponse expResponse = controller.execute(request);
        if (expResponse.getOutcome().isSuccess()) {
            expResponse.writeResult(out, true);
        } else {
            throw new Exception(expResponse.getOutcome().getFailureDescription());
        }
View Full Code Here


        Map<String, List<String>> attributes = new HashMap<String, List<String>>(1);
        attributes.put("importMode", Collections.singletonList(importMode));
        ManagedRequest request = ManagedRequest.Factory.create(OperationNames.IMPORT_RESOURCE,
                PathAddress.pathAddress("mop"), attributes, item.getInputStream(), ContentType.ZIP);
        try {
            ManagedResponse response = controller.execute(request);
            if (!response.getOutcome().isSuccess()) {
                addMessage(item.getName());
                log.error(response.getOutcome().getFailureDescription());
            }
        } catch (Exception e) {
View Full Code Here

                    ManagementController controller = getComponent(container, ManagementController.class);
                    PathAddress address = PathAddress.pathAddress("mop", type + "sites", name);

                    ManagedRequest request = ManagedRequest.Factory.create(OperationNames.EXPORT_RESOURCE, address,
                            ContentType.ZIP);
                    ManagedResponse response = controller.execute(request);
                    if (response.getOutcome().isSuccess()) {
                        response.writeResult(os);
                    } else {
                        throw new Exception(response.getOutcome().getFailureDescription());
                    }
View Full Code Here

                attributes.put("importMode", Collections.singletonList(importMode));

                ManagedRequest request = ManagedRequest.Factory.create(OperationNames.IMPORT_RESOURCE,
                        PathAddress.pathAddress("mop"), attributes, in, ContentType.ZIP);

                ManagedResponse response = controller.execute(request);
                if (!response.getOutcome().isSuccess()) {
                    throw new Exception(response.getOutcome().getFailureDescription());
                }

                return null;
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.