com.android.repository.impl.meta
Class Archive

java.lang.Object
  extended by com.android.repository.impl.meta.Archive
Direct Known Subclasses:
ArchiveType

public abstract class Archive
extends java.lang.Object

A downloadable version of a RepoPackage, corresponding to a specific version number, and optionally host OS, host bitness, JVM version or JVM bitness. Includes a complete version of the package (Archive.CompleteType), and optionally binary patches from previous revisions to this one (Archive.PatchType). Primarily a superclass for xjc-generated JAXB-compatible classes.


Nested Class Summary
static class Archive.ArchiveFile
          General parent for the actual files referenced in an archive.
static class Archive.CompleteType
          Parent for xjc-generated classes containing a complete zip of this archive.
static class Archive.PatchesType
          A list of Archive.PatchTypes.
static class Archive.PatchType
          A binary diff from a previous package version to this one.
 
Constructor Summary
Archive()
           
 
Method Summary
abstract  CommonFactory createFactory()
          Create a CommonFactory corresponding to this instance's SchemaModule.SchemaModuleVersion.
 java.util.List<Archive.PatchType> getAllPatches()
          Gets all the version-to-version patches for this Archive.
abstract  Archive.CompleteType getComplete()
          Gets the full zip of this package.
 java.lang.Integer getHostBits()
          Gets the required host bit size (32 or 64), if any
 java.lang.String getHostOs()
          Gets the required host OS ("windows", "linux", "macosx"), if any.
 java.lang.Integer getJvmBits()
          Gets the required JVM bit size (32 or 64), if any
 RevisionType getMinJvmVersion()
          Gets the minimum JVM version needed for this Archive, if any.
protected  Archive.PatchesType getPatches()
          Gets the Archive.PatchesType for this Archive.
 boolean isCompatible()
           
 void setComplete(Archive.CompleteType complete)
          Sets the full zip of this package.
 void setHostBits(java.lang.Integer bits)
          Sets the required host bit size (32 or 64), if any.
 void setHostOs(java.lang.String os)
          Sets the required host OS ("windows", "linux", "macosx"), if any.
 void setJvmBits(java.lang.Integer bits)
          Sets the required JVM bit size (32 or 64), if any.
 void setMinJvmVersion(RevisionType revision)
          Sets the minimum JVM version needed for this Archive, if any.
protected  void setPatches(Archive.PatchesType patches)
          Sets the Archive.PatchesType for this Archive.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Archive

public Archive()
Method Detail

isCompatible

public boolean isCompatible()
Returns:
true if this archive is compatible with the current system with respect to the specified host os, bit size, jvm version, and jvm bit size (if any).

getComplete

@NonNull
public abstract Archive.CompleteType getComplete()
Gets the full zip of this package.


setComplete

public void setComplete(@NonNull
                        Archive.CompleteType complete)
Sets the full zip of this package.


getHostBits

@Nullable
public java.lang.Integer getHostBits()
Gets the required host bit size (32 or 64), if any


setHostBits

public void setHostBits(@Nullable
                        java.lang.Integer bits)
Sets the required host bit size (32 or 64), if any.


getJvmBits

@Nullable
public java.lang.Integer getJvmBits()
Gets the required JVM bit size (32 or 64), if any


setJvmBits

public void setJvmBits(@Nullable
                       java.lang.Integer bits)
Sets the required JVM bit size (32 or 64), if any.


getHostOs

@Nullable
public java.lang.String getHostOs()
Gets the required host OS ("windows", "linux", "macosx"), if any.


setHostOs

public void setHostOs(@Nullable
                      java.lang.String os)
Sets the required host OS ("windows", "linux", "macosx"), if any.


getAllPatches

@NonNull
public java.util.List<Archive.PatchType> getAllPatches()
Gets all the version-to-version patches for this Archive.


getPatches

@NonNull
protected Archive.PatchesType getPatches()
Gets the Archive.PatchesType for this Archive. Probably only needed internally.


setPatches

protected void setPatches(@NonNull
                          Archive.PatchesType patches)
Sets the Archive.PatchesType for this Archive. Probably only needed internally.


getMinJvmVersion

@Nullable
public RevisionType getMinJvmVersion()
Gets the minimum JVM version needed for this Archive, if any.


setMinJvmVersion

public void setMinJvmVersion(@Nullable
                             RevisionType revision)
Sets the minimum JVM version needed for this Archive, if any.


createFactory

@NonNull
public abstract CommonFactory createFactory()
Create a CommonFactory corresponding to this instance's SchemaModule.SchemaModuleVersion.