public abstract class FakePackage extends java.lang.Object implements RepoPackage
RepoPackage for use in unit tests, that contains some behavior (e.g. around
FakeRemotePackage.FakeArchive) to make it a little easier to work with in some situations
than a plain mock would be.
Probably you want FakePackage.FakeLocalPackage or FakePackage.FakeRemotePackage.| Modifier and Type | Class and Description |
|---|---|
static class |
FakePackage.FakeLocalPackage
A fake
LocalPackage for use in unit tests. |
static class |
FakePackage.FakeRemotePackage
A fake
RemotePackage for use in unit tests. |
PATH_SEPARATOR| Constructor and Description |
|---|
FakePackage(java.lang.String path) |
| 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 other) |
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.
|
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.
|
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 |
setDependencies(java.util.Collection<Dependency> dependencies) |
void |
setDisplayName(java.lang.String displayName) |
void |
setLicense(License license) |
void |
setObsolete(boolean obsolete) |
void |
setRevision(Revision revision) |
void |
setTypeDetails(TypeDetails details) |
java.lang.String |
toString() |
public 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 RepoPackagepublic void setDisplayName(@NonNull
java.lang.String displayName)
@Nullable public License getLicense()
RepoPackageLicense, if any, associated with this package.getLicense in interface RepoPackagepublic void setLicense(@Nullable
License license)
@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 RepoPackagepublic void setObsolete(boolean obsolete)
@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 other)
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.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic void setDependencies(@NonNull
java.util.Collection<Dependency> dependencies)
public void setRevision(@NonNull
Revision revision)