void createFiles() throws RepositoryException {
NodeTypeManager manager =
session.getWorkspace().getNodeTypeManager();
NodeTypeTemplate ntt = manager.createNodeTypeTemplate();
ntt.setName("nt:saikufiles");
String[] str = new String[] { "nt:file" };
ntt.setDeclaredSuperTypeNames(str);
ntt.setMixin(true);
PropertyDefinitionTemplate pdt = manager.createPropertyDefinitionTemplate();
pdt.setName("owner");
pdt.setRequiredType(PropertyType.STRING);
PropertyDefinitionTemplate pdt2 = manager.createPropertyDefinitionTemplate();
pdt2.setName("type");
pdt2.setRequiredType(PropertyType.STRING);
PropertyDefinitionTemplate pdt4 = manager.createPropertyDefinitionTemplate();
pdt4.setName("roles");
pdt4.setRequiredType(PropertyType.STRING);
PropertyDefinitionTemplate pdt5 = manager.createPropertyDefinitionTemplate();
pdt5.setName("users");
pdt5.setRequiredType(PropertyType.STRING);
PropertyDefinitionTemplate pdt3 = manager.createPropertyDefinitionTemplate();
pdt3.setName("jcr:data");
pdt3.setRequiredType(PropertyType.STRING);
ntt.getPropertyDefinitionTemplates().add(pdt);
ntt.getPropertyDefinitionTemplates().add(pdt2);
ntt.getPropertyDefinitionTemplates().add(pdt3);
ntt.getPropertyDefinitionTemplates().add(pdt4);
ntt.getPropertyDefinitionTemplates().add(pdt5);
try {
manager.registerNodeType(ntt, false);
} catch (NodeTypeExistsException e) {
LOG.error("Node Exists", e);