@Entity public class RepositoryVersionEntity extends Object
Constructor and Description |
---|
RepositoryVersionEntity() |
RepositoryVersionEntity(StackEntity stack,
String version,
String displayName,
List<RepoOsEntity> repoOsEntities) |
Modifier and Type | Method and Description |
---|---|
void |
addRepoOsEntities(List<RepoOsEntity> repoOsEntities) |
boolean |
equals(Object object) |
List<RepositoryVersionEntity> |
getChildren() |
String |
getDisplayName() |
Long |
getId() |
Long |
getParentId() |
List<RepoOsEntity> |
getRepoOsEntities() |
org.apache.ambari.spi.RepositoryVersion |
getRepositoryVersion()
Builds a
RepositoryVersion instance type from this entity. |
VersionDefinitionXml |
getRepositoryXml()
Parse the version XML into its object representation.
|
StackEntity |
getStack()
Gets the repository version's stack.
|
StackId |
getStackId() |
String |
getStackName() |
String |
getStackVersion() |
org.apache.ambari.spi.RepositoryType |
getType() |
String |
getVersion() |
String |
getVersionUrl() |
String |
getVersionXml() |
String |
getVersionXsd() |
int |
hashCode() |
boolean |
isHidden()
Gets whether this repository is hidden.
|
boolean |
isLegacy()
Deprecated.
|
boolean |
isResolved()
Gets whether this repository has been installed and has reported back its
actual version.
|
static boolean |
isVersionInStack(StackId stackId,
String version)
Determine if the version belongs to the stack.
|
void |
removePrefixFromVersion() |
void |
setDisplayName(String displayName) |
void |
setHidden(boolean isHidden)
Sets whether this repository is hidden.
|
void |
setId(Long id) |
void |
setLegacy(boolean isLegacy)
Deprecated.
|
void |
setParent(RepositoryVersionEntity entity) |
void |
setResolved(boolean resolved)
Sets whether this repository has been installed and has reported back its
actual version.
|
void |
setStack(StackEntity stack)
Sets the repository version's stack.
|
void |
setType(org.apache.ambari.spi.RepositoryType type) |
void |
setVersion(String version)
Sets the version on this repository version entity.
|
void |
setVersionUrl(String url) |
void |
setVersionXml(String xml) |
void |
setVersionXsd(String xsdLocation) |
String |
toString() |
void |
updateHostVersionEntityRelation(HostVersionEntity entity)
Update one-to-many relation without rebuilding the whole entity
|
public RepositoryVersionEntity()
public RepositoryVersionEntity(StackEntity stack, String version, String displayName, List<RepoOsEntity> repoOsEntities)
public void removePrefixFromVersion()
public void updateHostVersionEntityRelation(HostVersionEntity entity)
entity
- many-to-one entitypublic Long getId()
public void setId(Long id)
public StackEntity getStack()
public void setStack(StackEntity stack)
stack
- the stack to set for the repo version (not null
).public String getVersion()
public void setVersion(String version)
setResolved(boolean)
.version
- public String getDisplayName()
public void setDisplayName(String displayName)
public String getStackName()
public String getStackVersion()
public StackId getStackId()
public org.apache.ambari.spi.RepositoryType getType()
public void setType(org.apache.ambari.spi.RepositoryType type)
type
- the repo typepublic String getVersionXml()
public void setVersionXml(String xml)
xml
- the XML that is the basis for the versionpublic String getVersionUrl()
public void setVersionUrl(String url)
url
- the url used to load the XML.public String getVersionXsd()
public void setVersionXsd(String xsdLocation)
xsdLocation
- the XSD name extracted from XML.public VersionDefinitionXml getRepositoryXml() throws Exception
null
if the XSD (from the XML) is not available.Exception
public static boolean isVersionInStack(StackId stackId, String version)
stackId
- Stack, such as HDP-2.3version
- Version number, such as 2.3.0.0, or 2.3.0.0-1234public void setParent(RepositoryVersionEntity entity)
entity
- parent entitypublic List<RepositoryVersionEntity> getChildren()
public Long getParentId()
null
if the entity is already a parentpublic boolean isHidden()
public void setHidden(boolean isHidden)
isHidden
- public boolean isResolved()
true
if the version for this repository can be trusted,
false
otherwise.@Deprecated public boolean isLegacy()
@Deprecated public void setLegacy(boolean isLegacy)
isLegacy
- public void setResolved(boolean resolved)
resolved
- public List<RepoOsEntity> getRepoOsEntities()
public void addRepoOsEntities(List<RepoOsEntity> repoOsEntities)
public org.apache.ambari.spi.RepositoryVersion getRepositoryVersion()
RepositoryVersion
instance type from this entity.Copyright © 2022 Apache Software Foundation. All rights reserved.