Package org.jboss.gravia.repository

Examples of org.jboss.gravia.repository.ContentCapability


                if (!ContentNamespace.CONTENT_NAMESPACE.equals(cap.getNamespace())) {
                    builder.addCapability(cap.getNamespace(), cap.getAttributes(), cap.getDirectives());
                }
            }
            for (Capability cap : ccaps) {
                ContentCapability ccap = cap.adapt(ContentCapability.class);
                Map<String, Object> contentAtts = new HashMap<String, Object>();
                String mimeType = (String) ccap.getAttribute(ContentNamespace.CAPABILITY_MIME_ATTRIBUTE);
                if (mimeType != null) {
                    contentAtts.put(ContentNamespace.CAPABILITY_MIME_ATTRIBUTE, mimeType);
                }
                InputStream input = getResourceContent(ccap);
                try {
View Full Code Here


public abstract class AbstractRepositoryResource extends DefaultResource implements RepositoryContent {

    @Override
    public InputStream getContent() {
        for (Capability cap : getCapabilities(ContentNamespace.CONTENT_NAMESPACE)) {
            ContentCapability ccap = cap.adapt(ContentCapability.class);
            String contentURL = ccap.getContentURL();
            try {
                return new URL(contentURL).openStream();
            } catch (IOException ex) {
                throw new IllegalStateException("Cannot access content URL: " + contentURL, ex);
            }
View Full Code Here

TOP

Related Classes of org.jboss.gravia.repository.ContentCapability

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.