|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.guvnor.server.files.FileManagerUtils
@Name(value="fileManager") @Scope(value=EVENT) @AutoCreate public class FileManagerUtils
This assists the file manager servlets.
Constructor Summary | |
---|---|
FileManagerUtils()
|
Method Summary | |
---|---|
void |
attachFile(FormData uploadItem)
This attach a file to an asset. |
void |
attachFileToAsset(String uuid,
InputStream fileData,
String fileName)
This utility method attaches a file to an asset. |
void |
close()
|
byte[] |
exportPackageFromRepository(String packageName)
|
void |
exportRulesRepository(OutputStream out)
|
static FormData |
getFormData(javax.servlet.http.HttpServletRequest request)
Get the form data from the inbound request. |
long |
getLastModified(String name,
String version)
This will return the last time the package was built. |
RulesRepository |
getRepository()
|
String |
importClassicDRL(InputStream drlStream,
String packageName)
This will import DRL from a drl file into a more normalised structure. |
void |
importPackageToRepository(byte[] data,
boolean importAsNew)
|
void |
importRulesRepository(InputStream in)
|
boolean |
isPackageExist(String packageName)
|
String |
loadBinaryPackage(String packageName,
String packageVersion,
boolean isLatest,
OutputStream out)
Load up the appropriate package version. |
String |
loadFileAttachmentByUUID(String uuid,
OutputStream out)
The get returns files based on UUID of an asset. |
String |
loadSourceAsset(String packageName,
String packageVersion,
boolean isLatest,
String assetName,
ByteArrayOutputStream out)
|
String |
loadSourcePackage(String packageName,
String packageVersion,
boolean isLatest,
OutputStream out)
Load up the approproate package version. |
void |
setRepository(RulesRepository repository)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileManagerUtils()
Method Detail |
---|
@Restrict(value="#{identity.loggedIn}") public void attachFile(FormData uploadItem) throws IOException
IOException
@Restrict(value="#{identity.loggedIn}") public void attachFileToAsset(String uuid, InputStream fileData, String fileName) throws IOException
IOException
public RulesRepository getRepository()
public void setRepository(RulesRepository repository)
@Restrict(value="#{identity.loggedIn}") public String loadFileAttachmentByUUID(String uuid, OutputStream out) throws IOException
IOException
public static FormData getFormData(javax.servlet.http.HttpServletRequest request)
public String loadBinaryPackage(String packageName, String packageVersion, boolean isLatest, OutputStream out) throws IOException
packageName
- The name of the package.packageVersion
- The version (if it is a snapshot).isLatest
- true if the latest package binary will be used (ie NOT a snapshot).
IOException
public String loadSourcePackage(String packageName, String packageVersion, boolean isLatest, OutputStream out) throws IOException
packageName
- The name of the package.packageVersion
- The version (if it is a snapshot).isLatest
- true if the latest package binary will be used (ie NOT a snapshot).
IOException
public byte[] exportPackageFromRepository(String packageName)
public boolean isPackageExist(String packageName)
public void exportRulesRepository(OutputStream out)
@Restrict(value="#{identity.loggedIn}") public void importRulesRepository(InputStream in)
@Restrict(value="#{identity.loggedIn}") public void importPackageToRepository(byte[] data, boolean importAsNew)
@Restrict(value="#{identity.loggedIn}") public String importClassicDRL(InputStream drlStream, String packageName) throws IOException, org.drools.compiler.DroolsParserException
packageName
- Name for this package. Overrides the one in the DRL.
IOException
org.drools.compiler.DroolsParserException
public long getLastModified(String name, String version)
public String loadSourceAsset(String packageName, String packageVersion, boolean isLatest, String assetName, ByteArrayOutputStream out) throws IOException
IOException
@Destroy public void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |