Package org.apache.ivy.osgi.updatesite
Class UpdateSiteLoader
- java.lang.Object
-
- org.apache.ivy.osgi.updatesite.UpdateSiteLoader
-
public class UpdateSiteLoader extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private intlogLevelprivate CacheResourceOptionsoptionsprivate RepositoryCacheManagerrepositoryCacheManagerprivate TimeoutConstrainttimeoutConstraintprivate URLRepositoryurlRepository
-
Constructor Summary
Constructors Constructor Description UpdateSiteLoader(RepositoryCacheManager repositoryCacheManager, EventManager eventManager, CacheResourceOptions options, TimeoutConstraint timeoutConstraint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.zip.ZipInputStreamfindEntry(java.io.InputStream in, java.lang.String entryName)RepoDescriptorload(java.net.URI repoUri)private UpdateSiteDescriptorloadFromDigest(UpdateSite site)private UpdateSiteDescriptorloadFromSite(UpdateSite site)private P2DescriptorloadP2(java.net.URI repoUri)private UpdateSiteloadSite(java.net.URI repoUri)private java.net.URInormalizeSiteUri(java.net.URI uri, java.net.URI defaultValue)private booleanpopulateP2Descriptor(java.net.URI repoUri, P2Descriptor p2Descriptor)private booleanreadArtifacts(java.net.URI repoUri, P2Descriptor p2Descriptor)private booleanreadCompositeArtifact(java.net.URI repoUri, java.lang.String name, P2Descriptor p2Descriptor)private booleanreadCompositeContent(java.net.URI repoUri, java.lang.String name, P2Descriptor p2Descriptor)private booleanreadContent(java.net.URI repoUri, P2Descriptor p2Descriptor)private booleanreadJarOrXml(java.net.URI repoUri, java.lang.String baseName, XMLInputParser reader)voidsetLogLevel(int logLevel)
-
-
-
Field Detail
-
repositoryCacheManager
private final RepositoryCacheManager repositoryCacheManager
-
urlRepository
private final URLRepository urlRepository
-
options
private final CacheResourceOptions options
-
timeoutConstraint
private final TimeoutConstraint timeoutConstraint
-
logLevel
private int logLevel
-
-
Constructor Detail
-
UpdateSiteLoader
public UpdateSiteLoader(RepositoryCacheManager repositoryCacheManager, EventManager eventManager, CacheResourceOptions options, TimeoutConstraint timeoutConstraint)
-
-
Method Detail
-
setLogLevel
public void setLogLevel(int logLevel)
-
load
public RepoDescriptor load(java.net.URI repoUri) throws java.io.IOException, java.text.ParseException, org.xml.sax.SAXException
- Throws:
java.io.IOExceptionjava.text.ParseExceptionorg.xml.sax.SAXException
-
loadP2
private P2Descriptor loadP2(java.net.URI repoUri) throws java.io.IOException, java.text.ParseException, org.xml.sax.SAXException
- Throws:
java.io.IOExceptionjava.text.ParseExceptionorg.xml.sax.SAXException
-
populateP2Descriptor
private boolean populateP2Descriptor(java.net.URI repoUri, P2Descriptor p2Descriptor) throws java.io.IOException, java.text.ParseException, org.xml.sax.SAXException- Throws:
java.io.IOExceptionjava.text.ParseExceptionorg.xml.sax.SAXException
-
readContent
private boolean readContent(java.net.URI repoUri, P2Descriptor p2Descriptor) throws java.io.IOException, java.text.ParseException, org.xml.sax.SAXException- Throws:
java.io.IOExceptionjava.text.ParseExceptionorg.xml.sax.SAXException
-
readArtifacts
private boolean readArtifacts(java.net.URI repoUri, P2Descriptor p2Descriptor) throws java.io.IOException, java.text.ParseException, org.xml.sax.SAXException- Throws:
java.io.IOExceptionjava.text.ParseExceptionorg.xml.sax.SAXException
-
readCompositeContent
private boolean readCompositeContent(java.net.URI repoUri, java.lang.String name, P2Descriptor p2Descriptor) throws java.io.IOException, java.text.ParseException, org.xml.sax.SAXException- Throws:
java.io.IOExceptionjava.text.ParseExceptionorg.xml.sax.SAXException
-
readCompositeArtifact
private boolean readCompositeArtifact(java.net.URI repoUri, java.lang.String name, P2Descriptor p2Descriptor) throws java.io.IOException, java.text.ParseException, org.xml.sax.SAXException- Throws:
java.io.IOExceptionjava.text.ParseExceptionorg.xml.sax.SAXException
-
readJarOrXml
private boolean readJarOrXml(java.net.URI repoUri, java.lang.String baseName, XMLInputParser reader) throws java.io.IOException, java.text.ParseException, org.xml.sax.SAXException- Throws:
java.io.IOExceptionjava.text.ParseExceptionorg.xml.sax.SAXException
-
loadSite
private UpdateSite loadSite(java.net.URI repoUri) throws java.io.IOException, org.xml.sax.SAXException
- Throws:
java.io.IOExceptionorg.xml.sax.SAXException
-
normalizeSiteUri
private java.net.URI normalizeSiteUri(java.net.URI uri, java.net.URI defaultValue)
-
loadFromDigest
private UpdateSiteDescriptor loadFromDigest(UpdateSite site) throws java.io.IOException, org.xml.sax.SAXException
- Throws:
java.io.IOExceptionorg.xml.sax.SAXException
-
loadFromSite
private UpdateSiteDescriptor loadFromSite(UpdateSite site) throws java.io.IOException, org.xml.sax.SAXException
- Throws:
java.io.IOExceptionorg.xml.sax.SAXException
-
findEntry
private java.util.zip.ZipInputStream findEntry(java.io.InputStream in, java.lang.String entryName) throws java.io.IOException- Throws:
java.io.IOException
-
-