Пример #1
0
 @Override
 public AttributeData create(ArtifactData parent, IAttributeType attributeType)
     throws OseeCoreException {
   VersionData version = objectFactory.createDefaultVersionData();
   version.setBranchId(parent.getVersion().getBranchId());
   ModificationType modType = RelationalConstants.DEFAULT_MODIFICATION_TYPE;
   Integer attributeid = RelationalConstants.DEFAULT_ITEM_ID;
   return objectFactory.createAttributeData(
       version, attributeid, attributeType, modType, parent.getLocalId());
 }
Пример #2
0
 @Override
 public RelationData introduce(IOseeBranch destination, RelationData source) {
   RelationData newVersion = objectFactory.createCopy(source);
   newVersion.setUseBackingData(true);
   updateDataForIntroduce(destination, newVersion);
   return newVersion;
 }
Пример #3
0
 @Override
 public AttributeData introduce(IOseeBranch destination, AttributeData source)
     throws OseeCoreException {
   AttributeData newVersion = objectFactory.createCopy(source);
   newVersion.setUseBackingData(true);
   updateDataForIntroduce(destination, newVersion);
   return newVersion;
 }
Пример #4
0
 @Override
 public ArtifactData copy(IOseeBranch destination, ArtifactData source) throws OseeCoreException {
   ArtifactData copy = objectFactory.createCopy(source);
   updateDataForCopy(destination, copy);
   copy.setGuid(idFactory.getUniqueGuid(null));
   copy.setLocalId(idFactory.getNextArtifactId());
   return copy;
 }
Пример #5
0
 @Override
 public AttributeData copy(IOseeBranch destination, AttributeData orcsData)
     throws OseeCoreException {
   AttributeData copy = objectFactory.createCopy(orcsData);
   updateDataForCopy(destination, copy);
   copy.setLocalId(RelationalConstants.DEFAULT_ITEM_ID);
   return copy;
 }
Пример #6
0
 @Override
 public RelationData createRelationData(
     IRelationType relationType,
     IOseeBranch branch,
     HasLocalId<Integer> aArt,
     HasLocalId<Integer> bArt,
     String rationale)
     throws OseeCoreException {
   VersionData version = objectFactory.createDefaultVersionData();
   version.setBranchId(branch.getUuid());
   ModificationType modType = RelationalConstants.DEFAULT_MODIFICATION_TYPE;
   Integer relationId = RelationalConstants.DEFAULT_ITEM_ID;
   return objectFactory.createRelationData(
       version,
       relationId,
       relationType,
       modType,
       aArt.getLocalId(),
       bArt.getLocalId(),
       rationale);
 }
Пример #7
0
  @Override
  public ArtifactData create(IOseeBranch branch, IArtifactType token, String guid, long uuid)
      throws OseeCoreException {
    Conditions.checkNotNull(branch, "branch");

    Conditions.checkExpressionFailOnTrue(
        artifactCache.isAbstract(token), "Cannot create an instance of abstract type [%s]", token);

    String guidToSet = idFactory.getUniqueGuid(guid);

    Conditions.checkExpressionFailOnTrue(
        !GUID.isValid(guidToSet),
        "Invalid guid [%s] during artifact creation [type: %s]",
        guidToSet,
        token);

    VersionData version = objectFactory.createDefaultVersionData();
    version.setBranchId(branch.getUuid());

    ModificationType modType = RelationalConstants.DEFAULT_MODIFICATION_TYPE;
    ArtifactData artifactData =
        objectFactory.createArtifactData(version, (int) uuid, token, modType, guidToSet);
    return artifactData;
  }
Пример #8
0
 @Override
 public RelationData clone(RelationData source) throws OseeCoreException {
   return objectFactory.createCopy(source);
 }
Пример #9
0
 @Override
 public AttributeData clone(AttributeData source) throws OseeCoreException {
   return objectFactory.createCopy(source);
 }
Пример #10
0
 @Override
 public ArtifactData clone(ArtifactData source) {
   return objectFactory.createCopy(source);
 }