/** Delegate to the JournalWorker. */
 public Date modifyDatastreamByReference(
     Context context,
     String pid,
     String datastreamID,
     String[] altIDs,
     String dsLabel,
     String mimeType,
     String formatURI,
     String dsLocation,
     String checksumType,
     String checksum,
     String logMessage,
     Date lastModifiedDate)
     throws ServerException {
   return worker.modifyDatastreamByReference(
       context,
       pid,
       datastreamID,
       altIDs,
       dsLabel,
       mimeType,
       formatURI,
       dsLocation,
       checksumType,
       checksum,
       logMessage,
       lastModifiedDate);
 }
 /** Delegate to the JournalWorker. */
 public Validation validate(
     @PName("context") Context context,
     @PName("pid") String pid,
     @PName("asOfDateTime") Date asOfDateTime)
     throws ServerException {
   return worker.validate(context, pid, asOfDateTime);
 }
 /** Delegate to the JournalWorker. */
 public String addDatastream(
     Context context,
     String pid,
     String dsID,
     String[] altIDs,
     String dsLabel,
     boolean versionable,
     String MIMEType,
     String formatURI,
     String location,
     String controlGroup,
     String dsState,
     String checksumType,
     String checksum,
     String logMessage)
     throws ServerException {
   return worker.addDatastream(
       context,
       pid,
       dsID,
       altIDs,
       dsLabel,
       versionable,
       MIMEType,
       formatURI,
       location,
       controlGroup,
       dsState,
       checksumType,
       checksum,
       logMessage);
 }
 /** Delegate to the JournalWorker. */
 public Date modifyDatastreamByValue(
     Context context,
     String pid,
     String datastreamID,
     String[] altIDs,
     String dsLabel,
     String mimeType,
     String formatURI,
     InputStream dsContent,
     String checksumType,
     String checksum,
     String logMessage,
     Date lastModifiedDate)
     throws ServerException {
   return worker.modifyDatastreamByValue(
       context,
       pid,
       datastreamID,
       altIDs,
       dsLabel,
       mimeType,
       formatURI,
       dsContent,
       checksumType,
       checksum,
       logMessage,
       null);
 }
 /** Get the ManagementDelegate module and pass it to the worker. */
 @Override
 public void postInitModule() throws ModuleInitializationException {
   ManagementDelegate delegate = serverInterface.getManagementDelegate();
   if (delegate == null) {
     throw new ModuleInitializationException(
         "Can't get a ManagementDelegate from Server.getModule()", getRole());
   }
   worker.setManagementDelegate(delegate);
 }
 /** Delegate to the JournalWorker. */
 public boolean purgeRelationship(
     Context context,
     String pid,
     String relationship,
     String object,
     boolean isLiteral,
     String datatype)
     throws ServerException {
   return worker.purgeRelationship(context, pid, relationship, object, isLiteral, datatype);
 }
 /** Delegate to the JournalWorker. */
 public String ingest(
     Context context,
     InputStream serialization,
     String logMessage,
     String format,
     String encoding,
     String pid)
     throws ServerException {
   return worker.ingest(context, serialization, logMessage, format, encoding, pid);
 }
 /** Delegate to the JournalWorker. */
 public Date modifyObject(
     Context context,
     String pid,
     String state,
     String label,
     String ownerId,
     String logMessage,
     Date lastModifiedDate)
     throws ServerException {
   return worker.modifyObject(context, pid, state, label, ownerId, logMessage, lastModifiedDate);
 }
  /**
   * Augment the parameters with values obtained from System Properties, and create the proper
   * worker (JournalCreator or JournalConsumer) for the current mode.
   */
  @Override
  public void initModule() throws ModuleInitializationException {
    Map<String, String> parameters = getParameters();
    copyPropertiesOverParameters(parameters);
    serverInterface = new ServerWrapper(getServer());
    logger.info("Journaling parameters: " + parameters);
    parseParameters(parameters);

    if (inRecoveryMode) {
      worker = new JournalConsumer(parameters, getRole(), serverInterface);
    } else {
      worker = new JournalCreator(parameters, getRole(), serverInterface);
    }
    logger.info("Journal worker module is: " + worker.toString());
  }
Exemple #10
0
 /** Delegate to the JournalWorker. */
 public Datastream[] getDatastreams(Context context, String pid, Date asOfDateTime, String dsState)
     throws ServerException {
   return worker.getDatastreams(context, pid, asOfDateTime, dsState);
 }
Exemple #11
0
 /** Delegate to the JournalWorker. */
 public InputStream export(
     Context context, String pid, String format, String exportContext, String encoding)
     throws ServerException {
   return worker.export(context, pid, format, exportContext, encoding);
 }
Exemple #12
0
 /** Delegate to the JournalWorker. */
 public InputStream getObjectXML(Context context, String pid, String encoding)
     throws ServerException {
   return worker.getObjectXML(context, pid, encoding);
 }
Exemple #13
0
 /** Delegate to the JournalWorker. */
 public String[] getNextPID(Context context, int numPIDs, String namespace)
     throws ServerException {
   return worker.getNextPID(context, numPIDs, namespace);
 }
Exemple #14
0
 /** Delegate to the JournalWorker. */
 public RelationshipTuple[] getRelationships(Context context, String pid, String relationship)
     throws ServerException {
   return worker.getRelationships(context, pid, relationship);
 }
Exemple #15
0
 /** Delegate to the JournalWorker. */
 public Date setDatastreamVersionable(
     Context context, String pid, String dsID, boolean versionable, String logMessage)
     throws ServerException {
   return worker.setDatastreamVersionable(context, pid, dsID, versionable, logMessage);
 }
Exemple #16
0
 /** Delegate to the JournalWorker. */
 public String compareDatastreamChecksum(
     Context context, String pid, String dsID, Date versionDate) throws ServerException {
   return worker.compareDatastreamChecksum(context, pid, dsID, versionDate);
 }
Exemple #17
0
 /** Delegate to the JournalWorker. */
 public InputStream getTempStream(String id) throws ServerException {
   return worker.getTempStream(id);
 }
Exemple #18
0
 /** Delegate to the JournalWorker. */
 public Date setDatastreamState(
     Context context, String pid, String dsID, String dsState, String logMessage)
     throws ServerException {
   return worker.setDatastreamState(context, pid, dsID, dsState, logMessage);
 }
Exemple #19
0
 /** Delegate to the JournalWorker. */
 public String putTempStream(Context context, InputStream in) throws ServerException {
   return worker.putTempStream(context, in);
 }
Exemple #20
0
 /** Delegate to the JournalWorker. */
 public StreamingOutput stream(
     Context context, String pid, String format, String exportContext, String encoding)
     throws ServerException {
   return worker.stream(context, pid, format, exportContext, encoding);
 }
Exemple #21
0
 /** Delegate to the JournalWorker. */
 public Date purgeObject(Context context, String pid, String logMessage) throws ServerException {
   return worker.purgeObject(context, pid, logMessage);
 }
Exemple #22
0
 /** Delegate to the JournalWorker. */
 public Datastream getDatastream(
     Context context, String pid, String datastreamID, Date asOfDateTime) throws ServerException {
   return worker.getDatastream(context, pid, datastreamID, asOfDateTime);
 }
Exemple #23
0
 /** Delegate to the JournalWorker. */
 public Date[] purgeDatastream(
     Context context, String pid, String datastreamID, Date startDT, Date endDT, String logMessage)
     throws ServerException {
   return worker.purgeDatastream(context, pid, datastreamID, startDT, endDT, logMessage);
 }
Exemple #24
0
 /** Tell the worker to shut down. */
 @Override
 public void shutdownModule() throws ModuleShutdownException {
   worker.shutdown();
 }
Exemple #25
0
 /** Delegate to the JournalWorker. */
 public Datastream[] getDatastreamHistory(Context context, String pid, String datastreamID)
     throws ServerException {
   return worker.getDatastreamHistory(context, pid, datastreamID);
 }