Merged DEV/WCM_SERVICES2 to HEAD

12236: Implementation of Sandbox Revert REST API
  12305: WCM Services - "asset service" initial checkpoint (more tests to be added)
  12334: placeholder for WCM Asset implementation
  12338: Check in to get server working ...
  12341: WCM Services - "asset service" checkpoint (locking fixes, bulk import, more tests added)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12544 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2008-12-23 14:48:34 +00:00
parent c4e9d6f97b
commit eb906a0d52
23 changed files with 2709 additions and 334 deletions

View File

@@ -30,7 +30,6 @@ import org.apache.commons.logging.LogFactory;
*/
public class AVMUndoSandboxListAction extends ActionExecuterAbstractBase
{
@SuppressWarnings("unused")
private static Log fgLogger = LogFactory.getLog(AVMUndoSandboxListAction.class);
public static final String NAME = "avm-undo-list";
@@ -85,22 +84,25 @@ public class AVMUndoSandboxListAction extends ActionExecuterAbstractBase
fAVMService.makeTransparent(parentChild[0], parentChild[1]);
}
final Map<QName, PropertyValue> dnsProperties = fAVMService.queryStorePropertyKey(item.getSecond().split(":")[0], QName.createQName(null, ".dns%"));
if (dnsProperties.size() == 1)
if (desc.isFile() || desc.isDeletedFile())
{
String webProject = dnsProperties.keySet().iterator().next().getLocalName();
webProject = webProject.substring(webProject.lastIndexOf('.') + 1, webProject.length());
String path = item.getSecond().substring(item.getSecond().indexOf(":") + 1);
if (fgLogger.isDebugEnabled())
fgLogger.debug("unlocking file " + path + " in web project " + webProject);
if (fAVMLockingService.getLock(webProject, path) != null)
final Map<QName, PropertyValue> dnsProperties = fAVMService.queryStorePropertyKey(item.getSecond().split(":")[0], QName.createQName(null, ".dns%"));
if (dnsProperties.size() == 1)
{
fAVMLockingService.removeLock(webProject, path);
}
else
{
fgLogger.warn("expected file " + path + " in " + webProject + " to be locked");
String webProject = dnsProperties.keySet().iterator().next().getLocalName();
webProject = webProject.substring(webProject.lastIndexOf('.') + 1, webProject.length());
String path = item.getSecond().substring(item.getSecond().indexOf(":") + 1);
if (fgLogger.isDebugEnabled())
fgLogger.debug("unlocking file " + path + " in web project " + webProject);
if (fAVMLockingService.getLock(webProject, path) != null)
{
fAVMLockingService.removeLock(webProject, path);
}
else
{
fgLogger.warn("expected file " + path + " in " + webProject + " to be locked");
}
}
}
}