private String getEstHoursStr() throws OseeCoreException { double awaEst = awa.getSoleAttributeValue(AtsAttributeTypes.EstimatedHours, 0.0); double totalEst = awa.getEstimatedHoursTotal(); if (awaEst != totalEst) { return String.format( "%s | %s", AtsUtilCore.doubleToI18nString(awaEst), AtsUtilCore.doubleToI18nString(totalEst)); } else { return AtsUtilCore.doubleToI18nString(awaEst); } }
private static Set<IAtsActionableItem> getActionableItemsByToken( Collection<IArtifactToken> aiArtifactTokens) throws OseeCoreException { Set<IAtsActionableItem> aias = new HashSet<IAtsActionableItem>(); for (IArtifactToken token : aiArtifactTokens) { Artifact aiArt = ArtifactQuery.getArtifactFromId(token.getGuid(), AtsUtilCore.getAtsBranchToken()); if (aiArt != null) { IAtsActionableItem item = AtsClientService.get().getConfigObject(aiArt); aias.add(item); } } return aias; }
@Override public AtsArtifactConfigCache call() throws Exception { AtsArtifactConfigCache cache = new AtsArtifactConfigCache(); List<IArtifactType> typesToLoad = getTypesToLoad(); List<Artifact> artifactListFromType = ArtifactQuery.getArtifactListFromType( typesToLoad, AtsUtilCore.getAtsBranchToken(), DeletionFlag.EXCLUDE_DELETED); for (Artifact artifact : artifactListFromType) { loadAtsConfigCacheArtifacts(artifactStore, cache, artifact); } return cache; }
protected Artifact getArtifactOrCreate( AtsArtifactConfigCache cache, IArtifactType artifactType, IAtsConfigObject atsObject, SkynetTransaction transaction) throws OseeCoreException { Artifact artifact = cache.getArtifact(atsObject); if (artifact == null) { artifact = ArtifactTypeManager.addArtifact( artifactType, AtsUtilCore.getAtsBranchToken(), atsObject.getName(), atsObject.getGuid(), atsObject.getHumanReadableId()); artifact.persist(transaction); } return artifact; }