mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V2.2 to HEAD (V2.1 sourced fixes)
7121: Merged V2.1 to V2.2 7049: Fix for unreported duplicate component ID error (very rarely seen) in browse WCM sandbox JSP 7058: Fixes failure to rollback correctly on failed alfresco->alfresco deployment. 7074: Added filtering/access control checks to the AVM virtualization view. 7083: Added transaction handling to calls involving preview store 7084: xmlsec library update to 1.4.1 7092: Missing config update from the AVM filtering checkin. 7124: Merged V2.1 to V2.2 7091: Fix to several issues found with Regenerate Renditions wizard and FormsService 7125: Merged V2.1 to V2.2 7093: Fixes to workaround some deployment issues being experienced by a customer. 7094: Fix for previous build failure git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7373 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -204,9 +204,31 @@ public class CreateWebContentWizard extends BaseContentWizard
|
|||||||
String storeName = AVMUtil.getStoreName(this.avmBrowseBean.getCurrentPath());
|
String storeName = AVMUtil.getStoreName(this.avmBrowseBean.getCurrentPath());
|
||||||
storeName = AVMUtil.getCorrespondingPreviewStoreName(storeName);
|
storeName = AVMUtil.getCorrespondingPreviewStoreName(storeName);
|
||||||
final String path = AVMUtil.buildStoreRootPath(storeName);
|
final String path = AVMUtil.buildStoreRootPath(storeName);
|
||||||
|
|
||||||
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
|
RetryingTransactionHelper txnHelper = Repository.getRetryingTransactionHelper(context);
|
||||||
|
RetryingTransactionCallback<String> callback = new RetryingTransactionCallback<String>()
|
||||||
|
{
|
||||||
|
public String execute() throws Throwable
|
||||||
|
{
|
||||||
if (LOGGER.isDebugEnabled())
|
if (LOGGER.isDebugEnabled())
|
||||||
LOGGER.debug("reseting layer " + path);
|
LOGGER.debug("reseting layer " + path);
|
||||||
this.avmSyncService.resetLayer(path);
|
|
||||||
|
// call the actual implementation
|
||||||
|
avmSyncService.resetLayer(path);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Execute
|
||||||
|
txnHelper.doInTransaction(callback);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Utils.addErrorMessage(e.getMessage(), e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -249,19 +271,42 @@ public class CreateWebContentWizard extends BaseContentWizard
|
|||||||
{
|
{
|
||||||
if ("content".equals(Application.getWizardManager().getCurrentStepName()))
|
if ("content".equals(Application.getWizardManager().getCurrentStepName()))
|
||||||
{
|
{
|
||||||
if (this.formInstanceData != null)
|
FacesContext context = FacesContext.getCurrentInstance();
|
||||||
|
RetryingTransactionHelper txnHelper = Repository.getRetryingTransactionHelper(context);
|
||||||
|
RetryingTransactionCallback<String> callback = new RetryingTransactionCallback<String>()
|
||||||
|
{
|
||||||
|
public String execute() throws Throwable
|
||||||
|
{
|
||||||
|
if (formInstanceData != null)
|
||||||
{
|
{
|
||||||
if (LOGGER.isDebugEnabled())
|
if (LOGGER.isDebugEnabled())
|
||||||
LOGGER.debug("clearing form instance data: " + this.formInstanceData.getPath());
|
LOGGER.debug("clearing form instance data: " + formInstanceData.getPath());
|
||||||
this.avmService.removeNode(this.formInstanceData.getPath());
|
|
||||||
|
avmService.removeNode(formInstanceData.getPath());
|
||||||
}
|
}
|
||||||
if (this.renditions != null)
|
|
||||||
|
if (renditions != null)
|
||||||
{
|
{
|
||||||
for (Rendition r : this.renditions)
|
for (Rendition r : renditions)
|
||||||
{
|
{
|
||||||
this.avmService.removeNode(r.getPath());
|
avmService.removeNode(r.getPath());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Execute
|
||||||
|
txnHelper.doInTransaction(callback);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Utils.addErrorMessage(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
|
||||||
this.formInstanceData = null;
|
this.formInstanceData = null;
|
||||||
this.renditions = null;
|
this.renditions = null;
|
||||||
}
|
}
|
||||||
|
@@ -116,7 +116,14 @@ public class DeploySnapshotDialog extends BaseDialogBean
|
|||||||
NodeRef report = ref.getChildRef();
|
NodeRef report = ref.getChildRef();
|
||||||
|
|
||||||
String server = (String)this.nodeService.getProperty(report, WCMAppModel.PROP_DEPLOYSERVER);
|
String server = (String)this.nodeService.getProperty(report, WCMAppModel.PROP_DEPLOYSERVER);
|
||||||
int version = (Integer)this.nodeService.getProperty(report, WCMAppModel.PROP_DEPLOYVERSION);
|
|
||||||
|
int version = -1;
|
||||||
|
Serializable snapshotObj = nodeService.getProperty(report, WCMAppModel.PROP_DEPLOYVERSION);
|
||||||
|
if (snapshotObj != null && snapshotObj instanceof Integer)
|
||||||
|
{
|
||||||
|
version = (Integer)snapshotObj;
|
||||||
|
}
|
||||||
|
|
||||||
if ((version == this.versionToDeploy && selectedDeployTo.contains(server)) ||
|
if ((version == this.versionToDeploy && selectedDeployTo.contains(server)) ||
|
||||||
(version != this.versionToDeploy) || (allDeployToServers.contains(server) == false))
|
(version != this.versionToDeploy) || (allDeployToServers.contains(server) == false))
|
||||||
{
|
{
|
||||||
|
@@ -23,55 +23,47 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.web.bean.wcm;
|
package org.alfresco.web.bean.wcm;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import javax.faces.application.FacesMessage;
|
|
||||||
import javax.faces.component.UIViewRoot;
|
import javax.faces.component.UIViewRoot;
|
||||||
import javax.faces.context.FacesContext;
|
import javax.faces.context.FacesContext;
|
||||||
import javax.faces.event.ActionEvent;
|
|
||||||
import javax.faces.event.ValueChangeEvent;
|
|
||||||
import javax.faces.model.DataModel;
|
|
||||||
import javax.faces.model.ListDataModel;
|
|
||||||
import javax.faces.model.SelectItem;
|
import javax.faces.model.SelectItem;
|
||||||
|
|
||||||
import org.alfresco.web.ui.common.component.UIListItems;
|
|
||||||
import org.alfresco.web.ui.common.component.data.UIRichList;
|
|
||||||
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;
|
||||||
import org.alfresco.repo.content.MimetypeMap;
|
|
||||||
import org.alfresco.service.cmr.avm.AVMService;
|
import org.alfresco.service.cmr.avm.AVMService;
|
||||||
import org.alfresco.service.cmr.avm.locking.AVMLockingService;
|
import org.alfresco.service.cmr.avm.locking.AVMLockingService;
|
||||||
import org.alfresco.service.cmr.avmsync.AVMDifference;
|
import org.alfresco.service.cmr.avmsync.AVMDifference;
|
||||||
import org.alfresco.service.cmr.avmsync.AVMSyncService;
|
import org.alfresco.service.cmr.avmsync.AVMSyncService;
|
||||||
import org.alfresco.service.cmr.model.FileExistsException;
|
import org.alfresco.service.cmr.repository.ContentService;
|
||||||
import org.alfresco.service.cmr.model.FileInfo;
|
import org.alfresco.service.cmr.repository.NodeRef;
|
||||||
import org.alfresco.service.cmr.repository.*;
|
import org.alfresco.service.cmr.repository.StoreRef;
|
||||||
import org.alfresco.service.cmr.search.*;
|
import org.alfresco.service.cmr.search.ResultSet;
|
||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.cmr.search.ResultSetRow;
|
||||||
|
import org.alfresco.service.cmr.search.SearchParameters;
|
||||||
|
import org.alfresco.service.cmr.search.SearchService;
|
||||||
import org.alfresco.web.app.Application;
|
import org.alfresco.web.app.Application;
|
||||||
import org.alfresco.web.bean.repository.Repository;
|
import org.alfresco.web.bean.repository.Repository;
|
||||||
import org.alfresco.web.bean.wizard.BaseWizardBean;
|
import org.alfresco.web.bean.wizard.BaseWizardBean;
|
||||||
import org.alfresco.web.data.IDataContainer;
|
import org.alfresco.web.forms.Form;
|
||||||
import org.alfresco.web.data.QuickSort;
|
import org.alfresco.web.forms.FormInstanceData;
|
||||||
import org.alfresco.web.forms.*;
|
import org.alfresco.web.forms.FormNotFoundException;
|
||||||
|
import org.alfresco.web.forms.FormsService;
|
||||||
|
import org.alfresco.web.forms.RenderingEngineTemplate;
|
||||||
|
import org.alfresco.web.forms.RenderingEngineTemplateImpl;
|
||||||
|
import org.alfresco.web.forms.Rendition;
|
||||||
import org.alfresco.web.ui.common.Utils;
|
import org.alfresco.web.ui.common.Utils;
|
||||||
import org.alfresco.web.ui.common.component.UIListItem;
|
import org.alfresco.web.ui.common.component.UIListItem;
|
||||||
import org.alfresco.web.ui.wcm.WebResources;
|
import org.alfresco.web.ui.common.component.UIListItems;
|
||||||
import org.apache.commons.io.FilenameUtils;
|
import org.alfresco.web.ui.common.component.data.UIRichList;
|
||||||
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.w3c.dom.Document;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author arielb
|
* @author arielb
|
||||||
@@ -79,7 +71,6 @@ import org.w3c.dom.Document;
|
|||||||
public class RegenerateRenditionsWizard
|
public class RegenerateRenditionsWizard
|
||||||
extends BaseWizardBean
|
extends BaseWizardBean
|
||||||
{
|
{
|
||||||
|
|
||||||
public final String REGENERATE_SCOPE_ALL = "all";
|
public final String REGENERATE_SCOPE_ALL = "all";
|
||||||
public final String REGENERATE_SCOPE_FORM = "form";
|
public final String REGENERATE_SCOPE_FORM = "form";
|
||||||
public final String REGENERATE_SCOPE_RENDERING_ENGINE_TEMPLATE = "rendering_engine_template";
|
public final String REGENERATE_SCOPE_RENDERING_ENGINE_TEMPLATE = "rendering_engine_template";
|
||||||
@@ -115,6 +106,7 @@ public class RegenerateRenditionsWizard
|
|||||||
-1, AVMUtil.getCorrespondingPathInMainStore(r.getPath()),
|
-1, AVMUtil.getCorrespondingPathInMainStore(r.getPath()),
|
||||||
AVMDifference.NEWER));
|
AVMDifference.NEWER));
|
||||||
}
|
}
|
||||||
|
if (LOGGER.isDebugEnabled())
|
||||||
LOGGER.debug("updating " + diffList.size() + " renditions in staging");
|
LOGGER.debug("updating " + diffList.size() + " renditions in staging");
|
||||||
this.avmSyncService.update(diffList, null, true, true, true, true, null, null);
|
this.avmSyncService.update(diffList, null, true, true, true, true, null, null);
|
||||||
String description = null;
|
String description = null;
|
||||||
@@ -158,11 +150,6 @@ public class RegenerateRenditionsWizard
|
|||||||
{
|
{
|
||||||
this.selectedForms = new String[] { this.browseBean.getDocument().getName() };
|
this.selectedForms = new String[] { this.browseBean.getDocument().getName() };
|
||||||
}
|
}
|
||||||
else if (this.browseBean.getDocument().hasAspect(WCMAppModel.ASPECT_RENDERING_ENGINE_TEMPLATE))
|
|
||||||
{
|
|
||||||
// System.err.println("how to handle ? " + this.browseBean.getDocument());
|
|
||||||
// this.selectedRenderingEngineTemplates = new String[] { "*:
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (this.browseBean.getActionSpace() != null)
|
else if (this.browseBean.getActionSpace() != null)
|
||||||
{
|
{
|
||||||
@@ -429,12 +416,13 @@ public class RegenerateRenditionsWizard
|
|||||||
final StoreRef storeRef = AVMNodeConverter.ToStoreRef(webProject.getStagingStore());
|
final StoreRef storeRef = AVMNodeConverter.ToStoreRef(webProject.getStagingStore());
|
||||||
sp.addStore(storeRef);
|
sp.addStore(storeRef);
|
||||||
sp.setLanguage(SearchService.LANGUAGE_LUCENE);
|
sp.setLanguage(SearchService.LANGUAGE_LUCENE);
|
||||||
final StringBuilder query = new StringBuilder();
|
final StringBuilder query = new StringBuilder(256);
|
||||||
query.append("+ASPECT:\"" + WCMAppModel.ASPECT_FORM_INSTANCE_DATA + "\"");
|
query.append("+ASPECT:\"" + WCMAppModel.ASPECT_FORM_INSTANCE_DATA + "\"");
|
||||||
query.append(" -ASPECT:\"" + WCMAppModel.ASPECT_RENDITION + "\"");
|
query.append(" -ASPECT:\"" + WCMAppModel.ASPECT_RENDITION + "\"");
|
||||||
query.append(" +@" + Repository.escapeQName(WCMAppModel.PROP_PARENT_FORM_NAME) +
|
query.append(" +@" + Repository.escapeQName(WCMAppModel.PROP_PARENT_FORM_NAME) +
|
||||||
":\"" + f.getName() + "\"");
|
":\"" + f.getName() + "\"");
|
||||||
|
|
||||||
|
if (LOGGER.isDebugEnabled())
|
||||||
LOGGER.debug("running query " + query);
|
LOGGER.debug("running query " + query);
|
||||||
sp.setQuery(query.toString());
|
sp.setQuery(query.toString());
|
||||||
final ResultSet rs = this.searchService.query(sp);
|
final ResultSet rs = this.searchService.query(sp);
|
||||||
@@ -458,7 +446,7 @@ public class RegenerateRenditionsWizard
|
|||||||
query.append("+ASPECT:\"" + WCMAppModel.ASPECT_RENDITION + "\"");
|
query.append("+ASPECT:\"" + WCMAppModel.ASPECT_RENDITION + "\"");
|
||||||
query.append(" +@" + Repository.escapeQName(WCMAppModel.PROP_PARENT_RENDERING_ENGINE_TEMPLATE) +
|
query.append(" +@" + Repository.escapeQName(WCMAppModel.PROP_PARENT_RENDERING_ENGINE_TEMPLATE) +
|
||||||
":\"" + ((RenderingEngineTemplateImpl)ret).getNodeRef() + "\"");
|
":\"" + ((RenderingEngineTemplateImpl)ret).getNodeRef() + "\"");
|
||||||
|
if (LOGGER.isDebugEnabled())
|
||||||
LOGGER.debug("running query " + query);
|
LOGGER.debug("running query " + query);
|
||||||
sp.setQuery(query.toString());
|
sp.setQuery(query.toString());
|
||||||
final ResultSet rs = this.searchService.query(sp);
|
final ResultSet rs = this.searchService.query(sp);
|
||||||
@@ -482,7 +470,7 @@ public class RegenerateRenditionsWizard
|
|||||||
final StoreRef storeRef = AVMNodeConverter.ToStoreRef(this.selectedWebProject.getStagingStore());
|
final StoreRef storeRef = AVMNodeConverter.ToStoreRef(this.selectedWebProject.getStagingStore());
|
||||||
sp.addStore(storeRef);
|
sp.addStore(storeRef);
|
||||||
sp.setLanguage(SearchService.LANGUAGE_LUCENE);
|
sp.setLanguage(SearchService.LANGUAGE_LUCENE);
|
||||||
StringBuilder query = new StringBuilder();
|
StringBuilder query = new StringBuilder(128);
|
||||||
if (this.regenerateScope.equals(REGENERATE_SCOPE_ALL) ||
|
if (this.regenerateScope.equals(REGENERATE_SCOPE_ALL) ||
|
||||||
this.regenerateScope.equals(REGENERATE_SCOPE_FORM))
|
this.regenerateScope.equals(REGENERATE_SCOPE_FORM))
|
||||||
{
|
{
|
||||||
@@ -531,12 +519,14 @@ public class RegenerateRenditionsWizard
|
|||||||
}
|
}
|
||||||
catch (FormNotFoundException fnfe)
|
catch (FormNotFoundException fnfe)
|
||||||
{
|
{
|
||||||
|
if (LOGGER.isDebugEnabled())
|
||||||
LOGGER.debug(fnfe);
|
LOGGER.debug(fnfe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
query.append(") ");
|
query.append(") ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (LOGGER.isDebugEnabled())
|
||||||
LOGGER.debug("running query " + query);
|
LOGGER.debug("running query " + query);
|
||||||
sp.setQuery(query.toString());
|
sp.setQuery(query.toString());
|
||||||
final ResultSet rs = this.searchService.query(sp);
|
final ResultSet rs = this.searchService.query(sp);
|
||||||
|
@@ -346,12 +346,15 @@ public final class FormsService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the list of web project nodes that reference a form name in their model
|
||||||
|
*/
|
||||||
private List<NodeRef> getFormConfigurations(final String formName)
|
private List<NodeRef> getFormConfigurations(final String formName)
|
||||||
{
|
{
|
||||||
final String query =
|
final String query =
|
||||||
"+TYPE:\"" + WCMAppModel.TYPE_WEBFORM +
|
"+TYPE:\"" + WCMAppModel.TYPE_WEBFORM + "\"" +
|
||||||
"\" +@" + Repository.escapeQName(WCMAppModel.PROP_FORMNAME) +
|
" +@" + Repository.escapeQName(WCMAppModel.PROP_FORMNAME) +
|
||||||
":\"" + QueryParser.escape(formName) + "\"";
|
":\"" + formName + "\"";
|
||||||
final ResultSet rs = this.searchService.query(Repository.getStoreRef(),
|
final ResultSet rs = this.searchService.query(Repository.getStoreRef(),
|
||||||
SearchService.LANGUAGE_LUCENE,
|
SearchService.LANGUAGE_LUCENE,
|
||||||
query);
|
query);
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
package org.alfresco.web.ui.wcm.component;
|
package org.alfresco.web.ui.wcm.component;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -44,7 +45,6 @@ import org.alfresco.web.app.Application;
|
|||||||
import org.alfresco.web.bean.repository.Repository;
|
import org.alfresco.web.bean.repository.Repository;
|
||||||
import org.alfresco.web.bean.wcm.AVMUtil;
|
import org.alfresco.web.bean.wcm.AVMUtil;
|
||||||
import org.alfresco.web.bean.wcm.DeploymentMonitor;
|
import org.alfresco.web.bean.wcm.DeploymentMonitor;
|
||||||
import org.alfresco.web.ui.common.Utils;
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
@@ -80,6 +80,7 @@ public class UIDeployWebsite extends UIInput
|
|||||||
return "org.alfresco.faces.DeployWebsite";
|
return "org.alfresco.faces.DeployWebsite";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public void decode(FacesContext context)
|
public void decode(FacesContext context)
|
||||||
{
|
{
|
||||||
@@ -186,16 +187,26 @@ public class UIDeployWebsite extends UIInput
|
|||||||
for (ChildAssociationRef ref : deployReportRefs)
|
for (ChildAssociationRef ref : deployReportRefs)
|
||||||
{
|
{
|
||||||
NodeRef report = ref.getChildRef();
|
NodeRef report = ref.getChildRef();
|
||||||
|
if (report != null)
|
||||||
|
{
|
||||||
|
int deployedVersion = -1;
|
||||||
Boolean success = (Boolean)nodeService.getProperty(report,
|
Boolean success = (Boolean)nodeService.getProperty(report,
|
||||||
WCMAppModel.PROP_DEPLOYSUCCESSFUL);
|
WCMAppModel.PROP_DEPLOYSUCCESSFUL);
|
||||||
int deployedVersion = (Integer)nodeService.getProperty(report,
|
|
||||||
|
Serializable deployVersionObj = nodeService.getProperty(report,
|
||||||
WCMAppModel.PROP_DEPLOYVERSION);
|
WCMAppModel.PROP_DEPLOYVERSION);
|
||||||
if (success.booleanValue() && (deployingVersion == deployedVersion))
|
if (deployVersionObj != null && deployVersionObj instanceof Integer)
|
||||||
|
{
|
||||||
|
deployedVersion = (Integer)deployVersionObj;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (success != null && success.booleanValue() && (deployingVersion == deployedVersion))
|
||||||
{
|
{
|
||||||
serversAlreadyDeployed.add((String)nodeService.getProperty(report,
|
serversAlreadyDeployed.add((String)nodeService.getProperty(report,
|
||||||
WCMAppModel.PROP_DEPLOYSERVER));
|
WCMAppModel.PROP_DEPLOYSERVER));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// get the list of servers for the user to select from
|
// get the list of servers for the user to select from
|
||||||
List<String> servers = (List<String>)nodeService.getProperty(webProject,
|
List<String> servers = (List<String>)nodeService.getProperty(webProject,
|
||||||
|
@@ -25,6 +25,7 @@
|
|||||||
package org.alfresco.web.ui.wcm.component;
|
package org.alfresco.web.ui.wcm.component;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -208,13 +209,27 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
|||||||
|
|
||||||
// extract the information we need to display
|
// extract the information we need to display
|
||||||
String server = (String)nodeService.getProperty(deploymentReport, WCMAppModel.PROP_DEPLOYSERVER);
|
String server = (String)nodeService.getProperty(deploymentReport, WCMAppModel.PROP_DEPLOYSERVER);
|
||||||
Integer snapshot = (Integer)nodeService.getProperty(deploymentReport, WCMAppModel.PROP_DEPLOYVERSION);
|
|
||||||
String creator = (String)nodeService.getProperty(deploymentReport, ContentModel.PROP_CREATOR);
|
String creator = (String)nodeService.getProperty(deploymentReport, ContentModel.PROP_CREATOR);
|
||||||
Date startTime = (Date)nodeService.getProperty(deploymentReport, WCMAppModel.PROP_DEPLOYSTARTTIME);
|
Date startTime = (Date)nodeService.getProperty(deploymentReport, WCMAppModel.PROP_DEPLOYSTARTTIME);
|
||||||
|
String started = null;
|
||||||
|
if (startTime != null)
|
||||||
|
{
|
||||||
|
started = Utils.getDateTimeFormat(context).format(startTime);
|
||||||
|
}
|
||||||
|
|
||||||
Date endTime = (Date)nodeService.getProperty(deploymentReport, WCMAppModel.PROP_DEPLOYENDTIME);
|
Date endTime = (Date)nodeService.getProperty(deploymentReport, WCMAppModel.PROP_DEPLOYENDTIME);
|
||||||
String started = Utils.getDateTimeFormat(context).format(startTime);
|
String finished = null;
|
||||||
String finished = Utils.getDateTimeFormat(context).format(endTime);
|
if (endTime != null)
|
||||||
|
{
|
||||||
|
finished = Utils.getDateTimeFormat(context).format(endTime);
|
||||||
|
}
|
||||||
|
|
||||||
Boolean success = (Boolean)nodeService.getProperty(deploymentReport, WCMAppModel.PROP_DEPLOYSUCCESSFUL);
|
Boolean success = (Boolean)nodeService.getProperty(deploymentReport, WCMAppModel.PROP_DEPLOYSUCCESSFUL);
|
||||||
|
if (success == null)
|
||||||
|
{
|
||||||
|
success = Boolean.FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
String failReason = (String)nodeService.getProperty(deploymentReport, WCMAppModel.PROP_DEPLOYFAILEDREASON);
|
String failReason = (String)nodeService.getProperty(deploymentReport, WCMAppModel.PROP_DEPLOYFAILEDREASON);
|
||||||
String content = "";
|
String content = "";
|
||||||
ContentReader reader = contentService.getReader(deploymentReport, ContentModel.PROP_CONTENT);
|
ContentReader reader = contentService.getReader(deploymentReport, ContentModel.PROP_CONTENT);
|
||||||
@@ -231,6 +246,13 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int snapshot = -1;
|
||||||
|
Serializable snapshotObj = nodeService.getProperty(deploymentReport, WCMAppModel.PROP_DEPLOYVERSION);
|
||||||
|
if (snapshotObj != null && snapshotObj instanceof Integer)
|
||||||
|
{
|
||||||
|
snapshot = (Integer)snapshotObj;
|
||||||
|
}
|
||||||
|
|
||||||
out.write("<table cellspacing='0' cellpadding='2' border='0' width='100%'>");
|
out.write("<table cellspacing='0' cellpadding='2' border='0' width='100%'>");
|
||||||
out.write("<tr><td width='40' valign='top'><img src='");
|
out.write("<tr><td width='40' valign='top'><img src='");
|
||||||
out.write(context.getExternalContext().getRequestContextPath());
|
out.write(context.getExternalContext().getRequestContextPath());
|
||||||
@@ -261,7 +283,7 @@ public class UIDeploymentReports extends SelfRenderingComponent
|
|||||||
out.write("<div style='margin-top: 6px;'>");
|
out.write("<div style='margin-top: 6px;'>");
|
||||||
out.write(Application.getMessage(context, "snapshot"));
|
out.write(Application.getMessage(context, "snapshot"));
|
||||||
out.write(": ");
|
out.write(": ");
|
||||||
out.write(snapshot.toString());
|
out.write(Integer.toString(snapshot));
|
||||||
out.write("</div>");
|
out.write("</div>");
|
||||||
out.write("<div style='margin-top: 3px;'>");
|
out.write("<div style='margin-top: 3px;'>");
|
||||||
out.write(Application.getMessage(context, "deploy_started"));
|
out.write(Application.getMessage(context, "deploy_started"));
|
||||||
|
@@ -51,7 +51,7 @@
|
|||||||
value="#{msg.web_project}:"/>
|
value="#{msg.web_project}:"/>
|
||||||
<h:selectOneMenu id="selectone-webproject"
|
<h:selectOneMenu id="selectone-webproject"
|
||||||
style="width:100%;"
|
style="width:100%;"
|
||||||
onclick="this.form.submit()"
|
onchange="this.form.submit()"
|
||||||
value="#{WizardManager.bean.selectedWebProject}">
|
value="#{WizardManager.bean.selectedWebProject}">
|
||||||
<f:selectItems id="selectitems-webproject"
|
<f:selectItems id="selectitems-webproject"
|
||||||
value="#{WizardManager.bean.webProjectChoices}"/>
|
value="#{WizardManager.bean.webProjectChoices}"/>
|
||||||
|
Reference in New Issue
Block a user