|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.prosyst.util.breq.BundleRequirementsUtils
public class BundleRequirementsUtils
Here are provided utility methods for parsing bundle requirements data.
| Field Summary | |
|---|---|
static java.lang.String |
HEADER_NAME
Constant for Bundle-Requirements header. |
static java.lang.String |
PERMISSIONS
Constant for bundle permission requirement type. |
static java.lang.String |
PLATFORMS
Constant for bundle platforms requirement type. |
static java.lang.String |
REQUIREMENT
Constant for requirement parameter. |
static java.lang.String |
RESOURCES
Constant for bundle resource requirement type. |
| Constructor Summary | |
|---|---|
BundleRequirementsUtils()
|
|
| Method Summary | |
|---|---|
static java.io.InputStream |
getBundleRequirements(Bundle bundle,
java.lang.String requirementType)
Gets bundle requirements, pointed by header Bundle-Requirements. |
static java.lang.String |
getLocation(java.lang.String bundleRequirement,
java.lang.String requirementType)
Gets the location of the xml file, which holds some bundle requirements data. |
static java.lang.String |
readNextOpenTag(java.io.InputStream is)
Reads the name of the next open tag. |
static java.lang.String |
readTagContents(java.io.InputStream is)
Reads contents up to '<' symbol. |
| 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 RESOURCES
public static final java.lang.String PERMISSIONS
public static final java.lang.String PLATFORMS
public static final java.lang.String HEADER_NAME
public static final java.lang.String REQUIREMENT
| Constructor Detail |
|---|
public BundleRequirementsUtils()
| Method Detail |
|---|
public static java.io.InputStream getBundleRequirements(Bundle bundle,
java.lang.String requirementType)
throws java.io.IOException,
java.lang.IllegalArgumentException
bundle - target bundle, whose requirements are of interest.requirementType - type of requirement; possible values are:
resources, permissions and platforms;
java.io.IOException - If an I/O error occurs while trying to get stream from the given location
java.lang.IllegalArgumentException - if Bundle-Requirement header is incorrect
public static java.lang.String getLocation(java.lang.String bundleRequirement,
java.lang.String requirementType)
throws java.lang.IllegalArgumentException
bundleRequirement - Must have syntax of a Bundle-Requirements header:
"Bundle-Requirements" := 1*(,requirementType - Type of requirement - can be permissions, platforms, or resources
java.lang.IllegalArgumentException - If header has incorrect syntax
public static java.lang.String readNextOpenTag(java.io.InputStream is)
throws java.io.IOException,
java.lang.IllegalArgumentException
is - to read tag from
java.io.IOException - if an I/O error occurs while reading
java.lang.IllegalArgumentException - if EOF is encountered before being able to read the tag
public static java.lang.String readTagContents(java.io.InputStream is)
throws java.io.IOException,
java.lang.IllegalArgumentException
is - to read contents from
java.io.IOException - if an I/O error occurs while reading
java.lang.IllegalArgumentException - if EOF is reached before reading the whole contents
|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||