@Override protected void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final IElementTagStructureHandler structureHandler) { // Nothing to do, this processor is just a marker. Simply remove the attribute final AttributeName attributeName = getMatchingAttributeName().getMatchingAttributeName(); structureHandler.removeAttribute(attributeName); }
protected void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { final String newAttributeValue = EscapedAttributeUtils.escapeAttribute(getTemplateMode(), expressionResult == null ? null : expressionResult.toString()); // These attributes are "removable if empty", so we simply remove the target attribute... if (newAttributeValue == null || newAttributeValue.length() == 0) { // We are removing the equivalent attribute name, without the prefix... structureHandler.removeAttribute(this.targetAttributeDefinition.getAttributeName()); structureHandler.removeAttribute(attributeName); } else { // We are setting the equivalent attribute name, without the prefix... StandardProcessorUtils.replaceAttribute( structureHandler, attributeName, this.targetAttributeDefinition, this.targetAttrCompleteName, (newAttributeValue == null ? "" : newAttributeValue)); } }
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { final String newAttributeValue = EscapedAttributeUtils.escapeAttribute(getTemplateMode(), expressionResult == null ? null : expressionResult.toString()); // These attributes might be "removable if empty", in which case we would simply remove the target attribute... if (this.removeIfEmpty && (newAttributeValue == null || newAttributeValue.length() == 0)) { // We are removing the equivalent attribute name, without the prefix... structureHandler.removeAttribute(this.targetAttributeDefinition.getAttributeName()); structureHandler.removeAttribute(attributeName); } else { // We are setting the equivalent attribute name, without the prefix... StandardProcessorUtils.replaceAttribute( structureHandler, attributeName, this.targetAttributeDefinition, this.targetAttrCompleteName, (newAttributeValue == null ? "" : newAttributeValue)); } }
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { final String newAttributeValue = EscapedAttributeUtils.escapeAttribute(getTemplateMode(), expressionResult == null ? null : expressionResult.toString()); // These attributes might be "removable if empty", in which case we would simply remove the target attributes... if (this.removeIfEmpty && (newAttributeValue == null || newAttributeValue.length() == 0)) { // We are removing the equivalent attribute name, without the prefix... structureHandler.removeAttribute(this.attributeOneDefinition.getAttributeName()); structureHandler.removeAttribute(this.attributeTwoDefinition.getAttributeName()); } else { // We are setting the equivalent attribute name, without the prefix... StandardProcessorUtils.setAttribute(structureHandler, this.attributeOneDefinition, this.attributeOneCompleteName, newAttributeValue); StandardProcessorUtils.setAttribute(structureHandler, this.attributeTwoDefinition, this.attributeTwoCompleteName, newAttributeValue); } }
@Override protected final void doProcess( final ITemplateContext context, final IProcessableElementTag tag, final AttributeName attributeName, final String attributeValue, final Object expressionResult, final IElementTagStructureHandler structureHandler) { if (EvaluationUtils.evaluateAsBoolean(expressionResult)) { StandardProcessorUtils.setAttribute(structureHandler, this.targetAttributeDefinition, this.targetAttributeCompleteName, this.targetAttributeCompleteName); } else { structureHandler.removeAttribute(this.targetAttributeDefinition.getAttributeName()); } }
structureHandler.removeAttribute(attributeName);
structureHandler.setAttribute(newAttributeName, newAttributeName); } else { structureHandler.removeAttribute(newAttributeName); structureHandler.removeAttribute(newAttributeName);
structureHandler.removeAttribute(attributeName); return; structureHandler.removeAttribute(newAttributeName); structureHandler.removeAttribute(attributeName); } else {
structureHandler.removeAttribute(attributeName); return;
structureHandler.removeAttribute(attributeName);
@Override protected void doProcess(ITemplateContext iTemplateContext, IProcessableElementTag iProcessableElementTag, AttributeName attributeName, String attributeValue, IElementTagStructureHandler iElementTagStructureHandler) { if (ShiroFacade.isUser()) { iElementTagStructureHandler.removeAttribute(attributeName); } else { iElementTagStructureHandler.removeElement(); } } }
@Override protected void doProcess(ITemplateContext iTemplateContext, IProcessableElementTag iProcessableElementTag, AttributeName attributeName, String attributeValue, IElementTagStructureHandler iElementTagStructureHandler) { if (ShiroFacade.isUser()) { iElementTagStructureHandler.removeAttribute(attributeName); } else { iElementTagStructureHandler.removeElement(); } } }
@Override protected void doProcess(ITemplateContext iTemplateContext, IProcessableElementTag iProcessableElementTag, AttributeName attributeName, String attributeValue, IElementTagStructureHandler iElementTagStructureHandler) { if (ShiroFacade.isAuthenticated()) { iElementTagStructureHandler.removeAttribute(attributeName); } else { iElementTagStructureHandler.removeElement(); } } }
@Override protected void doProcess(ITemplateContext iTemplateContext, IProcessableElementTag iProcessableElementTag, AttributeName attributeName, String attributeValue, IElementTagStructureHandler iElementTagStructureHandler) { if (ShiroFacade.isNotAuthenticated()) { iElementTagStructureHandler.removeAttribute(attributeName); } else { iElementTagStructureHandler.removeElement(); } } }
@Override protected void doProcess(ITemplateContext iTemplateContext, IProcessableElementTag iProcessableElementTag, AttributeName attributeName, String attributeValue, IElementTagStructureHandler iElementTagStructureHandler) { if (ShiroFacade.isGuest()) { iElementTagStructureHandler.removeAttribute(attributeName); } else { iElementTagStructureHandler.removeElement(); } } }
@Override protected void doProcess(ITemplateContext iTemplateContext, IProcessableElementTag iProcessableElementTag, AttributeName attributeName, String attributeValue, IElementTagStructureHandler iElementTagStructureHandler) { if (ShiroFacade.isNotAuthenticated()) { iElementTagStructureHandler.removeAttribute(attributeName); } else { iElementTagStructureHandler.removeElement(); } } }
@Override protected void doProcess(ITemplateContext iTemplateContext, IProcessableElementTag iProcessableElementTag, AttributeName attributeName, String attributeValue, IElementTagStructureHandler iElementTagStructureHandler) { if (ShiroFacade.isAuthenticated()) { iElementTagStructureHandler.removeAttribute(attributeName); } else { iElementTagStructureHandler.removeElement(); } } }
@Override protected void doProcess(ITemplateContext iTemplateContext, IProcessableElementTag iProcessableElementTag, AttributeName attributeName, String attributeValue, IElementTagStructureHandler iElementTagStructureHandler) { if (ShiroFacade.isGuest()) { iElementTagStructureHandler.removeAttribute(attributeName); } else { iElementTagStructureHandler.removeElement(); } } }
@Override protected void doProcess(ITemplateContext iTemplateContext, IProcessableElementTag iProcessableElementTag, AttributeName attributeName, String attributeValue, IElementTagStructureHandler iElementTagStructureHandler) { final String rawValue = getRawValue(iProcessableElementTag, attributeName); final List<String> values = evaluateAsStringsWithDelimiter(iTemplateContext, rawValue, DELIMITER); if (ShiroFacade.hasAllRoles(values)) { iElementTagStructureHandler.removeAttribute(attributeName); } else { iElementTagStructureHandler.removeElement(); } } }
@Override protected void doProcess(ITemplateContext iTemplateContext, IProcessableElementTag iProcessableElementTag, AttributeName attributeName, String attributeValue, IElementTagStructureHandler iElementTagStructureHandler) { final String rawValue = getRawValue(iProcessableElementTag, attributeName); final List<String> values = evaluateAsStringsWithDelimiter(iTemplateContext, rawValue, DELIMITER); if (ShiroFacade.hasAnyRoles(values)) { iElementTagStructureHandler.removeAttribute(attributeName); } else { iElementTagStructureHandler.removeElement(); } } }