Package org.fcrepo.server.storage

Examples of org.fcrepo.server.storage.ContentManagerParams


                    schemaStream = schemaDS.getContentStream();
                    source = new StreamSource(schemaStream);

                } else if ("url".equalsIgnoreCase(type)){
                    InputStream schemaStream;
                    ContentManagerParams params = new ContentManagerParams(value);
                    MIMETypedStream externalContent = m_exExternalContentManager.getExternalContent(params);
                    schemaStream = externalContent.getStream();
                    source = new StreamSource(schemaStream);
                } else { //reference used, but type not recognized
                    List<String> validationProblems = validation.getDatastreamProblems(objectDatastream.DatastreamID);
View Full Code Here


                    ctx = ReadOnlyContext.getContext(null, null, "", false);
                    // changed from below, which sets noOp to true, seems to cause an AuthZ permitted exception
                    // in PolicyEnforcementPoint.enforce(...)
                    // ctx = ReadOnlyContext.EMPTY;
                }
               ContentManagerParams params = new ContentManagerParams(DSLocation);
                params.setContext(ctx);
                MIMETypedStream stream = getExternalContentManager()
                        .getExternalContent(params);

                // TODO: refactor temp file management - see FCREPO-718; for now create temp file and write to it
                // note - don't use temp upload directory, use (container's) temp dir (upload dir is for uploads)
View Full Code Here

     * @see org.fcrepo.server.storage.types.Datastream#getContentStream()
     */
    @Override
    public InputStream getContentStream(Context context) throws StreamIOException {
        try {
            ContentManagerParams params = new ContentManagerParams(DSLocation);
            if (context != null ) {
                params.setContext(context);
            }
            MIMETypedStream stream = getExternalContentManager()
                    .getExternalContent(params);
            DSSize = getContentLength(stream);
            return stream.getStream();
View Full Code Here

                // Datastream is ReferencedExternalContent so dsLocation is a
                // URL string
                ExternalContentManager externalContentManager =
                        (ExternalContentManager) m_server
                                .getModule("org.fcrepo.server.storage.ExternalContentManager");
                ContentManagerParams params = new ContentManagerParams(dsPhysicalLocation);
                params.setContext(context);
                mimeTypedStream = externalContentManager.getExternalContent(params);

                // had substituted context:
                // ReadOnlyContext.getContext(Constants.HTTP_REQUEST.REST.uri,
                // request));
View Full Code Here

                dissURL);
          }

          // Dispatch backend service URL request authenticating as
          // necessary based on beSecurity configuration
          ContentManagerParams params = new ContentManagerParams(
              dissURL, null, beServiceCallUsername,
              beServiceCallPassword);
          params.setBypassBackend(true);
          params.setContext(context);
          dissemination = m_ecm.getExternalContent(params);
        }

      } else if (protocolType.equalsIgnoreCase("soap")) {
        // FIXME!! future handling of soap bindings.
        String message = "[DisseminationService] Protocol type: "
            + protocolType + "NOT yet implemented";
        logger.error(message);
        throw new DisseminationException(message);

      } else if (protocolType.equalsIgnoreCase("file")) {
        ContentManagerParams params = new ContentManagerParams(dissURL);
        params.setContext(context);
        dissemination = m_ecm.getExternalContent(params);
      } else {
        String message = "[DisseminationService] Protocol type: "
            + protocolType + "NOT supported.";
        logger.error(message);
View Full Code Here

                    InputStream in;
                    MIMETypedStream mimeTypedStream = null;
                    if (dsLocation.startsWith(DatastreamManagedContent.UPLOADED_SCHEME)) {
                        in = getTempStream(dsLocation);
                    } else {
                        ContentManagerParams params = new ContentManagerParams(dsLocation);
                        params.setContext(context);
                        mimeTypedStream = m_contentManager.getExternalContent(params);
                        in = mimeTypedStream.getStream();
                    }
                    // set and validate the content
                    DatastreamXMLMetadata dsm = (DatastreamXMLMetadata) ds;
View Full Code Here

        if (ds.DSControlGrp.equalsIgnoreCase("E")) {
            DatastreamReferencedContent drc =
                    (DatastreamReferencedContent) reader
                            .GetDatastream(dsID, asOfDateTime);
            ContentManagerParams params = new ContentManagerParams(drc.DSLocation,
                                                                   drc.DSMIME, null, null);
            params.setContext(context);
            mimeTypedStream = m_externalContentManager.getExternalContent(params);
        } else if (ds.DSControlGrp.equalsIgnoreCase("M")) {
            DatastreamManagedContent dmc =
                    (DatastreamManagedContent) reader
                            .GetDatastream(dsID, asOfDateTime);
View Full Code Here

TOP

Related Classes of org.fcrepo.server.storage.ContentManagerParams

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.