01: package com.bostechcorp.cbesb.runtime.component.parser;
02:
03: public enum ParserPropertiesEnumeration {
04: PARSER_TYPE {
05: String getValue(ParserEndpoint endpoint) {
06: return endpoint.getParserType();
07: }
08:
09: void setValue(ParserEndpoint endpoint, Object value) {
10: if (isSetable())
11: endpoint.setParserType((String) value);
12: }
13:
14: boolean isSetable() {
15: return true;
16: }
17: },
18:
19: MSG_DEF {
20: String getValue(ParserEndpoint endpoint) {
21: return endpoint.getMsgDef();
22: }
23:
24: void setValue(ParserEndpoint endpoint, Object value) {
25: if (isSetable())
26: endpoint.setMsgDef((String) value);
27: }
28:
29: boolean isSetable() {
30: return true;
31: }
32: };
33: /**
34: *
35: * @param endpoint --
36: * endpoint in use
37: * @return - attribute value according to enumeration item
38: */
39: abstract String getValue(ParserEndpoint endpoint);
40:
41: /**
42: *
43: * @param endpoint--
44: * endpoint in use
45: * @param value -
46: * sets attribute value according to enumeration item
47: */
48: abstract void setValue(ParserEndpoint endpoint, Object value);
49:
50: /**
51: * tells either is possible or not to set the value false if the attribute
52: * is read only
53: *
54: * @return
55: */
56: abstract boolean isSetable();
57: }
|