Merged 5.2.N (5.2.1) to HEAD (5.2)

125783 rmunteanu: Merged 5.1.N (5.1.2) to 5.2.N (5.2.1)
      125605 rmunteanu: Merged 5.1.1 (5.1.1) to 5.1.N (5.1.2)
         125498 slanglois: MNT-16155 Update source headers - remove svn:eol-style property on Java and JSP source files


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@127809 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-06-03 16:45:04 +00:00
parent 4818f7ccf5
commit 22512d8c9e
265 changed files with 44099 additions and 44099 deletions

View File

@@ -1,73 +1,73 @@
package org.alfresco.web.ui.common.component.debug;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import javax.faces.context.FacesContext;
import org.alfresco.repo.admin.patch.AppliedPatch;
import org.alfresco.repo.admin.patch.PatchService;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.descriptor.Descriptor;
import org.alfresco.service.descriptor.DescriptorService;
import org.alfresco.web.app.Application;
import org.alfresco.web.bean.repository.Repository;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.jsf.FacesContextUtils;
/**
* Component which displays the Alfresco Repository properties
*
* @author kevinr
*/
public class UIRepositoryProperties extends BaseDebugComponent
{
/**
* @see javax.faces.component.UIComponent#getFamily()
*/
public String getFamily()
{
return "org.alfresco.faces.debug.RepositoryProperties";
}
/**
* @see org.alfresco.web.ui.common.component.debug.BaseDebugComponent#getDebugData()
*/
@SuppressWarnings("unchecked")
public Map getDebugData()
{
// note: sort properties
Map properties = new TreeMap();
FacesContext fc = FacesContext.getCurrentInstance();
ServiceRegistry services = Repository.getServiceRegistry(fc);
DescriptorService descriptorService = services.getDescriptorService();
Descriptor installedRepoDescriptor = descriptorService.getInstalledRepositoryDescriptor();
properties.put("Installed Version", installedRepoDescriptor.getVersion());
properties.put("Installed Schema", installedRepoDescriptor.getSchema());
Descriptor systemDescriptor = descriptorService.getServerDescriptor();
properties.put("Server Version", systemDescriptor.getVersion());
properties.put("Server Schema", systemDescriptor.getSchema());
WebApplicationContext cx = FacesContextUtils.getRequiredWebApplicationContext(fc);
PatchService patchService = (PatchService)cx.getBean("PatchService");
List<AppliedPatch> patches = patchService.getPatches(null, null);
for (AppliedPatch patch : patches)
{
StringBuilder data = new StringBuilder(256);
data.append(patch.getAppliedOnDate())
.append(" - ")
.append(patch.getDescription())
.append(" - ")
.append(patch.getSucceeded() == true ?
Application.getMessage(fc, "repository_patch_succeeded") :
Application.getMessage(fc, "repository_patch_failed"));
properties.put(patch.getId(), data);
}
return properties;
}
}
package org.alfresco.web.ui.common.component.debug;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import javax.faces.context.FacesContext;
import org.alfresco.repo.admin.patch.AppliedPatch;
import org.alfresco.repo.admin.patch.PatchService;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.descriptor.Descriptor;
import org.alfresco.service.descriptor.DescriptorService;
import org.alfresco.web.app.Application;
import org.alfresco.web.bean.repository.Repository;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.jsf.FacesContextUtils;
/**
* Component which displays the Alfresco Repository properties
*
* @author kevinr
*/
public class UIRepositoryProperties extends BaseDebugComponent
{
/**
* @see javax.faces.component.UIComponent#getFamily()
*/
public String getFamily()
{
return "org.alfresco.faces.debug.RepositoryProperties";
}
/**
* @see org.alfresco.web.ui.common.component.debug.BaseDebugComponent#getDebugData()
*/
@SuppressWarnings("unchecked")
public Map getDebugData()
{
// note: sort properties
Map properties = new TreeMap();
FacesContext fc = FacesContext.getCurrentInstance();
ServiceRegistry services = Repository.getServiceRegistry(fc);
DescriptorService descriptorService = services.getDescriptorService();
Descriptor installedRepoDescriptor = descriptorService.getInstalledRepositoryDescriptor();
properties.put("Installed Version", installedRepoDescriptor.getVersion());
properties.put("Installed Schema", installedRepoDescriptor.getSchema());
Descriptor systemDescriptor = descriptorService.getServerDescriptor();
properties.put("Server Version", systemDescriptor.getVersion());
properties.put("Server Schema", systemDescriptor.getSchema());
WebApplicationContext cx = FacesContextUtils.getRequiredWebApplicationContext(fc);
PatchService patchService = (PatchService)cx.getBean("PatchService");
List<AppliedPatch> patches = patchService.getPatches(null, null);
for (AppliedPatch patch : patches)
{
StringBuilder data = new StringBuilder(256);
data.append(patch.getAppliedOnDate())
.append(" - ")
.append(patch.getDescription())
.append(" - ")
.append(patch.getSucceeded() == true ?
Application.getMessage(fc, "repository_patch_succeeded") :
Application.getMessage(fc, "repository_patch_failed"));
properties.put(patch.getId(), data);
}
return properties;
}
}