mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
SE.S62 Share - DM Remote Store migration patch - WIP
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28814 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -332,6 +332,10 @@ public class ADMRemoteStore extends BaseRemoteStore
|
|||||||
logger.debug("createDocument: " + fileInfo.toString());
|
logger.debug("createDocument: " + fileInfo.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
catch (AccessDeniedException ae)
|
||||||
|
{
|
||||||
|
res.setStatus(Status.STATUS_UNAUTHORIZED);
|
||||||
|
}
|
||||||
catch (FileExistsException feeErr)
|
catch (FileExistsException feeErr)
|
||||||
{
|
{
|
||||||
res.setStatus(Status.STATUS_CONFLICT);
|
res.setStatus(Status.STATUS_CONFLICT);
|
||||||
@@ -645,9 +649,15 @@ public class ADMRemoteStore extends BaseRemoteStore
|
|||||||
{
|
{
|
||||||
// remap the path into the appropriate Sites or site relative folder location
|
// remap the path into the appropriate Sites or site relative folder location
|
||||||
// by first matching the path to appropriate user or site regex
|
// by first matching the path to appropriate user or site regex
|
||||||
|
final boolean debug = logger.isDebugEnabled();
|
||||||
String userId = null;
|
String userId = null;
|
||||||
String siteName = null;
|
String siteName = null;
|
||||||
Matcher matcher;
|
Matcher matcher;
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
// user data is stored directly under the Sites folder along with
|
||||||
|
// other generic config files - there is actually no need to match
|
||||||
|
// anything other than site specific config other than for debug
|
||||||
if ((matcher = USER_PATTERN_1.matcher(path)).matches())
|
if ((matcher = USER_PATTERN_1.matcher(path)).matches())
|
||||||
{
|
{
|
||||||
userId = matcher.group(1);
|
userId = matcher.group(1);
|
||||||
@@ -664,18 +674,20 @@ public class ADMRemoteStore extends BaseRemoteStore
|
|||||||
{
|
{
|
||||||
siteName = matcher.group(1);
|
siteName = matcher.group(1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if ((matcher = SITE_PATTERN_1.matcher(path)).matches())
|
||||||
|
{
|
||||||
|
siteName = matcher.group(1);
|
||||||
|
}
|
||||||
|
else if ((matcher = SITE_PATTERN_2.matcher(path)).matches())
|
||||||
|
{
|
||||||
|
siteName = matcher.group(1);
|
||||||
|
}
|
||||||
|
|
||||||
NodeRef surfConfigRef = null;
|
NodeRef surfConfigRef = null;
|
||||||
if (userId != null)
|
if (siteName != null)
|
||||||
{
|
{
|
||||||
if (logger.isDebugEnabled())
|
if (debug) logger.debug("...resolved site path id: " + siteName);
|
||||||
logger.debug("...resolved user path id: " + userId);
|
|
||||||
surfConfigRef = getSurfConfigNodeRef(getRootNodeRef(), create);
|
|
||||||
}
|
|
||||||
else if (siteName != null)
|
|
||||||
{
|
|
||||||
if (logger.isDebugEnabled())
|
|
||||||
logger.debug("...resolved site path id: " + siteName);
|
|
||||||
NodeRef siteRef = getSiteNodeRef(siteName);
|
NodeRef siteRef = getSiteNodeRef(siteName);
|
||||||
if (siteRef != null)
|
if (siteRef != null)
|
||||||
{
|
{
|
||||||
@@ -684,8 +696,17 @@ public class ADMRemoteStore extends BaseRemoteStore
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (logger.isDebugEnabled())
|
if (debug)
|
||||||
|
{
|
||||||
|
if (userId != null)
|
||||||
|
{
|
||||||
|
logger.debug("...resolved user path id: " + userId);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
logger.debug("...resolved to generic path.");
|
logger.debug("...resolved to generic path.");
|
||||||
|
}
|
||||||
|
}
|
||||||
surfConfigRef = getSurfConfigNodeRef(getRootNodeRef(), create);
|
surfConfigRef = getSurfConfigNodeRef(getRootNodeRef(), create);
|
||||||
}
|
}
|
||||||
return surfConfigRef;
|
return surfConfigRef;
|
||||||
|
Reference in New Issue
Block a user