You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by ju...@apache.org on 2001/05/16 14:03:02 UTC
cvs commit: jakarta-slide/src/examples/xml Test.java
juergen 01/05/16 05:03:01
Modified: src/examples/xml Test.java
Log:
removed the NRD from the API, to be put in NodePermission, see e-mails.
Revision Changes Path
1.8 +17 -26 jakarta-slide/src/examples/xml/Test.java
Index: Test.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/examples/xml/Test.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Test.java 2001/05/10 18:37:00 1.7
+++ Test.java 2001/05/16 12:02:56 1.8
@@ -40,7 +40,7 @@
*
* Copyright 1999 (C) Exoffice Technologies Inc. All Rights Reserved.
*
- * $Id: Test.java,v 1.7 2001/05/10 18:37:00 juergen Exp $
+ * $Id: Test.java,v 1.8 2001/05/16 12:02:56 juergen Exp $
*/
package xml;
@@ -69,7 +69,7 @@
try {
- token = Domain.accessNamespace(new SecurityToken(new String()),
+ token = Domain.accessNamespace(new SecurityToken(new String()),
"xml");
Structure structure = token.getStructureHelper();
@@ -77,7 +77,7 @@
Lock lock = token.getLockHelper();
Content content = token.getContentHelper();
- CredentialsToken credToken =
+ CredentialsToken credToken =
new CredentialsToken(new String("root"));
SlideToken slideToken = new SlideToken(credToken);
@@ -120,7 +120,7 @@
structure.create(slideToken, subject5, "/toto/2/3");
structure.create(slideToken, subject5, "/toto/2/3/4");
structure.create(slideToken, subject5, "/toto/2/3/4/5");
- structure.createLink(slideToken, link, "/toto/test.lnk",
+ structure.createLink(slideToken, link, "/toto/test.lnk",
subject2);
user1 = (SubjectNode) structure.retrieve(slideToken, "/users/");
structure.create(slideToken, user2, "/users/remm.user");
@@ -131,8 +131,8 @@
System.out.println("Children list for /");
- Enumeration children =
- structure.getChildren(slideToken,
+ Enumeration children =
+ structure.getChildren(slideToken,
structure.retrieve(slideToken, "/"));
while (children.hasMoreElements()) {
ObjectNode child = (ObjectNode) children.nextElement();
@@ -144,8 +144,8 @@
System.out.println("Children list for /toto");
- children =
- structure.getChildren(slideToken,
+ children =
+ structure.getChildren(slideToken,
structure.retrieve(slideToken, "/toto"));
while (children.hasMoreElements()) {
ObjectNode child = (ObjectNode) children.nextElement();
@@ -178,7 +178,7 @@
System.out.println("Link test");
- System.out.println("Resolved link to "
+ System.out.println("Resolved link to "
+ structure.retrieve
(slideToken, "/toto/test.lnk/1.txt").getUri());
@@ -244,44 +244,35 @@
Date expirationDate = new Date((new Date()).getTime() + 10000000);
- NodeLock token1 =
+ NodeLock token1 =
new NodeLock(toLock, remm, lockType, expirationDate, false);
- NodeLock token2 =
+ NodeLock token2 =
new NodeLock(toLock, dave, lockType, expirationDate, false);
- NodeLock token3 =
+ NodeLock token3 =
new NodeLock(toLock3, dave, lockAction, expirationDate, true);
- NodeLock token4 =
+ NodeLock token4 =
new NodeLock(toLock2, dave, lockAction, expirationDate, false);
System.out.println("Grant locking permission");
security.grantPermission
- (slideToken, structure.retrieve(slideToken, "/toto"),
- null, // no version specified yet
+ (slideToken, structure.retrieve(slideToken, "/toto"),
(SubjectNode) structure.retrieve(slideToken, "/users"),
lockAction);
System.out.println("Locking resource");
- lock.lock(slideToken,
- null, // no version specified yet
- token1);
+ lock.lock(slideToken, token1);
System.out.println("Lock test1 - correct");
try {
- lock.lock(slideToken,
- null, // no version specified yet
- token2);
+ lock.lock(slideToken, token2);
} catch (SlideException e) {
System.out.println("Lock test2 - correct");
}
- lock.lock(slideToken,
- null, // no version specified yet
- token3);
+ lock.lock(slideToken, token3);
System.out.println("Lock test3 - correct");
try {
- lock.lock(slideToken,
- null, // no version specified yet
- token4);
+ lock.lock(slideToken, token4);
} catch (SlideException e) {
System.out.println("Lock test4 - correct");
}