01: package newprocess.validation;
02:
03: import newprocess.Element;
04:
05: /**
06: * @author sh
07: *
08: */
09: public class ElementValidatorImpl implements ElementValidator {
10:
11: public static final ElementValidatorImpl INSTANCE = new ElementValidatorImpl();
12:
13: /**
14: * validates the name of the Element
15: * @param act
16: * @return
17: */
18: public boolean validateName(Element act) {
19: if (act.getName() == null || act.getName() == "")
20: return false;
21: return true;
22: }
23:
24: /**
25: * validates the implementation of the Element
26: * @param act
27: * @return
28: */
29: public boolean validateImplementation(Element act) {
30: if (ImplementationValidator.INSTANCE.validate(act))
31: return true;
32: return false;
33: }
34: }
|