jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kooper <sergeysach...@list.ru>
Subject RMI NodeType export
Date Fri, 17 Apr 2009 11:58:40 GMT

Hi,
Does anyone know how I can export Node types via RMI? 
I am able to export them through local repository:
FileWriter writer = new FileWriter(destFile);
	        NamespaceRegistry namespaceReg =
jcrSession.getWorkspace().getNamespaceRegistry();
	        NodeTypeManagerImpl ntm = (NodeTypeManagerImpl)
jcrSession.getWorkspace().getNodeTypeManager();
	        NodeTypeRegistry ntr = ntm.getNodeTypeRegistry();
	        Set custom = new HashSet();
	        Name[] names = ntr.getRegisteredNodeTypes();
	        for (int i=0; i<names.length; i++) {
	            if (!ntr.isBuiltIn(names[i])) {
	                custom.add(ntr.getNodeTypeDef(names[i]));
	            }
	        }
	        SessionNamespaceResolver sessionNamespaceResolver = new
SessionNamespaceResolver(jcrSession);
	        NodeTypeDef[] defs = (NodeTypeDef[]) custom.toArray(new
NodeTypeDef[custom.size()]);
	        CompactNodeTypeDefWriter.write(Arrays.asList(defs),
sessionNamespaceResolver, new
DefaultNamePathResolver(sessionNamespaceResolver), writer);

but cannot find any example via RMI. Are there any posobility to do export
via RMI?
Thanks.
-- 
View this message in context: http://www.nabble.com/RMI-NodeType-export-tp23096118p23096118.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message