diff --git a/project-build.xml b/project-build.xml index 3a8aeb131f..ee26f97e68 100644 --- a/project-build.xml +++ b/project-build.xml @@ -49,7 +49,7 @@ - + @@ -189,5 +189,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/generated/org/alfresco/example/webservice/action/Action.java b/source/generated/org/alfresco/example/webservice/action/Action.java new file mode 100644 index 0000000000..744c6a7010 --- /dev/null +++ b/source/generated/org/alfresco/example/webservice/action/Action.java @@ -0,0 +1,484 @@ +/** + * Action.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.2.1 Jun 14, 2005 (09:15:57 EDT) WSDL2Java emitter. + */ + +package org.alfresco.example.webservice.action; + +public class Action implements java.io.Serializable { + private java.lang.String id; + private org.alfresco.example.webservice.action.ActionItemType type; + private java.lang.String title; + private java.lang.String description; + private boolean executeAsynchronously; + private org.alfresco.example.webservice.types.NamedValue[] parameters; + private org.alfresco.example.webservice.action.Condition[] conditions; + private org.alfresco.example.webservice.action.Action compensatingAction; + private org.alfresco.example.webservice.action.Action[] actions; + private org.alfresco.example.webservice.types.Reference reference; + + public Action() { + } + + public Action( + java.lang.String id, + org.alfresco.example.webservice.action.ActionItemType type, + java.lang.String title, + java.lang.String description, + boolean executeAsynchronously, + org.alfresco.example.webservice.types.NamedValue[] parameters, + org.alfresco.example.webservice.action.Condition[] conditions, + org.alfresco.example.webservice.action.Action compensatingAction, + org.alfresco.example.webservice.action.Action[] actions, + org.alfresco.example.webservice.types.Reference reference) { + this.id = id; + this.type = type; + this.title = title; + this.description = description; + this.executeAsynchronously = executeAsynchronously; + this.parameters = parameters; + this.conditions = conditions; + this.compensatingAction = compensatingAction; + this.actions = actions; + this.reference = reference; + } + + + /** + * Gets the id value for this Action. + * + * @return id + */ + public java.lang.String getId() { + return id; + } + + + /** + * Sets the id value for this Action. + * + * @param id + */ + public void setId(java.lang.String id) { + this.id = id; + } + + + /** + * Gets the type value for this Action. + * + * @return type + */ + public org.alfresco.example.webservice.action.ActionItemType getType() { + return type; + } + + + /** + * Sets the type value for this Action. + * + * @param type + */ + public void setType(org.alfresco.example.webservice.action.ActionItemType type) { + this.type = type; + } + + + /** + * Gets the title value for this Action. + * + * @return title + */ + public java.lang.String getTitle() { + return title; + } + + + /** + * Sets the title value for this Action. + * + * @param title + */ + public void setTitle(java.lang.String title) { + this.title = title; + } + + + /** + * Gets the description value for this Action. + * + * @return description + */ + public java.lang.String getDescription() { + return description; + } + + + /** + * Sets the description value for this Action. + * + * @param description + */ + public void setDescription(java.lang.String description) { + this.description = description; + } + + + /** + * Gets the executeAsynchronously value for this Action. + * + * @return executeAsynchronously + */ + public boolean isExecuteAsynchronously() { + return executeAsynchronously; + } + + + /** + * Sets the executeAsynchronously value for this Action. + * + * @param executeAsynchronously + */ + public void setExecuteAsynchronously(boolean executeAsynchronously) { + this.executeAsynchronously = executeAsynchronously; + } + + + /** + * Gets the parameters value for this Action. + * + * @return parameters + */ + public org.alfresco.example.webservice.types.NamedValue[] getParameters() { + return parameters; + } + + + /** + * Sets the parameters value for this Action. + * + * @param parameters + */ + public void setParameters(org.alfresco.example.webservice.types.NamedValue[] parameters) { + this.parameters = parameters; + } + + public org.alfresco.example.webservice.types.NamedValue getParameters(int i) { + return this.parameters[i]; + } + + public void setParameters(int i, org.alfresco.example.webservice.types.NamedValue _value) { + this.parameters[i] = _value; + } + + + /** + * Gets the conditions value for this Action. + * + * @return conditions + */ + public org.alfresco.example.webservice.action.Condition[] getConditions() { + return conditions; + } + + + /** + * Sets the conditions value for this Action. + * + * @param conditions + */ + public void setConditions(org.alfresco.example.webservice.action.Condition[] conditions) { + this.conditions = conditions; + } + + public org.alfresco.example.webservice.action.Condition getConditions(int i) { + return this.conditions[i]; + } + + public void setConditions(int i, org.alfresco.example.webservice.action.Condition _value) { + this.conditions[i] = _value; + } + + + /** + * Gets the compensatingAction value for this Action. + * + * @return compensatingAction + */ + public org.alfresco.example.webservice.action.Action getCompensatingAction() { + return compensatingAction; + } + + + /** + * Sets the compensatingAction value for this Action. + * + * @param compensatingAction + */ + public void setCompensatingAction(org.alfresco.example.webservice.action.Action compensatingAction) { + this.compensatingAction = compensatingAction; + } + + + /** + * Gets the actions value for this Action. + * + * @return actions + */ + public org.alfresco.example.webservice.action.Action[] getActions() { + return actions; + } + + + /** + * Sets the actions value for this Action. + * + * @param actions + */ + public void setActions(org.alfresco.example.webservice.action.Action[] actions) { + this.actions = actions; + } + + public org.alfresco.example.webservice.action.Action getActions(int i) { + return this.actions[i]; + } + + public void setActions(int i, org.alfresco.example.webservice.action.Action _value) { + this.actions[i] = _value; + } + + + /** + * Gets the reference value for this Action. + * + * @return reference + */ + public org.alfresco.example.webservice.types.Reference getReference() { + return reference; + } + + + /** + * Sets the reference value for this Action. + * + * @param reference + */ + public void setReference(org.alfresco.example.webservice.types.Reference reference) { + this.reference = reference; + } + + private java.lang.Object __equalsCalc = null; + public synchronized boolean equals(java.lang.Object obj) { + if (!(obj instanceof Action)) return false; + Action other = (Action) obj; + if (obj == null) return false; + if (this == obj) return true; + if (__equalsCalc != null) { + return (__equalsCalc == obj); + } + __equalsCalc = obj; + boolean _equals; + _equals = true && + ((this.id==null && other.getId()==null) || + (this.id!=null && + this.id.equals(other.getId()))) && + ((this.type==null && other.getType()==null) || + (this.type!=null && + this.type.equals(other.getType()))) && + ((this.title==null && other.getTitle()==null) || + (this.title!=null && + this.title.equals(other.getTitle()))) && + ((this.description==null && other.getDescription()==null) || + (this.description!=null && + this.description.equals(other.getDescription()))) && + this.executeAsynchronously == other.isExecuteAsynchronously() && + ((this.parameters==null && other.getParameters()==null) || + (this.parameters!=null && + java.util.Arrays.equals(this.parameters, other.getParameters()))) && + ((this.conditions==null && other.getConditions()==null) || + (this.conditions!=null && + java.util.Arrays.equals(this.conditions, other.getConditions()))) && + ((this.compensatingAction==null && other.getCompensatingAction()==null) || + (this.compensatingAction!=null && + this.compensatingAction.equals(other.getCompensatingAction()))) && + ((this.actions==null && other.getActions()==null) || + (this.actions!=null && + java.util.Arrays.equals(this.actions, other.getActions()))) && + ((this.reference==null && other.getReference()==null) || + (this.reference!=null && + this.reference.equals(other.getReference()))); + __equalsCalc = null; + return _equals; + } + + private boolean __hashCodeCalc = false; + public synchronized int hashCode() { + if (__hashCodeCalc) { + return 0; + } + __hashCodeCalc = true; + int _hashCode = 1; + if (getId() != null) { + _hashCode += getId().hashCode(); + } + if (getType() != null) { + _hashCode += getType().hashCode(); + } + if (getTitle() != null) { + _hashCode += getTitle().hashCode(); + } + if (getDescription() != null) { + _hashCode += getDescription().hashCode(); + } + _hashCode += (isExecuteAsynchronously() ? Boolean.TRUE : Boolean.FALSE).hashCode(); + if (getParameters() != null) { + for (int i=0; + iContentFormat>encoding"); + cachedSerQNames.add(qName); + cls = java.lang.String.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(simplesf); + cachedDeserFactories.add(simpledf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", ">ContentFormat>mimetype"); + cachedSerQNames.add(qName); + cls = java.lang.String.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(simplesf); + cachedDeserFactories.add(simpledf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", ">ResultSetRow>node"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.ResultSetRowNode.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", ">Store>address"); + cachedSerQNames.add(qName); + cls = java.lang.String.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(simplesf); + cachedDeserFactories.add(simpledf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "AssociationDefinition"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.AssociationDefinition.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Cardinality"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.Cardinality.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(enumsf); + cachedDeserFactories.add(enumdf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Category"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.Category.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "ClassDefinition"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.ClassDefinition.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Classification"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.Classification.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "ContentFormat"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.ContentFormat.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Name"); + cachedSerQNames.add(qName); + cls = java.lang.String.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(simplesf); + cachedDeserFactories.add(simpledf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "NamedValue"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.NamedValue.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Node"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.Node.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "NodeDefinition"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.NodeDefinition.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "ParentReference"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.ParentReference.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Path"); + cachedSerQNames.add(qName); + cls = java.lang.String.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(simplesf); + cachedDeserFactories.add(simpledf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Predicate"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.Predicate.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "PropertyDefinition"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.PropertyDefinition.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Query"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.Query.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "QueryLanguageEnum"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.QueryLanguageEnum.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(enumsf); + cachedDeserFactories.add(enumdf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Reference"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.Reference.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "ResultSet"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.ResultSet.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "ResultSetMetaData"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.ResultSetMetaData.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "ResultSetRow"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.ResultSetRow.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "RoleDefinition"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.RoleDefinition.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Store"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.Store.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "StoreEnum"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.StoreEnum.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(enumsf); + cachedDeserFactories.add(enumdf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "UUID"); + cachedSerQNames.add(qName); + cls = java.lang.String.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(simplesf); + cachedDeserFactories.add(simpledf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "ValueDefinition"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.ValueDefinition.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "Version"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.Version.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/model/content/1.0", "VersionHistory"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.VersionHistory.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "Action"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.action.Action.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "ActionExecutionResult"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.action.ActionExecutionResult.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "ActionFault"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.action.ActionFault.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "ActionFilter"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.action.ActionFilter.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "ActionItemType"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.action.ActionItemType.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "Condition"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.action.Condition.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "ParameterDefinition"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.action.ParameterDefinition.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "Rule"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.action.Rule.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "RuleFilter"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.action.RuleFilter.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "RuleType"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.action.RuleType.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + + } + + protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException { + try { + org.apache.axis.client.Call _call = super._createCall(); + if (super.maintainSessionSet) { + _call.setMaintainSession(super.maintainSession); + } + if (super.cachedUsername != null) { + _call.setUsername(super.cachedUsername); + } + if (super.cachedPassword != null) { + _call.setPassword(super.cachedPassword); + } + if (super.cachedEndpoint != null) { + _call.setTargetEndpointAddress(super.cachedEndpoint); + } + if (super.cachedTimeout != null) { + _call.setTimeout(super.cachedTimeout); + } + if (super.cachedPortName != null) { + _call.setPortName(super.cachedPortName); + } + java.util.Enumeration keys = super.cachedProperties.keys(); + while (keys.hasMoreElements()) { + java.lang.String key = (java.lang.String) keys.nextElement(); + _call.setProperty(key, super.cachedProperties.get(key)); + } + // All the type mapping information is registered + // when the first call is made. + // The type mapping information is actually registered in + // the TypeMappingRegistry of the service, which + // is the reason why registration is only needed for the first call. + synchronized (this) { + if (firstCall()) { + // must set encoding style before registering serializers + _call.setEncodingStyle(null); + for (int i = 0; i < cachedSerFactories.size(); ++i) { + java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i); + javax.xml.namespace.QName qName = + (javax.xml.namespace.QName) cachedSerQNames.get(i); + java.lang.Object x = cachedSerFactories.get(i); + if (x instanceof Class) { + java.lang.Class sf = (java.lang.Class) + cachedSerFactories.get(i); + java.lang.Class df = (java.lang.Class) + cachedDeserFactories.get(i); + _call.registerTypeMapping(cls, qName, sf, df, false); + } + else if (x instanceof javax.xml.rpc.encoding.SerializerFactory) { + org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory) + cachedSerFactories.get(i); + org.apache.axis.encoding.DeserializerFactory df = (org.apache.axis.encoding.DeserializerFactory) + cachedDeserFactories.get(i); + _call.registerTypeMapping(cls, qName, sf, df, false); + } + } + } + } + return _call; + } + catch (java.lang.Throwable _t) { + throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t); + } + } + + public org.alfresco.example.webservice.action.ActionItemType[] getConditionDefinitions() throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault { + if (super.cachedEndpoint == null) { + throw new org.apache.axis.NoEndPointException(); + } + org.apache.axis.client.Call _call = createCall(); + _call.setOperation(_operations[0]); + _call.setUseSOAPAction(true); + _call.setSOAPActionURI("http://www.alfresco.org/ws/service/action/1.0/getConditionDefinitions"); + _call.setEncodingStyle(null); + _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); + _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); + _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "getConditionDefinitions")); + + setRequestHeaders(_call); + setAttachments(_call); + try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {}); + + if (_resp instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException)_resp; + } + else { + extractAttachments(_call); + try { + return (org.alfresco.example.webservice.action.ActionItemType[]) _resp; + } catch (java.lang.Exception _exception) { + return (org.alfresco.example.webservice.action.ActionItemType[]) org.apache.axis.utils.JavaUtils.convert(_resp, org.alfresco.example.webservice.action.ActionItemType[].class); + } + } + } catch (org.apache.axis.AxisFault axisFaultException) { + if (axisFaultException.detail != null) { + if (axisFaultException.detail instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException) axisFaultException.detail; + } + if (axisFaultException.detail instanceof org.alfresco.example.webservice.action.ActionFault) { + throw (org.alfresco.example.webservice.action.ActionFault) axisFaultException.detail; + } + } + throw axisFaultException; +} + } + + public org.alfresco.example.webservice.action.ActionItemType[] getActionDefinitions() throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault { + if (super.cachedEndpoint == null) { + throw new org.apache.axis.NoEndPointException(); + } + org.apache.axis.client.Call _call = createCall(); + _call.setOperation(_operations[1]); + _call.setUseSOAPAction(true); + _call.setSOAPActionURI("http://www.alfresco.org/ws/service/action/1.0/getActionDefinitions"); + _call.setEncodingStyle(null); + _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); + _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); + _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "getActionDefinitions")); + + setRequestHeaders(_call); + setAttachments(_call); + try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {}); + + if (_resp instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException)_resp; + } + else { + extractAttachments(_call); + try { + return (org.alfresco.example.webservice.action.ActionItemType[]) _resp; + } catch (java.lang.Exception _exception) { + return (org.alfresco.example.webservice.action.ActionItemType[]) org.apache.axis.utils.JavaUtils.convert(_resp, org.alfresco.example.webservice.action.ActionItemType[].class); + } + } + } catch (org.apache.axis.AxisFault axisFaultException) { + if (axisFaultException.detail != null) { + if (axisFaultException.detail instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException) axisFaultException.detail; + } + if (axisFaultException.detail instanceof org.alfresco.example.webservice.action.ActionFault) { + throw (org.alfresco.example.webservice.action.ActionFault) axisFaultException.detail; + } + } + throw axisFaultException; +} + } + + public org.alfresco.example.webservice.action.RuleType[] getRuleTypes() throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault { + if (super.cachedEndpoint == null) { + throw new org.apache.axis.NoEndPointException(); + } + org.apache.axis.client.Call _call = createCall(); + _call.setOperation(_operations[2]); + _call.setUseSOAPAction(true); + _call.setSOAPActionURI("http://www.alfresco.org/ws/service/action/1.0/getRuleTypes"); + _call.setEncodingStyle(null); + _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); + _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); + _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "getRuleTypes")); + + setRequestHeaders(_call); + setAttachments(_call); + try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {}); + + if (_resp instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException)_resp; + } + else { + extractAttachments(_call); + try { + return (org.alfresco.example.webservice.action.RuleType[]) _resp; + } catch (java.lang.Exception _exception) { + return (org.alfresco.example.webservice.action.RuleType[]) org.apache.axis.utils.JavaUtils.convert(_resp, org.alfresco.example.webservice.action.RuleType[].class); + } + } + } catch (org.apache.axis.AxisFault axisFaultException) { + if (axisFaultException.detail != null) { + if (axisFaultException.detail instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException) axisFaultException.detail; + } + if (axisFaultException.detail instanceof org.alfresco.example.webservice.action.ActionFault) { + throw (org.alfresco.example.webservice.action.ActionFault) axisFaultException.detail; + } + } + throw axisFaultException; +} + } + + public org.alfresco.example.webservice.action.Action[] getActions(org.alfresco.example.webservice.types.Reference reference, org.alfresco.example.webservice.action.ActionFilter filter) throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault { + if (super.cachedEndpoint == null) { + throw new org.apache.axis.NoEndPointException(); + } + org.apache.axis.client.Call _call = createCall(); + _call.setOperation(_operations[3]); + _call.setUseSOAPAction(true); + _call.setSOAPActionURI("http://www.alfresco.org/ws/service/action/1.0/getActions"); + _call.setEncodingStyle(null); + _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); + _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); + _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "getActions")); + + setRequestHeaders(_call); + setAttachments(_call); + try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {reference, filter}); + + if (_resp instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException)_resp; + } + else { + extractAttachments(_call); + try { + return (org.alfresco.example.webservice.action.Action[]) _resp; + } catch (java.lang.Exception _exception) { + return (org.alfresco.example.webservice.action.Action[]) org.apache.axis.utils.JavaUtils.convert(_resp, org.alfresco.example.webservice.action.Action[].class); + } + } + } catch (org.apache.axis.AxisFault axisFaultException) { + if (axisFaultException.detail != null) { + if (axisFaultException.detail instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException) axisFaultException.detail; + } + if (axisFaultException.detail instanceof org.alfresco.example.webservice.action.ActionFault) { + throw (org.alfresco.example.webservice.action.ActionFault) axisFaultException.detail; + } + } + throw axisFaultException; +} + } + + public org.alfresco.example.webservice.action.Action[] saveActions(org.alfresco.example.webservice.types.Reference reference, org.alfresco.example.webservice.action.Action[] actions) throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault { + if (super.cachedEndpoint == null) { + throw new org.apache.axis.NoEndPointException(); + } + org.apache.axis.client.Call _call = createCall(); + _call.setOperation(_operations[4]); + _call.setUseSOAPAction(true); + _call.setSOAPActionURI("http://www.alfresco.org/ws/service/action/1.0/saveActions"); + _call.setEncodingStyle(null); + _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); + _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); + _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "saveActions")); + + setRequestHeaders(_call); + setAttachments(_call); + try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {reference, actions}); + + if (_resp instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException)_resp; + } + else { + extractAttachments(_call); + try { + return (org.alfresco.example.webservice.action.Action[]) _resp; + } catch (java.lang.Exception _exception) { + return (org.alfresco.example.webservice.action.Action[]) org.apache.axis.utils.JavaUtils.convert(_resp, org.alfresco.example.webservice.action.Action[].class); + } + } + } catch (org.apache.axis.AxisFault axisFaultException) { + if (axisFaultException.detail != null) { + if (axisFaultException.detail instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException) axisFaultException.detail; + } + if (axisFaultException.detail instanceof org.alfresco.example.webservice.action.ActionFault) { + throw (org.alfresco.example.webservice.action.ActionFault) axisFaultException.detail; + } + } + throw axisFaultException; +} + } + + public void removeActions(org.alfresco.example.webservice.types.Reference reference, org.alfresco.example.webservice.action.Action[] actions) throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault { + if (super.cachedEndpoint == null) { + throw new org.apache.axis.NoEndPointException(); + } + org.apache.axis.client.Call _call = createCall(); + _call.setOperation(_operations[5]); + _call.setUseSOAPAction(true); + _call.setSOAPActionURI("http://www.alfresco.org/ws/service/action/1.0/removeActions"); + _call.setEncodingStyle(null); + _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); + _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); + _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "removeActions")); + + setRequestHeaders(_call); + setAttachments(_call); + try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {reference, actions}); + + if (_resp instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException)_resp; + } + extractAttachments(_call); + } catch (org.apache.axis.AxisFault axisFaultException) { + if (axisFaultException.detail != null) { + if (axisFaultException.detail instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException) axisFaultException.detail; + } + if (axisFaultException.detail instanceof org.alfresco.example.webservice.action.ActionFault) { + throw (org.alfresco.example.webservice.action.ActionFault) axisFaultException.detail; + } + } + throw axisFaultException; +} + } + + public org.alfresco.example.webservice.action.ActionExecutionResult[] executeActions(org.alfresco.example.webservice.types.Predicate predicate, org.alfresco.example.webservice.action.Action[] actions) throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault { + if (super.cachedEndpoint == null) { + throw new org.apache.axis.NoEndPointException(); + } + org.apache.axis.client.Call _call = createCall(); + _call.setOperation(_operations[6]); + _call.setUseSOAPAction(true); + _call.setSOAPActionURI("http://www.alfresco.org/ws/service/action/1.0/executeActions"); + _call.setEncodingStyle(null); + _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); + _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); + _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "executeActions")); + + setRequestHeaders(_call); + setAttachments(_call); + try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {predicate, actions}); + + if (_resp instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException)_resp; + } + else { + extractAttachments(_call); + try { + return (org.alfresco.example.webservice.action.ActionExecutionResult[]) _resp; + } catch (java.lang.Exception _exception) { + return (org.alfresco.example.webservice.action.ActionExecutionResult[]) org.apache.axis.utils.JavaUtils.convert(_resp, org.alfresco.example.webservice.action.ActionExecutionResult[].class); + } + } + } catch (org.apache.axis.AxisFault axisFaultException) { + if (axisFaultException.detail != null) { + if (axisFaultException.detail instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException) axisFaultException.detail; + } + if (axisFaultException.detail instanceof org.alfresco.example.webservice.action.ActionFault) { + throw (org.alfresco.example.webservice.action.ActionFault) axisFaultException.detail; + } + } + throw axisFaultException; +} + } + + public org.alfresco.example.webservice.action.Rule[] getRules(org.alfresco.example.webservice.types.Reference reference, org.alfresco.example.webservice.action.RuleFilter ruleFilter) throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault { + if (super.cachedEndpoint == null) { + throw new org.apache.axis.NoEndPointException(); + } + org.apache.axis.client.Call _call = createCall(); + _call.setOperation(_operations[7]); + _call.setUseSOAPAction(true); + _call.setSOAPActionURI("http://www.alfresco.org/ws/service/action/1.0/getRules"); + _call.setEncodingStyle(null); + _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); + _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); + _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "getRules")); + + setRequestHeaders(_call); + setAttachments(_call); + try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {reference, ruleFilter}); + + if (_resp instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException)_resp; + } + else { + extractAttachments(_call); + try { + return (org.alfresco.example.webservice.action.Rule[]) _resp; + } catch (java.lang.Exception _exception) { + return (org.alfresco.example.webservice.action.Rule[]) org.apache.axis.utils.JavaUtils.convert(_resp, org.alfresco.example.webservice.action.Rule[].class); + } + } + } catch (org.apache.axis.AxisFault axisFaultException) { + if (axisFaultException.detail != null) { + if (axisFaultException.detail instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException) axisFaultException.detail; + } + if (axisFaultException.detail instanceof org.alfresco.example.webservice.action.ActionFault) { + throw (org.alfresco.example.webservice.action.ActionFault) axisFaultException.detail; + } + } + throw axisFaultException; +} + } + + public org.alfresco.example.webservice.action.Rule[] saveRules(org.alfresco.example.webservice.types.Reference reference, org.alfresco.example.webservice.action.Rule[] rules) throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault { + if (super.cachedEndpoint == null) { + throw new org.apache.axis.NoEndPointException(); + } + org.apache.axis.client.Call _call = createCall(); + _call.setOperation(_operations[8]); + _call.setUseSOAPAction(true); + _call.setSOAPActionURI("http://www.alfresco.org/ws/service/action/1.0/saveRules"); + _call.setEncodingStyle(null); + _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); + _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); + _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "saveRules")); + + setRequestHeaders(_call); + setAttachments(_call); + try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {reference, rules}); + + if (_resp instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException)_resp; + } + else { + extractAttachments(_call); + try { + return (org.alfresco.example.webservice.action.Rule[]) _resp; + } catch (java.lang.Exception _exception) { + return (org.alfresco.example.webservice.action.Rule[]) org.apache.axis.utils.JavaUtils.convert(_resp, org.alfresco.example.webservice.action.Rule[].class); + } + } + } catch (org.apache.axis.AxisFault axisFaultException) { + if (axisFaultException.detail != null) { + if (axisFaultException.detail instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException) axisFaultException.detail; + } + if (axisFaultException.detail instanceof org.alfresco.example.webservice.action.ActionFault) { + throw (org.alfresco.example.webservice.action.ActionFault) axisFaultException.detail; + } + } + throw axisFaultException; +} + } + + public void removeRules(org.alfresco.example.webservice.types.Reference reference, org.alfresco.example.webservice.action.Rule[] rules) throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault { + if (super.cachedEndpoint == null) { + throw new org.apache.axis.NoEndPointException(); + } + org.apache.axis.client.Call _call = createCall(); + _call.setOperation(_operations[9]); + _call.setUseSOAPAction(true); + _call.setSOAPActionURI("http://www.alfresco.org/ws/service/action/1.0/removeRules"); + _call.setEncodingStyle(null); + _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); + _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); + _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); + _call.setOperationName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/action/1.0", "removeRules")); + + setRequestHeaders(_call); + setAttachments(_call); + try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {reference, rules}); + + if (_resp instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException)_resp; + } + extractAttachments(_call); + } catch (org.apache.axis.AxisFault axisFaultException) { + if (axisFaultException.detail != null) { + if (axisFaultException.detail instanceof java.rmi.RemoteException) { + throw (java.rmi.RemoteException) axisFaultException.detail; + } + if (axisFaultException.detail instanceof org.alfresco.example.webservice.action.ActionFault) { + throw (org.alfresco.example.webservice.action.ActionFault) axisFaultException.detail; + } + } + throw axisFaultException; +} + } + +} diff --git a/source/generated/org/alfresco/example/webservice/action/ActionServiceSoapPort.java b/source/generated/org/alfresco/example/webservice/action/ActionServiceSoapPort.java new file mode 100644 index 0000000000..f9de7b3476 --- /dev/null +++ b/source/generated/org/alfresco/example/webservice/action/ActionServiceSoapPort.java @@ -0,0 +1,61 @@ +/** + * ActionServiceSoapPort.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.2.1 Jun 14, 2005 (09:15:57 EDT) WSDL2Java emitter. + */ + +package org.alfresco.example.webservice.action; + +public interface ActionServiceSoapPort extends java.rmi.Remote { + + /** + * Gets the available condition definitions. + */ + public org.alfresco.example.webservice.action.ActionItemType[] getConditionDefinitions() throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault; + + /** + * Gets the available action definitions. + */ + public org.alfresco.example.webservice.action.ActionItemType[] getActionDefinitions() throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault; + + /** + * Gets the availble action types. + */ + public org.alfresco.example.webservice.action.RuleType[] getRuleTypes() throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault; + + /** + * Gets the actions saved against a reference. + */ + public org.alfresco.example.webservice.action.Action[] getActions(org.alfresco.example.webservice.types.Reference reference, org.alfresco.example.webservice.action.ActionFilter filter) throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault; + + /** + * Save actions against a given reference. + */ + public org.alfresco.example.webservice.action.Action[] saveActions(org.alfresco.example.webservice.types.Reference reference, org.alfresco.example.webservice.action.Action[] actions) throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault; + + /** + * Removes saved actions. + */ + public void removeActions(org.alfresco.example.webservice.types.Reference reference, org.alfresco.example.webservice.action.Action[] actions) throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault; + + /** + * Executes actions. + */ + public org.alfresco.example.webservice.action.ActionExecutionResult[] executeActions(org.alfresco.example.webservice.types.Predicate predicate, org.alfresco.example.webservice.action.Action[] actions) throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault; + + /** + * Gets the rules for a reference. + */ + public org.alfresco.example.webservice.action.Rule[] getRules(org.alfresco.example.webservice.types.Reference reference, org.alfresco.example.webservice.action.RuleFilter ruleFilter) throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault; + + /** + * Save rules. + */ + public org.alfresco.example.webservice.action.Rule[] saveRules(org.alfresco.example.webservice.types.Reference reference, org.alfresco.example.webservice.action.Rule[] rules) throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault; + + /** + * Remove saved rules. + */ + public void removeRules(org.alfresco.example.webservice.types.Reference reference, org.alfresco.example.webservice.action.Rule[] rules) throws java.rmi.RemoteException, org.alfresco.example.webservice.action.ActionFault; +} diff --git a/source/generated/org/alfresco/example/webservice/action/Condition.java b/source/generated/org/alfresco/example/webservice/action/Condition.java new file mode 100644 index 0000000000..94e5a77152 --- /dev/null +++ b/source/generated/org/alfresco/example/webservice/action/Condition.java @@ -0,0 +1,238 @@ +/** + * Condition.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.2.1 Jun 14, 2005 (09:15:57 EDT) WSDL2Java emitter. + */ + +package org.alfresco.example.webservice.action; + +public class Condition implements java.io.Serializable { + private java.lang.String id; + private org.alfresco.example.webservice.action.ActionItemType type; + private boolean invertCondition; + private org.alfresco.example.webservice.types.NamedValue[] parameters; + + public Condition() { + } + + public Condition( + java.lang.String id, + org.alfresco.example.webservice.action.ActionItemType type, + boolean invertCondition, + org.alfresco.example.webservice.types.NamedValue[] parameters) { + this.id = id; + this.type = type; + this.invertCondition = invertCondition; + this.parameters = parameters; + } + + + /** + * Gets the id value for this Condition. + * + * @return id + */ + public java.lang.String getId() { + return id; + } + + + /** + * Sets the id value for this Condition. + * + * @param id + */ + public void setId(java.lang.String id) { + this.id = id; + } + + + /** + * Gets the type value for this Condition. + * + * @return type + */ + public org.alfresco.example.webservice.action.ActionItemType getType() { + return type; + } + + + /** + * Sets the type value for this Condition. + * + * @param type + */ + public void setType(org.alfresco.example.webservice.action.ActionItemType type) { + this.type = type; + } + + + /** + * Gets the invertCondition value for this Condition. + * + * @return invertCondition + */ + public boolean isInvertCondition() { + return invertCondition; + } + + + /** + * Sets the invertCondition value for this Condition. + * + * @param invertCondition + */ + public void setInvertCondition(boolean invertCondition) { + this.invertCondition = invertCondition; + } + + + /** + * Gets the parameters value for this Condition. + * + * @return parameters + */ + public org.alfresco.example.webservice.types.NamedValue[] getParameters() { + return parameters; + } + + + /** + * Sets the parameters value for this Condition. + * + * @param parameters + */ + public void setParameters(org.alfresco.example.webservice.types.NamedValue[] parameters) { + this.parameters = parameters; + } + + public org.alfresco.example.webservice.types.NamedValue getParameters(int i) { + return this.parameters[i]; + } + + public void setParameters(int i, org.alfresco.example.webservice.types.NamedValue _value) { + this.parameters[i] = _value; + } + + private java.lang.Object __equalsCalc = null; + public synchronized boolean equals(java.lang.Object obj) { + if (!(obj instanceof Condition)) return false; + Condition other = (Condition) obj; + if (obj == null) return false; + if (this == obj) return true; + if (__equalsCalc != null) { + return (__equalsCalc == obj); + } + __equalsCalc = obj; + boolean _equals; + _equals = true && + ((this.id==null && other.getId()==null) || + (this.id!=null && + this.id.equals(other.getId()))) && + ((this.type==null && other.getType()==null) || + (this.type!=null && + this.type.equals(other.getType()))) && + this.invertCondition == other.isInvertCondition() && + ((this.parameters==null && other.getParameters()==null) || + (this.parameters!=null && + java.util.Arrays.equals(this.parameters, other.getParameters()))); + __equalsCalc = null; + return _equals; + } + + private boolean __hashCodeCalc = false; + public synchronized int hashCode() { + if (__hashCodeCalc) { + return 0; + } + __hashCodeCalc = true; + int _hashCode = 1; + if (getId() != null) { + _hashCode += getId().hashCode(); + } + if (getType() != null) { + _hashCode += getType().hashCode(); + } + _hashCode += (isInvertCondition() ? Boolean.TRUE : Boolean.FALSE).hashCode(); + if (getParameters() != null) { + for (int i=0; + iNamespaceConfiguration>mapping"); - cachedSerQNames.add(qName); - cls = org.alfresco.example.webservice.types.NamespaceConfigurationMapping.class; - cachedSerClasses.add(cls); - cachedSerFactories.add(beansf); - cachedDeserFactories.add(beandf); - qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/headers/1.0", "LocaleConfiguration"); cachedSerQNames.add(qName); cls = org.alfresco.example.webservice.types.LocaleConfiguration.class; @@ -311,13 +304,20 @@ public class RepositoryServiceSoapBindingStub extends org.apache.axis.client.Stu qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/headers/1.0", "NamespaceConfiguration"); cachedSerQNames.add(qName); - cls = org.alfresco.example.webservice.types.NamespaceConfigurationMapping[].class; + cls = org.alfresco.example.webservice.types.NamespaceConfigurationInner[].class; cachedSerClasses.add(cls); - qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/headers/1.0", ">NamespaceConfiguration>mapping"); + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/headers/1.0", "NamespaceConfigurationInner"); qName2 = new javax.xml.namespace.QName("http://www.alfresco.org/ws/headers/1.0", "mapping"); cachedSerFactories.add(new org.apache.axis.encoding.ser.ArraySerializerFactory(qName, qName2)); cachedDeserFactories.add(new org.apache.axis.encoding.ser.ArrayDeserializerFactory()); + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/headers/1.0", "NamespaceConfigurationInner"); + cachedSerQNames.add(qName); + cls = org.alfresco.example.webservice.types.NamespaceConfigurationInner.class; + cachedSerClasses.add(cls); + cachedSerFactories.add(beansf); + cachedDeserFactories.add(beandf); + qName = new javax.xml.namespace.QName("http://www.alfresco.org/ws/headers/1.0", "QueryConfiguration"); cachedSerQNames.add(qName); cls = org.alfresco.example.webservice.types.QueryConfiguration.class; diff --git a/source/generated/org/alfresco/example/webservice/types/NamespaceConfigurationInner.java b/source/generated/org/alfresco/example/webservice/types/NamespaceConfigurationInner.java new file mode 100644 index 0000000000..13f268c62d --- /dev/null +++ b/source/generated/org/alfresco/example/webservice/types/NamespaceConfigurationInner.java @@ -0,0 +1,154 @@ +/** + * NamespaceConfigurationInner.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.2.1 Jun 14, 2005 (09:15:57 EDT) WSDL2Java emitter. + */ + +package org.alfresco.example.webservice.types; + +public class NamespaceConfigurationInner implements java.io.Serializable { + private org.apache.axis.types.NCName prefix; + private java.lang.String uri; + + public NamespaceConfigurationInner() { + } + + public NamespaceConfigurationInner( + org.apache.axis.types.NCName prefix, + java.lang.String uri) { + this.prefix = prefix; + this.uri = uri; + } + + + /** + * Gets the prefix value for this NamespaceConfigurationInner. + * + * @return prefix + */ + public org.apache.axis.types.NCName getPrefix() { + return prefix; + } + + + /** + * Sets the prefix value for this NamespaceConfigurationInner. + * + * @param prefix + */ + public void setPrefix(org.apache.axis.types.NCName prefix) { + this.prefix = prefix; + } + + + /** + * Gets the uri value for this NamespaceConfigurationInner. + * + * @return uri + */ + public java.lang.String getUri() { + return uri; + } + + + /** + * Sets the uri value for this NamespaceConfigurationInner. + * + * @param uri + */ + public void setUri(java.lang.String uri) { + this.uri = uri; + } + + private java.lang.Object __equalsCalc = null; + public synchronized boolean equals(java.lang.Object obj) { + if (!(obj instanceof NamespaceConfigurationInner)) return false; + NamespaceConfigurationInner other = (NamespaceConfigurationInner) obj; + if (obj == null) return false; + if (this == obj) return true; + if (__equalsCalc != null) { + return (__equalsCalc == obj); + } + __equalsCalc = obj; + boolean _equals; + _equals = true && + ((this.prefix==null && other.getPrefix()==null) || + (this.prefix!=null && + this.prefix.equals(other.getPrefix()))) && + ((this.uri==null && other.getUri()==null) || + (this.uri!=null && + this.uri.equals(other.getUri()))); + __equalsCalc = null; + return _equals; + } + + private boolean __hashCodeCalc = false; + public synchronized int hashCode() { + if (__hashCodeCalc) { + return 0; + } + __hashCodeCalc = true; + int _hashCode = 1; + if (getPrefix() != null) { + _hashCode += getPrefix().hashCode(); + } + if (getUri() != null) { + _hashCode += getUri().hashCode(); + } + __hashCodeCalc = false; + return _hashCode; + } + + // Type metadata + private static org.apache.axis.description.TypeDesc typeDesc = + new org.apache.axis.description.TypeDesc(NamespaceConfigurationInner.class, true); + + static { + typeDesc.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/headers/1.0", "NamespaceConfigurationInner")); + org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("prefix"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/headers/1.0", "prefix")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "NCName")); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("uri"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/headers/1.0", "uri")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + } + + /** + * Return type metadata object + */ + public static org.apache.axis.description.TypeDesc getTypeDesc() { + return typeDesc; + } + + /** + * Get Custom Serializer + */ + public static org.apache.axis.encoding.Serializer getSerializer( + java.lang.String mechType, + java.lang.Class _javaType, + javax.xml.namespace.QName _xmlType) { + return + new org.apache.axis.encoding.ser.BeanSerializer( + _javaType, _xmlType, typeDesc); + } + + /** + * Get Custom Deserializer + */ + public static org.apache.axis.encoding.Deserializer getDeserializer( + java.lang.String mechType, + java.lang.Class _javaType, + javax.xml.namespace.QName _xmlType) { + return + new org.apache.axis.encoding.ser.BeanDeserializer( + _javaType, _xmlType, typeDesc); + } + +} diff --git a/source/generated/org/alfresco/repo/webservice/action/Action.java b/source/generated/org/alfresco/repo/webservice/action/Action.java new file mode 100644 index 0000000000..9b0cdc2f9f --- /dev/null +++ b/source/generated/org/alfresco/repo/webservice/action/Action.java @@ -0,0 +1,484 @@ +/** + * Action.java + * + * This file was auto-generated from WSDL + * by the Apache Axis 1.2.1 Jun 14, 2005 (09:15:57 EDT) WSDL2Java emitter. + */ + +package org.alfresco.repo.webservice.action; + +public class Action implements java.io.Serializable { + private java.lang.String id; + private org.alfresco.repo.webservice.action.ActionItemType type; + private java.lang.String title; + private java.lang.String description; + private boolean executeAsynchronously; + private org.alfresco.repo.webservice.types.NamedValue[] parameters; + private org.alfresco.repo.webservice.action.Condition[] conditions; + private org.alfresco.repo.webservice.action.Action compensatingAction; + private org.alfresco.repo.webservice.action.Action[] actions; + private org.alfresco.repo.webservice.types.Reference reference; + + public Action() { + } + + public Action( + java.lang.String id, + org.alfresco.repo.webservice.action.ActionItemType type, + java.lang.String title, + java.lang.String description, + boolean executeAsynchronously, + org.alfresco.repo.webservice.types.NamedValue[] parameters, + org.alfresco.repo.webservice.action.Condition[] conditions, + org.alfresco.repo.webservice.action.Action compensatingAction, + org.alfresco.repo.webservice.action.Action[] actions, + org.alfresco.repo.webservice.types.Reference reference) { + this.id = id; + this.type = type; + this.title = title; + this.description = description; + this.executeAsynchronously = executeAsynchronously; + this.parameters = parameters; + this.conditions = conditions; + this.compensatingAction = compensatingAction; + this.actions = actions; + this.reference = reference; + } + + + /** + * Gets the id value for this Action. + * + * @return id + */ + public java.lang.String getId() { + return id; + } + + + /** + * Sets the id value for this Action. + * + * @param id + */ + public void setId(java.lang.String id) { + this.id = id; + } + + + /** + * Gets the type value for this Action. + * + * @return type + */ + public org.alfresco.repo.webservice.action.ActionItemType getType() { + return type; + } + + + /** + * Sets the type value for this Action. + * + * @param type + */ + public void setType(org.alfresco.repo.webservice.action.ActionItemType type) { + this.type = type; + } + + + /** + * Gets the title value for this Action. + * + * @return title + */ + public java.lang.String getTitle() { + return title; + } + + + /** + * Sets the title value for this Action. + * + * @param title + */ + public void setTitle(java.lang.String title) { + this.title = title; + } + + + /** + * Gets the description value for this Action. + * + * @return description + */ + public java.lang.String getDescription() { + return description; + } + + + /** + * Sets the description value for this Action. + * + * @param description + */ + public void setDescription(java.lang.String description) { + this.description = description; + } + + + /** + * Gets the executeAsynchronously value for this Action. + * + * @return executeAsynchronously + */ + public boolean isExecuteAsynchronously() { + return executeAsynchronously; + } + + + /** + * Sets the executeAsynchronously value for this Action. + * + * @param executeAsynchronously + */ + public void setExecuteAsynchronously(boolean executeAsynchronously) { + this.executeAsynchronously = executeAsynchronously; + } + + + /** + * Gets the parameters value for this Action. + * + * @return parameters + */ + public org.alfresco.repo.webservice.types.NamedValue[] getParameters() { + return parameters; + } + + + /** + * Sets the parameters value for this Action. + * + * @param parameters + */ + public void setParameters(org.alfresco.repo.webservice.types.NamedValue[] parameters) { + this.parameters = parameters; + } + + public org.alfresco.repo.webservice.types.NamedValue getParameters(int i) { + return this.parameters[i]; + } + + public void setParameters(int i, org.alfresco.repo.webservice.types.NamedValue _value) { + this.parameters[i] = _value; + } + + + /** + * Gets the conditions value for this Action. + * + * @return conditions + */ + public org.alfresco.repo.webservice.action.Condition[] getConditions() { + return conditions; + } + + + /** + * Sets the conditions value for this Action. + * + * @param conditions + */ + public void setConditions(org.alfresco.repo.webservice.action.Condition[] conditions) { + this.conditions = conditions; + } + + public org.alfresco.repo.webservice.action.Condition getConditions(int i) { + return this.conditions[i]; + } + + public void setConditions(int i, org.alfresco.repo.webservice.action.Condition _value) { + this.conditions[i] = _value; + } + + + /** + * Gets the compensatingAction value for this Action. + * + * @return compensatingAction + */ + public org.alfresco.repo.webservice.action.Action getCompensatingAction() { + return compensatingAction; + } + + + /** + * Sets the compensatingAction value for this Action. + * + * @param compensatingAction + */ + public void setCompensatingAction(org.alfresco.repo.webservice.action.Action compensatingAction) { + this.compensatingAction = compensatingAction; + } + + + /** + * Gets the actions value for this Action. + * + * @return actions + */ + public org.alfresco.repo.webservice.action.Action[] getActions() { + return actions; + } + + + /** + * Sets the actions value for this Action. + * + * @param actions + */ + public void setActions(org.alfresco.repo.webservice.action.Action[] actions) { + this.actions = actions; + } + + public org.alfresco.repo.webservice.action.Action getActions(int i) { + return this.actions[i]; + } + + public void setActions(int i, org.alfresco.repo.webservice.action.Action _value) { + this.actions[i] = _value; + } + + + /** + * Gets the reference value for this Action. + * + * @return reference + */ + public org.alfresco.repo.webservice.types.Reference getReference() { + return reference; + } + + + /** + * Sets the reference value for this Action. + * + * @param reference + */ + public void setReference(org.alfresco.repo.webservice.types.Reference reference) { + this.reference = reference; + } + + private java.lang.Object __equalsCalc = null; + public synchronized boolean equals(java.lang.Object obj) { + if (!(obj instanceof Action)) return false; + Action other = (Action) obj; + if (obj == null) return false; + if (this == obj) return true; + if (__equalsCalc != null) { + return (__equalsCalc == obj); + } + __equalsCalc = obj; + boolean _equals; + _equals = true && + ((this.id==null && other.getId()==null) || + (this.id!=null && + this.id.equals(other.getId()))) && + ((this.type==null && other.getType()==null) || + (this.type!=null && + this.type.equals(other.getType()))) && + ((this.title==null && other.getTitle()==null) || + (this.title!=null && + this.title.equals(other.getTitle()))) && + ((this.description==null && other.getDescription()==null) || + (this.description!=null && + this.description.equals(other.getDescription()))) && + this.executeAsynchronously == other.isExecuteAsynchronously() && + ((this.parameters==null && other.getParameters()==null) || + (this.parameters!=null && + java.util.Arrays.equals(this.parameters, other.getParameters()))) && + ((this.conditions==null && other.getConditions()==null) || + (this.conditions!=null && + java.util.Arrays.equals(this.conditions, other.getConditions()))) && + ((this.compensatingAction==null && other.getCompensatingAction()==null) || + (this.compensatingAction!=null && + this.compensatingAction.equals(other.getCompensatingAction()))) && + ((this.actions==null && other.getActions()==null) || + (this.actions!=null && + java.util.Arrays.equals(this.actions, other.getActions()))) && + ((this.reference==null && other.getReference()==null) || + (this.reference!=null && + this.reference.equals(other.getReference()))); + __equalsCalc = null; + return _equals; + } + + private boolean __hashCodeCalc = false; + public synchronized int hashCode() { + if (__hashCodeCalc) { + return 0; + } + __hashCodeCalc = true; + int _hashCode = 1; + if (getId() != null) { + _hashCode += getId().hashCode(); + } + if (getType() != null) { + _hashCode += getType().hashCode(); + } + if (getTitle() != null) { + _hashCode += getTitle().hashCode(); + } + if (getDescription() != null) { + _hashCode += getDescription().hashCode(); + } + _hashCode += (isExecuteAsynchronously() ? Boolean.TRUE : Boolean.FALSE).hashCode(); + if (getParameters() != null) { + for (int i=0; + i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/generated/org/alfresco/repo/webservice/repository/deploy.wsdd b/source/generated/org/alfresco/repo/webservice/repository/deploy.wsdd index 1197feab41..fe08853ad8 100644 --- a/source/generated/org/alfresco/repo/webservice/repository/deploy.wsdd +++ b/source/generated/org/alfresco/repo/webservice/repository/deploy.wsdd @@ -116,6 +116,14 @@ deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" /> + - definitions = this.actionService.getActionConditionDefinitions(); + + // Marshal the results into an array of action item types + ActionItemType[] result = new ActionItemType[definitions.size()]; + int index = 0; + for (ActionConditionDefinition definition : definitions) + { + result[index] = convertToActionItemType(definition); + index++; + } + + return result; + } + + /** + * @see org.alfresco.repo.webservice.action.ActionServiceSoapPort#getActionDefinitions() + */ + public ActionItemType[] getActionDefinitions() throws RemoteException, + ActionFault + { + // Get the action defintions from the action service + List definitions = this.actionService.getActionDefinitions(); + + // Marshal the results into an array of action item types + ActionItemType[] result = new ActionItemType[definitions.size()]; + int index = 0; + for (ActionDefinition definition : definitions) + { + result[index] = convertToActionItemType(definition); + index++; + } + + return result; + } + + private ActionItemType convertToActionItemType(ParameterizedItemDefinition definition) + { + // Create action item type + ActionItemType actionItemType = new ActionItemType(); + actionItemType.setName(definition.getName()); + actionItemType.setTitle(definition.getTitle()); + actionItemType.setDescription(definition.getDescription()); + actionItemType.setAdHocPropertiesAllowed(definition.getAdhocPropertiesAllowed()); + + // Marshal the paremeter definitions + List params = definition.getParameterDefinitions(); + org.alfresco.repo.webservice.action.ParameterDefinition[] parameterDefinitions = new org.alfresco.repo.webservice.action.ParameterDefinition[params.size()]; + int index = 0; + for (ParameterDefinition paramDef : params) + { + org.alfresco.repo.webservice.action.ParameterDefinition parameterDefinition = new org.alfresco.repo.webservice.action.ParameterDefinition( + paramDef.getName(), + paramDef.getType().toString(), + paramDef.isMandatory(), + paramDef.getDisplayLabel()); + parameterDefinitions[index] = parameterDefinition; + index ++; + } + actionItemType.setParameterDefinition(parameterDefinitions); + + return actionItemType; + } + + /** + * @see org.alfresco.repo.webservice.action.ActionServiceSoapPort#getRuleTypes() + */ + public org.alfresco.repo.webservice.action.RuleType[] getRuleTypes() throws RemoteException, ActionFault + { + // Get the list of rule types + List ruleTypes = this.ruleService.getRuleTypes(); + + // Marshal the rule types into an array + org.alfresco.repo.webservice.action.RuleType[] results = new org.alfresco.repo.webservice.action.RuleType[ruleTypes.size()]; + int index = 0; + for (RuleType ruleType : ruleTypes) + { + org.alfresco.repo.webservice.action.RuleType webServiceRuleType = new org.alfresco.repo.webservice.action.RuleType( + ruleType.getName(), + ruleType.getDisplayLabel()); + results[index] = webServiceRuleType; + index ++; + } + + return results; + } + + /** + * @see org.alfresco.repo.webservice.action.ActionServiceSoapPort#getActions(org.alfresco.repo.webservice.types.Reference, java.lang.String[]) + */ + public org.alfresco.repo.webservice.action.Action[] getActions(Reference reference, ActionFilter filter) throws RemoteException, ActionFault + { + // Get the actions + NodeRef nodeRef = Utils.convertToNodeRef(reference, this.nodeService, this.searchService, this.namespaceService); + List actions = this.actionService.getActions(nodeRef); + + org.alfresco.repo.webservice.action.Action[] webServiceActions = new org.alfresco.repo.webservice.action.Action[actions.size()]; + + // Filter the results + if (filter != null) + { + // TODO implement the filters + } + + // Marshal the results + int index = 0; + for (Action action : actions) + { + webServiceActions[index] = convertToWebServiceAction(action); + index++; + } + + return webServiceActions; + } + + private org.alfresco.repo.webservice.action.Action convertToWebServiceAction(Action action) + { + // Create the action item type for the action + ActionDefinition actionDefinition = this.actionService.getActionDefinition(action.getActionDefinitionName()); + ActionItemType actionItemType = convertToActionItemType(actionDefinition); + + // Get the parameters into a named value array + NamedValue[] namedValues = convertParametersToNamedValues(action); + + // Get the conditions + List conditions = action.getActionConditions(); + Condition[] webServiceConditions = new Condition[conditions.size()]; + int index2 = 0; + for (ActionCondition condition : conditions) + { + webServiceConditions[index2] = convertToWebServiceCondition(condition); + index2++; + } + + // Get the compenstaing action + Action compensatingAction = action.getCompensatingAction(); + org.alfresco.repo.webservice.action.Action webServiceCompensatingAction = convertToWebServiceAction(compensatingAction); + + // Sort out any sub-actions + org.alfresco.repo.webservice.action.Action[] childWebServiceActions = null; + if (action instanceof CompositeAction) + { + List childActions = ((CompositeAction)action).getActions(); + childWebServiceActions = new org.alfresco.repo.webservice.action.Action[childActions.size()]; + int index3 = 0; + for (Action childAction : childActions) + { + childWebServiceActions[index3] = convertToWebServiceAction(childAction); + index3 ++; + } + } + + // Get the reference to the 'owning' node + NodeRef owningNodeRef = action.getOwningNodeRef(); + Reference reference = null; + if (owningNodeRef != null) + { + reference = Utils.convertToReference(owningNodeRef); + } + + // Create the web service action object + org.alfresco.repo.webservice.action.Action webServiceAction = new org.alfresco.repo.webservice.action.Action( + action.getId(), + actionItemType, + action.getTitle(), + action.getDescription(), + action.getExecuteAsychronously(), + namedValues, + webServiceConditions, + webServiceCompensatingAction, + childWebServiceActions, + reference); + + return webServiceAction; + } + + /** + * + * @param item + * @return + */ + private NamedValue[] convertParametersToNamedValues(ParameterizedItem item) + { + Map params = item.getParameterValues(); + NamedValue[] namedValues = new NamedValue[params.size()]; + int index = 0; + for (Map.Entry entry : params.entrySet()) + { + String value = null; + try + { + value = DefaultTypeConverter.INSTANCE.convert(String.class, entry.getValue()); + } + catch (Throwable exception) + { + value = entry.getValue().toString(); + } + namedValues[index] = new NamedValue(entry.getKey(), value); + index++; + } + return namedValues; + } + + /** + * + * @param condition + * @return + */ + private Condition convertToWebServiceCondition(ActionCondition condition) + { + // Create the action item type for the condition + ActionConditionDefinition conditionDefinition = this.actionService.getActionConditionDefinition(condition.getActionConditionDefinitionName()); + ActionItemType actionItemType = convertToActionItemType(conditionDefinition); + + // Get the parameter values as an array of names values + NamedValue[] namedValues = convertParametersToNamedValues(condition); + + Condition webServiceCondition = new Condition( + condition.getId(), + actionItemType, + condition.getInvertCondition(), + namedValues); + + return webServiceCondition; + } + + /** + * @see org.alfresco.repo.webservice.action.ActionServiceSoapPort#saveActions(org.alfresco.repo.webservice.types.Reference, org.alfresco.repo.webservice.action.Action[]) + */ + public org.alfresco.repo.webservice.action.Action[] saveActions( + Reference reference, + org.alfresco.repo.webservice.action.Action[] webServiceActions) throws RemoteException, ActionFault + { + // Get the node reference + NodeRef nodeRef = Utils.convertToNodeRef(reference, this.nodeService, this.searchService, this.namespaceService); + + // Create the result array + org.alfresco.repo.webservice.action.Action[] results = new org.alfresco.repo.webservice.action.Action[webServiceActions.length]; + + int index = 0; + for (org.alfresco.repo.webservice.action.Action webServiceAction : webServiceActions) + { + // Convert to a server action object + Action action = convertToAction(webServiceAction); + + // Save the action + this.actionService.saveAction(nodeRef, action); + + // Add the updated action to the results + results[index] = convertToWebServiceAction(action); + index++; + } + + return results; + } + + /** + * Convert a web service action object into a repository action object. + * + * @param webServiceAction the web service action object + * @return the repository action object + */ + private Action convertToAction(org.alfresco.repo.webservice.action.Action webServiceAction) + { + // If the id is null then generate one + String id = webServiceAction.getId(); + if (id == null || id.length() == 0) + { + id = GUID.generate(); + } + + // Get the owning node ref + NodeRef owningNodeRef = null; + if (webServiceAction.getReference() != null) + { + owningNodeRef = Utils.convertToNodeRef( + webServiceAction.getReference(), + this.nodeService, + this.searchService, + this.namespaceService); + } + + // Create the action (or composite action) + ActionImpl action = null; + String actionDefinitionName = webServiceAction.getType().getName(); + if (CompositeActionExecuter.NAME.equals(actionDefinitionName) == true) + { + action = new CompositeActionImpl(id, owningNodeRef); + } + else + { + action = new ActionImpl(id, actionDefinitionName, owningNodeRef); + } + + // Set some of the action's details + action.setTitle(webServiceAction.getTitle()); + action.setDescription(webServiceAction.getDescription()); + action.setExecuteAsynchronously(webServiceAction.isExecuteAsynchronously()); + + // Set the parameters + NamedValue[] namedValues = webServiceAction.getParameters(); + for (NamedValue namedValue : namedValues) + { + // Get the type of the property + DataTypeDefinition propertyType = null; + ActionDefinition actionDefintion = this.actionService.getActionDefinition(action.getActionDefinitionName()); + ParameterDefinition propertyDefintion = actionDefintion.getParameterDefintion(namedValue.getName()); + if (propertyDefintion != null) + { + propertyType = this.dictionaryService.getDataType(propertyDefintion.getType()); + } + + // Convert the value into the correct type + Serializable value = null; + if (propertyType != null) + { + value = (Serializable)DefaultTypeConverter.INSTANCE.convert(propertyType, namedValue.getValue()); + } + else + { + value = namedValue.getValue(); + } + + // Set the parameter + action.setParameterValue(namedValue.getName(), value); + } + + // Set the conditions + Condition[] webServiceConditions = webServiceAction.getConditions(); + if (webServiceConditions != null) + { + for (Condition webServiceCondition : webServiceConditions) + { + action.addActionCondition(convertToActionCondition(webServiceCondition)); + } + } + + // Set the compensating action + org.alfresco.repo.webservice.action.Action webServiceCompensatingAction = webServiceAction.getCompensatingAction(); + if (webServiceCompensatingAction != null) + { + Action compensatingAction = convertToAction(webServiceCompensatingAction); + action.setCompensatingAction(compensatingAction); + } + + // Set the child actions (if we are dealing with a composite action) + if (CompositeActionExecuter.NAME.equals(actionDefinitionName) == true) + { + org.alfresco.repo.webservice.action.Action[] webServiceChildActions = webServiceAction.getActions(); + if (webServiceChildActions != null) + { + for (org.alfresco.repo.webservice.action.Action webServiceChildAction : webServiceChildActions) + { + Action childAction = convertToAction(webServiceChildAction); + ((CompositeAction)action).addAction(childAction); + } + } + } + + return action; + } + + /** + * + * @param webServiceCondition + * @return + */ + private ActionCondition convertToActionCondition(Condition webServiceCondition) + { + // If the id is null then generate one + String id = webServiceCondition.getId(); + if (id == null || id.length() == 0) + { + id = GUID.generate(); + } + + // Create the action condition + ActionCondition actionCondition = new ActionConditionImpl(id, webServiceCondition.getType().getName()); + + // Set the details of the condition + actionCondition.setInvertCondition(webServiceCondition.isInvertCondition()); + + // Set the condition parameters + NamedValue[] namedValues = webServiceCondition.getParameters(); + for (NamedValue namedValue : namedValues) + { + // Get the type of the property + DataTypeDefinition propertyType = null; + ActionConditionDefinition actionConditionDefintion = this.actionService.getActionConditionDefinition(actionCondition.getActionConditionDefinitionName()); + ParameterDefinition propertyDefintion = actionConditionDefintion.getParameterDefintion(namedValue.getName()); + if (propertyDefintion != null) + { + propertyType = this.dictionaryService.getDataType(propertyDefintion.getType()); + } + + // Convert the value into the correct type + Serializable value = null; + if (propertyType != null) + { + value = (Serializable)DefaultTypeConverter.INSTANCE.convert(propertyType, namedValue.getValue()); + } + else + { + value = namedValue.getValue(); + } + + // Set the parameter + actionCondition.setParameterValue(namedValue.getName(), value); + } + + return actionCondition; + } + + /** + * @see org.alfresco.repo.webservice.action.ActionServiceSoapPort#removeActions(org.alfresco.repo.webservice.types.Reference, org.alfresco.repo.webservice.action.Action[]) + */ + public void removeActions(Reference reference, org.alfresco.repo.webservice.action.Action[] webServiceActions) + throws RemoteException, ActionFault + { + // Get the node reference + NodeRef nodeRef = Utils.convertToNodeRef(reference, this.nodeService, this.searchService, this.namespaceService); + + if (webServiceActions == null) + { + // Remove all the actions + this.actionService.removeAllActions(nodeRef); + } + else + { + for (org.alfresco.repo.webservice.action.Action webServiceAction : webServiceActions) + { + Action action = convertToAction(webServiceAction); + this.actionService.removeAction(nodeRef, action); + } + } + } + + /** + * @see org.alfresco.repo.webservice.action.ActionServiceSoapPort#executeActions(org.alfresco.repo.webservice.types.Predicate, org.alfresco.repo.webservice.action.Action[]) + */ + public ActionExecutionResult[] executeActions(Predicate predicate, org.alfresco.repo.webservice.action.Action[] webServiceActions) throws RemoteException, ActionFault + { + List results = new ArrayList(10); + + // Resolve the predicate to a list of nodes + List nodeRefs = Utils.resolvePredicate(predicate, this.nodeService, this.searchService, this.namespaceService); + for (NodeRef nodeRef : nodeRefs) + { + // Create the execution result object and set the action reference + ActionExecutionResult executionResult = new ActionExecutionResult(); + executionResult.setReference(Utils.convertToReference(nodeRef)); + + // Tyr and execute the actions + List executedActions = new ArrayList(10); + for (org.alfresco.repo.webservice.action.Action webServiceAction : webServiceActions) + { + // Get the repository action object + Action action = convertToAction(webServiceAction); + + // TODO what about condition inversion + if (this.actionService.evaluateAction(action, nodeRef) == true) + { + // Execute the action (now that we know the conditions have been met) + this.actionService.executeAction(action, nodeRef, false); + executedActions.add(webServiceAction); + } + } + + // Set the executed actions on the execution result object + org.alfresco.repo.webservice.action.Action[] executedWebServiceActions = (org.alfresco.repo.webservice.action.Action[])executedActions.toArray(new org.alfresco.repo.webservice.action.Action[executedActions.size()]); + executionResult.setActions(executedWebServiceActions); + + // Add the execution object to the result list + results.add(executionResult); + } + return (ActionExecutionResult[])results.toArray(new ActionExecutionResult[results.size()]); + } + + /** + * @see org.alfresco.repo.webservice.action.ActionServiceSoapPort#getRules(org.alfresco.repo.webservice.types.Reference, org.alfresco.repo.webservice.action.RuleFilter) + */ + public org.alfresco.repo.webservice.action.Rule[] getRules(Reference reference, RuleFilter ruleFilter) + throws RemoteException, ActionFault + { + // Get the node reference + NodeRef nodeRef = Utils.convertToNodeRef(reference, this.nodeService, this.searchService, this.namespaceService); + + // Get the rules associtated with the node reference + List rules = this.ruleService.getRules(nodeRef); + + // Filter the results based on the rule filter passed + // TODO + + // Marshal the results + org.alfresco.repo.webservice.action.Rule[] webServiceRules = new org.alfresco.repo.webservice.action.Rule[rules.size()]; + int index = 0; + for (Rule rule : rules) + { + webServiceRules[index] = convertToWebServiceRule(rule); + index ++; + } + + + return webServiceRules; + } + + private org.alfresco.repo.webservice.action.Rule convertToWebServiceRule(Rule rule) + { + // Get the rule type + RuleType ruleType = this.ruleService.getRuleType(rule.getRuleTypeName()); + org.alfresco.repo.webservice.action.RuleType webServiceRuleType = new org.alfresco.repo.webservice.action.RuleType( + ruleType.getName(), + ruleType.getDisplayLabel()); + + // Get the run as user + // TODO for now set to null since this has no effect yet + String runAsUserName = null; + + // Get the conditions + List conditions = rule.getActionConditions(); + Condition[] webServiceConditions = new Condition[conditions.size()]; + int index2 = 0; + for (ActionCondition condition : conditions) + { + webServiceConditions[index2] = convertToWebServiceCondition(condition); + index2++; + } + + // Sort out any sub-actions + org.alfresco.repo.webservice.action.Action[] childWebServiceActions = null; + List childActions = rule.getActions(); + childWebServiceActions = new org.alfresco.repo.webservice.action.Action[childActions.size()]; + int index3 = 0; + for (Action childAction : childActions) + { + childWebServiceActions[index3] = convertToWebServiceAction(childAction); + index3 ++; + } + + // Get the reference to the 'owning' node + NodeRef owningNodeRef = rule.getOwningNodeRef(); + Reference reference = null; + if (owningNodeRef != null) + { + reference = Utils.convertToReference(owningNodeRef); + } + + // Create the web service rule object + org.alfresco.repo.webservice.action.Rule webServiceRule = new org.alfresco.repo.webservice.action.Rule( + rule.getId(), + webServiceRuleType, + rule.getTitle(), + rule.getDescription(), + rule.getExecuteAsychronously(), + webServiceConditions, + childWebServiceActions, + runAsUserName, + reference); + + return webServiceRule; + } + + /** + * @see org.alfresco.repo.webservice.action.ActionServiceSoapPort#saveRules(org.alfresco.repo.webservice.types.Reference, org.alfresco.repo.webservice.action.Rule[]) + */ + public org.alfresco.repo.webservice.action.Rule[] saveRules(Reference reference, org.alfresco.repo.webservice.action.Rule[] webServiceRules) + throws RemoteException, ActionFault + { + // Get the node reference + NodeRef nodeRef = Utils.convertToNodeRef(reference, this.nodeService, this.searchService, this.namespaceService); + + // Create the result array + org.alfresco.repo.webservice.action.Rule[] results = new org.alfresco.repo.webservice.action.Rule[webServiceRules.length]; + + int index = 0; + for (org.alfresco.repo.webservice.action.Rule webServiceRule : webServiceRules) + { + // Convert to a server rule object + Rule rule = convertToRule(webServiceRule); + + // Save the rule + this.ruleService.saveRule(nodeRef, rule); + + // Add the updated rule to the results + results[index] = convertToWebServiceRule(rule); + index++; + } + + return results; + } + + /** + * @see org.alfresco.repo.webservice.action.ActionServiceSoapPort#removeRules(org.alfresco.repo.webservice.types.Reference, org.alfresco.repo.webservice.action.Rule[]) + */ + public void removeRules(Reference reference, org.alfresco.repo.webservice.action.Rule[] webServiceRules) + throws RemoteException, ActionFault + { + // Get the node reference + NodeRef nodeRef = Utils.convertToNodeRef(reference, this.nodeService, this.searchService, this.namespaceService); + + if (webServiceRules == null) + { + // Remove all the actions + this.ruleService.removeAllRules(nodeRef); + } + else + { + for (org.alfresco.repo.webservice.action.Rule webServiceRule : webServiceRules) + { + Rule rule = convertToRule(webServiceRule); + this.ruleService.removeRule(nodeRef, rule); + } + } + + } + + private Rule convertToRule(org.alfresco.repo.webservice.action.Rule webServiceRule) + { + // If the id is null then generate one + String id = webServiceRule.getId(); + if (id == null || id.length() == 0) + { + id = GUID.generate(); + } + + // Get the owning node ref + NodeRef owningNodeRef = null; + if (webServiceRule.getReference() != null) + { + owningNodeRef = Utils.convertToNodeRef( + webServiceRule.getReference(), + this.nodeService, + this.searchService, + this.namespaceService); + } + + // Get the rule type name + String ruleTypeName = webServiceRule.getRuleType().getName(); + + // Create the rule + RuleImpl rule = new RuleImpl(id, ruleTypeName, owningNodeRef); + + // Set some of the rules details + rule.setTitle(webServiceRule.getTitle()); + rule.setDescription(webServiceRule.getDescription()); + rule.setExecuteAsynchronously(webServiceRule.isExecuteAsynchronously()); + + // Set the conditions + Condition[] webServiceConditions = webServiceRule.getConditions(); + if (webServiceConditions != null) + { + for (Condition webServiceCondition : webServiceConditions) + { + rule.addActionCondition(convertToActionCondition(webServiceCondition)); + } + } + + // Set the child actions + org.alfresco.repo.webservice.action.Action[] webServiceChildActions = webServiceRule.getActions(); + if (webServiceChildActions != null) + { + for (org.alfresco.repo.webservice.action.Action webServiceChildAction : webServiceChildActions) + { + Action childAction = convertToAction(webServiceChildAction); + rule.addAction(childAction); + } + } + + return rule; + } +} diff --git a/source/java/web-services-application-context.xml b/source/java/web-services-application-context.xml index d991c8e636..dea510c853 100644 --- a/source/java/web-services-application-context.xml +++ b/source/java/web-services-application-context.xml @@ -134,5 +134,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/web/WEB-INF/server-config.wsdd b/source/web/WEB-INF/server-config.wsdd index 736c3773d4..337bcd0549 100644 --- a/source/web/WEB-INF/server-config.wsdd +++ b/source/web/WEB-INF/server-config.wsdd @@ -1650,7 +1650,393 @@ encodingStyle="" /> - + + + Provides action and rule manipulation methods. + /wsdl/action-service.wsdl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/wsdl/action-service.wsdl b/source/wsdl/action-service.wsdl new file mode 100644 index 0000000000..1793d305da --- /dev/null +++ b/source/wsdl/action-service.wsdl @@ -0,0 +1,563 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gets the available condition definitions. + + + + + + Gets the available action definitions. + + + + + + Gets the availble action types. + + + + + + Gets the actions saved against a reference. + + + + + + Save actions against a given reference. + + + + + + Removes saved actions. + + + + + + Executes actions. + + + + + + Gets the rules for a reference. + + + + + + Save rules. + + + + + + Remove saved rules. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Provides Action and Rule manipulation methods. + + + + + + \ No newline at end of file diff --git a/source/wsdl/authentication-service.wsdl b/source/wsdl/authentication-service.wsdl index f1f29b3711..f9c298cc3c 100644 --- a/source/wsdl/authentication-service.wsdl +++ b/source/wsdl/authentication-service.wsdl @@ -93,15 +93,18 @@ - - - + + + + + + - + - + diff --git a/source/wsdl/headers.xsd b/source/wsdl/headers.xsd index 9a56ad6f78..cb758f3a91 100644 --- a/source/wsdl/headers.xsd +++ b/source/wsdl/headers.xsd @@ -1,29 +1,29 @@ - + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - \ No newline at end of file