Search in sources :

Example 1 with ReturnValue

use of org.danann.cernunnos.ReturnValue in project uPortal by Jasig.

the class GenerateEntityFileNameTask method perform.

/* (non-Javadoc)
     * @see org.danann.cernunnos.Phrase#evaluate(org.danann.cernunnos.TaskRequest, org.danann.cernunnos.TaskResponse)
     */
@Override
public void perform(TaskRequest req, TaskResponse res) {
    final Element rootElement = (Element) entityElement.evaluate(req, res);
    final IUserLayoutStore rdbmdls = (IUserLayoutStore) layoutStore.evaluate(req, res);
    SupportedFileTypes y = SupportedFileTypes.getApplicableFileType(rootElement, rdbmdls);
    String entityFileName = y.getSafeFileNameWithExtension(rootElement);
    ReturnValue rslt = (ReturnValue) req.getAttribute(Attributes.RETURN_VALUE);
    rslt.setValue(entityFileName);
}
Also used : Element(org.dom4j.Element) ReturnValue(org.danann.cernunnos.ReturnValue) IUserLayoutStore(org.apereo.portal.layout.IUserLayoutStore)

Aggregations

IUserLayoutStore (org.apereo.portal.layout.IUserLayoutStore)1 ReturnValue (org.danann.cernunnos.ReturnValue)1 Element (org.dom4j.Element)1