org.fcrepo.server.security.xacml.pdp.decorator
Class ManagementMethodInvocation

java.lang.Object
  extended by org.fcrepo.server.security.xacml.pdp.decorator.ManagementMethodInvocation
All Implemented Interfaces:
Management

public class ManagementMethodInvocation
extends Object
implements Management

Used to provide an explicitly paramterised view of API-M methods that affect the policy cache Note: this is not strictly an implementation of Management, but using this interface ensures a build error will be generated if Management changes and any new or modified methods are not catered for by the decorator. Constructor locates the equivalent API-M method in this class, and invokes it. Invoking the method pulls out the relevant method parameters, and determines what kind of operation it is. Methods that do not affect the policy cache should set action to NA

Version:
$Id$
Author:
Stephen Bayliss

Nested Class Summary
static class ManagementMethodInvocation.Action
           
static class ManagementMethodInvocation.Component
           
 class ManagementMethodInvocation.Parameters
           
static class ManagementMethodInvocation.Target
           
 
Field Summary
 ManagementMethodInvocation.Action action
           
 ManagementMethodInvocation.Component component
           
 ManagementMethodInvocation.Parameters parameters
           
 ManagementMethodInvocation.Target target
           
 
Constructor Summary
ManagementMethodInvocation(Method method, Object[] args)
          Given an API-M method and arguments, locate the same method in this class and invoke it, populating the method parameters and classifying the method in terms of the kind of action and the kind of resource it is operating on.
 
Method Summary
 String addDatastream(Context context, String pid, String dsID, String[] altIDs, String dsLabel, boolean versionable, String mimeType, String formatURI, String dsLocation, String controlGroup, String dsState, String checksumType, String checksum, String logMessage)
           
 boolean addRelationship(Context context, String subject, String relationship, String object, boolean isLiteral, String datatype)
           
 String compareDatastreamChecksum(Context context, String pid, String dsID, Date asOfDateTime)
           
 InputStream export(Context context, String pid, String format, String exportContext, String encoding)
           
 Datastream getDatastream(Context context, String pid, String dsID, Date asOfDateTime)
           
 Datastream[] getDatastreamHistory(Context context, String pid, String dsID)
           
 Datastream[] getDatastreams(Context context, String pid, Date asOfDateTime, String dsState)
           
 String[] getNextPID(Context context, int numPIDs, String namespace)
           
 InputStream getObjectXML(Context context, String pid, String encoding)
           
 RelationshipTuple[] getRelationships(Context context, String subject, String relationship)
           
 InputStream getTempStream(String id)
           
 String ingest(Context context, InputStream serialization, String logMessage, String format, String encoding, String newPid)
           
 Date modifyDatastreamByReference(Context context, String pid, String dsID, String[] altIDs, String dsLabel, String mimeType, String formatURI, String dsLocation, String checksumType, String checksum, String logMessage, Date lastModifiedDate)
           
 Date modifyDatastreamByValue(Context context, String pid, String dsID, String[] altIDs, String dsLabel, String mimeType, String formatURI, InputStream dsContent, String checksumType, String checksum, String logMessage, Date lastModifiedDate)
           
 Date modifyObject(Context context, String pid, String state, String label, String ownerID, String logMessage, Date lastModifiedDate)
           
 Date[] purgeDatastream(Context context, String pid, String dsID, Date startDT, Date endDT, String logMessage)
           
 Date purgeObject(Context context, String pid, String logMessage)
           
 boolean purgeRelationship(Context context, String subject, String relationship, String object, boolean isLiteral, String datatype)
           
 String putTempStream(Context context, InputStream in)
           
 Date setDatastreamState(Context context, String pid, String dsID, String dsState, String logMessage)
           
 Date setDatastreamVersionable(Context context, String pid, String dsID, boolean versionable, String logMessage)
           
 Validation validate(Context context, String pid, Date asOfDateTime)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

action

public ManagementMethodInvocation.Action action

target

public ManagementMethodInvocation.Target target

component

public ManagementMethodInvocation.Component component

parameters

public ManagementMethodInvocation.Parameters parameters
Constructor Detail

ManagementMethodInvocation

public ManagementMethodInvocation(Method method,
                                  Object[] args)
                           throws InvocationTargetException
Given an API-M method and arguments, locate the same method in this class and invoke it, populating the method parameters and classifying the method in terms of the kind of action and the kind of resource it is operating on.

Parameters:
method -
args -
Throws:
InvocationTargetException
Method Detail

addDatastream

public String addDatastream(Context context,
                            String pid,
                            String dsID,
                            String[] altIDs,
                            String dsLabel,
                            boolean versionable,
                            String mimeType,
                            String formatURI,
                            String dsLocation,
                            String controlGroup,
                            String dsState,
                            String checksumType,
                            String checksum,
                            String logMessage)
                     throws ServerException
Specified by:
addDatastream in interface Management
Throws:
ServerException

addRelationship

public boolean addRelationship(Context context,
                               String subject,
                               String relationship,
                               String object,
                               boolean isLiteral,
                               String datatype)
                        throws ServerException
Specified by:
addRelationship in interface Management
Throws:
ServerException

compareDatastreamChecksum

public String compareDatastreamChecksum(Context context,
                                        String pid,
                                        String dsID,
                                        Date asOfDateTime)
                                 throws ServerException
Specified by:
compareDatastreamChecksum in interface Management
Throws:
ServerException

export

public InputStream export(Context context,
                          String pid,
                          String format,
                          String exportContext,
                          String encoding)
                   throws ServerException
Specified by:
export in interface Management
Throws:
ServerException

getDatastream

public Datastream getDatastream(Context context,
                                String pid,
                                String dsID,
                                Date asOfDateTime)
                         throws ServerException
Specified by:
getDatastream in interface Management
Throws:
ServerException

getDatastreamHistory

public Datastream[] getDatastreamHistory(Context context,
                                         String pid,
                                         String dsID)
                                  throws ServerException
Specified by:
getDatastreamHistory in interface Management
Throws:
ServerException

getDatastreams

public Datastream[] getDatastreams(Context context,
                                   String pid,
                                   Date asOfDateTime,
                                   String dsState)
                            throws ServerException
Specified by:
getDatastreams in interface Management
Throws:
ServerException

getNextPID

public String[] getNextPID(Context context,
                           int numPIDs,
                           String namespace)
                    throws ServerException
Specified by:
getNextPID in interface Management
Throws:
ServerException

getObjectXML

public InputStream getObjectXML(Context context,
                                String pid,
                                String encoding)
                         throws ServerException
Specified by:
getObjectXML in interface Management
Throws:
ServerException

getRelationships

public RelationshipTuple[] getRelationships(Context context,
                                            String subject,
                                            String relationship)
                                     throws ServerException
Specified by:
getRelationships in interface Management
Throws:
ServerException

getTempStream

public InputStream getTempStream(String id)
                          throws ServerException
Specified by:
getTempStream in interface Management
Throws:
ServerException

ingest

public String ingest(Context context,
                     InputStream serialization,
                     String logMessage,
                     String format,
                     String encoding,
                     String newPid)
              throws ServerException
Specified by:
ingest in interface Management
Throws:
ServerException

modifyDatastreamByReference

public Date modifyDatastreamByReference(Context context,
                                        String pid,
                                        String dsID,
                                        String[] altIDs,
                                        String dsLabel,
                                        String mimeType,
                                        String formatURI,
                                        String dsLocation,
                                        String checksumType,
                                        String checksum,
                                        String logMessage,
                                        Date lastModifiedDate)
                                 throws ServerException
Specified by:
modifyDatastreamByReference in interface Management
Throws:
ServerException

modifyDatastreamByValue

public Date modifyDatastreamByValue(Context context,
                                    String pid,
                                    String dsID,
                                    String[] altIDs,
                                    String dsLabel,
                                    String mimeType,
                                    String formatURI,
                                    InputStream dsContent,
                                    String checksumType,
                                    String checksum,
                                    String logMessage,
                                    Date lastModifiedDate)
                             throws ServerException
Specified by:
modifyDatastreamByValue in interface Management
Throws:
ServerException

modifyObject

public Date modifyObject(Context context,
                         String pid,
                         String state,
                         String label,
                         String ownerID,
                         String logMessage,
                         Date lastModifiedDate)
                  throws ServerException
Specified by:
modifyObject in interface Management
Throws:
ServerException

purgeDatastream

public Date[] purgeDatastream(Context context,
                              String pid,
                              String dsID,
                              Date startDT,
                              Date endDT,
                              String logMessage)
                       throws ServerException
Specified by:
purgeDatastream in interface Management
Throws:
ServerException

purgeObject

public Date purgeObject(Context context,
                        String pid,
                        String logMessage)
                 throws ServerException
Specified by:
purgeObject in interface Management
Throws:
ServerException

purgeRelationship

public boolean purgeRelationship(Context context,
                                 String subject,
                                 String relationship,
                                 String object,
                                 boolean isLiteral,
                                 String datatype)
                          throws ServerException
Specified by:
purgeRelationship in interface Management
Throws:
ServerException

putTempStream

public String putTempStream(Context context,
                            InputStream in)
                     throws ServerException
Specified by:
putTempStream in interface Management
Throws:
ServerException

setDatastreamState

public Date setDatastreamState(Context context,
                               String pid,
                               String dsID,
                               String dsState,
                               String logMessage)
                        throws ServerException
Specified by:
setDatastreamState in interface Management
Throws:
ServerException

setDatastreamVersionable

public Date setDatastreamVersionable(Context context,
                                     String pid,
                                     String dsID,
                                     boolean versionable,
                                     String logMessage)
                              throws ServerException
Specified by:
setDatastreamVersionable in interface Management
Throws:
ServerException

validate

public Validation validate(Context context,
                           String pid,
                           Date asOfDateTime)
                    throws ServerException
Specified by:
validate in interface Management
Throws:
ServerException


Copyright © 2012 DuraSpace. All Rights Reserved.