Пример #1
0
 /** 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);
 }
Пример #2
0
 /** 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);
 }
Пример #3
0
 /** 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);
 }
Пример #4
0
 /** 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);
 }
Пример #5
0
 /** 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);
 }
Пример #6
0
 /** 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);
 }
Пример #7
0
 /** 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);
 }
Пример #8
0
 /** 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);
 }
Пример #9
0
  /**
   * 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());
  }
Пример #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);
 }
Пример #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);
 }
Пример #12
0
 /** Delegate to the JournalWorker. */
 public InputStream getObjectXML(Context context, String pid, String encoding)
     throws ServerException {
   return worker.getObjectXML(context, pid, encoding);
 }
Пример #13
0
 /** Delegate to the JournalWorker. */
 public String[] getNextPID(Context context, int numPIDs, String namespace)
     throws ServerException {
   return worker.getNextPID(context, numPIDs, namespace);
 }
Пример #14
0
 /** Delegate to the JournalWorker. */
 public RelationshipTuple[] getRelationships(Context context, String pid, String relationship)
     throws ServerException {
   return worker.getRelationships(context, pid, relationship);
 }
Пример #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);
 }
Пример #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);
 }
Пример #17
0
 /** Delegate to the JournalWorker. */
 public InputStream getTempStream(String id) throws ServerException {
   return worker.getTempStream(id);
 }
Пример #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);
 }
Пример #19
0
 /** Delegate to the JournalWorker. */
 public String putTempStream(Context context, InputStream in) throws ServerException {
   return worker.putTempStream(context, in);
 }
Пример #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);
 }
Пример #21
0
 /** Delegate to the JournalWorker. */
 public Date purgeObject(Context context, String pid, String logMessage) throws ServerException {
   return worker.purgeObject(context, pid, logMessage);
 }
Пример #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);
 }
Пример #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);
 }
Пример #24
0
 /** Tell the worker to shut down. */
 @Override
 public void shutdownModule() throws ModuleShutdownException {
   worker.shutdown();
 }
Пример #25
0
 /** Delegate to the JournalWorker. */
 public Datastream[] getDatastreamHistory(Context context, String pid, String datastreamID)
     throws ServerException {
   return worker.getDatastreamHistory(context, pid, datastreamID);
 }