Search in sources :

Example 1 with JavascriptContent

use of org.asqatasun.entity.audit.JavascriptContent in project Asqatasun by Asqatasun.

the class JSHandlerImpl method initialize.

private void initialize() {
    if (initialized) {
        return;
    }
    XStream xStream = new XStream();
    XStream.setupDefaultSecurity(xStream);
    xStream.allowTypesByWildcard(new String[] { "org.asqatasun.**" });
    for (RelatedContent relatedContent : ssp.getRelatedContentSet()) {
        if (relatedContent instanceof JavascriptContent) {
            if (javaScriptSet == null) {
                javaScriptSet = new HashSet<>();
            }
            javaScriptSet.addAll((Set<JSResource>) xStream.fromXML(((JavascriptContent) relatedContent).getAdaptedContent()));
        }
    }
    initialized = true;
}
Also used : XStream(com.thoughtworks.xstream.XStream) JavascriptContent(org.asqatasun.entity.audit.JavascriptContent) JSResource(org.asqatasun.contentadapter.js.JSResource) RelatedContent(org.asqatasun.entity.audit.RelatedContent)

Aggregations

XStream (com.thoughtworks.xstream.XStream)1 JSResource (org.asqatasun.contentadapter.js.JSResource)1 JavascriptContent (org.asqatasun.entity.audit.JavascriptContent)1 RelatedContent (org.asqatasun.entity.audit.RelatedContent)1