@Override public String getPropertyWithVariableReplacement( SecurityContext securityContext, ActionContext renderContext, PropertyKey<String> key) throws FrameworkException { return SchemaHelper.getPropertyWithVariableReplacement( securityContext, this, renderContext, key); }
@Override public String replaceVariables( final SecurityContext securityContext, final ActionContext actionContext, final Object rawValue) throws FrameworkException { return SchemaHelper.replaceVariables(securityContext, this, actionContext, rawValue); }
@Override public void onNodeDeletion() { final String signature = getResourceSignature(); if (StringUtils.isNotBlank(signature)) { SchemaHelper.removeDynamicGrants(getResourceSignature()); } // register transaction post processing that recreates the schema information TransactionCommand.postProcess("reloadSchema", new ReloadSchema()); }
@Override public Element createElement(final String tag) throws DOMException { final String elementType = StringUtils.capitalize(tag); final App app = StructrApp.getInstance(securityContext); String c = Content.class.getSimpleName(); // Avoid creating an (invalid) 'Content' DOMElement if (elementType == null || c.equals(elementType)) { logger.log(Level.WARNING, "Blocked attempt to create a DOMElement of type {0}", c); return null; } final Page _page = this; // create new content element DOMElement element; try { final Class entityClass = SchemaHelper.getEntityClassForRawType(elementType); if (entityClass != null) { element = (DOMElement) app.create(entityClass, new NodeAttribute(DOMElement.tag, tag)); element.doAdopt(_page); return element; } } catch (FrameworkException ex) { logger.log(Level.SEVERE, null, ex); } return null; }