コード例 #1
0
 private IAtsTeamWorkflow setTargetedVersionLink(IAtsTeamWorkflow teamWf, IAtsVersion version)
     throws OseeCoreException {
   Artifact versionArt =
       ArtifactQuery.checkArtifactFromId(version.getGuid(), AtsUtilCore.getAtsBranch());
   if (versionArt != null) {
     TeamWorkFlowArtifact teamArt = TeamWorkFlowManager.getTeamWorkflowArt(teamWf);
     if (teamArt != null) {
       teamArt.setRelations(
           AtsRelationTypes.TeamWorkflowTargetedForVersion_Version,
           Collections.singleton(versionArt));
       return teamArt;
     } else {
       throw new OseeStateException(
           "Team Workflow artifact does not exist [%s]", teamWf.toStringWithId());
     }
   } else {
     throw new OseeStateException(
         "Version artifact does not exist [%s]", version.toStringWithId());
   }
 }