public abstract class License
extends java.lang.Object
| Constructor and Description |
|---|
License() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkAccepted(java.io.File repositoryRoot,
FileOp fop)
Checks whether this license has previously been accepted.
|
boolean |
equals(java.lang.Object obj) |
abstract java.lang.String |
getId()
Gets the ID of this license, used to refer to it from within a
RepoPackage. |
java.lang.String |
getLicenseHash()
Returns the hash of the license text, used for persisting acceptance.
|
java.lang.String |
getType()
Gets the type of the license.
|
abstract java.lang.String |
getValue()
Gets the text of the license.
|
int |
hashCode() |
boolean |
setAccepted(java.io.File repositoryRoot,
FileOp fop)
Marks this license as accepted.
|
abstract void |
setId(java.lang.String id)
Sets the ID of this license, used to refer to it from within a
RepoPackage. |
void |
setType(java.lang.String type)
Sets the type of the license.
|
abstract void |
setValue(java.lang.String value)
Sets the text of the license.
|
java.lang.String |
toString()
Returns a string representation of the license, useful for debugging.
|
@NonNull public abstract java.lang.String getId()
RepoPackage.public abstract void setId(@NonNull
java.lang.String id)
RepoPackage.@NonNull public abstract java.lang.String getValue()
public abstract void setValue(java.lang.String value)
@Nullable public java.lang.String getType()
"text" is valid.public void setType(@Nullable
java.lang.String type)
"text" is valid.@NonNull public java.lang.String getLicenseHash()
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(@Nullable
java.lang.Object obj)
equals in class java.lang.Objectpublic boolean checkAccepted(@Nullable
java.io.File repositoryRoot,
@NonNull
FileOp fop)
repositoryRoot - The root directory of the repositorypublic boolean setAccepted(@Nullable
java.io.File repositoryRoot,
@NonNull
FileOp fop)
repositoryRoot - The root directory of the repository