..iniciante no JackRabbit

0 respostas
breffo

…pessoal bom dia,

…estou iniciando no JackRabbit http://jackrabbit.apache.org/ e estou tentando montar uma rotina de importação de arquivo, tem como fazer o JackRabbit importar um arquivo da máquina cliente ??? …consegui executar esse rotina:

public Node importFile (Node folderNode, File file, String mimeType, String encoding) throws RepositoryException, IOException
    {
        //create the file node
        Node fileNode = folderNode.addNode (file.getName (), "nt:file");
        
        //create the mandatory child node - jcr:content
        Node resNode = fileNode.addNode ("jcr:content", "nt:resource");
        resNode.setProperty ("jcr:mimeType", mimeType);
        resNode.setProperty ("jcr:encoding", encoding);
        resNode.setProperty ("jcr:data", new FileInputStream (file));
        Calendar lastModified = Calendar.getInstance ();
        lastModified.setTimeInMillis (file.lastModified ());
        resNode.setProperty ("jcr:lastModified", lastModified);

        return fileNode;
    }

…no entanto gostaria de saber se tem como fazer o servior (JackRabbit) buscar o arquivo…
…grato qualquer ajuda!!! :roll:

Criado 21 de dezembro de 2007
Respostas 0
Participantes 1