com.citytechinc.cq.component.content.Content Maven / Gradle / Ivy
package com.citytechinc.cq.component.content;
import com.citytechinc.cq.component.util.Constants;
import com.citytechinc.cq.component.xml.AbstractXmlElement;
import com.citytechinc.cq.component.xml.NameSpacedAttribute;
import java.util.List;
/**
* Based on http://dev.day.com/docs/en/cq/current/developing/components.html
*/
public class Content extends AbstractXmlElement {
private final List allowedChildren;
private final List allowedParents;
private final String componentGroup;
private final NameSpacedAttribute cellName;
private final NameSpacedAttribute isContainer;
private final NameSpacedAttribute noDecoration;
private final NameSpacedAttribute templatePath;
private final String dialogPath;
private final NameSpacedAttribute created;
private final NameSpacedAttribute description;
private final NameSpacedAttribute title;
private final NameSpacedAttribute resourceSuperType;
private final String className;
public Content(ContentParameters parameters) {
super(parameters);
allowedChildren = parameters.getAllowedChildren();
allowedParents = parameters.getAllowedParents();
componentGroup = parameters.getComponentGroup();
cellName =
new NameSpacedAttribute(Constants.CQ_NS_URI, Constants.CQ_NS_PREFIX, parameters.getCellName());
isContainer =
new NameSpacedAttribute(Constants.CQ_NS_URI, Constants.CQ_NS_PREFIX, parameters.getIsContainer());
noDecoration =
new NameSpacedAttribute(Constants.CQ_NS_URI, Constants.CQ_NS_PREFIX, parameters.getNoDecoration());
templatePath =
new NameSpacedAttribute(Constants.CQ_NS_URI, Constants.CQ_NS_PREFIX, parameters.getTemplatePath());
dialogPath = parameters.getDialogPath();
created =
new NameSpacedAttribute(Constants.JCR_NS_URI, Constants.JCR_NS_PREFIX, parameters.getCreated());
description =
new NameSpacedAttribute(Constants.JCR_NS_URI, Constants.JCR_NS_PREFIX, parameters.getDescription());
title = new NameSpacedAttribute(Constants.JCR_NS_URI, Constants.JCR_NS_PREFIX, parameters.getTitle());
resourceSuperType =
new NameSpacedAttribute(Constants.SLING_NS_URI, Constants.SLING_NS_PREFIX,
parameters.getResourceSuperType());
className = parameters.getClassName();
}
public List getAllowedChildren() {
return allowedChildren;
}
public List getAllowedParents() {
return allowedParents;
}
public String getClassName() {
return className;
}
public String getComponentGroup() {
return componentGroup;
}
public NameSpacedAttribute getCellName() {
return cellName;
}
public NameSpacedAttribute getIsContainer() {
return isContainer;
}
public NameSpacedAttribute getNoDecoration() {
return noDecoration;
}
public NameSpacedAttribute getTemplatePath() {
return templatePath;
}
public String getDialogPath() {
return dialogPath;
}
public NameSpacedAttribute getCreated() {
return created;
}
public NameSpacedAttribute getDescription() {
return description;
}
public NameSpacedAttribute getTitle() {
return title;
}
public NameSpacedAttribute getResourceSuperType() {
return resourceSuperType;
}
}