private Set<String> getTypes() {
    OrcsTypes orcsTypes = orcsApi.getOrcsTypes();
    ArtifactTypes artifactTypes = orcsTypes.getArtifactTypes();
    Set<String> toReturn = new HashSet<>();

    for (IArtifactType type : artifactTypes.getAll()) {
      toReturn.add(type.getName());
    }
    return toReturn;
  }
Beispiel #2
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;
  }