|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.repository.util.RepositoryUtils
Various static utility methods used throughout repository related programing interfaces.
Field Summary | |
static String |
META
meta extension tag for meta-data containing artifacts |
Constructor Summary | |
RepositoryUtils()
|
Method Summary | |
static URL |
convertToURL(String host)
Convert a path to a url. |
static URL[] |
convertToURLs(String[] hosts)
Convert a set of host path statements to formal urls. |
static Attributes |
getAsAttributes(Properties properties)
Transforms a Properties into a Attributes using a simple enumeration convention for property names which appends a numeric enumeration name component to the dotted property key. |
static Attributes |
getAttributes(File cache,
Artifact artifact)
Gets the Attribues from the cache. |
static Attributes |
getAttributes(String[] repositories,
Artifact artifact)
Gets the Attribues in a remote artifact. |
static String[] |
getCleanPaths(String[] hosts)
For a given set of host paths, returns an equivalent set ensuring that the path ends with the "/" character. |
static String[] |
getDelimited(char a_delim,
String a_substrate)
|
static String |
getEnumeratedBase(String key)
Gets the key base of an enumerated property using the multivalued property key naming convention. |
static Properties |
getProperties(File cache,
Artifact artifact)
Gets the Properties in the local cache. |
static Properties |
getProperties(String[] repositories,
Artifact artifact)
Gets the Properties in a remote properties file. |
static Properties |
getProperties(URL url)
Gets the Properties in a remote properties file. |
static boolean |
isEnumerated(String key)
Detects whether or not a property key is of the multivalued enumeration kind. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String META
Constructor Detail |
public RepositoryUtils()
Method Detail |
public static Attributes getAsAttributes(Properties properties)
properties
- the properties to be transformed
public static Attributes getAttributes(String[] repositories, Artifact artifact) throws RepositoryException
repositories
- the reprositories to search againstartifact
- the artifact to load meta data from
RepositoryException
- if there is execution failurepublic static Attributes getAttributes(File cache, Artifact artifact) throws RepositoryException
cache
- the reprository cacheartifact
- the artifact to load meta data from
RepositoryException
- if there is execution failurepublic static Properties getProperties(File cache, Artifact artifact) throws RepositoryException
cache
- the local cacheartifact
- the artifact to load meta data from
RepositoryException
- if there is any problem loading the
propertiespublic static Properties getProperties(String[] repositories, Artifact artifact) throws RepositoryException
repositories
- the reprositories to search againstartifact
- the artifact to load meta data from
RepositoryException
- if there is any problem loading the
propertiespublic static Properties getProperties(URL url) throws IOException
url
- the url to the properties file
IOException
- indicating a IO error during property loadingpublic static boolean isEnumerated(String key)
key
- the property name or key
public static String getEnumeratedBase(String key)
key
- the enumerated key whose last name component is a number
public static String[] getDelimited(char a_delim, String a_substrate)
public static URL[] convertToURLs(String[] hosts)
hosts
- the set of host names
public static URL convertToURL(String host) throws IllegalArgumentException
host
- the host address
IllegalArgumentException
- if the path cannot
be converted to a urlpublic static String[] getCleanPaths(String[] hosts)
hosts
- the set of host path names
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |