Package com.dtolabs.rundeck.core.storage

Examples of com.dtolabs.rundeck.core.storage.ResourceMeta


            String privateKeyResourcePath = getPrivateKeyResourcePath();
            if (null == privateKeyResourcePath) {
                return null;
            }
            Path path = PathUtil.asPath(privateKeyResourcePath);
            ResourceMeta contents = context.getStorageTree().getResource(path)
                    .getContents();
            return contents.getInputStream();
        }
View Full Code Here


            String passwordStoragePath = getPasswordStoragePath();
            if (null == passwordStoragePath) {
                return null;
            }
            Path path = PathUtil.asPath(passwordStoragePath);
            ResourceMeta contents = context.getStorageTree().getResource(path)
                    .getContents();
            ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
            contents.writeContent(byteArrayOutputStream);
            return byteArrayOutputStream.toByteArray();
        }
View Full Code Here

                        continue;
                    }
                    try {
                        Resource<ResourceMeta> resource = storageTree.getResource
                                (propValue);
                        ResourceMeta contents = resource.getContents();
                        //test filter
                        if (filter != null) {
                            String[] filterComponents = filter.split("=", 2);
                            if (filterComponents != null && filterComponents.length == 2) {
                                String key = filterComponents[0];
                                String test = filterComponents[1];
                                Map<String, String> meta = contents.getMeta();
                                if (meta == null || !test.equals(meta.get(key))) {
                                    continue;
                                }
                            }
                        }
                        //finally load storage contents into a string
                        ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
                        contents.writeContent(byteArrayOutputStream);
                        data.put(name, new String(byteArrayOutputStream.toByteArray()));
                    } catch (StorageException e) {
                        throw new ConfigurationException("Unable to load configuration key '" +
                                name + "' value from storage path:  " + propValue, e);
                    } catch (IOException e) {
View Full Code Here

TOP

Related Classes of com.dtolabs.rundeck.core.storage.ResourceMeta

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.