Enhancements to FSR.

1) Performance imporvements (client and server are now multi-threaded + other performance work)
2) Pluggable transport protocols (ENH-145)
3) Changes to initialisation (ALFCOM-135)
4) Changes to the action service to enable multiple async event queues.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@11022 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2008-09-25 15:10:58 +00:00
parent ee55f90a07
commit 4bf32304f1
3 changed files with 159 additions and 55 deletions

View File

@@ -1332,6 +1332,7 @@ deploy_server=Server
deploy_server_type=Type
deploy_server_name=Display Name
deploy_server_group=Display Group
deploy_server_adapter_name=Transport Name
deploy_server_host=Host
deploy_server_port=Port
deploy_server_username=Username

View File

@@ -53,6 +53,7 @@ public final class DeploymentServerConfig implements Serializable
public static final String PROP_ALLOCATED_TO = "allocatedTo";
public static final String PROP_ON_APPROVAL = "onApproval";
public static final String PROP_GROUP = "group";
public static final String PROP_ADAPTER_NAME = "adapterName";
protected String id;
protected NodeRef serverRef;
@@ -198,6 +199,10 @@ public final class DeploymentServerConfig implements Serializable
repoProps.put(WCMAppModel.PROP_DEPLOYSERVERGROUP, (Serializable)this.props.get(PROP_GROUP));
}
if (this.props.get(PROP_ADAPTER_NAME) != null && ((String)this.props.get(PROP_ADAPTER_NAME)).length() > 0)
{
repoProps.put(WCMAppModel.PROP_DEPLOYSERVERADPTERNAME, (Serializable)this.props.get(PROP_ADAPTER_NAME));
}
return repoProps;
@@ -283,5 +288,16 @@ public final class DeploymentServerConfig implements Serializable
// Default the group to blank
this.props.put(PROP_GROUP, "");
}
if (repoProps.get(WCMAppModel.PROP_DEPLOYSERVERADPTERNAME) != null)
{
this.props.put(PROP_ADAPTER_NAME, (String)repoProps.get(WCMAppModel.PROP_DEPLOYSERVERADPTERNAME));
}
else
{
// Default the adapter name to "default"
this.props.put(PROP_ADAPTER_NAME, "default");
}
}
}

View File

@@ -29,6 +29,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.ResourceBundle;
import java.util.Set;
import javax.faces.component.UICommand;
import javax.faces.component.UIComponent;
@@ -46,6 +47,8 @@ import javax.transaction.UserTransaction;
import org.alfresco.model.WCMAppModel;
import org.alfresco.repo.avm.actions.AVMDeployWebsiteAction;
import org.alfresco.service.cmr.avm.deploy.DeploymentService;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.web.app.Application;
import org.alfresco.web.app.servlet.FacesHelper;
import org.alfresco.web.bean.repository.Repository;
@@ -71,6 +74,7 @@ public class UIDeploymentServers extends UIInput
private static final String MSG_TYPE = "deploy_server_type";
private static final String MSG_NAME = "deploy_server_name";
private static final String MSG_GROUP = "deploy_server_group";
private static final String MSG_ADAPTER_NAME = "deploy_server_adapter_name";
private static final String MSG_HOST = "deploy_server_host";
private static final String MSG_PORT = "deploy_server_port";
private static final String MSG_USER = "deploy_server_username";
@@ -91,6 +95,8 @@ public class UIDeploymentServers extends UIInput
private Boolean inAddMode;
private String addType;
private DeploymentService deploymentService;
// ------------------------------------------------------------------------------
// Component implementation
@@ -368,6 +374,26 @@ public class UIDeploymentServers extends UIInput
out.write("<tr><td colspan='3'>");
out.write("<table cellpadding='0' cellspacing='0'>");
out.write("<tr><td width='100%'><table cellpadding='3' cellspacing='0' class='deployConfigServerDetailsLeftCol'>");
if (WCMAppModel.CONSTRAINT_FILEDEPLOY.equals(getAddType()) ||
(WCMAppModel.CONSTRAINT_FILEDEPLOY.equals(server.getDeployType())))
{
out.write("<tr><td align='right'>");
out.write(bundle.getString(MSG_ADAPTER_NAME));
out.write(":</td><td>");
if (server.getProperties().get(DeploymentServerConfig.PROP_ADAPTER_NAME) != null)
{
out.write((String)server.getProperties().get(DeploymentServerConfig.PROP_ADAPTER_NAME));
}
else
{
out.write(noData);
}
out.write("</td></tr>");
}
out.write("<tr><td align='right'>");
out.write(bundle.getString(MSG_HOST));
out.write(":</td><td>");
@@ -377,6 +403,7 @@ public class UIDeploymentServers extends UIInput
}
out.write("</td></tr>");
out.write("<tr><td align='right'>");
out.write(bundle.getString(MSG_PORT));
out.write(":</td><td>");
@@ -390,6 +417,19 @@ public class UIDeploymentServers extends UIInput
}
out.write("</td></tr>");
out.write("<tr><td align='right'>");
out.write(bundle.getString(MSG_URL));
out.write(":</td><td>");
if (server.getProperties().get(DeploymentServerConfig.PROP_URL) != null)
{
out.write(Utils.encode((String)server.getProperties().get(DeploymentServerConfig.PROP_URL)));
}
else
{
out.write(noData);
}
out.write("</td></tr>");
out.write("<tr><td align='right'>");
out.write(bundle.getString(MSG_TYPE));
out.write(":</td><td>");
@@ -407,19 +447,6 @@ public class UIDeploymentServers extends UIInput
}
out.write("</td></tr>");
out.write("<tr><td align='right'>");
out.write(bundle.getString(MSG_URL));
out.write(":</td><td>");
if (server.getProperties().get(DeploymentServerConfig.PROP_URL) != null)
{
out.write(Utils.encode((String)server.getProperties().get(DeploymentServerConfig.PROP_URL)));
}
else
{
out.write(noData);
}
out.write("</td></tr>");
out.write("<tr><td align='right'>");
out.write(bundle.getString(MSG_USER));
out.write(":</td><td>");
@@ -621,6 +648,87 @@ public class UIDeploymentServers extends UIInput
Utils.encodeRecursive(context, type);
out.write("</td></tr>");
// create the server display name field
out.write("<tr><td align='right'>");
out.write(bundle.getString(MSG_NAME));
out.write(":</td><td>");
UIComponent name = context.getApplication().createComponent(
UIInput.COMPONENT_TYPE);
FacesHelper.setupComponentId(context, name, null);
name.getAttributes().put("styleClass", "inputField");
ValueBinding vbName = context.getApplication().createValueBinding(
"#{WizardManager.bean.editedDeployServerProperties." +
DeploymentServerConfig.PROP_NAME + "}");
name.setValueBinding("value", vbName);
this.getChildren().add(name);
Utils.encodeRecursive(context, name);
out.write("</td></tr>");
// create the display group name field
out.write("<tr><td align='right'>");
out.write(bundle.getString(MSG_GROUP));
out.write(":</td><td>");
UIComponent group = context.getApplication().createComponent(
UIInput.COMPONENT_TYPE);
FacesHelper.setupComponentId(context, group, null);
group.getAttributes().put("styleClass", "inputField");
ValueBinding vbGroup = context.getApplication().createValueBinding(
"#{WizardManager.bean.editedDeployServerProperties." +
DeploymentServerConfig.PROP_GROUP + "}");
group.setValueBinding("value", vbGroup);
this.getChildren().add(group);
Utils.encodeRecursive(context, group);
out.write("</td></tr>");
// MER START
if (WCMAppModel.CONSTRAINT_FILEDEPLOY.equals(getAddType() ) ||
(server != null && WCMAppModel.CONSTRAINT_FILEDEPLOY.equals(server.getDeployType())))
{
// for an FSR create the protocol adapter field
out.write("<tr><td align='right'>");
out.write(bundle.getString(MSG_ADAPTER_NAME));
out.write(":</td><td>");
UIComponent adapterName = context.getApplication().createComponent(
UISelectOne.COMPONENT_TYPE);
FacesHelper.setupComponentId(context, adapterName, "deploy_server_adapter_name");
adapterName.getAttributes().put("styleClass", "inputField");
ValueBinding vbAdapterName = context.getApplication().createValueBinding(
"#{WizardManager.bean.editedDeployServerProperties." +
DeploymentServerConfig.PROP_ADAPTER_NAME + "}");
adapterName.setValueBinding("value", vbAdapterName);
UISelectItems adaptersComponent = (UISelectItems)context.getApplication().
createComponent(UISelectItems.COMPONENT_TYPE);
DeploymentService dep = getDeploymentService();
if(dep == null)
{
List<SelectItem> adapters = new ArrayList<SelectItem>(1);
adapters.add(new SelectItem("default", "Default"));
adaptersComponent.setValue(adapters);
}
else
{
Set<String> adapterNames = dep.getAdapterNames();
List<SelectItem> adapters = new ArrayList<SelectItem>(adapterNames.size());
for(String aname : adapterNames)
{
adapters.add(new SelectItem(aname, aname));
}
adaptersComponent.setValue(adapters);
}
adapterName.getChildren().add(adaptersComponent);
this.getChildren().add(adapterName);
Utils.encodeRecursive(context, adapterName);
out.write("</td></tr>");
}
// MER END
// create the server host field
out.write("<tr><td align='right'>");
out.write(bundle.getString(MSG_HOST));
@@ -661,36 +769,20 @@ public class UIDeploymentServers extends UIInput
Utils.encodeRecursive(context, port);
out.write("</td></tr>");
// create the server display name field
// create the server url field
out.write("<tr><td align='right'>");
out.write(bundle.getString(MSG_NAME));
out.write(bundle.getString(MSG_URL));
out.write(":</td><td>");
UIComponent name = context.getApplication().createComponent(
UIComponent url = context.getApplication().createComponent(
UIInput.COMPONENT_TYPE);
FacesHelper.setupComponentId(context, name, null);
name.getAttributes().put("styleClass", "inputField");
ValueBinding vbName = context.getApplication().createValueBinding(
FacesHelper.setupComponentId(context, url, null);
url.getAttributes().put("styleClass", "inputField");
ValueBinding vbUrl = context.getApplication().createValueBinding(
"#{WizardManager.bean.editedDeployServerProperties." +
DeploymentServerConfig.PROP_NAME + "}");
name.setValueBinding("value", vbName);
this.getChildren().add(name);
Utils.encodeRecursive(context, name);
out.write("</td></tr>");
// create the display group name field
out.write("<tr><td align='right'>");
out.write(bundle.getString(MSG_GROUP));
out.write(":</td><td>");
UIComponent group = context.getApplication().createComponent(
UIInput.COMPONENT_TYPE);
FacesHelper.setupComponentId(context, group, null);
group.getAttributes().put("styleClass", "inputField");
ValueBinding vbGroup = context.getApplication().createValueBinding(
"#{WizardManager.bean.editedDeployServerProperties." +
DeploymentServerConfig.PROP_GROUP + "}");
group.setValueBinding("value", vbGroup);
this.getChildren().add(group);
Utils.encodeRecursive(context, group);
DeploymentServerConfig.PROP_URL + "}");
url.setValueBinding("value", vbUrl);
this.getChildren().add(url);
Utils.encodeRecursive(context, url);
out.write("</td></tr>");
// create the server username field
@@ -726,21 +818,7 @@ public class UIDeploymentServers extends UIInput
Utils.encodeRecursive(context, pwd);
out.write("</td></tr>");
// create the server url field
out.write("<tr><td align='right'>");
out.write(bundle.getString(MSG_URL));
out.write(":</td><td>");
UIComponent url = context.getApplication().createComponent(
UIInput.COMPONENT_TYPE);
FacesHelper.setupComponentId(context, url, null);
url.getAttributes().put("styleClass", "inputField");
ValueBinding vbUrl = context.getApplication().createValueBinding(
"#{WizardManager.bean.editedDeployServerProperties." +
DeploymentServerConfig.PROP_URL + "}");
url.setValueBinding("value", vbUrl);
this.getChildren().add(url);
Utils.encodeRecursive(context, url);
out.write("</td></tr>");
// create the source path field
out.write("<tr><td align='right'>");
@@ -962,4 +1040,13 @@ public class UIDeploymentServers extends UIInput
return items;
}
protected DeploymentService getDeploymentService()
{
if (deploymentService == null)
{
deploymentService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getDeploymentService();
}
return deploymentService;
}
}