Author: deepal
Date: Thu Feb 7 01:40:30 2008
New Revision: 13392
Log:
supporting "/tags" and "/comments"
fixing REGISTRY-115
Modified:
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/app/AtomRegistry.java
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/jdbc/dao/VersionedResourceDAO.java
Modified:
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/app/AtomRegistry.java
==============================================================================
---
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/app/AtomRegistry.java
(original)
+++
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/app/AtomRegistry.java
Thu Feb 7 01:40:30 2008
@@ -53,6 +53,7 @@
public class AtomRegistry extends AbstractProvider implements Provider,
APPConstants {
private Log log = LogFactory.getLog(AtomRegistry.class);
+ public static final String SECURE_REGISTRY = "secureRegistry";
private Registry jdbcregistry;
private RegistryRealm realm;
@@ -315,6 +316,11 @@
Abdera abdera = request.getAbdera();
String baseURI = request.getBaseUri().toString();
String entry_id = getRealPath(request);
+ if ("/tags".equals(entry_id)) {
+ entry_id = "/;tags";
+ } else if ("/comments".equals(entry_id)){
+ entry_id = "/;comments";
+ }
int idx = entry_id.indexOf(RegistryConstants.URL_SEPARATOR);
String resourcePath = entry_id.substring(0, (idx == -1) ?
entry_id.length() : idx);
Modified:
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/jdbc/dao/VersionedResourceDAO.java
==============================================================================
---
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/jdbc/dao/VersionedResourceDAO.java
(original)
+++
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/jdbc/dao/VersionedResourceDAO.java
Thu Feb 7 01:40:30 2008
@@ -735,7 +735,11 @@
byte[] bytes = convertToBytes(content);
statement.setBytes(3, bytes);
- statement.setString(4, resource.getLastUpdaterUserName());
+ String userName = resource.getLastUpdaterUserName();
+ if(userName == null){
+ userName = User.getCurrentUser();
+ }
+ statement.setString(4, userName);
statement.setTimestamp(5, new Timestamp(System.currentTimeMillis()));
statement.executeUpdate();
@@ -1012,6 +1016,9 @@
Resource resource = new Resource();
resource.setId(resourceID);
+ if(lastUpdaterUserName == null){
+ lastUpdaterUserName = User.getCurrentUser();
+ }
resource.setLastUpdaterUserName(lastUpdaterUserName);
resource.setLastModified(new Date(lastModifiedTime));
insertToVersionTable(resource, connection);
_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev