Merged 5.0.N (5.0.3) to HEAD (5.1)

110010: Merged 5.0.2 (5.0.2) to 5.0.N (5.0.3)
      109966: SysAdminParams INFO logging when setAllowWrite is changed to 'false' (MNT-14579)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@110016 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-08-13 08:00:22 +00:00
parent f00b22bbbf
commit 734bcdd99b

View File

@@ -25,6 +25,8 @@ import java.util.StringTokenizer;
import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.service.license.LicenseService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.context.ApplicationContext;
@@ -35,6 +37,8 @@ import org.springframework.context.ApplicationContextAware;
*/
public class SysAdminParamsImpl implements SysAdminParams, ApplicationContextAware, InitializingBean
{
private static Log logger = LogFactory.getLog(SysAdminParams.class);
/** Token name to substitute current servers DNS name or TCP/IP address into a host name **/
private static final String TOKEN_LOCAL_NAME = "${localname}";
@@ -111,6 +115,10 @@ public class SysAdminParamsImpl implements SysAdminParams, ApplicationContextAwa
{
licenseService = (LicenseService) this.ctx.getBean("licenseService");
this.allowWrite = licenseService.isLicenseValid();
if (logger.isInfoEnabled())
{
logger.info("'allowWrite' being set to false: licenseService.isLicenseValid() returned false.");
}
}
catch (NoSuchBeanDefinitionException e)
{
@@ -172,6 +180,13 @@ public class SysAdminParamsImpl implements SysAdminParams, ApplicationContextAwa
public void setAllowWrite(boolean allowWrite)
{
this.allowWrite = allowWrite;
if (!allowWrite)
{
if (logger.isInfoEnabled())
{
logger.info("'allowWrite' being set to false: Bean property setter.");
}
}
}
@Override