|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openoffice.ide.eclipse.core.model.UnoPackage
public class UnoPackage
This class represents a UNO package and should be used to create a UNO package.
In the same way than ant jar target does, the UNO package is defined by an output file and a root directory. All the file that will be added to the package will have to be contained in this directory or one of its children.
Field Summary | |
---|---|
static java.lang.String |
OXT
|
static java.lang.String |
UNOPKG
|
static java.lang.String |
ZIP
|
Constructor Summary | |
---|---|
UnoPackage(java.io.File pOut,
java.io.File pDir)
Create a new package object. |
Method Summary | |
---|---|
void |
addBasicLibraryFile(java.io.File pDir)
Add a basic library to the package. |
void |
addComponentFile(java.io.File pFile,
java.lang.String pType)
Add a uno component file, for example a jar, shared library or python file containing the uno implementation. |
void |
addComponentFile(java.io.File pFile,
java.lang.String pType,
java.lang.String pPlatform)
Add a uno component file, for example a jar, shared library or python file containing the uno implementation. |
void |
addConfigurationDataFile(java.io.File pFile)
Add an xcu configuration to the package. |
void |
addConfigurationSchemaFile(java.io.File pFile)
Add an xcs configuration to the package. |
void |
addContent(java.io.File pContent)
Add a file or directory to the package. |
void |
addDialogLibraryFile(java.io.File pDir)
Add a dialog library to the package. |
void |
addOtherFile(java.io.File pFile)
Adds a file or directory to the package but do not include it in the manifest. |
void |
addPackageDescription(java.io.File pDescriptionFile,
java.util.Locale pLocale)
Add a localized description of the package. |
void |
addTypelibraryFile(java.io.File pFile,
java.lang.String pType)
Add a type library to the package. |
java.io.File |
close()
Writes the package on the disk and cleans up the data. |
void |
dispose()
Cleans up the data structure. |
static java.util.List<org.eclipse.core.resources.IResource> |
getContainedFile(org.eclipse.core.resources.IProject pPrj)
Get the list of the files contained in the minimal UNO package. |
java.util.List<java.io.File> |
getContainedFiles()
|
static boolean |
isContainedInPackage(org.eclipse.core.resources.IResource pRes)
Checks if the resource is contained in the UNO package. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ZIP
public static final java.lang.String UNOPKG
public static final java.lang.String OXT
Constructor Detail |
---|
public UnoPackage(java.io.File pOut, java.io.File pDir)
The extension has be one of the following. The default extension is
ZIP
. If the extension is invalid or missing, the file will be
renamed in .zip
.
pOut
- the file of the package.pDir
- the root directory of the package content.Method Detail |
---|
public void dispose()
close()
public void addContent(java.io.File pContent)
This method doesn't know about the different languages
contributions to the manifest.xml
file.
pContent
- the file or folder to addpublic void addComponentFile(java.io.File pFile, java.lang.String pType)
pFile
- the file to add to the packagepType
- the type of the file to add.for platform support
public void addComponentFile(java.io.File pFile, java.lang.String pType, java.lang.String pPlatform)
The type of the file defines the language and should be given as defined in the OOo Developer's Guide, like Java, native, Python.
pFile
- the file to add to the packagepType
- the type of the file to add.pPlatform
- optional parameter to use only with native type. Please
refer to the OOo Developer's Guide for more information.public void addTypelibraryFile(java.io.File pFile, java.lang.String pType)
Note that by some strange way, a jar dependency can be added in the package as a type library like RDB files.
pFile
- the file to addpType
- the type of the file as specified in the OOo Developer's Guidepublic void addBasicLibraryFile(java.io.File pDir)
Even if this method may not be used, it is possible.
pDir
- the directory of the basic library.public void addDialogLibraryFile(java.io.File pDir)
Even if this method may not be used, it is possible.
pDir
- the directory of the dialog library.public void addConfigurationDataFile(java.io.File pFile)
pFile
- the xcu file to addpublic void addConfigurationSchemaFile(java.io.File pFile)
pFile
- the xcs file to addpublic void addPackageDescription(java.io.File pDescriptionFile, java.util.Locale pLocale)
pDescriptionFile
- the file containing the description for that localepLocale
- the locale of the description. Can be null
.public void addOtherFile(java.io.File pFile)
This could be used for example for images.
pFile
- the file or directory to add.public java.io.File close()
null
if nothing happened.public java.util.List<java.io.File> getContainedFiles()
public static boolean isContainedInPackage(org.eclipse.core.resources.IResource pRes)
pRes
- the resource to check
true
if the resource is contained in the packagepublic static java.util.List<org.eclipse.core.resources.IResource> getContainedFile(org.eclipse.core.resources.IProject pPrj)
pPrj
- the project for which to get the minimal resources
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |