org.eclipse.stardust.engine.core.spi.artifact.impl
Class BenchmarkDefinitionArtifactHandler

java.lang.Object
  extended by org.eclipse.stardust.engine.core.spi.artifact.impl.BenchmarkDefinitionArtifactHandler
All Implemented Interfaces:
IArtifactHandler, IArtifactHandler.Factory

public class BenchmarkDefinitionArtifactHandler
extends Object
implements IArtifactHandler, IArtifactHandler.Factory

This IArtifactHandler handles artifacts of type BenchmarkDefinitionArtifactType.

The handled artifacts are all of content type MIME_TYPE.
Internal caches for benchmark definitions are flushed if a benchmark definition runtime artifact is overwritten or deleted.

Author:
Roland.Stamm

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.stardust.engine.core.spi.artifact.IArtifactHandler
IArtifactHandler.Factory
 
Field Summary
static ArtifactType ARTIFACT_TYPE
           
static String MIME_TYPE
           
 
Constructor Summary
BenchmarkDefinitionArtifactHandler()
           
 
Method Summary
 void afterDelete(long oid)
          With this the artifact handler can purge caches after the artifact was deleted.
 void afterOverwrite(DeployedRuntimeArtifact deployedRuntimeArtifact)
          Notifies after a runtime artifact is overwritten.
 void beforeDelete(DeployedRuntimeArtifact deployedRuntimeArtifact)
          With this the artifact handler can e.g.
 String getArtifactContentType(RuntimeArtifact runtimeArtifact)
          Should return the MIME-type for the artifact.
 ArtifactType getArtifactType()
           
 IArtifactHandler getInstance()
           
 RuntimeArtifact preProcess(RuntimeArtifact runtimeArtifact)
          This method is called before deploy and overwrite.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARTIFACT_TYPE

public static final ArtifactType ARTIFACT_TYPE

MIME_TYPE

public static final String MIME_TYPE
See Also:
Constant Field Values
Constructor Detail

BenchmarkDefinitionArtifactHandler

public BenchmarkDefinitionArtifactHandler()
Method Detail

getInstance

public IArtifactHandler getInstance()
Specified by:
getInstance in interface IArtifactHandler.Factory

getArtifactType

public ArtifactType getArtifactType()
Specified by:
getArtifactType in interface IArtifactHandler
Returns:
the supported artifact type.

getArtifactContentType

public String getArtifactContentType(RuntimeArtifact runtimeArtifact)
Description copied from interface: IArtifactHandler
Should return the MIME-type for the artifact.

Specified by:
getArtifactContentType in interface IArtifactHandler
Returns:
MIME-type string.

preProcess

public RuntimeArtifact preProcess(RuntimeArtifact runtimeArtifact)
Description copied from interface: IArtifactHandler
This method is called before deploy and overwrite.

Handler can pre-process the artifact before it is deployed. E.g. compile, convert, validate.

It is possible to change all fields of the RuntimeArtifact prior to deployment,
e.g. the the artifactId to change the file ending for a compiled/processed artifact.

Specified by:
preProcess in interface IArtifactHandler
Parameters:
runtimeArtifact - The input artifact.
Returns:
pre-processed artifact.

afterOverwrite

public void afterOverwrite(DeployedRuntimeArtifact deployedRuntimeArtifact)
Description copied from interface: IArtifactHandler
Notifies after a runtime artifact is overwritten.

Specified by:
afterOverwrite in interface IArtifactHandler

beforeDelete

public void beforeDelete(DeployedRuntimeArtifact deployedRuntimeArtifact)
Description copied from interface: IArtifactHandler
With this the artifact handler can e.g. check referential integrity and prevent delete if the artifact is still being required.

Specified by:
beforeDelete in interface IArtifactHandler

afterDelete

public void afterDelete(long oid)
Description copied from interface: IArtifactHandler
With this the artifact handler can purge caches after the artifact was deleted.

Specified by:
afterDelete in interface IArtifactHandler


Copyright © 2017 Eclipse Stardust. All Rights Reserved.