diff --git a/project-build.xml b/project-build.xml index 09104e1332..c5819b09a1 100644 --- a/project-build.xml +++ b/project-build.xml @@ -48,7 +48,7 @@ - + @@ -135,5 +135,19 @@ + + + + + + + + + + + + + + diff --git a/source/generated/org/alfresco/repo/webservice/accesscontrol/ACE.java b/source/generated/org/alfresco/repo/webservice/accesscontrol/ACE.java new file mode 100644 index 0000000000..3b94483fea --- /dev/null +++ b/source/generated/org/alfresco/repo/webservice/accesscontrol/ACE.java @@ -0,0 +1,185 @@ +/** + * ACE.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.accesscontrol; + +public class ACE implements java.io.Serializable { + private java.lang.String authority; + private java.lang.String permission; + private boolean allow; + + public ACE() { + } + + public ACE( + java.lang.String authority, + java.lang.String permission, + boolean allow) { + this.authority = authority; + this.permission = permission; + this.allow = allow; + } + + + /** + * Gets the authority value for this ACE. + * + * @return authority + */ + public java.lang.String getAuthority() { + return authority; + } + + + /** + * Sets the authority value for this ACE. + * + * @param authority + */ + public void setAuthority(java.lang.String authority) { + this.authority = authority; + } + + + /** + * Gets the permission value for this ACE. + * + * @return permission + */ + public java.lang.String getPermission() { + return permission; + } + + + /** + * Sets the permission value for this ACE. + * + * @param permission + */ + public void setPermission(java.lang.String permission) { + this.permission = permission; + } + + + /** + * Gets the allow value for this ACE. + * + * @return allow + */ + public boolean isAllow() { + return allow; + } + + + /** + * Sets the allow value for this ACE. + * + * @param allow + */ + public void setAllow(boolean allow) { + this.allow = allow; + } + + private java.lang.Object __equalsCalc = null; + public synchronized boolean equals(java.lang.Object obj) { + if (!(obj instanceof ACE)) return false; + ACE other = (ACE) obj; + if (obj == null) return false; + if (this == obj) return true; + if (__equalsCalc != null) { + return (__equalsCalc == obj); + } + __equalsCalc = obj; + boolean _equals; + _equals = true && + ((this.authority==null && other.getAuthority()==null) || + (this.authority!=null && + this.authority.equals(other.getAuthority()))) && + ((this.permission==null && other.getPermission()==null) || + (this.permission!=null && + this.permission.equals(other.getPermission()))) && + this.allow == other.isAllow(); + __equalsCalc = null; + return _equals; + } + + private boolean __hashCodeCalc = false; + public synchronized int hashCode() { + if (__hashCodeCalc) { + return 0; + } + __hashCodeCalc = true; + int _hashCode = 1; + if (getAuthority() != null) { + _hashCode += getAuthority().hashCode(); + } + if (getPermission() != null) { + _hashCode += getPermission().hashCode(); + } + _hashCode += (isAllow() ? Boolean.TRUE : Boolean.FALSE).hashCode(); + __hashCodeCalc = false; + return _hashCode; + } + + // Type metadata + private static org.apache.axis.description.TypeDesc typeDesc = + new org.apache.axis.description.TypeDesc(ACE.class, true); + + static { + typeDesc.setXmlType(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/accesscontrol/1.0", "ACE")); + org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("authority"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/accesscontrol/1.0", "authority")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("permission"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/accesscontrol/1.0", "permission")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); + elemField.setNillable(false); + typeDesc.addFieldDesc(elemField); + elemField = new org.apache.axis.description.ElementDesc(); + elemField.setFieldName("allow"); + elemField.setXmlName(new javax.xml.namespace.QName("http://www.alfresco.org/ws/service/accesscontrol/1.0", "allow")); + elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean")); + 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/accesscontrol/ACL.java b/source/generated/org/alfresco/repo/webservice/accesscontrol/ACL.java new file mode 100644 index 0000000000..8eb6a698f1 --- /dev/null +++ b/source/generated/org/alfresco/repo/webservice/accesscontrol/ACL.java @@ -0,0 +1,203 @@ +/** + * ACL.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.accesscontrol; + +public class ACL implements java.io.Serializable { + private org.alfresco.repo.webservice.types.Reference reference; + private boolean inheritPermissions; + private org.alfresco.repo.webservice.accesscontrol.ACE[] aces; + + public ACL() { + } + + public ACL( + org.alfresco.repo.webservice.types.Reference reference, + boolean inheritPermissions, + org.alfresco.repo.webservice.accesscontrol.ACE[] aces) { + this.reference = reference; + this.inheritPermissions = inheritPermissions; + this.aces = aces; + } + + + /** + * Gets the reference value for this ACL. + * + * @return reference + */ + public org.alfresco.repo.webservice.types.Reference getReference() { + return reference; + } + + + /** + * Sets the reference value for this ACL. + * + * @param reference + */ + public void setReference(org.alfresco.repo.webservice.types.Reference reference) { + this.reference = reference; + } + + + /** + * Gets the inheritPermissions value for this ACL. + * + * @return inheritPermissions + */ + public boolean isInheritPermissions() { + return inheritPermissions; + } + + + /** + * Sets the inheritPermissions value for this ACL. + * + * @param inheritPermissions + */ + public void setInheritPermissions(boolean inheritPermissions) { + this.inheritPermissions = inheritPermissions; + } + + + /** + * Gets the aces value for this ACL. + * + * @return aces + */ + public org.alfresco.repo.webservice.accesscontrol.ACE[] getAces() { + return aces; + } + + + /** + * Sets the aces value for this ACL. + * + * @param aces + */ + public void setAces(org.alfresco.repo.webservice.accesscontrol.ACE[] aces) { + this.aces = aces; + } + + public org.alfresco.repo.webservice.accesscontrol.ACE getAces(int i) { + return this.aces[i]; + } + + public void setAces(int i, org.alfresco.repo.webservice.accesscontrol.ACE _value) { + this.aces[i] = _value; + } + + private java.lang.Object __equalsCalc = null; + public synchronized boolean equals(java.lang.Object obj) { + if (!(obj instanceof ACL)) return false; + ACL other = (ACL) obj; + if (obj == null) return false; + if (this == obj) return true; + if (__equalsCalc != null) { + return (__equalsCalc == obj); + } + __equalsCalc = obj; + boolean _equals; + _equals = true && + ((this.reference==null && other.getReference()==null) || + (this.reference!=null && + this.reference.equals(other.getReference()))) && + this.inheritPermissions == other.isInheritPermissions() && + ((this.aces==null && other.getAces()==null) || + (this.aces!=null && + java.util.Arrays.equals(this.aces, other.getAces()))); + __equalsCalc = null; + return _equals; + } + + private boolean __hashCodeCalc = false; + public synchronized int hashCode() { + if (__hashCodeCalc) { + return 0; + } + __hashCodeCalc = true; + int _hashCode = 1; + if (getReference() != null) { + _hashCode += getReference().hashCode(); + } + _hashCode += (isInheritPermissions() ? Boolean.TRUE : Boolean.FALSE).hashCode(); + if (getAces() != null) { + for (int i=0; + i + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/java/org/alfresco/repo/webservice/accesscontrol/AccessControlService.java b/source/java/org/alfresco/repo/webservice/accesscontrol/AccessControlService.java new file mode 100644 index 0000000000..a105782b8d --- /dev/null +++ b/source/java/org/alfresco/repo/webservice/accesscontrol/AccessControlService.java @@ -0,0 +1,72 @@ +package org.alfresco.repo.webservice.accesscontrol; + +import java.rmi.RemoteException; + +import org.alfresco.repo.transaction.TransactionComponent; +import org.alfresco.repo.webservice.AbstractWebService; +import org.alfresco.repo.webservice.types.Predicate; + +public class AccessControlService extends AbstractWebService implements AccessControlServiceSoapPort +{ + private TransactionComponent transactionService = null; + + public void setTransactionService(TransactionComponent transactionService) + { + this.transactionService = transactionService; + } + + public ACL[] getACLs(Predicate predicate, ACE filter) throws RemoteException, AccessControlFault + { + // TODO Auto-generated method stub + return null; + } + + public ACL[] addACEs(Predicate predicate, ACE[] aces) throws RemoteException, AccessControlFault + { + // TODO Auto-generated method stub + return null; + } + + public ACL[] removeACEs(Predicate predicate, ACE[] aces) throws RemoteException, AccessControlFault + { + // TODO Auto-generated method stub + return null; + } + + public GetPermissionsResult[] getPermissions(Predicate predicate) throws RemoteException, AccessControlFault + { + // TODO Auto-generated method stub + return null; + } + + public GetPermissionsResult[] getClassPermissions(String[] classNames) throws RemoteException, AccessControlFault + { + // TODO Auto-generated method stub + return null; + } + + public HasPermissionsResult hasPermissions(Predicate predicate, String[] permissions) throws RemoteException, AccessControlFault + { + // TODO Auto-generated method stub + return null; + } + + public ACL[] setInheritPermission(Predicate predicate, boolean inheritPermission) throws RemoteException, AccessControlFault + { + // TODO Auto-generated method stub + return null; + } + + public OwnerResult[] getOwners(Predicate predicate) throws RemoteException, AccessControlFault + { + // TODO Auto-generated method stub + return null; + } + + public OwnerResult[] setOwners(Predicate predicate, String owner) throws RemoteException, AccessControlFault + { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/source/java/web-services-application-context.xml b/source/java/web-services-application-context.xml index 7fae49ba3c..8e83bf1f21 100644 --- a/source/java/web-services-application-context.xml +++ b/source/java/web-services-application-context.xml @@ -30,10 +30,10 @@ - + - + @@ -41,7 +41,7 @@ - + @@ -56,10 +56,10 @@ - + - + @@ -80,7 +80,7 @@ - + @@ -95,16 +95,16 @@ - + - + - + - + @@ -122,10 +122,10 @@ - + - + @@ -146,16 +146,31 @@ - + - + - + - + + + + + + + + + + + + + + + + diff --git a/source/web/WEB-INF/server-config.wsdd b/source/web/WEB-INF/server-config.wsdd index a86de8ea61..237d0cb997 100644 --- a/source/web/WEB-INF/server-config.wsdd +++ b/source/web/WEB-INF/server-config.wsdd @@ -2322,6 +2322,380 @@ encodingStyle="" /> + + + Access control web service API. + /wsdl/access-control-service.wsdl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/wsdl/access-control-service.wsdl b/source/wsdl/access-control-service.wsdl new file mode 100644 index 0000000000..483f55540a --- /dev/null +++ b/source/wsdl/access-control-service.wsdl @@ -0,0 +1,499 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Get the list of the ACL's for a reference. + + + + + + Adds a number of ACE's to a collection of references. + + + + + + Removes ACE's from a collection of references. + + + + + + Gets a list of the settable permissions for a set of references. + + + + + + Gets a list of the settable permissions for a list of classes. + + + + + + Determines whether the current authenticated user has the permissions on each of the specified references. + + + + + + Set the inherit permission property of a set of references. + + + + + + Get the current node owner. + + + + + + Sets the current node owner. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Access control service. + + + + + + \ No newline at end of file