Rational Developer for Power Systems Software
V7.6

com.ibm.etools.iseries.edit.preferences.templates
Class ISeriesTemplateSet

java.lang.Object
  extended by com.ibm.etools.iseries.edit.preferences.templates.ISeriesTemplateSet
Direct Known Subclasses:
ISeriesTemplates

public class ISeriesTemplateSet
extends Object

ISeriesTemplateSet manages a collection of templates and makes them persistent.


Field Summary
static String Copyright
           
 
Constructor Summary
ISeriesTemplateSet()
           
 
Method Summary
 void add(ISeriesTemplate template)
          Adds a template to the set.
 void addFromFile(File file, boolean checkVersion)
          Convenience method for reading templates from a file.
 void addFromStream(InputStream stream, boolean checkVersion)
          Reads templates from a XML stream and adds them to the template set.
 void addFromStream(InputStream stream, boolean checkVersion, String[] validContexts)
           
 void clear()
          Empties the set.
 void clear(String[] validContexts)
          Clears the templates that have the specified contexts
 ISeriesTemplate[] getTemplates()
          Returns all templates.
 ISeriesTemplate[] getTemplates(String name)
          Returns all templates with a given name.
 void remove(ISeriesTemplate template)
          Removes a template to the set.
 void saveToFile(File file)
          Convenience method for saving to a file.
 void saveToStream(OutputStream stream)
          Saves the template set as XML.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Copyright

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

ISeriesTemplateSet

public ISeriesTemplateSet()
Method Detail

addFromFile

public void addFromFile(File file,
                        boolean checkVersion)
                 throws CoreException
Convenience method for reading templates from a file.

Throws:
CoreException
See Also:
#addFromStream(InputStream)

addFromStream

public void addFromStream(InputStream stream,
                          boolean checkVersion)
                   throws CoreException
Reads templates from a XML stream and adds them to the template set.

Throws:
CoreException

addFromStream

public void addFromStream(InputStream stream,
                          boolean checkVersion,
                          String[] validContexts)
                   throws CoreException
Throws:
CoreException

saveToFile

public void saveToFile(File file)
                throws CoreException
Convenience method for saving to a file.

Throws:
CoreException
See Also:
saveToStream(OutputStream)

saveToStream

public void saveToStream(OutputStream stream)
                  throws CoreException
Saves the template set as XML.

Throws:
CoreException

add

public void add(ISeriesTemplate template)
Adds a template to the set.


remove

public void remove(ISeriesTemplate template)
Removes a template to the set.


clear

public void clear()
Empties the set.


clear

public void clear(String[] validContexts)
Clears the templates that have the specified contexts

Parameters:
validContexts - the contexts to clear
Since:
7.1

getTemplates

public ISeriesTemplate[] getTemplates()
Returns all templates.


getTemplates

public ISeriesTemplate[] getTemplates(String name)
Returns all templates with a given name.


Rational Developer for Power Systems Software
V7.6

Copyright 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.