Package org.modeshape.jboss.service

Examples of org.modeshape.jboss.service.CompositeBinaryStorageService


                                               List<ServiceController<?>> newControllers,
                                               ServiceTarget target,
                                               String repositoryName,
                                               EditableDocument binaries,
                                               ServiceName serviceName ) throws OperationFailedException {
        CompositeBinaryStorageService service = new CompositeBinaryStorageService(repositoryName, binaries);
        ServiceBuilder<BinaryStorage> builder = target.addService(serviceName, service);

        List<ModelNode> nestedStores = ModelAttributes.NESTED_STORES.resolveModelAttribute(context, model).asList();

        // parse the nested store names and add a dependency on each of those services
        for (ModelNode nestedStore : nestedStores) {
            String nestedStoreName = nestedStore.asString();
            ServiceName nestedServiceName = ModeShapeServiceNames.binaryStorageNestedServiceName(repositoryName, nestedStoreName);
            if (!StringUtil.isBlank(nestedStoreName)) {
                builder.addDependency(nestedServiceName, BinaryStorage.class, service.nestedStoreConfiguration(nestedStoreName));
            }
        }

        builder.setInitialMode(ServiceController.Mode.ACTIVE);
        newControllers.add(builder.install());
View Full Code Here

TOP

Related Classes of org.modeshape.jboss.service.CompositeBinaryStorageService

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.