dflorey 2004/07/26 06:49:40
Modified: projector/src/java/org/apache/slide/projector/repository/webdav
WebdavRepository.java
projector/src/java/org/apache/slide/projector Projector.java
Log:
Bugfixing
Revision Changes Path
1.3 +3 -3
jakarta-slide/projector/src/java/org/apache/slide/projector/repository/webdav/WebdavRepository.java
Index: WebdavRepository.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/projector/src/java/org/apache/slide/projector/repository/webdav/WebdavRepository.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- WebdavRepository.java 23 Jul 2004 16:14:53 -0000 1.2
+++ WebdavRepository.java 26 Jul 2004 13:49:39 -0000 1.3
@@ -102,7 +102,7 @@
}
public URI createUser(String username, String password, Credentials
credentials) throws UserExistsException, IOException {
- Value userExists = getResource(new URIValue(domain+users+username),
credentials);
+ Value userExists = getResource(new URIValue(users+username), credentials);
if ( userExists == NullValue.NULL || userExists != null ) {
throw new UserExistsException(new ErrorMessage("userExists", new
String[] { username }));
} else {
@@ -113,7 +113,7 @@
httpState.setCredentials(null, host, credentials);
int state = mkcolMethod.execute(httpState, new HttpConnection(host,
port, protocol));
if ( state == HttpStatus.SC_CREATED ) {
- changePassword(new URIValue(domain+userUri), null, password,
credentials);
+ changePassword(userUri, null, password, credentials);
return userUri;
}
return null;
@@ -213,7 +213,7 @@
}
public void setProperty(URI uri, String namespace, String name, String value,
Credentials credentials) throws IOException {
- PropPatchMethod proppatchMethod = new PropPatchMethod(uri.toString());
+ PropPatchMethod proppatchMethod = new
PropPatchMethod(domain+uri.toString());
proppatchMethod.setDoAuthentication(true);
HttpState httpState = new HttpState();
httpState.setCredentials(null, host, credentials);
1.3 +4 -4
jakarta-slide/projector/src/java/org/apache/slide/projector/Projector.java
Index: Projector.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/projector/src/java/org/apache/slide/projector/Projector.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Projector.java 22 Jul 2004 13:07:21 -0000 1.2
+++ Projector.java 26 Jul 2004 13:49:40 -0000 1.3
@@ -45,6 +45,10 @@
SAXBuilder saxBuilder = new SAXBuilder();
try {
Document document = saxBuilder.build(configuration);
+ Element credentialsElement =
document.getRootElement().getChild("credentials");
+ String user = credentialsElement.getAttributeValue("user");
+ String password = credentialsElement.getAttributeValue("password");
+ credentials = new UsernamePasswordCredentials(user, password);
Element repositoryElement =
document.getRootElement().getChild("repository");
String repositoryClassname =
repositoryElement.getAttributeValue("class");
Class repositoryClass = Class.forName(repositoryClassname);
@@ -58,10 +62,6 @@
projectorDir = pathsElement.getChildText("projector");
applicationsDir = pathsElement.getChildText("applications");
workDir = pathsElement.getChildText("work");
- Element credentialsElement =
document.getRootElement().getChild("credentials");
- String user = credentialsElement.getAttributeValue("user");
- String password = credentialsElement.getAttributeValue("password");
- credentials = new UsernamePasswordCredentials(user, password);
} catch (Exception e) {
throw new ConfigurationException(new
ErrorMessage("projector/configurationFailed"), e);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]