|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.dsrg.sofa.repository.RepositoryUtil
public class RepositoryUtil
Contains convenient static methods for working with the repository.
Nested Class Summary | |
---|---|
static class |
RepositoryUtil.ConnectionKind
Constants for connection pseudo-kinds. |
Field Summary | |
---|---|
static char |
VERSIONDELIMITER
|
Constructor Summary | |
---|---|
RepositoryUtil()
|
Method Summary | |
---|---|
static boolean |
containsName(java.util.List<? extends NamedEntity> list,
java.lang.String name)
Tests if the given list contains an entity with the given name |
static boolean |
containsNamedEntity(java.lang.String name,
org.eclipse.emf.common.util.EList<NamedEntity> listOfEntities)
Returns true if the given list contains object with the given name. |
static java.util.List<Interface> |
getAllInterfaces(Architecture arch)
Returns a list with all interfaces of all frames of the given architecture. |
static java.util.List<Interface> |
getAllProvidedInterfaces(Architecture arch)
Returns a list with all provided interfaces of all frames of the given architecture. |
static java.util.List<Interface> |
getAllRequiredInterfaces(Architecture arch)
Returns a list with all required interfaces of all frames of the given architecture. |
static RepositoryUtil.ConnectionKind |
getConnectionKind(Connection con)
Returns pseudo-kind of a connection. |
static InstanceDeploymentDescription |
getDeploymentSubcomponentByName(InstanceDeploymentDescription instance,
java.lang.String subCompName)
Returns subcomponent with the given name |
static Interface |
getInterfaceOfArchitecture(java.lang.String name,
Architecture arch)
Returns architecture's interface with the given name |
static Interface |
getInterfaceOfFrame(java.lang.String name,
Frame frame)
Returns frames's interface with the given name |
static VersionedEntity |
getLastHeadVersion(java.lang.String name,
RepositoryQuery rq)
Returns the last head version of the given object or null if object does not exist. |
static java.lang.String[] |
getNameAndVersionParts(java.lang.String name_versionOrTag)
Splits name and version/tag literal into separate strings. |
static NamedEntity |
getNamedEntityInEList(java.lang.String name,
org.eclipse.emf.common.util.EList<NamedEntity> listOfEntities)
Searches named entity in the given list. |
static Interface |
getProvidedInterfaceByName(java.lang.String name,
Frame frame)
Return provided frame's interface with the given name. |
static Interface |
getRequiredInterfaceByName(java.lang.String name,
Frame frame)
Return required frame's interface with the given name. |
static java.util.List<VersionedEntity> |
lookupEntitiesByUserToken(java.lang.String token,
RepositoryQuery rq)
Looks up entity specified by name,version,tag or wildcard. |
static java.util.List<VersionedEntity> |
lookupEntitiesByUserTokens(java.lang.String[] tokens,
RepositoryQuery rq)
Looks up entities specified by names,versions,tags or wildcards. |
static java.util.List<VersionedEntity> |
lookupEntitiesByUserTokens(java.lang.String tokens,
RepositoryQuery rq)
Looks up entities specified by names,versions,tags or wildcards. |
static java.util.List<VersionedEntity> |
lookupNamedEntityByName(java.lang.String name,
RepositoryQuery rq)
Looks up all entities with the given name. |
static VersionedEntity |
lookupNamedEntityByTag(java.lang.String name,
java.lang.String tag,
RepositoryQuery rq)
Looks up entity with given name and version tag. |
static VersionedEntity |
lookupNamedEntityByVersion(java.lang.String name,
java.lang.String version,
RepositoryQuery rq)
Looks up entity with given name and version. |
static VersionedEntity |
lookupNamedEntityByVersionOrTag(java.lang.String name,
java.lang.String versionOrTag,
RepositoryQuery rq)
Looks up entity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char VERSIONDELIMITER
Constructor Detail |
---|
public RepositoryUtil()
Method Detail |
---|
public static boolean containsNamedEntity(java.lang.String name, org.eclipse.emf.common.util.EList<NamedEntity> listOfEntities)
true
if the given list contains object with the given name.
name
- namelistOfEntities
- list of NamedEntities
true
if the given list contains oject with the given namepublic static NamedEntity getNamedEntityInEList(java.lang.String name, org.eclipse.emf.common.util.EList<NamedEntity> listOfEntities)
name
- name of the entitylistOfEntities
- list of named entities
null
public static java.util.List<VersionedEntity> lookupNamedEntityByName(java.lang.String name, RepositoryQuery rq)
name
- name of an entityrq
- repository query object
null
public static VersionedEntity lookupNamedEntityByVersion(java.lang.String name, java.lang.String version, RepositoryQuery rq)
name
- name of an entityversion
- versionrq
- repository query object
null
public static VersionedEntity lookupNamedEntityByTag(java.lang.String name, java.lang.String tag, RepositoryQuery rq)
name
- name of an entitytag
- version tagrq
- repository query object
null
public static VersionedEntity lookupNamedEntityByVersionOrTag(java.lang.String name, java.lang.String versionOrTag, RepositoryQuery rq)
name
- name of an entityversionOrTag
- version or version tag identifier of an entityrq
- repository query object
null
public static VersionedEntity getLastHeadVersion(java.lang.String name, RepositoryQuery rq)
null
if object does not exist.
name
- name of the given objectrq
- repository query object
null
public static java.util.List<Interface> getAllProvidedInterfaces(Architecture arch)
arch
- architecture
public static java.util.List<Interface> getAllRequiredInterfaces(Architecture arch)
arch
- architecture
public static java.util.List<Interface> getAllInterfaces(Architecture arch)
arch
- architecture
public static RepositoryUtil.ConnectionKind getConnectionKind(Connection con)
con
- connection
public static Interface getInterfaceOfArchitecture(java.lang.String name, Architecture arch)
name
- interface namearch
- architecture
null
public static Interface getInterfaceOfFrame(java.lang.String name, Frame frame)
name
- interface nameframe
- frame
null
public static Interface getProvidedInterfaceByName(java.lang.String name, Frame frame)
name
- interface nameframe
- frame
null
public static Interface getRequiredInterfaceByName(java.lang.String name, Frame frame)
name
- interface nameframe
- frame
null
public static boolean containsName(java.util.List<? extends NamedEntity> list, java.lang.String name)
list
- list of named entitiesname
- name
true
if the given list contains an entity with the given namepublic static InstanceDeploymentDescription getDeploymentSubcomponentByName(InstanceDeploymentDescription instance, java.lang.String subCompName)
instance
- instance descriptionsubCompName
- subcomponent name
null
public static java.util.List<VersionedEntity> lookupEntitiesByUserTokens(java.lang.String tokens, RepositoryQuery rq) throws EntityNotFoundException
tokens
- String in form of "name1:version1;name2:tag1;nameprefix*;..."rq
- repository query object
EntityNotFoundException
public static java.util.List<VersionedEntity> lookupEntitiesByUserTokens(java.lang.String[] tokens, RepositoryQuery rq) throws EntityNotFoundException
tokens
- Strings in form of name1:version1, name2:tag1, nameprefix* ...rq
- repository query object
EntityNotFoundException
public static java.util.List<VersionedEntity> lookupEntitiesByUserToken(java.lang.String token, RepositoryQuery rq)
token
- String in form of name1:version1, name2:tag1 or nameprefix*rq
- repository query object
public static java.lang.String[] getNameAndVersionParts(java.lang.String name_versionOrTag)
name_versionOrTag
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |