NodeTypeManager mgr = session.getWorkspace().getNodeTypeManager();
NodeTypeIterator it = mgr.getAllNodeTypes();
while (it.hasNext()) {
NodeType type = it.nextNodeType();
JcrNodeType jcrType = new JcrNodeType();
jcrType.setName(type.getName());
jcrType.setAbstract(type.isAbstract());
jcrType.setPrimary(!type.isMixin());
jcrType.setMixin(type.isMixin());
list.add(jcrType);
}
} catch (Exception e) {
throw new RemoteException(e.getMessage());
}