-1
나는 야외 문서 라이브러리 폴더에 저장하는 문서를 생성해야하는 활동 워크 플로에서 한 단계, 문서를 만들었지 만 문서를 저장할 때 사용합니다. 내가, 참조폴더를 만들고 자바 위임을 사용하여 야외에 문서를 저장하는 방법
나는 야외 문서 라이브러리 폴더에 저장하는 문서를 생성해야하는 활동 워크 플로에서 한 단계, 문서를 만들었지 만 문서를 저장할 때 사용합니다. 내가, 참조폴더를 만들고 자바 위임을 사용하여 야외에 문서를 저장하는 방법
함께 도와주세요 수없는 문서 라이브러리 내가 자바에 자동으로 문서를 만드는 데 사용하는 방법이이 나를
public static void main(String args[]) {
String serverUrl = args[0];
String username = args[1];
String password = args[2];
Session session = getSession(serverUrl, username, password);
Folder root = session.getRootFolder();
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.OBJECT_TYPE_ID, BaseTypeId.CMIS_
DOCUMENT.value());
String name = "New Document (" + System.currentTimeMillis() +
").txt";
properties.put(PropertyIds.NAME, name);
List<Ace> addAces = new LinkedList<Ace>();
List<Ace> removeAces = new LinkedList<Ace>();
List<Policy> policies = new LinkedList<Policy>();
String content = "The quick brown fox jumps over the lazy dog.";
ContentStream contentStream = new ContentStreamImpl("text.txt",
BigInteger.valueOf(content.length()),
"text/plain", new ByteArrayInputStream(content.
getBytes()));
Document newDocument = root.createDocument(properties,
contentStream, VersioningState.MAJOR, policies, addAces, removeAces,
session.getDefaultContext());
System.out.println(newDocument.getId());}
을 위해 좋은 일을하려고 당신이 관심이?!? –
예, 알프레드에서 작업 공간을 만들려고했지만 시도하지 않았습니다. – Paul
JavaScript를 사용하여 문서 또는 Java를 만들지 여부를 지정하지 않았습니다. 둘 다 옵션이 있습니다. 또한 문제가 귀하의 게시물에서 무엇인지 정확하게 파악할 수 없습니다. –