|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gridsystems.nextgrid.api.pom.AbstractGroundingImpl
com.gridsystems.nextgrid.api.pom.components.FileSystemGrounding
public class FileSystemGrounding
Grounding providing standard operations on the local file-system.
This grounding requires the service to be defined with the following attributes:
Convenience constants are provided for the attribute names and valid values. For example, the following code creates and configures a Service for the "OP_DELETE_FILE" operation:
ProcessFactory factory = ProcessFactoryFinder.getFactory(); Service s = factory.newServiceProcess(); s.setAttribute(new QName("urn:grounding", "type"), "urn:file-system"); s.setAttribute(new QName("urn:grounding", "operation"), "DeleteFile");
Operation | Operation Name | Constant |
---|---|---|
Delete File | DeleteFile | OP_DELETE_FILE |
Create File | CreateFileFromTemplate | OP_CREATE_FROM_TEMPLATE |
All input parameters are processed by this operations. Any parameter that
can be casted to a File
instance will be deleted. For the
rest, if their contents in string format matches a local file path to an
existent file, it will be deleted.
This operation creates a file from an optional template. It uses the following inputs:
If no destination file is defined, a temporary file will be created.
If found, the resulting file will be returned in an output parameter called "file".
Field Summary | |
---|---|
static java.lang.String |
OP_CREATE_FROM_TEMPLATE
Operation that creates a file from a template. |
static java.lang.String |
OP_DELETE_FILE
Operation that deletes a file from the file system. |
static java.lang.String |
TYPE
Grounding type. |
static java.net.URI |
TYPE_URI
Grounding type. |
Fields inherited from interface nextgrid.api.pom.Grounding |
---|
ATTR_GROUNDING_TYPE, ATTR_OPERATION, NS_GROUNDING |
Constructor Summary | |
---|---|
FileSystemGrounding()
Creates a new instance. |
Method Summary | |
---|---|
nextgrid.api.pom.Grounding |
createGrounding()
|
void |
dispose()
|
void |
invoke(nextgrid.api.env.ProcessEnvironment env,
nextgrid.api.pom.Service service)
|
void |
validate()
|
Methods inherited from class com.gridsystems.nextgrid.api.pom.AbstractGroundingImpl |
---|
attr, getSupportedAttribs, getType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface nextgrid.api.pom.GroundingFactory |
---|
getType |
Field Detail |
---|
public static final java.lang.String OP_DELETE_FILE
public static final java.lang.String OP_CREATE_FROM_TEMPLATE
public static final java.lang.String TYPE
public static final java.net.URI TYPE_URI
Constructor Detail |
---|
public FileSystemGrounding()
Method Detail |
---|
public void dispose()
dispose
in interface nextgrid.api.pom.Grounding
public void invoke(nextgrid.api.env.ProcessEnvironment env, nextgrid.api.pom.Service service) throws nextgrid.api.pom.ProcessException
invoke
in interface nextgrid.api.pom.Grounding
nextgrid.api.pom.ProcessException
public void validate() throws nextgrid.api.pom.ProcessException
validate
in interface nextgrid.api.pom.Grounding
nextgrid.api.pom.ProcessException
public nextgrid.api.pom.Grounding createGrounding()
createGrounding
in interface nextgrid.api.pom.GroundingFactory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |