mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.2 to HEAD
8078: Merged V2.1 to V2.2 8025: Fixes WCM-1039, problems with case insensitive name handling. 8079: Merged V2.1 to V2.2 8035: -- DONE SEPARATELY -- 8040: Fix AR-1985: SQL Server dialect is derived from Sybase dialect there need additional no-op script 8046: Better Javadocs for getChildByName() 8056: Fixed WCM-790: Date conversion for metadata extractors 8057: Fixed WCM-790: Properties that don't convert can be discarded (default is to fail) 8059: -- DONE SEPARATELY -- 8061: Fixes WCM-790: Fallout from CHK-2168 and CHK-2169 8081: Fix for WCM-1018 8082: Merged V2.1 to V2.2 8016: Merged V2.1-A to V2.1 8000: Additional indexes for AVM 8013: Patch to introduce reverse indexes required for AVM git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8474 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -45,6 +45,7 @@ import javax.transaction.UserTransaction;
|
|||||||
import org.alfresco.config.ConfigElement;
|
import org.alfresco.config.ConfigElement;
|
||||||
import org.alfresco.config.ConfigService;
|
import org.alfresco.config.ConfigService;
|
||||||
import org.alfresco.linkvalidation.HrefValidationProgress;
|
import org.alfresco.linkvalidation.HrefValidationProgress;
|
||||||
|
import org.alfresco.linkvalidation.LinkValidationService;
|
||||||
import org.alfresco.model.ContentModel;
|
import org.alfresco.model.ContentModel;
|
||||||
import org.alfresco.model.WCMAppModel;
|
import org.alfresco.model.WCMAppModel;
|
||||||
import org.alfresco.repo.avm.AVMNodeConverter;
|
import org.alfresco.repo.avm.AVMNodeConverter;
|
||||||
@@ -104,6 +105,7 @@ import org.alfresco.web.ui.wcm.component.UIUserSandboxes;
|
|||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
import org.springframework.web.jsf.FacesContextUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bean backing up the AVM specific browse screens
|
* Bean backing up the AVM specific browse screens
|
||||||
@@ -228,10 +230,12 @@ public class AVMBrowseBean implements IContextListener
|
|||||||
/** The SearchService reference */
|
/** The SearchService reference */
|
||||||
transient private SearchService searchService;
|
transient private SearchService searchService;
|
||||||
|
|
||||||
|
/** The LinkValidationService */
|
||||||
|
transient private LinkValidationService linkValidationService;
|
||||||
|
|
||||||
/** The PermissionService reference */
|
/** The PermissionService reference */
|
||||||
transient protected PermissionService permissionService;
|
transient protected PermissionService permissionService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default Constructor
|
* Default Constructor
|
||||||
*/
|
*/
|
||||||
@@ -320,6 +324,22 @@ public class AVMBrowseBean implements IContextListener
|
|||||||
return workflowService;
|
return workflowService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setLinkValidationService(LinkValidationService service)
|
||||||
|
{
|
||||||
|
this.linkValidationService = service;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected LinkValidationService getLinkValidationService()
|
||||||
|
{
|
||||||
|
if (linkValidationService == null)
|
||||||
|
{
|
||||||
|
linkValidationService = (LinkValidationService)FacesContextUtils.getRequiredWebApplicationContext(
|
||||||
|
FacesContext.getCurrentInstance()).getBean("LinkValidationService");
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.linkValidationService;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param searchService The Searcher to set.
|
* @param searchService The Searcher to set.
|
||||||
*/
|
*/
|
||||||
@@ -676,6 +696,14 @@ public class AVMBrowseBean implements IContextListener
|
|||||||
this.linkValidationState = state;
|
this.linkValidationState = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Determines whether the link validation service is enabled
|
||||||
|
*/
|
||||||
|
public boolean isLinkValidationEnabled()
|
||||||
|
{
|
||||||
|
return (this.getLinkValidationService().getPollInterval() > 0);
|
||||||
|
}
|
||||||
|
|
||||||
public List<AVMNodeDescriptor> getNodesForSubmit()
|
public List<AVMNodeDescriptor> getNodesForSubmit()
|
||||||
{
|
{
|
||||||
return this.nodesForSubmit;
|
return this.nodesForSubmit;
|
||||||
|
@@ -63,6 +63,7 @@ import org.alfresco.web.app.servlet.FacesHelper;
|
|||||||
import org.alfresco.web.bean.BrowseBean;
|
import org.alfresco.web.bean.BrowseBean;
|
||||||
import org.alfresco.web.bean.repository.Repository;
|
import org.alfresco.web.bean.repository.Repository;
|
||||||
import org.alfresco.web.bean.repository.User;
|
import org.alfresco.web.bean.repository.User;
|
||||||
|
import org.alfresco.web.bean.wcm.AVMBrowseBean;
|
||||||
import org.alfresco.web.bean.wcm.AVMNode;
|
import org.alfresco.web.bean.wcm.AVMNode;
|
||||||
import org.alfresco.web.bean.wcm.AVMUtil;
|
import org.alfresco.web.bean.wcm.AVMUtil;
|
||||||
import org.alfresco.web.bean.wcm.DeploymentUtil;
|
import org.alfresco.web.bean.wcm.DeploymentUtil;
|
||||||
@@ -303,7 +304,7 @@ public class UIUserSandboxes extends SelfRenderingComponent implements Serializa
|
|||||||
UserTransaction tx = null;
|
UserTransaction tx = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
tx = Repository.getUserTransaction(FacesContext.getCurrentInstance(), true);
|
tx = Repository.getUserTransaction(context, true);
|
||||||
tx.begin();
|
tx.begin();
|
||||||
|
|
||||||
NodeRef websiteRef = getValue();
|
NodeRef websiteRef = getValue();
|
||||||
@@ -323,6 +324,14 @@ public class UIUserSandboxes extends SelfRenderingComponent implements Serializa
|
|||||||
// sort the user list alphabetically and insert the current user at the top of the list
|
// sort the user list alphabetically and insert the current user at the top of the list
|
||||||
List<UserRoleWrapper> userRoleWrappers = buildSortedUserRoles(nodeService, currentUserName, userInfoRefs);
|
List<UserRoleWrapper> userRoleWrappers = buildSortedUserRoles(nodeService, currentUserName, userInfoRefs);
|
||||||
|
|
||||||
|
// determine whether the check links action should be shown
|
||||||
|
boolean linkValidationEnabled = true;
|
||||||
|
AVMBrowseBean avmBrowseBean = (AVMBrowseBean)FacesHelper.getManagedBean(context, "AVMBrowseBean");
|
||||||
|
if (avmBrowseBean != null)
|
||||||
|
{
|
||||||
|
linkValidationEnabled = avmBrowseBean.isLinkValidationEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
// determine whether the deploy action should be shown
|
// determine whether the deploy action should be shown
|
||||||
boolean deployServersConfigured = false;
|
boolean deployServersConfigured = false;
|
||||||
List<NodeRef> deployToServers = DeploymentUtil.findTestServers(websiteRef, false);
|
List<NodeRef> deployToServers = DeploymentUtil.findTestServers(websiteRef, false);
|
||||||
@@ -447,6 +456,8 @@ public class UIUserSandboxes extends SelfRenderingComponent implements Serializa
|
|||||||
menu.getChildren().clear();
|
menu.getChildren().clear();
|
||||||
|
|
||||||
// Check Links action
|
// Check Links action
|
||||||
|
if (linkValidationEnabled)
|
||||||
|
{
|
||||||
Map<String, String> params = new HashMap<String, String>(6);
|
Map<String, String> params = new HashMap<String, String>(6);
|
||||||
params.put("store", mainStore);
|
params.put("store", mainStore);
|
||||||
params.put("username", username);
|
params.put("username", username);
|
||||||
@@ -458,6 +469,7 @@ public class UIUserSandboxes extends SelfRenderingComponent implements Serializa
|
|||||||
"#{DialogManager.setupParameters}", "dialog:linkValidation",
|
"#{DialogManager.setupParameters}", "dialog:linkValidation",
|
||||||
null, params, false);
|
null, params, false);
|
||||||
menu.getChildren().add(checkLinks);
|
menu.getChildren().add(checkLinks);
|
||||||
|
}
|
||||||
|
|
||||||
// Deploy action
|
// Deploy action
|
||||||
if (deployServersConfigured)
|
if (deployServersConfigured)
|
||||||
|
@@ -3395,6 +3395,10 @@
|
|||||||
<property-name>searchService</property-name>
|
<property-name>searchService</property-name>
|
||||||
<value>#{SearchService}</value>
|
<value>#{SearchService}</value>
|
||||||
</managed-property>
|
</managed-property>
|
||||||
|
<managed-property>
|
||||||
|
<property-name>linkValidationService</property-name>
|
||||||
|
<value>#{LinkValidationService}</value>
|
||||||
|
</managed-property>
|
||||||
<managed-property>
|
<managed-property>
|
||||||
<property-name>permissionService</property-name>
|
<property-name>permissionService</property-name>
|
||||||
<value>#{PermissionService}</value>
|
<value>#{PermissionService}</value>
|
||||||
|
@@ -140,7 +140,8 @@
|
|||||||
<td align=left><h:outputText value="#{msg.staging_sandbox}" styleClass="mainSubTitle" /></td>
|
<td align=left><h:outputText value="#{msg.staging_sandbox}" styleClass="mainSubTitle" /></td>
|
||||||
<td align=right>
|
<td align=right>
|
||||||
<a:actionLink id="actLinks" value="#{msg.check_links}" image="/images/icons/run_link_validation.gif"
|
<a:actionLink id="actLinks" value="#{msg.check_links}" image="/images/icons/run_link_validation.gif"
|
||||||
actionListener="#{DialogManager.setupParameters}" action="dialog:linkValidation">
|
actionListener="#{DialogManager.setupParameters}" action="dialog:linkValidation"
|
||||||
|
rendered="#{AVMBrowseBean.linkValidationEnabled}">
|
||||||
<f:param name="store" value="#{AVMBrowseBean.stagingStore}" />
|
<f:param name="store" value="#{AVMBrowseBean.stagingStore}" />
|
||||||
<f:param name="webapp" value="#{AVMBrowseBean.webapp}" />
|
<f:param name="webapp" value="#{AVMBrowseBean.webapp}" />
|
||||||
<f:param name="mode" value="runReport" />
|
<f:param name="mode" value="runReport" />
|
||||||
|
Reference in New Issue
Block a user