com.infoengine.administration.packaging
Class TaskPackager
java.lang.Object
com.infoengine.administration.packaging.TaskPackager
- public class TaskPackager
- extends Object
Method Summary |
private void |
addToQuery(String repositoryType,
String typeIdentifier)
|
private void |
addTypeIdToDescriptor(PackageDescriptor descriptor,
String rTypeName,
TypeId tid)
|
private boolean |
in(File dir1,
File dir2)
a/b/c would be in a/b |
private boolean |
isAncestor(File dir1,
File dir2)
a/b would be an ancestor of a/b/c
a/c would not be an ancestor of a/b/c |
PackageDescriptor |
packageTasks(File jar,
File[] tasks)
create a task package archive. |
private void |
process(File loadPoint,
File currentDir,
DotDelegateInfo parentInfo,
PackageDescriptor descriptor,
Vector toArchive)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
taskRoot
private File taskRoot
directory
private DelegateDirectory directory
defaultRepository
private Repository defaultRepository
defaultRepositoryType
private RepositoryType defaultRepositoryType
toQuery
private Map toQuery
TaskPackager
public TaskPackager(File root,
DelegateDirectory dir,
Repository repo)
throws FileNotFoundException
- create a new TaskPackager
- Parameters:
root
- the task rootdir
- the delegate directoryrepo
- the default repository entry
- Throws:
NullPointerException
- if root or dir is null
FileNotFoundException
- if root doesn't exist or isn't a directory
packageTasks
public PackageDescriptor packageTasks(File jar,
File[] tasks)
throws IOException
- create a task package archive.
- Parameters:
jar
- the jar file to create, will be deleted if it exists
- Returns:
- a PackageDescriptor object if the archive will require additional
info to be re-installed (hierarchy or schema info).
- Throws:
IOException
- if an I/O error occurs
process
private void process(File loadPoint,
File currentDir,
DotDelegateInfo parentInfo,
PackageDescriptor descriptor,
Vector toArchive)
throws IOException
- Throws:
IOException
addTypeIdToDescriptor
private void addTypeIdToDescriptor(PackageDescriptor descriptor,
String rTypeName,
TypeId tid)
addToQuery
private void addToQuery(String repositoryType,
String typeIdentifier)
isAncestor
private boolean isAncestor(File dir1,
File dir2)
- a/b would be an ancestor of a/b/c
a/c would not be an ancestor of a/b/c
- Returns:
- true if dir1 is an ancestor of dir2
in
private boolean in(File dir1,
File dir2)
- a/b/c would be in a/b
- Returns:
- true if dir1 is in dir2