Rename getNames to getCaptionFor

FEA: ItEr60S04ValidacionEProbasFuncionaisItEr59S04
This commit is contained in:
Óscar González Fernández 2010-09-20 00:53:09 +02:00
parent fa59ac32e1
commit 6cd332f6d8
9 changed files with 12 additions and 12 deletions

View file

@ -111,7 +111,7 @@ public class Criterion extends IntegrationEntity implements ICriterion {
* @param criteria
* @return
*/
public static String getNames(Collection<? extends Criterion> criteria) {
public static String getCaptionFor(Collection<? extends Criterion> criteria) {
List<String> names = new ArrayList<String>();
for (Criterion each: criteria) {
names.add(each.getName());

View file

@ -234,7 +234,7 @@ public class LimitingResourcesController extends GenericForwardComposer {
} else if (resourceAllocation instanceof GenericResourceAllocation) {
Set<Criterion> criteria = ((GenericResourceAllocation) resourceAllocation)
.getCriterions();
return Criterion.getNames(criteria);
return Criterion.getCaptionFor(criteria);
}
return StringUtils.EMPTY;
}

View file

@ -211,7 +211,7 @@ public class QueueComponent extends XulElement implements
result.append(_("Resource: {0} ", specific.getResource().getName()));
} else if (resourceAllocation instanceof GenericResourceAllocation) {
final GenericResourceAllocation generic = (GenericResourceAllocation) resourceAllocation;
result.append(_("Criteria: {0} ", Criterion.getNames(generic.getCriterions())));
result.append(_("Criteria: {0} ", Criterion.getCaptionFor(generic.getCriterions())));
}
result.append(_("Allocation: [{0},{1}]", element.getStartDate()
.toString(), element.getEndDate()));

View file

@ -923,7 +923,7 @@ public class AdvancedAllocationController extends GenericForwardComposer {
GenericResourceAllocation genericResourceAllocation,
Restriction restriction, TaskElement task) {
return Row.createRow(messages, restriction, Criterion
.getNames(genericResourceAllocation.getCriterions()), 1, Arrays
.getCaptionFor(genericResourceAllocation.getCriterions()), 1, Arrays
.asList(genericResourceAllocation), genericResourceAllocation
.isLimiting(), task);
}

View file

@ -500,13 +500,13 @@ public class FormBinder {
Level.ERROR,
_(
"there are no resources for required criteria: {0}. So the generic allocation can't be added",
Criterion.getNames(criterions)));
Criterion.getCaptionFor(criterions)));
}
public void markThereisAlreadyAssignmentWith(Set<Criterion> criterions) {
messagesForUser.showMessage(Level.ERROR, _(
"already exists an allocation for criteria {0}",
Criterion.getNames(criterions)));
Criterion.getCaptionFor(criterions)));
}
public void markEndDateMustBeAfterStartDate() {

View file

@ -58,7 +58,7 @@ public class GenericAllocationRow extends AllocationRow {
GenericAllocationRow result = createDefault();
result.criterions = criterions;
result.resources = new ArrayList<Resource>(resources);
result.setName(Criterion.getNames(criterions));
result.setName(Criterion.getCaptionFor(criterions));
return result;
}
@ -72,7 +72,7 @@ public class GenericAllocationRow extends AllocationRow {
result.criterions = resourceAllocation.getCriterions();
result.resources = resourceDAO.findSatisfyingAllCriterionsAtSomePoint(result.criterions);
result.setName(Criterion.getNames(result.criterions));
result.setName(Criterion.getCaptionFor(result.criterions));
return result;
}

View file

@ -138,7 +138,7 @@ public class LimitingAllocationRow {
final AllocationType type = getAllocationType();
if (AllocationType.GENERIC_WORKERS.equals(type)) {
final GenericResourceAllocation generic = (GenericResourceAllocation) resourceAllocation;
return Criterion.getNames(generic.getCriterions());
return Criterion.getCaptionFor(generic.getCriterions());
}
if (AllocationType.SPECIFIC.equals(type)) {
return formatResources(resourceAllocation.getAssociatedResources());

View file

@ -108,7 +108,7 @@ public class LimitingResourceAllocationModel implements ILimitingResourceAllocat
.showMessage(Level.ERROR,
_("there are no resources for required criteria: {0}. " +
"So the generic allocation can't be added",
Criterion.getNames(criteria)));
Criterion.getCaptionFor(criteria)));
}
if (resources.size() >= 1) {

View file

@ -537,7 +537,7 @@ public class ResourceLoadModel implements IResourceLoadModel {
for (CriterionSatisfaction satisfaction : satisfactions) {
criterions.add(satisfaction.getCriterion());
}
return " :: " + Criterion.getNames(criterions);
return " :: " + Criterion.getCaptionFor(criterions);
}
private LoadTimeLine createPrincipal(Criterion criterion,
@ -758,7 +758,7 @@ public class ResourceLoadModel implements IResourceLoadModel {
public static String getName(Collection<? extends Criterion> criterions,
Task task) {
String prefix = task.getName();
return (prefix + " :: " + Criterion.getNames(criterions));
return (prefix + " :: " + Criterion.getCaptionFor(criterions));
}
private LoadTimeLine buildTimeLine(Resource resource, String name,