Package org.fcrepo.server

Examples of org.fcrepo.server.MultiValueMap


            throws AuthzException {
        try {
            logger.debug("Entered enforceModifyDatastreamByReference");
            String target = Constants.ACTION.MODIFY_DATASTREAM_BY_REFERENCE.uri;
            context.setActionAttributes(null);
            MultiValueMap resourceAttributes = new MultiValueMap();
            String name = null;
            try {
                name = Constants.DATASTREAM.ID.uri;
                resourceAttributes.set(name, datastreamId);
                name = Constants.DATASTREAM.NEW_MIME_TYPE.uri;
                resourceAttributes.set(name, datastreamNewMimeType);
                name = Constants.DATASTREAM.NEW_FORMAT_URI.uri;
                resourceAttributes.set(name, datastreamNewFormatURI);
                name = Constants.DATASTREAM.NEW_LOCATION.uri;
                resourceAttributes.set(name, datastreamNewLocation);
                name = Constants.DATASTREAM.NEW_ALT_IDS.uri;
                resourceAttributes.set(name, datastreamNewAltIDs);
                name = Constants.DATASTREAM.NEW_CHECKSUM_TYPE.uri;
                resourceAttributes.set(name, datastreamNewChecksumType);
                name = Constants.DATASTREAM.NEW_CHECKSUM.uri;
                resourceAttributes.set(name, datastreamNewChecksum);
            } catch (Exception e) {
                context.setResourceAttributes(null);
                throw new AuthzOperationalException(target + " couldn't set "
                                                    + name, e);
            }
View Full Code Here


            throws AuthzException {
        try {
            logger.debug("Entered enforceModifyDatastreamByValue");
            String target = Constants.ACTION.MODIFY_DATASTREAM_BY_VALUE.uri;
            context.setActionAttributes(null);
            MultiValueMap resourceAttributes = new MultiValueMap();
            String name = null;
            try {
                name = Constants.DATASTREAM.ID.uri;
                resourceAttributes.set(name, datastreamId);
                name = Constants.DATASTREAM.NEW_MIME_TYPE.uri;
                resourceAttributes.set(name, newDatastreamMimeType);
                name = Constants.DATASTREAM.NEW_FORMAT_URI.uri;
                resourceAttributes.set(name, newDatastreamFormatURI);
                name = Constants.DATASTREAM.NEW_ALT_IDS.uri;
                resourceAttributes.set(name, newDatastreamAltIDs);
                name = Constants.DATASTREAM.NEW_CHECKSUM_TYPE.uri;
                resourceAttributes.set(name, newDatastreamChecksumType);
                name = Constants.DATASTREAM.NEW_CHECKSUM.uri;
                resourceAttributes.set(name, newDatastreamChecksum);
            } catch (Exception e) {
                context.setResourceAttributes(null);
                throw new AuthzOperationalException(target + " couldn't set "
                                                    + name, e);
            }
View Full Code Here

            throws AuthzException {
        try {
            logger.debug("Entered enforceModifyObject");
            String target = Constants.ACTION.MODIFY_OBJECT.uri;
            context.setActionAttributes(null);
            MultiValueMap resourceAttributes = new MultiValueMap();
            String name = null;
            try {
                name = Constants.OBJECT.NEW_STATE.uri;
                resourceAttributes.set(name, objectNewState);
                if (objectNewOwnerId != null){
                    name = Constants.OBJECT.OWNER.uri;
                    resourceAttributes.set(name, objectNewOwnerId.split(m_ownerIdSeparator));
                }
            } catch (Exception e) {
                context.setResourceAttributes(null);
                throw new AuthzOperationalException(target + " couldn't set "
                                                    + name, e);
View Full Code Here

                                             Date endDT) throws AuthzException {
        try {
            logger.debug("Entered enforcePurgeDatastream");
            String target = Constants.ACTION.PURGE_DATASTREAM.uri;
            context.setActionAttributes(null);
            MultiValueMap resourceAttributes = new MultiValueMap();
            String name = null;
            try {
                name = Constants.DATASTREAM.ID.uri;
                resourceAttributes.set(name, datastreamId);
                name = Constants.RESOURCE.AS_OF_DATETIME.uri;
                resourceAttributes.set(name, ensureDate(endDT, context));
            } catch (Exception e) {
                context.setResourceAttributes(null);
                throw new AuthzOperationalException(target + " couldn't set "
                                                    + name, e);
            }
View Full Code Here

            throws AuthzException {
        try {
            logger.debug("Entered enforceSetDatastreamState");
            String target = Constants.ACTION.SET_DATASTREAM_STATE.uri;
            context.setActionAttributes(null);
            MultiValueMap resourceAttributes = new MultiValueMap();
            String name = null;
            try {
                name = Constants.DATASTREAM.ID.uri;
                resourceAttributes.set(name, datastreamId);
                name = Constants.DATASTREAM.NEW_STATE.uri;
                resourceAttributes.set(name, datastreamNewState);
            } catch (Exception e) {
                context.setResourceAttributes(null);
                throw new AuthzOperationalException(target + " couldn't set "
                                                    + name, e);
            }
View Full Code Here

            throws AuthzException {
        try {
            logger.debug("Entered enforceSetDatastreamVersionable");
            String target = Constants.ACTION.SET_DATASTREAM_VERSIONABLE.uri;
            context.setActionAttributes(null);
            MultiValueMap resourceAttributes = new MultiValueMap();
            String name = null;
            try {
                name = Constants.DATASTREAM.ID.uri;
                resourceAttributes.set(name, datastreamId);
                name = Constants.DATASTREAM.NEW_VERSIONABLE.uri;
                resourceAttributes.set(name,
                                       new Boolean(datastreamNewVersionable).toString());
            } catch (Exception e) {
                context.setResourceAttributes(null);
                throw new AuthzOperationalException(target + " couldn't set "
                                                    + name, e);
View Full Code Here

            throws AuthzException {
        try {
            logger.debug("Entered enforceCompareDatastreamChecksum");
            String target = Constants.ACTION.COMPARE_DATASTREAM_CHECKSUM.uri;
            context.setActionAttributes(null);
            MultiValueMap resourceAttributes = new MultiValueMap();
            String name = null;

            try {
                name = Constants.DATASTREAM.ID.uri;
                resourceAttributes.set(name, datastreamId);
                name = Constants.RESOURCE.AS_OF_DATETIME.uri;
                resourceAttributes.set(name, ensureDate(versionDate, context));
            } catch (Exception e) {
                context.setResourceAttributes(null);
                throw new AuthzOperationalException(target + " couldn't set "
                                                    + name, e);
            }
View Full Code Here

            throws AuthzException {
        try {
            logger.debug("Entered enforceGetDatastreamDissemination");
            String target = Constants.ACTION.GET_DATASTREAM_DISSEMINATION.uri;
            context.setActionAttributes(null);
            MultiValueMap resourceAttributes = new MultiValueMap();
            String name = null;
            try {
                name = Constants.DATASTREAM.ID.uri;
                resourceAttributes.set(name, datastreamId);
                name = Constants.RESOURCE.AS_OF_DATETIME.uri;
                resourceAttributes.set(name, ensureDate(asOfDate, context));
            } catch (Exception e) {
                context.setResourceAttributes(null);
                throw new AuthzOperationalException(target + " couldn't set "
                                                    + name, e);
            }
View Full Code Here

                                        String dissState) throws AuthzException {
        try {
            logger.debug("Entered enforceGetDissemination");
            String target = Constants.ACTION.GET_DISSEMINATION.uri;
            context.setActionAttributes(null);
            MultiValueMap resourceAttributes = new MultiValueMap();
            String name = null;
            try {
                name = Constants.SDEF.PID.uri;
                resourceAttributes.set(name, sDefPid);
                name = Constants.SDEF.NAMESPACE.uri;
                resourceAttributes.set(name, extractNamespace(sDefPid));
                name = Constants.DISSEMINATOR.METHOD.uri;
                resourceAttributes.set(name, methodName);
                name = Constants.SDEP.PID.uri;
                resourceAttributes.set(name, sDepPid);
                name = Constants.SDEP.NAMESPACE.uri;
                resourceAttributes.set(name, extractNamespace(sDepPid));
                name = Constants.OBJECT.STATE.uri;
                resourceAttributes.set(name, objectState);
                name = Constants.DISSEMINATOR.STATE.uri;
                resourceAttributes.set(name, dissState);
                name = Constants.SDEF.STATE.uri;
                resourceAttributes.set(name, sDefState);
                name = Constants.SDEP.STATE.uri;
                resourceAttributes.set(name, sDepState);
                name = Constants.RESOURCE.AS_OF_DATETIME.uri;
                resourceAttributes.set(name, ensureDate(asOfDate, context));
            } catch (Exception e) {
                context.setResourceAttributes(null);
                throw new AuthzOperationalException(target + " couldn't set "
                                                    + name, e);
            }
View Full Code Here

                                        Date asOfDate) throws AuthzException {
        try {
            logger.debug("Entered enforceGetObjectProfile");
            String target = Constants.ACTION.GET_OBJECT_PROFILE.uri;
            context.setActionAttributes(null);
            MultiValueMap resourceAttributes = new MultiValueMap();
            try {
                resourceAttributes.set(Constants.RESOURCE.AS_OF_DATETIME.uri,
                                   ensureDate(asOfDate, context));
            } catch (Exception e) {
                context.setResourceAttributes(null);
                throw new AuthzOperationalException(target + " couldn't set "
                                                    + Constants.RESOURCE.AS_OF_DATETIME.uri, e);
View Full Code Here

TOP

Related Classes of org.fcrepo.server.MultiValueMap

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.