public boolean isApplicable(ElementPath elementPath, Attributes attributes, InterpretationContext ic) { String nestedElementTagName = elementPath.peekLast(); // calling ic.peekObject with an empty stack will throw an exception if (ic.isEmpty()) { return false; } Object o = ic.peekObject(); PropertySetter parentBean = new PropertySetter(o); parentBean.setContext(context); AggregationType aggregationType = parentBean .computeAggregationType(nestedElementTagName); switch (aggregationType) { case NOT_FOUND: case AS_BASIC_PROPERTY: case AS_BASIC_PROPERTY_COLLECTION: return false; // we only push action data if NestComponentIA is applicable case AS_COMPLEX_PROPERTY_COLLECTION: case AS_COMPLEX_PROPERTY: IADataForComplexProperty ad = new IADataForComplexProperty(parentBean, aggregationType, nestedElementTagName); actionDataStack.push(ad); return true; default: addError("PropertySetter.computeAggregationType returned " + aggregationType); return false; } }
if (ec.isEmpty()) { return false;
private URL peekPath(InterpretationContext ic) { if (!ic.isEmpty()) { Object topOfStack = ic.peekObject(); if (topOfStack instanceof State) { URL url = ((State)topOfStack).getUrl(); if (url != null) { return url; } } } return null; }
@Override public void end(InterpretationContext ic, String name) throws ActionException { if (!ic.isEmpty() && (ic.peekObject() instanceof ConditionalIncludeAction.State)) { ConditionalIncludeAction.State state = (ConditionalIncludeAction.State)ic.popObject(); URL url = state.getUrl(); if (url != null) { addInfo("Path found [" + url.toString() + "]"); try { processInclude(ic, url); } catch (JoranException e) { addError("Failed to process include [" + url.toString() + "]", e); } } else { addInfo("No paths found from includes"); } } }
public boolean isApplicable(ElementPath elementPath, Attributes attributes, InterpretationContext ic) { String nestedElementTagName = elementPath.peekLast(); // calling ic.peekObject with an empty stack will throw an exception if (ic.isEmpty()) { return false; } Object o = ic.peekObject(); PropertySetter parentBean = new PropertySetter(beanDescriptionCache, o); parentBean.setContext(context); AggregationType aggregationType = parentBean.computeAggregationType(nestedElementTagName); switch (aggregationType) { case NOT_FOUND: case AS_BASIC_PROPERTY: case AS_BASIC_PROPERTY_COLLECTION: return false; // we only push action data if NestComponentIA is applicable case AS_COMPLEX_PROPERTY_COLLECTION: case AS_COMPLEX_PROPERTY: IADataForComplexProperty ad = new IADataForComplexProperty(parentBean, aggregationType, nestedElementTagName); actionDataStack.push(ad); return true; default: addError("PropertySetter.computeAggregationType returned " + aggregationType); return false; } }
public boolean isApplicable(ElementPath elementPath, Attributes attributes, InterpretationContext ic) { String nestedElementTagName = elementPath.peekLast(); // calling ic.peekObject with an empty stack will throw an exception if (ic.isEmpty()) { return false; } Object o = ic.peekObject(); PropertySetter parentBean = new PropertySetter(beanDescriptionCache, o); parentBean.setContext(context); AggregationType aggregationType = parentBean.computeAggregationType(nestedElementTagName); switch (aggregationType) { case NOT_FOUND: case AS_BASIC_PROPERTY: case AS_BASIC_PROPERTY_COLLECTION: return false; // we only push action data if NestComponentIA is applicable case AS_COMPLEX_PROPERTY_COLLECTION: case AS_COMPLEX_PROPERTY: IADataForComplexProperty ad = new IADataForComplexProperty(parentBean, aggregationType, nestedElementTagName); actionDataStack.push(ad); return true; default: addError("PropertySetter.computeAggregationType returned " + aggregationType); return false; } }
public boolean isApplicable(ElementPath elementPath, Attributes attributes, InterpretationContext ic) { String nestedElementTagName = elementPath.peekLast(); // calling ic.peekObject with an empty stack will throw an exception if (ic.isEmpty()) { return false; } Object o = ic.peekObject(); PropertySetter parentBean = new PropertySetter(beanDescriptionCache, o); parentBean.setContext(context); AggregationType aggregationType = parentBean.computeAggregationType(nestedElementTagName); switch (aggregationType) { case NOT_FOUND: case AS_BASIC_PROPERTY: case AS_BASIC_PROPERTY_COLLECTION: return false; // we only push action data if NestComponentIA is applicable case AS_COMPLEX_PROPERTY_COLLECTION: case AS_COMPLEX_PROPERTY: IADataForComplexProperty ad = new IADataForComplexProperty(parentBean, aggregationType, nestedElementTagName); actionDataStack.push(ad); return true; default: addError("PropertySetter.computeAggregationType returned " + aggregationType); return false; } }
public boolean isApplicable(ElementPath elementPath, Attributes attributes, InterpretationContext ec) { // System.out.println("in NestedSimplePropertyIA.isApplicable [" + pattern + // "]"); String nestedElementTagName = elementPath.peekLast(); // no point in attempting if there is no parent object if (ec.isEmpty()) { return false; } Object o = ec.peekObject(); PropertySetter parentBean = new PropertySetter(beanDescriptionCache, o); parentBean.setContext(context); AggregationType aggregationType = parentBean.computeAggregationType(nestedElementTagName); switch (aggregationType) { case NOT_FOUND: case AS_COMPLEX_PROPERTY: case AS_COMPLEX_PROPERTY_COLLECTION: return false; case AS_BASIC_PROPERTY: case AS_BASIC_PROPERTY_COLLECTION: IADataForBasicProperty ad = new IADataForBasicProperty(parentBean, aggregationType, nestedElementTagName); actionDataStack.push(ad); // addInfo("NestedSimplePropertyIA deemed applicable [" + pattern + "]"); return true; default: addError("PropertySetter.canContainComponent returned " + aggregationType); return false; } }
public boolean isApplicable(ElementPath elementPath, Attributes attributes, InterpretationContext ic) { String nestedElementTagName = elementPath.peekLast(); // calling ic.peekObject with an empty stack will throw an exception if (ic.isEmpty()) { return false; } Object o = ic.peekObject(); PropertySetter parentBean = new PropertySetter(o); parentBean.setContext(context); AggregationType aggregationType = parentBean .computeAggregationType(nestedElementTagName); switch (aggregationType) { case NOT_FOUND: case AS_BASIC_PROPERTY: case AS_BASIC_PROPERTY_COLLECTION: return false; // we only push action data if NestComponentIA is applicable case AS_COMPLEX_PROPERTY_COLLECTION: case AS_COMPLEX_PROPERTY: IADataForComplexProperty ad = new IADataForComplexProperty(parentBean, aggregationType, nestedElementTagName); actionDataStack.push(ad); return true; default: addError("PropertySetter.computeAggregationType returned " + aggregationType); return false; } }
if (ec.isEmpty()) { return false;
public boolean isApplicable(Pattern pattern, Attributes attributes, InterpretationContext ic) { String nestedElementTagName = pattern.peekLast(); // calling ic.peekObject with an empty stack will throw an exception if (ic.isEmpty()) { return false; } Object o = ic.peekObject(); PropertySetter parentBean = new PropertySetter(o); parentBean.setContext(context); AggregationType aggregationType = parentBean .computeAggregationType(nestedElementTagName); switch (aggregationType) { case NOT_FOUND: case AS_BASIC_PROPERTY: case AS_BASIC_PROPERTY_COLLECTION: return false; // we only push action data if NestComponentIA is applicable case AS_COMPLEX_PROPERTY_COLLECTION: case AS_COMPLEX_PROPERTY: IADataForComplexProperty ad = new IADataForComplexProperty(parentBean, aggregationType, nestedElementTagName); actionDataStack.push(ad); return true; default: addError("PropertySetter.computeAggregationType returned " + aggregationType); return false; } }
public boolean isApplicable(ElementPath elementPath, Attributes attributes, InterpretationContext ic) { String nestedElementTagName = elementPath.peekLast(); // calling ic.peekObject with an empty stack will throw an exception if (ic.isEmpty()) { return false; } Object o = ic.peekObject(); PropertySetter parentBean = new PropertySetter(o); parentBean.setContext(context); AggregationType aggregationType = parentBean .computeAggregationType(nestedElementTagName); switch (aggregationType) { case NOT_FOUND: case AS_BASIC_PROPERTY: case AS_BASIC_PROPERTY_COLLECTION: return false; // we only push action data if NestComponentIA is applicable case AS_COMPLEX_PROPERTY_COLLECTION: case AS_COMPLEX_PROPERTY: IADataForComplexProperty ad = new IADataForComplexProperty(parentBean, aggregationType, nestedElementTagName); actionDataStack.push(ad); return true; default: addError("PropertySetter.computeAggregationType returned " + aggregationType); return false; } }
public boolean isApplicable(ElementPath elementPath, Attributes attributes, InterpretationContext ec) { // System.out.println("in NestedSimplePropertyIA.isApplicable [" + pattern + // "]"); String nestedElementTagName = elementPath.peekLast(); // no point in attempting if there is no parent object if (ec.isEmpty()) { return false; } Object o = ec.peekObject(); PropertySetter parentBean = new PropertySetter(beanDescriptionCache, o); parentBean.setContext(context); AggregationType aggregationType = parentBean.computeAggregationType(nestedElementTagName); switch (aggregationType) { case NOT_FOUND: case AS_COMPLEX_PROPERTY: case AS_COMPLEX_PROPERTY_COLLECTION: return false; case AS_BASIC_PROPERTY: case AS_BASIC_PROPERTY_COLLECTION: IADataForBasicProperty ad = new IADataForBasicProperty(parentBean, aggregationType, nestedElementTagName); actionDataStack.push(ad); // addInfo("NestedSimplePropertyIA deemed applicable [" + pattern + "]"); return true; default: addError("PropertySetter.canContainComponent returned " + aggregationType); return false; } }
public boolean isApplicable(ElementPath elementPath, Attributes attributes, InterpretationContext ec) { // System.out.println("in NestedSimplePropertyIA.isApplicable [" + pattern + // "]"); String nestedElementTagName = elementPath.peekLast(); // no point in attempting if there is no parent object if (ec.isEmpty()) { return false; } Object o = ec.peekObject(); PropertySetter parentBean = new PropertySetter(beanDescriptionCache, o); parentBean.setContext(context); AggregationType aggregationType = parentBean.computeAggregationType(nestedElementTagName); switch (aggregationType) { case NOT_FOUND: case AS_COMPLEX_PROPERTY: case AS_COMPLEX_PROPERTY_COLLECTION: return false; case AS_BASIC_PROPERTY: case AS_BASIC_PROPERTY_COLLECTION: IADataForBasicProperty ad = new IADataForBasicProperty(parentBean, aggregationType, nestedElementTagName); actionDataStack.push(ad); // addInfo("NestedSimplePropertyIA deemed applicable [" + pattern + "]"); return true; default: addError("PropertySetter.canContainComponent returned " + aggregationType); return false; } }
if (ec.isEmpty()) { return false;
if (ec.isEmpty()) { return false;
public boolean isApplicable(Pattern pattern, Attributes attributes, InterpretationContext ic) { String nestedElementTagName = pattern.peekLast(); // calling ic.peekObject with an empty stack will throw an exception if (ic.isEmpty()) { return false; } Object o = ic.peekObject(); PropertySetter parentBean = new PropertySetter(o); parentBean.setContext(context); AggregationType aggregationType = parentBean .computeAggregationType(nestedElementTagName); switch (aggregationType) { case NOT_FOUND: case AS_BASIC_PROPERTY: case AS_BASIC_PROPERTY_COLLECTION: return false; // we only push action data if NestComponentIA is applicable case AS_COMPLEX_PROPERTY_COLLECTION: case AS_COMPLEX_PROPERTY: IADataForComplexProperty ad = new IADataForComplexProperty(parentBean, aggregationType, nestedElementTagName); actionDataStack.push(ad); return true; default: addError("PropertySetter.computeAggregationType returned " + aggregationType); return false; } }
public boolean isApplicable(Pattern pattern, Attributes attributes, InterpretationContext ic) { String nestedElementTagName = pattern.peekLast(); // calling ic.peekObject with an empty stack will throw an exception if (ic.isEmpty()) { return false; } Object o = ic.peekObject(); PropertySetter parentBean = new PropertySetter(o); parentBean.setContext(context); AggregationType aggregationType = parentBean .computeAggregationType(nestedElementTagName); switch (aggregationType) { case NOT_FOUND: case AS_BASIC_PROPERTY: case AS_BASIC_PROPERTY_COLLECTION: return false; // we only push action data if NestComponentIA is applicable case AS_COMPLEX_PROPERTY_COLLECTION: case AS_COMPLEX_PROPERTY: IADataForComplexProperty ad = new IADataForComplexProperty(parentBean, aggregationType, nestedElementTagName); actionDataStack.push(ad); return true; default: addError("PropertySetter.computeAggregationType returned " + aggregationType); return false; } }
if (ec.isEmpty()) { return false;
if (ec.isEmpty()) { return false;