All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----com.sun.install.products.WSRData
WSRData w = new WSRData("/net/syrinx/export/a/WSR");
addCollection(w.getCollection());
getWizardState().setData("install.wsrData", w);
Then, at runtime, you can retrieve this information to stdout by running the wizard like this:
$ java wizard -get wsr
You can also optionally write out the same file structure to your disk by running the wizard like this:
$ java wizard -get "wsr,/tmp/out"
(yes, you need to include the comma (",") above). This will write the contents of the WSRData into the /tmp/out directory. The directory will be created if it does not exist.
NOTE: Using this class assumes you are also using
InstallCommandLineTask as an initialization task, as
that is the task that does the command-line parsing for
-get. If your builder subclasses from
com.sun.install.products.InstallArchiveWriter, then
you are most likely using InstallCommandLineTask and
should not need to do anything. However, if you are subclassing from
com.sun.wizards.builder.ArchiveWriter, you might need
to add the InstallCommandLineTask as an initialization task by
doing this:
WizardState wizardState = getWizardState();
Sequence wizardInitSequence = wizardState.getSequence("wizardStateInitialization");
if (wizardInitSequence == null)
wizardInitSequence = new Sequence();
wizardInitSequence.addTask(new InstallCommandLineTask());
wizardState.addSequence("wizardStateInitialization", wizardInitSequence);
ResourceResolver
interface.
path.
public static final String SECTION
public WSRData(String path)
public void setPath(String path)
public ResourceInputStream resolveResource(String type,
String name,
byte extData[])
ResourceResolver
interface. This is so the object can serve up the
WSR data files itself for inclusing into the wizard.
Users of this object should not call this method directly.
SECTION.
getCollection().
null.
public ResourceCollection getCollection()
ResourceCollection
returned by this method, and this is passed into
the ResourceCollection indicating that this object
will resolve the WSR files (since it knows the path
to them).
public Vector getList(String offset)
public void writeTo(String path,
WizardState state) throws IOException
path. The contents of each file come from the
preconfigured section in the wizard state passed in.
public void print(PrintWriter out,
WizardState state)
CD_NAME=Solaris Software Companion CD CD_INSTALLER=installer -warp Verify,Summary CD_VOLID=s8_software_companion companioncd testfilecontentsline1 testfilecontentsline2 This would correspond to a file structure looking like this:
WSR | +-- cd.info +-- cd.name +-- test | +-- testfilecontentsline1 +-- testfilecontentsline2The output can be parsed recursively to re-build structures for other applications reading this data.
new PrintWriter(System.out).
public static final void copyFile(DataInput in,
DataOutput out,
long length) throws IOException
All Packages Class Hierarchy This Package Previous Next Index