public class FakePackage extends java.lang.Object implements LocalPackage, RemotePackage
RepoPackage (implementing both LocalPackage and RemotePackage,
for use in unit tests.
Currently not especially fully-featured.PATH_SEPARATOR| Constructor and Description |
|---|
FakePackage(java.lang.String path,
Revision version,
java.util.Collection<Dependency> dependencies) |
| Modifier and Type | Method and Description |
|---|---|
RepoPackageImpl |
asMarshallable()
Returns a package with the same content as this one that can be marshalled using JAXB
(or
this if it already can be marshalled). |
int |
compareTo(RepoPackage o) |
CommonFactory |
createFactory()
Creates a
CommonFactory corresponding to the SchemaModule.SchemaModuleVersion
of this instance. |
boolean |
equals(java.lang.Object obj) |
java.util.Collection<Dependency> |
getAllDependencies()
Gets information on what versions of what packages this package depends on.
|
Archive |
getArchive() |
Channel |
getChannel()
Gets the update channel (e.g.
|
java.lang.String |
getDisplayName()
Gets the user-friendly name of this package.
|
java.io.File |
getInstallDir(RepoManager manager,
ProgressIndicator progress)
Gets the path into which this
RemotePackage should be installed. |
License |
getLicense()
Gets the
License, if any, associated with this package. |
java.io.File |
getLocation()
Gets the installed location of this package.
|
java.lang.String |
getPath()
The install path (which also serves as unique id) for this package.
|
RepositorySource |
getSource() |
TypeDetails |
getTypeDetails()
Gets the
TypeDetails for this package. |
Revision |
getVersion()
Gets the
Revision of this package. |
int |
hashCode() |
boolean |
obsolete()
Whether this package is obsolete.
|
void |
setChannel(Channel channel) |
void |
setCompleteUrl(java.lang.String url) |
void |
setInstalledPath(java.io.File root)
Specifies the path at which this package is installed.
|
void |
setSource(RepositorySource source) |
void |
setTypeDetails(TypeDetails details) |
java.lang.String |
toString() |
public FakePackage(@NonNull
java.lang.String path,
@NonNull
Revision version,
@Nullable
java.util.Collection<Dependency> dependencies)
@NonNull public RepositorySource getSource()
getSource in interface RemotePackageRepositorySource from which we got this package.public void setSource(@NonNull
RepositorySource source)
setSource in interface RemotePackagesource - The RepositorySource from which we got this package.@Nullable public Archive getArchive()
getArchive in interface RemotePackagenull if there is none.public void setCompleteUrl(java.lang.String url)
public void setChannel(Channel channel)
@NonNull public Channel getChannel()
RemotePackagegetChannel in interface RemotePackage@NonNull
public java.io.File getInstallDir(@NonNull
RepoManager manager,
@NonNull
ProgressIndicator progress)
RemotePackageRemotePackage should be installed.getInstallDir in interface RemotePackagepublic void setTypeDetails(TypeDetails details)
@NonNull public TypeDetails getTypeDetails()
RepoPackageTypeDetails for this package.getTypeDetails in interface RepoPackage@NonNull public Revision getVersion()
RepoPackageRevision of this package.getVersion in interface RepoPackage@NonNull public java.lang.String getDisplayName()
RepoPackagegetDisplayName in interface RepoPackage@Nullable public License getLicense()
RepoPackageLicense, if any, associated with this package.getLicense in interface RepoPackage@NonNull public java.util.Collection<Dependency> getAllDependencies()
RepoPackagegetAllDependencies in interface RepoPackage@NonNull public java.lang.String getPath()
RepoPackagegetPath in interface RepoPackagepublic boolean obsolete()
RepoPackageobsolete in interface RepoPackage@NonNull public CommonFactory createFactory()
RepoPackageCommonFactory corresponding to the SchemaModule.SchemaModuleVersion
of this instance.createFactory in interface RepoPackage@NonNull public RepoPackageImpl asMarshallable()
RepoPackagethis if it already can be marshalled).asMarshallable in interface RepoPackagepublic int compareTo(@NonNull
RepoPackage o)
compareTo in interface java.lang.Comparable<RepoPackage>public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object@NonNull public java.io.File getLocation()
LocalPackagegetLocation in interface LocalPackagepublic void setInstalledPath(@NonNull
java.io.File root)
LocalPackagesetInstalledPath in interface LocalPackagepublic java.lang.String toString()
toString in class java.lang.Object