public class IfsUploadFileCommand extends IfsCommand
Command specification for IfsUploadFileCommand
Inputs:
parseFlag
is true, the content
stream
will be parsed where applicable.
name
(IfsDetermineParserComand is called).
parser
is found, the content
stream
will be parsed and appropriate object will
be created (IfsParseStreamCommand is called).
parser
is found, the content
stream
will be stored as is with the given
name
(IfsCreateDocumentCommand is called).
acl
is not specified,
the default acl of the session user will be applied
(IfsDetermineAclCommand is called).Constructor and Description |
---|
IfsUploadFileCommand()
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
CommandContext |
createCommandContext()
Returns a CommandContext to be used throughout the invocation.
|
protected void |
execute(CommandContext context)
Execute a CommandContext.
|
protected void |
execute(UploadFileContext context)
Execute a UploadFileContext.
|
protected IfsCreateDocumentCommand |
getCreateDocumentCommand()
Return an instance of the IfsCreateDocumentCommand.
|
protected IfsDetermineParserCommand |
getDetermineParserCommand()
Return an instance of the IfsDetermineParserCommand.
|
protected IfsParseStreamCommand |
getParseStreamCommand()
Return an instance of the IfsParseStreamCommand.
|
void |
populateNestedCommands(CommandInvoker invoker)
Populate the required nested commands.
|
protected Document |
runCreateDocumentCommand(LibrarySession session,
String name,
InputStream stream,
Folder folder,
AccessControlList acl)
Execute an IfsCreateDocumentCommand.
|
protected Parser |
runDetermineParserCommand(LibrarySession session,
String name)
Execute an IfsDetermineParserCommand.
|
protected LibraryObject |
runParseStreamCommand(LibrarySession session,
Parser parser,
InputStream stream,
String name,
String folderPath,
ParserCallback callback,
AccessControlList acl,
String language,
String characterSet)
Execute an IfsParseStreamCommand.
|
postExecute, preExecute, run
public IfsUploadFileCommand()
public void populateNestedCommands(CommandInvoker invoker) throws IfsException
populateNestedCommands
in interface Command
populateNestedCommands
in class IfsCommand
invoker
- Command invoker object.IfsException
- If there is any exception thrown.CommandInvoker
protected void execute(CommandContext context) throws IfsException
execute
in class IfsCommand
context
- The command context.IfsException
- if execution failsprotected void execute(UploadFileContext context) throws IfsException
context
- The command context.IfsException
public CommandContext createCommandContext() throws IfsException
createCommandContext
in interface Command
createCommandContext
in class IfsCommand
IfsException
CommandContext
protected Parser runDetermineParserCommand(LibrarySession session, String name) throws IfsException
IfsException
IfsDetermineParserCommand
protected IfsDetermineParserCommand getDetermineParserCommand() throws IfsException
IfsException
protected LibraryObject runParseStreamCommand(LibrarySession session, Parser parser, InputStream stream, String name, String folderPath, ParserCallback callback, AccessControlList acl, String language, String characterSet) throws IfsException
IfsException
IfsParseStreamCommand
protected IfsParseStreamCommand getParseStreamCommand() throws IfsException
IfsException
protected Document runCreateDocumentCommand(LibrarySession session, String name, InputStream stream, Folder folder, AccessControlList acl) throws IfsException
IfsException
IfsCreateDocumentCommand
protected IfsCreateDocumentCommand getCreateDocumentCommand() throws IfsException
IfsException
Copyright © 2023. All rights reserved.