Added missing properties display un property check page.
This commit is contained in:
parent
01ba2e0ac8
commit
6f6f9d17c8
2 changed files with 39 additions and 3 deletions
|
@ -148,7 +148,7 @@ public class PropertyChecker
|
|||
this.serviceRules.add("service.logo", URL, PropertyMode.WISHED);
|
||||
this.serviceRules.add("service.contact.url", URL, PropertyMode.WISHED);
|
||||
this.serviceRules.add("service.contact.email", EMAIL, PropertyMode.WISHED);
|
||||
this.serviceRules.add("^service\\.socialnetworks\\.\\S+$", URL, PropertyMode.WISHED);
|
||||
this.serviceRules.add("^service\\.socialnetworks\\.\\S+$", URL, PropertyMode.OPTIONAL);
|
||||
this.serviceRules.add("service.legal.url", URL, PropertyMode.WISHED);
|
||||
this.serviceRules.add("service.guide.user", URL, PropertyMode.WISHED);
|
||||
this.serviceRules.add("service.guide.technical", URL, PropertyMode.WISHED);
|
||||
|
@ -190,7 +190,9 @@ public class PropertyChecker
|
|||
result = new PropertyChecks();
|
||||
|
||||
//
|
||||
for (PropertyRule rule : rules.getMandatories())
|
||||
PropertyRules requiredRules = rules.getMandatories();
|
||||
requiredRules.addAll(rules.getWished());
|
||||
for (PropertyRule rule : requiredRules)
|
||||
{
|
||||
boolean ended = false;
|
||||
Iterator<String> iterator = lines.iterator();
|
||||
|
@ -214,7 +216,18 @@ public class PropertyChecker
|
|||
else
|
||||
{
|
||||
ended = true;
|
||||
PropertyCheck check = new PropertyCheck(0, rule.getPathPattern().replaceAll("\\\\.", "."), Status.ERROR, "Propriété manquante");
|
||||
Status status;
|
||||
switch (rule.getMode())
|
||||
{
|
||||
default:
|
||||
case MANDATORY:
|
||||
status = Status.ERROR;
|
||||
break;
|
||||
case WISHED:
|
||||
status = Status.WARNING;
|
||||
break;
|
||||
}
|
||||
PropertyCheck check = new PropertyCheck(0, rule.getPathPattern().replaceAll("\\\\.", "."), status, "Propriété manquante");
|
||||
result.add(check);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -124,4 +124,27 @@ public class PropertyRules extends ArrayList<PropertyRule>
|
|||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the wished.
|
||||
*
|
||||
* @return the wished
|
||||
*/
|
||||
public PropertyRules getWished()
|
||||
{
|
||||
PropertyRules result;
|
||||
|
||||
result = new PropertyRules();
|
||||
|
||||
for (PropertyRule rule : this)
|
||||
{
|
||||
if (rule.isWished())
|
||||
{
|
||||
result.add(rule);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue