com.android.repository.impl.meta
Class RepoPackageImpl

java.lang.Object
  extended by com.android.repository.impl.meta.RepoPackageImpl
All Implemented Interfaces:
RepoPackage, java.lang.Comparable<RepoPackage>
Direct Known Subclasses:
LocalPackageImpl, RemotePackageImpl

public abstract class RepoPackageImpl
extends java.lang.Object
implements RepoPackage

A local or remote RepoPackage. Primarily a superclass for xjc-generated classes.


Nested Class Summary
static class RepoPackageImpl.Archives
          List of Archives.
static class RepoPackageImpl.Dependencies
          List of Dependencys.
static class RepoPackageImpl.UsesLicense
          Reference to a License.
 
Field Summary
 
Fields inherited from interface com.android.repository.api.RepoPackage
PATH_SEPARATOR
 
Constructor Summary
RepoPackageImpl()
           
 
Method Summary
 void addDependency(Dependency dep)
          Convenience method to add a Dependency to this package's list of dependencies.
 int compareTo(RepoPackage o)
           
 boolean equals(java.lang.Object obj)
           
 java.util.Collection<Dependency> getAllDependencies()
          Gets information on what versions of what packages this package depends on.
protected  RepoPackageImpl.Dependencies getDependencies()
           
abstract  java.lang.String getDisplayName()
          Gets the user-friendly name of this package.
 License getLicense()
          Gets the License, if any, associated with this package.
 java.lang.String getPath()
          The install path (which also serves as unique id) for this package.
protected abstract  RevisionType getRevision()
           
abstract  TypeDetails getTypeDetails()
          Gets the TypeDetails for this package.
protected  RepoPackageImpl.UsesLicense getUsesLicense()
           
 Revision getVersion()
          Gets the Revision of this package.
 int hashCode()
           
protected  java.lang.Boolean isObsolete()
           
 boolean obsolete()
          Convenience method for getting the obsolete status, defaulting null from the underlying isObsolete() to false.
 void setDependencies(RepoPackageImpl.Dependencies dependencies)
           
 void setDisplayName(java.lang.String name)
           
 void setLicense(License l)
          Convenience method to add a reference to the given license to this package.
 void setObsolete(java.lang.Boolean obsolete)
           
 void setPath(java.lang.String path)
           
protected  void setRevision(RevisionType revision)
           
 void setTypeDetails(TypeDetails details)
           
protected  void setUsesLicense(RepoPackageImpl.UsesLicense license)
           
 void setVersion(Revision revision)
          Convenience method to set this package's RevisionType based on a Revision.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.android.repository.api.RepoPackage
createFactory
 

Constructor Detail

RepoPackageImpl

public RepoPackageImpl()
Method Detail

getTypeDetails

@NonNull
public abstract TypeDetails getTypeDetails()
Description copied from interface: RepoPackage
Gets the TypeDetails for this package.

Specified by:
getTypeDetails in interface RepoPackage

getVersion

@NonNull
public Revision getVersion()
Description copied from interface: RepoPackage
Gets the Revision of this package.

Specified by:
getVersion in interface RepoPackage

getRevision

@NonNull
protected abstract RevisionType getRevision()

getDisplayName

@NonNull
public abstract java.lang.String getDisplayName()
Description copied from interface: RepoPackage
Gets the user-friendly name of this package.

Specified by:
getDisplayName in interface RepoPackage

getUsesLicense

@Nullable
protected RepoPackageImpl.UsesLicense getUsesLicense()

getLicense

@Nullable
public License getLicense()
Description copied from interface: RepoPackage
Gets the License, if any, associated with this package.

Specified by:
getLicense in interface RepoPackage

setUsesLicense

protected void setUsesLicense(@Nullable
                              RepoPackageImpl.UsesLicense license)

setLicense

public void setLicense(@Nullable
                       License l)
Convenience method to add a reference to the given license to this package.


getDependencies

@Nullable
protected RepoPackageImpl.Dependencies getDependencies()

getAllDependencies

@NonNull
public java.util.Collection<Dependency> getAllDependencies()
Description copied from interface: RepoPackage
Gets information on what versions of what packages this package depends on.

Specified by:
getAllDependencies in interface RepoPackage

getPath

@NonNull
public java.lang.String getPath()
Description copied from interface: RepoPackage
The install path (which also serves as unique id) for this package.

Specified by:
getPath in interface RepoPackage

obsolete

public boolean obsolete()
Convenience method for getting the obsolete status, defaulting null from the underlying isObsolete() to false.

Specified by:
obsolete in interface RepoPackage

isObsolete

@Nullable
protected java.lang.Boolean isObsolete()

compareTo

public int compareTo(@NonNull
                     RepoPackage o)
Specified by:
compareTo in interface java.lang.Comparable<RepoPackage>

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

setRevision

protected void setRevision(@NonNull
                           RevisionType revision)

setVersion

public void setVersion(@NonNull
                       Revision revision)
Convenience method to set this package's RevisionType based on a Revision.


setDependencies

public void setDependencies(@Nullable
                            RepoPackageImpl.Dependencies dependencies)

setTypeDetails

public void setTypeDetails(@Nullable
                           TypeDetails details)

setDisplayName

public void setDisplayName(@NonNull
                           java.lang.String name)

setPath

public void setPath(@NonNull
                    java.lang.String path)

setObsolete

public void setObsolete(@Nullable
                        java.lang.Boolean obsolete)

addDependency

public void addDependency(@NonNull
                          Dependency dep)
Convenience method to add a Dependency to this package's list of dependencies.