Merged DEV\EXTENSIONS to HEAD

svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/DEV/EXTENSIONS@4868 svn://svn.alfresco.com:3691/alfresco/BRANCHES/DEV/EXTENSIONS@4869 .
   svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/DEV/EXTENSIONS@4904 svn://svn.alfresco.com:3691/alfresco/BRANCHES/DEV/EXTENSIONS@4938 .
   Module management support
   Modularization of Records Management


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4956 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-01-29 14:43:37 +00:00
parent 0e3da160a2
commit f047c6baaf
42 changed files with 3324 additions and 664 deletions

View File

@@ -30,10 +30,11 @@ import java.util.List;
import java.util.Locale;
import java.util.Properties;
import java.util.ResourceBundle;
import java.util.StringTokenizer;
import javax.transaction.UserTransaction;
import net.sf.acegisecurity.Authentication;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.i18n.I18NUtil;
import org.alfresco.repo.security.authentication.AuthenticationComponent;
@@ -249,21 +250,8 @@ public class ImporterBootstrap extends AbstractLifecycleBean
public void setLocale(String locale)
{
// construct locale
StringTokenizer t = new StringTokenizer(locale, "_");
int tokens = t.countTokens();
if (tokens == 1)
{
this.locale = new Locale(locale);
}
else if (tokens == 2)
{
this.locale = new Locale(t.nextToken(), t.nextToken());
}
else if (tokens == 3)
{
this.locale = new Locale(t.nextToken(), t.nextToken(), t.nextToken());
}
this.locale = I18NUtil.parseLocale(locale);
// store original
strLocale = locale;
}
@@ -333,6 +321,7 @@ public class ImporterBootstrap extends AbstractLifecycleBean
}
UserTransaction userTransaction = transactionService.getUserTransaction();
Authentication authentication = authenticationComponent.getCurrentAuthentication();
authenticationComponent.setSystemUserAsCurrentUser();
try
@@ -448,7 +437,7 @@ public class ImporterBootstrap extends AbstractLifecycleBean
}
finally
{
try {authenticationComponent.clearCurrentSecurityContext(); } catch (Throwable ex) {}
try {authenticationComponent.setCurrentAuthentication(authentication); } catch (Throwable ex) {}
}
}