Skip navigation links

Oracle® Imaging and Process Management Java API Reference
11g Release 1 (11.1.1)

E12853-01


oracle.imaging
Interface InputService


public interface InputService

Method Summary
 NameId createInput(Input input)
          Adds a new Inputto the Imaging system.
 void deleteInput(NameId input)
          Deletes an existing input based on its name, ID, or both.
 java.util.List<java.lang.String> getDataSourceContent(Input parsingInput, java.lang.String dataSource, int startPosition, int sampleRange)
          Gets the raw data of a sample data source and returns it in a list of strings.
 Input getInput(NameId id, Input.SectionSet sectionSet)
          Retrieves an Input with the requested sections filled out.
 java.util.List<Input> getInputs(java.util.List<NameId> ids, Input.SectionSet sectionSet)
           
 java.util.List<java.lang.String> getInputSectionsForDataSource(Input inputInfo, boolean useSampleSource, int startPosition, int endPosition)
          Gets the set of Input Sections available in the specified Input Source.
 java.util.List<Input> getOnlineInputs()
          Retrieves a list of the Inputs that are currently online.
 java.util.List<NameId> listInputs(Input.Ability ability)
          Retrieves an array containing the NameId of each Input in the system.
 java.util.List<java.lang.String> listSampleDataSources(java.lang.String inputSourceName)
          Retrieves a list of sample Data Sources for a particular Input Source.
 void modifyInput(Input input, Input.SectionSet sectionSet)
           
 void modifyState(NameId id, Input.StateUpdate update)
          Updates the specified field on the Inputwhose name and/or ID is provided.
 void modifyStates(NameId id, Input.StateUpdate[] updates)
           
 void saveSampleDataSource(java.lang.String inputSource, javax.activation.DataHandler sampleData, java.lang.String sampleName)
          This method allows the caller to save a data stream to the Data Sample store on the server and make it available for future use.

 

Method Detail

createInput

NameId createInput(Input input)
                   throws ImagingException,
                          ValidationException
Adds a new Inputto the Imaging system. The new input will be validated before being added to ensure that it defines values for all of the necessary fields, and that the values defined are valid.
Parameters:
input - the new input definition
Returns:
the ID of the created input
Throws:
ImagingException - Thrown if the input is not properly defined, does not have a unique name, or an error is encountered while creating it.
ValidationException
See Also:
Input

deleteInput

void deleteInput(NameId input)
                 throws ImagingException
Deletes an existing input based on its name, ID, or both.
Parameters:
input - the name, ID, or both, of the input to delete
Throws:
ImagingException - Thrown if the input cannot be found, or cannot be deleted.

getInput

Input getInput(NameId id,
               Input.SectionSet sectionSet)
               throws ImagingException
Retrieves an Input with the requested sections filled out. The operation will only return those sections specified by the sectionFlags parameter. The operation will throw an exception if the requested application does not exist or the requesting user does not have permissions to view it.

The Input$SectionFlags provided are used to determine which aspects of the input definition should be populated in the returned definition. If null, or an empty array, is passed, the definition is returned with only its most basic information filled in, and the non-requested sections left null.

Parameters:
id - the name, ID, or both, of the input to retrieve
sectionSet - the sections of the input which should be populated
Returns:
an input containing the requested sections
Throws:
ImagingException - Thrown if the input cannot be found, or its data cannot be loaded

getInputs

java.util.List<Input> getInputs(java.util.List<NameId> ids,
                                Input.SectionSet sectionSet)
                                throws ImagingException
Throws:
ImagingException

getOnlineInputs

java.util.List<Input> getOnlineInputs()
                                      throws ImagingException
Retrieves a list of the Inputs that are currently online. The inputs returned are not fully populated. Instead, they contain only the values which would be returned by calling getInput(NameId, oracle.imaging.Input.SectionSet) and providing null for the section flags. If there are currently no online inputs, an empty list is returned.

If a listing of all inputs is desired, whether they are currently online or not, the listInputs(oracle.imaging.Input.Ability) method should be used instead.

Note: There is no method provided for retrieving all inputs, nor for retrieving online inputs with specific sections populated.

Returns:
a list containing 0 or more online inputs
Throws:
ImagingException - Thrown if the list of online inputs cannot be retrieved, or name/IDs for the inputs cannot be loaded

listInputs

java.util.List<NameId> listInputs(Input.Ability ability)
                                  throws ImagingException
Retrieves an array containing the NameId of each Input in the system. Both online and offline inputs will be returned by this method. If no inputs have been created, an empty list is returned.

If a listing of only the online inputs in the system is desired, getOnlineInputs() should be used instead.

Parameters:
ability - Returns only inputs the current user has specific to that ability.

For example, to return back a list of inputs the current user can manage, the Input.Ability.MANAGE enumeration should be specified.

Returns:
a list containing 0 or more input name/ID pairs
Throws:
ImagingException

modifyInput

void modifyInput(Input input,
                 Input.SectionSet sectionSet)
                 throws ImagingException,
                        ValidationException
Throws:
ImagingException
ValidationException

modifyState

void modifyState(NameId id,
                 Input.StateUpdate update)
                 throws ImagingException
Updates the specified field on the Inputwhose name and/or ID is provided.

To update multiple fields on the input with a single call, which is generally much more efficient, InputService#modifyState(oracle.imaging.NameId,oracle.imaging.Input.StateUpdate[])should be used instead.

Parameters:
id - the name, ID, or both, of the input to update
update - the new value, and its field, to apply to the input
Throws:
ImagingException - Thrown

modifyStates

void modifyStates(NameId id,
                  Input.StateUpdate[] updates)
                  throws ImagingException
Throws:
ImagingException

listSampleDataSources

java.util.List<java.lang.String> listSampleDataSources(java.lang.String inputSourceName)
                                                       throws ImagingException
Retrieves a list of sample Data Sources for a particular Input Source. For the CSV Data Source this will return a list of files in the configured sample directory.
Parameters:
inputSourceName - The name of the Input Source to get data sources for
Returns:
A list of data sources.
Throws:
ImagingException - If there any errors getting the data source list.

getDataSourceContent

java.util.List<java.lang.String> getDataSourceContent(Input parsingInput,
                                                      java.lang.String dataSource,
                                                      int startPosition,
                                                      int sampleRange)
                                                      throws ImagingException
Gets the raw data of a sample data source and returns it in a list of strings. If the data source that's specified doesn't have enough data to fill the entire range or is empty for the specified range then an abbreviated or empty list will be returned. This method will only work for sample data sources and will throw an error for any production data.
Parameters:
parsingInput - An Input definition that contains encough information to parse the input stream
dataSource - The data source identifier to read
startPosition - The location to start gathering data inputSection
sampleRange - How many rows of data to return
Returns:
A list of strings that represents the contents of the source
Throws:
ImagingException - If there are any errors loading and reading the source data, or if the specified data source is a production data source.

getInputSectionsForDataSource

java.util.List<java.lang.String> getInputSectionsForDataSource(Input inputInfo,
                                                               boolean useSampleSource,
                                                               int startPosition,
                                                               int endPosition)
                                                               throws ImagingException
Gets the set of Input Sections available in the specified Input Source. These sections can be saved to the Input$FieldMap InputSection to define the input source of a mapping.
Parameters:
inputInfo - The Input Definition that has all the information on how to parse the data source. At this time only the Input.SourceProperties section must be completely filled out to get an accurate list of Input Sections.
useSampleSource - A flag that if set to true tells the parser it should try listing sections from the Input's Sample Data Source instead of the normal Input Source.
startPosition - Where to start inspecting the data source for Input Sections
endPosition - Where to stop examining the data source for Input Sections
Returns:
A list of strings representing all the possible Input Sections for the given data source.
Throws:
ImagingException - For any errors that occur examing the data source.

saveSampleDataSource

void saveSampleDataSource(java.lang.String inputSource,
                          javax.activation.DataHandler sampleData,
                          java.lang.String sampleName)
                          throws ImagingException
This method allows the caller to save a data stream to the Data Sample store on the server and make it available for future use.
Parameters:
inputSource - The ID of the Input Source that the sample is being saved for.
sampleData - The data stream of the data to save.
sampleName - What to name the data in the sample store.
Throws:
ImagingException - If saving sample data is not supported or if an error occurrs attemping to save the stream then an error will be thrown.

Skip navigation links

Oracle® Imaging and Process Management Java API Reference
11g Release 1 (11.1.1)

E12853-01


Copyright © 2010, Oracle. All rights reserved.