use of com.agiletec.plugins.jacms.aps.system.services.resource.parse.ResourceDOM in project entando-core by entando.
the class AbstractMonoInstanceResource method getXML.
@Override
public String getXML() {
ResourceDOM resourceDom = this.getResourceDOM();
resourceDom.addInstance(this.getInstance().getJDOMElement());
return resourceDom.getXMLDocument();
}
use of com.agiletec.plugins.jacms.aps.system.services.resource.parse.ResourceDOM in project entando-core by entando.
the class AbstractMultiInstanceResource method getXML.
/**
* Restituisce l'xml completo della risorsa.
* @return L'xml completo della risorsa.
*/
@Override
public String getXML() {
ResourceDOM resourceDom = this.getResourceDOM();
List<ResourceInstance> instances = new ArrayList<ResourceInstance>(this.getInstances().values());
for (int i = 0; i < instances.size(); i++) {
ResourceInstance currentInstance = instances.get(i);
resourceDom.addInstance(currentInstance.getJDOMElement());
}
return resourceDom.getXMLDocument();
}
use of com.agiletec.plugins.jacms.aps.system.services.resource.parse.ResourceDOM in project entando-core by entando.
the class AbstractResource method getResourceDOM.
/**
* Restituisce la classe dom (necessaria per la generazione dell'xml della risorsa)
* preparata con gli attributi base della risorsa.
* @return La classe dom preparata con gli attributi base della risorsa.
*/
protected ResourceDOM getResourceDOM() {
ResourceDOM resourceDom = this.getNewResourceDOM();
resourceDom.setTypeCode(this.getType());
resourceDom.setId(this.getId());
resourceDom.setDescription(this.getDescription());
resourceDom.setMainGroup(this.getMainGroup());
resourceDom.setMasterFileName(this.getMasterFileName());
if (null != this.getCategories()) {
for (int i = 0; i < this.getCategories().size(); i++) {
Category cat = (Category) this.getCategories().get(i);
resourceDom.addCategory(cat.getCode());
}
}
return resourceDom;
}
Aggregations