public class SrampModelUtils extends Object
| Constructor and Description |
|---|
SrampModelUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Relationship |
addGenericRelationship(BaseArtifactType artifact,
String relationshipType,
String targetUUID)
Adds a new generic
Relationship to the artifact. |
static String |
getCustomProperty(BaseArtifactType artifact,
String propName)
Gets the value of one of the s-ramp custom properties.
|
static Relationship |
getGenericRelationship(BaseArtifactType artifact,
String relationshipType)
Gets the generic relationship from the artifact (by type).
|
static boolean |
isDocumentArtifact(BaseArtifactType artifact)
Returns true if the artifact is a Document style artifact (has content).
|
static boolean |
isTextDocumentArtifact(DocumentArtifactType artifact)
Returns true if the artifact has text content.
|
static void |
setCustomProperty(BaseArtifactType artifact,
String propName,
String propValue)
Convenience method to help set a custom s-ramp property on the given artifact.
|
public static void setCustomProperty(BaseArtifactType artifact, String propName, String propValue)
artifact - propName - propValue - public static String getCustomProperty(BaseArtifactType artifact, String propName)
artifact - the s-ramp artifactpropName - the name of the custom propertypublic static Relationship addGenericRelationship(BaseArtifactType artifact, String relationshipType, String targetUUID)
Relationship to the artifact.artifact - relationshipType - targetUUID - Relationshippublic static Relationship getGenericRelationship(BaseArtifactType artifact, String relationshipType)
artifact - the s-ramp artifactrelationshipType - the relationship typepublic static boolean isDocumentArtifact(BaseArtifactType artifact)
artifact - public static boolean isTextDocumentArtifact(DocumentArtifactType artifact)
artifact - Copyright © 2011–2013 JBoss, a division of Red Hat. All rights reserved.