Merged V3.1 to HEAD

- incl. taking Hibernate libs from 3.1 and adding missing file from earlier merge
   13321: Fix ETHREEOH-1407: System error occur during "Undo Selected" action if no items are selected
   13322: ETHREEOH-1206: Throwing Alfresco Exception on OnUpdateProperties behaviour resets Encoding field to Big (first entry)
   13326: (RECORD ONLY) Removed 'dev' from version label.
   13330: Fix ETHREEOH-1408: Incorrect button name at "Manage Task: Submitted" page
   13337: Fix for ETHREEOH-1409 and further fix for ETHREEOH-1408
   13338: Removed svn:mergeinfo
   13346: Make startup bat script check JAVA can be found.
   13351: ETHREEOH-1386 validate ASR and FSR hostname.
   13359: ETHREEOH-1435: Share doesn't extract document metadata correctly
   13360: Fix ETHREEOH-821: SDK dependencies
   13369: Fixed distribute-sdk target for when it's run locally
   13382: ETHREEOH-1437: Container creation induces an unexpected permission allocation in Share
   13391: Shutdown backstop continues if logging throws errors.
   13394: Fix ETHREEOH-1457 - MT coci issue with bootstrap (eg. data dictionary) content
   13400: Activate JAWS-223: Adobe LC Hibernate Dialect Loading
   13401: Support for JAWS-215, mysql and oracle
   13413: Fix ETHREEOH-1458 - MT delete->archive
   ___________________________________________________________________
   Modified: svn:mergeinfo
      Merged /alfresco/BRANCHES/V3.1:r
                           13321-13322,13326-13327,13330,13337-13339,13341-13347,13351,13354-13355,13358-13363,
                           13365,13367,13369,13382,13385-13392,13394,13400-13403,13405-13406,13413


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13617 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2009-03-13 00:51:43 +00:00
parent bd92627376
commit ba836f778c
6 changed files with 90 additions and 17 deletions

View File

@@ -261,6 +261,20 @@ public class EditContentPropertiesDialog extends BaseDialogBean
@Override
protected String formatErrorMessage(Throwable exception)
{
if(editableNode != null)
{
// special case for Mimetype - since this is a sub-property of the ContentData object
// we must extract it so it can be edited in the client, then we check for it later
// and create a new ContentData object to wrap it and it's associated URL
ContentData content = (ContentData)this.editableNode.getProperties().get(ContentModel.PROP_CONTENT);
if (content != null)
{
this.editableNode.getProperties().put(TEMP_PROP_MIMETYPE, content.getMimetype());
this.editableNode.getProperties().put(TEMP_PROP_ENCODING, content.getEncoding());
}
}
if (exception instanceof FileExistsException)
{
return MessageFormat.format(Application.getMessage(

View File

@@ -82,20 +82,22 @@ public class RevertSelectedDialog extends BaseDialogBean
String userSandboxId = this.avmBrowseBean.getSandbox();
List<AVMNodeDescriptor> selected = this.avmBrowseBean.getSelectedSandboxItems();
List<String> relativePaths = new ArrayList<String>(selected.size());
for (AVMNodeDescriptor node : selected)
if (selected != null && selected.size() > 0)
{
relativePaths.add(AVMUtil.getStoreRelativePath(node.getPath()));
List<String> relativePaths = new ArrayList<String>(selected.size());
for (AVMNodeDescriptor node : selected)
{
relativePaths.add(AVMUtil.getStoreRelativePath(node.getPath()));
}
getSandboxService().revertList(userSandboxId, relativePaths);
String msg = MessageFormat.format(Application.getMessage(
context, MSG_REVERTSELECTED_SUCCESS), this.avmBrowseBean.getUsername());
FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, msg);
context.addMessage(AVMBrowseBean.FORM_ID + ':' + AVMBrowseBean.COMPONENT_SANDBOXESPANEL, facesMsg);
}
getSandboxService().revertList(userSandboxId, relativePaths);
String msg = MessageFormat.format(Application.getMessage(
context, MSG_REVERTSELECTED_SUCCESS), this.avmBrowseBean.getUsername());
FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, msg);
context.addMessage(AVMBrowseBean.FORM_ID + ':' + AVMBrowseBean.COMPONENT_SANDBOXESPANEL, facesMsg);
return outcome;
}

View File

@@ -49,6 +49,7 @@ import org.alfresco.service.cmr.workflow.WorkflowInstance;
import org.alfresco.service.cmr.workflow.WorkflowService;
import org.alfresco.service.cmr.workflow.WorkflowTask;
import org.alfresco.service.cmr.workflow.WorkflowTaskDefinition;
import org.alfresco.service.cmr.workflow.WorkflowTaskState;
import org.alfresco.service.cmr.workflow.WorkflowTransition;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
@@ -179,6 +180,14 @@ public class ManageTaskDialog extends BaseDialogBean
if (LOGGER.isDebugEnabled())
LOGGER.debug("Saving task: " + this.getWorkflowTask().id);
// before updating the task still exists and is not completed
WorkflowTask checkTask = this.getWorkflowService().getTaskById(this.getWorkflowTask().id);
if (checkTask == null || checkTask.state == WorkflowTaskState.COMPLETED)
{
Utils.addErrorMessage(Application.getMessage(context, "invalid_task"));
return outcome;
}
// prepare the edited parameters for saving
Map<QName, Serializable> params = WorkflowUtil.prepareTaskParams(this.taskNode);
@@ -224,10 +233,17 @@ public class ManageTaskDialog extends BaseDialogBean
if (this.transitions != null)
{
Object hiddenTransitions = this.taskNode.getProperties().get(WorkflowModel.PROP_HIDDEN_TRANSITIONS);
for (WorkflowTransition trans : this.transitions)
{
buttons.add(new DialogButtonConfig(ID_PREFIX + trans.title, trans.title, null,
"#{DialogManager.bean.transition}", "false", null));
if (hiddenTransitions == null ||
(hiddenTransitions instanceof String && ((String)hiddenTransitions).equals("")) ||
(hiddenTransitions instanceof String && !((String)hiddenTransitions).equals(trans.id)) ||
(hiddenTransitions instanceof List) && !((List<String>)hiddenTransitions).contains(trans.id))
{
buttons.add(new DialogButtonConfig(ID_PREFIX + trans.title, trans.title, null,
"#{DialogManager.bean.transition}", "false", null));
}
}
}
}
@@ -274,6 +290,15 @@ public class ManageTaskDialog extends BaseDialogBean
LOGGER.debug("Taking ownership of task: " + this.getWorkflowTask().id);
FacesContext context = FacesContext.getCurrentInstance();
// before taking ownership check the task still exists and is not completed
WorkflowTask checkTask = this.getWorkflowService().getTaskById(this.getWorkflowTask().id);
if (checkTask == null || checkTask.state == WorkflowTaskState.COMPLETED)
{
Utils.addErrorMessage(Application.getMessage(context, "invalid_task"));
return outcome;
}
UserTransaction tx = null;
try
@@ -314,6 +339,14 @@ public class ManageTaskDialog extends BaseDialogBean
LOGGER.debug("Returning ownership of task to pool: " + this.getWorkflowTask().id);
FacesContext context = FacesContext.getCurrentInstance();
// before returning ownership check the task still exists and is not completed
WorkflowTask checkTask = this.getWorkflowService().getTaskById(this.getWorkflowTask().id);
if (checkTask == null || checkTask.state == WorkflowTaskState.COMPLETED)
{
Utils.addErrorMessage(Application.getMessage(context, "invalid_task"));
return outcome;
}
UserTransaction tx = null;
try
@@ -351,10 +384,18 @@ public class ManageTaskDialog extends BaseDialogBean
if (LOGGER.isDebugEnabled())
LOGGER.debug("Transitioning task: " + this.getWorkflowTask().id);
// before transitioning check the task still exists and is not completed
FacesContext context = FacesContext.getCurrentInstance();
WorkflowTask checkTask = this.getWorkflowService().getTaskById(this.getWorkflowTask().id);
if (checkTask == null || checkTask.state == WorkflowTaskState.COMPLETED)
{
Utils.addErrorMessage(Application.getMessage(context, "invalid_task"));
return outcome;
}
// to find out which transition button was pressed we need
// to look for the button's id in the request parameters,
// the first non-null result is the button that was pressed.
FacesContext context = FacesContext.getCurrentInstance();
Map reqParams = context.getExternalContext().getRequestParameterMap();
String selectedTransition = null;

View File

@@ -160,9 +160,12 @@ public class UIDeploymentServers extends UIInput
tx.begin();
String contextPath = context.getExternalContext().getRequestContextPath();
out.write("\n<script type='text/javascript'>var MSG_PORT_MUST_BE_NUMBER = '");
out.write(Application.getMessage(context, "port_must_be_number"));
out.write("';</script>\n<script type='text/javascript' src='");
out.write("\n<script type='text/javascript'>");
out.write("var MSG_PORT_MUST_BE_NUMBER = '" + Application.getMessage(context, "port_must_be_number") + "'; \n");
out.write("var MSG_HOST_WRONG_FORMAT = '" + Application.getMessage(context, "host_wrong_format") + "'; \n");
out.write("</script>\n");
out.write("<script type='text/javascript' src='");
out.write(contextPath);
out.write("/scripts/ajax/deployment.js'></script>\n");
out.write("<div class='deployConfig'>");