Coverage Report - org.kuali.student.core.organization.service.OrganizationService
 
Classes in this File Line Coverage Branch Coverage Complexity
OrganizationService
N/A
N/A
1
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 package org.kuali.student.core.organization.service;
 17  
 
 18  
 import java.util.List;
 19  
 
 20  
 import javax.jws.WebParam;
 21  
 import javax.jws.WebService;
 22  
 import javax.jws.soap.SOAPBinding;
 23  
 
 24  
 import org.kuali.student.common.dictionary.service.old.DictionaryService;
 25  
 import org.kuali.student.common.dto.StatusInfo;
 26  
 import org.kuali.student.common.exceptions.AlreadyExistsException;
 27  
 import org.kuali.student.common.exceptions.DataValidationErrorException;
 28  
 import org.kuali.student.common.exceptions.DoesNotExistException;
 29  
 import org.kuali.student.common.exceptions.InvalidParameterException;
 30  
 import org.kuali.student.common.exceptions.MissingParameterException;
 31  
 import org.kuali.student.common.exceptions.OperationFailedException;
 32  
 import org.kuali.student.common.exceptions.PermissionDeniedException;
 33  
 import org.kuali.student.common.exceptions.VersionMismatchException;
 34  
 import org.kuali.student.common.search.service.SearchService;
 35  
 import org.kuali.student.common.validation.dto.ValidationResultInfo;
 36  
 import org.kuali.student.core.organization.dto.OrgHierarchyInfo;
 37  
 import org.kuali.student.core.organization.dto.OrgInfo;
 38  
 import org.kuali.student.core.organization.dto.OrgOrgRelationInfo;
 39  
 import org.kuali.student.core.organization.dto.OrgOrgRelationTypeInfo;
 40  
 import org.kuali.student.core.organization.dto.OrgPersonRelationInfo;
 41  
 import org.kuali.student.core.organization.dto.OrgPersonRelationTypeInfo;
 42  
 import org.kuali.student.core.organization.dto.OrgPositionRestrictionInfo;
 43  
 import org.kuali.student.core.organization.dto.OrgTreeInfo;
 44  
 import org.kuali.student.core.organization.dto.OrgTypeInfo;
 45  
 /**
 46  
  * <b>IMPORTANT:</b> This service contract is currently under development. If you are planning to implement the Kuali Student System or parts thereof, <b>please do not consider this service to be final!</b> Consult this page for status before making any plans that rely on specific implementations of these services.</p>
 47  
  * 
 48  
  * <h3><a name="KSDOC-ServiceDescriptions-Description"></a>Description</h3>
 49  
  * 
 50  
  * <p>The Organization service manages organizational units that have some relationship to the institution and manages the relationships between people and those organization. Internal organizations include officially recognized organizations (such as schools and departments) and unofficial organizations (such as clubs or student groups). Organizations may also be external to the institution, such as companies, other institutions, government, associations.</p>
 51  
  * 
 52  
  * <h3><a name="KSDOC-ServiceDescriptions-Assumptions"></a>Assumptions</h3>
 53  
  * 
 54  
  * <p>The design of this service considers the following assumptions:</p>
 55  
  * <ul>
 56  
  *         <li>Most organizations have "parent" organization(s) within a given context. For example, the School of Arts and Sciences exists within the institution, so the School or Arts and Sciences is a child of the institution.</li>
 57  
  *         <li>There may be multiple relationships that need to be captured for a given organization since the parent organization may be different depending on the context. For example, a department may report to a particular organization for administrative purposes, but report to another organization for financial purposes.</li>
 58  
  *         <li>Organization-to-organization relationships can be grouped into hierarchies based upon the type of relationship.</li>
 59  
  * 
 60  
  *         <li>Organizations may place additional constraints on the types of relationships a person may have with the organization.</li>
 61  
  * </ul>
 62  
  * 
 63  
  * 
 64  
  * <h3><a name="KSDOC-ServiceDescriptions-KeyConcepts"></a>Key Concepts</h3>
 65  
  * 
 66  
  * <ul>
 67  
  *         <li>Organizations are different from authorization groups in that organizations deal directly with people while authorization groups deal directly with principals. Organizations may contain individuals who have no way to authenticate themselves (and thus have no unique permissions) and authorization groups may have principals which are linked to non-human entities (such as batch jobs, other services, and so forth).</li>
 68  
  *         <li>Organizations and authorization groups may be related in that a member of an organization may have a principal associated with an authorization group, but this is not required.
 69  
  * <br clear="all">
 70  
  * <br clear="all"></li>
 71  
  * 
 72  
  * </ul>
 73  
  *
 74  
  * @author Kuali Student Team
 75  
  */
 76  
 
 77  
 @WebService(name = "OrganizationService", targetNamespace = "http://student.kuali.org/wsdl/organization")
 78  
 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
 79  
 public interface OrganizationService extends DictionaryService, SearchService {
 80  
 
 81  
     /** 
 82  
      * Retrieves the list of organization hierarchies known by this service.
 83  
      * @param None No parameters
 84  
      * @return list of organization hierarchies
 85  
      * @throws OperationFailedException unable to complete request
 86  
          */
 87  
     public List<OrgHierarchyInfo> getOrgHierarchies() throws OperationFailedException;
 88  
 
 89  
     /** 
 90  
      * Retrieves information about a specific organization hierarchy.
 91  
      * @param orgHierarchyKey organization hierarchy identifier
 92  
      * @return information about the specified organization hierarchy
 93  
      * @throws DoesNotExistException orgHierarchy not found
 94  
      * @throws InvalidParameterException invalid orgHierarchyKey
 95  
      * @throws MissingParameterException missing orgHierarchyKey
 96  
      * @throws OperationFailedException unable to complete request
 97  
          */
 98  
     public OrgHierarchyInfo getOrgHierarchy(@WebParam(name="orgHierarchyKey")String orgHierarchyKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 99  
 
 100  
     /** 
 101  
      * Retrieves the list of types of organizations known by this service.
 102  
      * @param None No parameters
 103  
      * @return List of organization types
 104  
      * @throws OperationFailedException unable to complete request
 105  
          */
 106  
     public List<OrgTypeInfo> getOrgTypes() throws OperationFailedException;
 107  
 
 108  
     /** 
 109  
      * Retrieves information about the specified type of organization.
 110  
      * @param orgTypeKey organization type identifier
 111  
      * @return organization type
 112  
      * @throws DoesNotExistException orgType not found
 113  
      * @throws InvalidParameterException invalid orgTypeKey
 114  
      * @throws MissingParameterException missing orgTypeKey
 115  
      * @throws OperationFailedException unable to complete request
 116  
          */
 117  
     public OrgTypeInfo getOrgType(@WebParam(name="orgTypeKey")String orgTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 118  
 
 119  
     /** 
 120  
      * Retrieves the list of all types of relationships between organizations known to the service.
 121  
      * @param None No parameters
 122  
      * @return list of organization to organization relationship types
 123  
      * @throws OperationFailedException unable to complete request
 124  
          */
 125  
     public List<OrgOrgRelationTypeInfo> getOrgOrgRelationTypes() throws OperationFailedException;
 126  
 
 127  
     /** 
 128  
      * Retrieves information about the specified type of relationship between organizations.
 129  
      * @param orgOrgRelationTypeKey organization organization relationship type identifier
 130  
      * @return organization organization relationship type information
 131  
      * @throws DoesNotExistException orgOrgRelationType not found
 132  
      * @throws InvalidParameterException invalid orgOrgRelationTypeKey
 133  
      * @throws MissingParameterException missing orgOrgRelationTypeKey
 134  
      * @throws OperationFailedException unable to complete request
 135  
          */
 136  
     public OrgOrgRelationTypeInfo getOrgOrgRelationType(@WebParam(name="orgOrgRelationTypeKey")String orgOrgRelationTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 137  
 
 138  
     /** 
 139  
      * Retrieves the types of relationships between organizations that are allowed for a particular type of organization.
 140  
      * @param orgTypeKey organization type identifier
 141  
      * @return list of relationship types between organizations for the specified organization type
 142  
      * @throws DoesNotExistException orgType not found
 143  
      * @throws InvalidParameterException invalid orgTypeKey
 144  
      * @throws MissingParameterException missing orgTypeKey
 145  
      * @throws OperationFailedException unable to complete request
 146  
          */
 147  
     public List<OrgOrgRelationTypeInfo> getOrgOrgRelationTypesForOrgType(@WebParam(name="orgTypeKey")String orgTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 148  
 
 149  
     /** 
 150  
      * Retrieves the types of relationships between organizations that are allowed for a particular organization hierarchy.
 151  
      * @param orgHierarchyKey organization hierarchy identifier
 152  
      * @return list of relationship types between organizations
 153  
      * @throws DoesNotExistException orgHierarchy not found
 154  
      * @throws InvalidParameterException invalid orgHierarchyKey
 155  
      * @throws MissingParameterException missing orgHierarchyKey
 156  
      * @throws OperationFailedException unable to complete request
 157  
          */
 158  
     public List<OrgOrgRelationTypeInfo> getOrgOrgRelationTypesForOrgHierarchy(@WebParam(name="orgHierarchyKey")String orgHierarchyKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 159  
 
 160  
     /** 
 161  
      * Retrieves all types of relationships between an organization and a person known by this service.
 162  
      * @param None No parameters
 163  
      * @return list of all organization person relationship types
 164  
      * @throws OperationFailedException unable to complete request
 165  
          */
 166  
     public List<OrgPersonRelationTypeInfo> getOrgPersonRelationTypes() throws OperationFailedException;
 167  
 
 168  
     /** 
 169  
      * Retrieves information about a type of relationship between an organization and a person.
 170  
      * @param orgPersonRelationTypeKey organization person relationship type identifier
 171  
      * @return organization person relationship type information
 172  
      * @throws DoesNotExistException orgType not found
 173  
      * @throws InvalidParameterException invalid orgTypeKey
 174  
      * @throws MissingParameterException missing orgTypeKey
 175  
      * @throws OperationFailedException unable to complete request
 176  
          */
 177  
     public OrgPersonRelationTypeInfo getOrgPersonRelationType(@WebParam(name="orgPersonRelationTypeKey")String orgPersonRelationTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 178  
 
 179  
     /** 
 180  
      * Retrieves the types of relationships between an organization and a person that are allowed for a particular organization type.
 181  
      * @param orgTypeKey organization type identifier
 182  
      * @return list of organization person relationship types that are valid for the supplied organization type (may have nothing)
 183  
      * @throws DoesNotExistException orgType not found
 184  
      * @throws InvalidParameterException invalid orgTypeKey
 185  
      * @throws MissingParameterException missing orgTypeKey
 186  
      * @throws OperationFailedException unable to complete request
 187  
          */
 188  
     public List<OrgPersonRelationTypeInfo> getOrgPersonRelationTypesForOrgType(@WebParam(name="orgTypeKey")String orgTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 189  
 
 190  
     /** 
 191  
      * Validates an organization. Depending on the value of validationType, this validation could be limited to tests on just the current object and its directly contained sub-objects or expanded to perform all tests related to this object. If an identifier is present for the organization (and/or one of its contained sub-objects) and a record is found for that identifier, the validation checks if the organization can be shifted to the new values. If an identifier is not present or a record cannot be found for the identifier, it is assumed that the record does not exist and as such, the checks performed will be much shallower, typically mimicking those performed by setting the validationType to the current object.
 192  
      * @param validationType identifier of the extent of validation
 193  
      * @param orgInfo organization information to be tested.
 194  
      * @return results from performing the validation
 195  
      * @throws DoesNotExistException validationTypeKey not found
 196  
      * @throws InvalidParameterException invalid validationTypeKey, orgInfo
 197  
      * @throws MissingParameterException missing validationTypeKey, orgInfo
 198  
      * @throws OperationFailedException unable to complete request
 199  
          */
 200  
     public List<ValidationResultInfo> validateOrg(@WebParam(name="validationType")String validationType, @WebParam(name="orgInfo")OrgInfo orgInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 201  
 
 202  
     /** 
 203  
      * Validates an organization to organization relationship. Depending on the value of validationType, this validation could be limited to tests on just the current object and its directly contained sub-objects or expanded to perform all tests related to this object. If an identifier is present for the organization organization relationship (and/or one of its contained sub-objects) and a record is found for that identifier, the validation checks if the organization organization relationship can be shifted to the new values. If an identifier is not present or a record cannot be found for the identifier, it is assumed that the record does not exist and as such, the checks performed will be much shallower, typically mimicking those performed by setting the validationType to the current object.
 204  
      * @param validationType identifier of the extent of validation
 205  
      * @param orgOrgRelationInfo organization organization relationship information to be tested.
 206  
      * @return results from performing the validation
 207  
      * @throws DoesNotExistException validationTypeKey not found
 208  
      * @throws InvalidParameterException invalid validationTypeKey, orgOrgRelationInfo
 209  
      * @throws MissingParameterException missing validationTypeKey, orgOrgRelationInfo
 210  
      * @throws OperationFailedException unable to complete request
 211  
          */
 212  
     public List<ValidationResultInfo> validateOrgOrgRelation(@WebParam(name="validationType")String validationType, @WebParam(name="orgOrgRelationInfo")OrgOrgRelationInfo orgOrgRelationInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 213  
 
 214  
     /** 
 215  
      * Validates a organization to person relationship. Depending on the value of validationType, this validation could be limited to tests on just the current object and its directly contained sub-objects or expanded to perform all tests related to this object. If an identifier is present for the organization person relationship (and/or one of its contained sub-objects) and a record is found for that identifier, the validation checks if the organization person relationship can be shifted to the new values. If an identifier is not present or a record cannot be found for the identifier, it is assumed that the record does not exist and as such, the checks performed will be much shallower, typically mimicking those performed by setting the validationType to the current object.
 216  
      * @param validationType identifier of the extent of validation
 217  
      * @param orgPersonRelationInfo organization person relationship information to be tested.
 218  
      * @return results from performing the validation
 219  
      * @throws DoesNotExistException validationTypeKey not found
 220  
      * @throws InvalidParameterException invalid validationTypeKey, orgPersonRelationInfo
 221  
      * @throws MissingParameterException missing validationTypeKey, orgPersonRelationInfo
 222  
      * @throws OperationFailedException unable to complete request
 223  
          */
 224  
     public List<ValidationResultInfo> validateOrgPersonRelation(@WebParam(name="validationType")String validationType, @WebParam(name="orgPersonRelationInfo")OrgPersonRelationInfo orgPersonRelationInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 225  
 
 226  
     /** 
 227  
      * Validates an organization position restriction. Depending on the value of validationType, this validation could be limited to tests on just the current object and its directly contained sub-objects or expanded to perform all tests related to this object. If an identifier is present for the position restriction (and/or one of its contained sub-objects) and a record is found for that identifier, the validation checks if the position restriction can be shifted to the new values. If an identifier is not present or a record cannot be found for the identifier, it is assumed that the record does not exist and as such, the checks performed will be much shallower, typically mimicking those performed by setting the validationType to the current object.
 228  
      * @param validationType identifier of the extent of validation
 229  
      * @param orgPositionRestrictionInfo organization position restriction information to be tested.
 230  
      * @return results from performing the validation
 231  
      * @throws DoesNotExistException validationTypeKey not found
 232  
      * @throws InvalidParameterException invalid validationTypeKey, orgPositionRestrictionInfo
 233  
      * @throws MissingParameterException missing validationTypeKey, orgPositionRestrictionInfo
 234  
      * @throws OperationFailedException unable to complete request
 235  
          */
 236  
     public List<ValidationResultInfo> validateOrgPositionRestriction(@WebParam(name="validationType")String validationType, @WebParam(name="orgPositionRestrictionInfo")OrgPositionRestrictionInfo orgPositionRestrictionInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException;
 237  
 
 238  
     /** 
 239  
      * Retrieves an existing organization by its identifier.
 240  
      * @param orgId identifier for org to be retrieved
 241  
      * @return details of the organization for this id
 242  
      * @throws DoesNotExistException orgId not found
 243  
      * @throws InvalidParameterException invalid orgId
 244  
      * @throws MissingParameterException invalid orgId
 245  
      * @throws OperationFailedException unable to complete request
 246  
      * @throws PermissionDeniedException authorization failure
 247  
          */
 248  
     public OrgInfo getOrganization(@WebParam(name="orgId")String orgId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 249  
 
 250  
     /** 
 251  
      * Retrieves a list of existing organizations from a list of identifiers.
 252  
      * @param orgIdList identifiers for orgs to be retrieved
 253  
      * @return details of the organizations for these ids
 254  
      * @throws DoesNotExistException orgId not found
 255  
      * @throws InvalidParameterException invalid orgId
 256  
      * @throws MissingParameterException invalid orgId
 257  
      * @throws OperationFailedException unable to complete request
 258  
      * @throws PermissionDeniedException authorization failure
 259  
          */
 260  
     public List<OrgInfo> getOrganizationsByIdList(@WebParam(name="orgIdList")List<String> orgIdList) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 261  
 
 262  
     /** 
 263  
      * Retrieves an existing organization to organization relationship by the relationship identifier
 264  
      * @param orgOrgRelationId identifier for org to org relation to be retrieved
 265  
      * @return details of the orgOrgRelation for this id
 266  
      * @throws DoesNotExistException orgOrgRelationId not found
 267  
      * @throws InvalidParameterException invalid orgOrgRelationId
 268  
      * @throws MissingParameterException invalid orgOrgRelationId
 269  
      * @throws OperationFailedException unable to complete request
 270  
      * @throws PermissionDeniedException authorization failure
 271  
          */
 272  
     public OrgOrgRelationInfo getOrgOrgRelation(@WebParam(name="orgOrgRelationId")String orgOrgRelationId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 273  
 
 274  
     /** 
 275  
      * Retrieves a list of existing organization to organization relationships from a list of identifiers
 276  
      * @param orgOrgRelationIdList identifiers for org org relations to be retrieved
 277  
      * @return details of the organizations for these ids
 278  
      * @throws DoesNotExistException orgOrgRelationId not found
 279  
      * @throws InvalidParameterException invalid orgOrgRelationId
 280  
      * @throws MissingParameterException invalid orgOrgRelationId
 281  
      * @throws OperationFailedException unable to complete request
 282  
      * @throws PermissionDeniedException authorization failure
 283  
          */
 284  
     public List<OrgOrgRelationInfo> getOrgOrgRelationsByIdList(@WebParam(name="orgOrgRelationIdList")List<String> orgOrgRelationIdList) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 285  
 
 286  
     /** 
 287  
      * Retrieves organization to organization relationships for a particular organization
 288  
      * @param orgId organization identifier for which organization organization relationships are to be found
 289  
      * @return List of org to org relations found for the supplied organization
 290  
      * @throws DoesNotExistException orgId not found
 291  
      * @throws InvalidParameterException invalid orgId
 292  
      * @throws MissingParameterException missing orgId
 293  
      * @throws OperationFailedException unable to complete request
 294  
      * @throws PermissionDeniedException authorization failure
 295  
          */
 296  
     public List<OrgOrgRelationInfo> getOrgOrgRelationsByOrg(@WebParam(name="orgId")String orgId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 297  
 
 298  
     /** 
 299  
      * Retrieves organization to organization relationships that have been made TO a particular organization. Opposite direction from getOrgOrgRelationsByOrg.
 300  
      * @param relatedOrgId organization identifier for which the reverse organization organization relationships are to be found
 301  
      * @return List of organization organization relationships found for the supplied organization
 302  
      * @throws DoesNotExistException orgId not found
 303  
      * @throws InvalidParameterException invalid orgId
 304  
      * @throws MissingParameterException missing orgId
 305  
      * @throws OperationFailedException unable to complete request
 306  
      * @throws PermissionDeniedException authorization failure
 307  
          */
 308  
     public List<OrgOrgRelationInfo> getOrgOrgRelationsByRelatedOrg(@WebParam(name="relatedOrgId")String relatedOrgId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 309  
 
 310  
     /** 
 311  
      * Tests if a org has a current relationship with a specified organization.
 312  
      * @param orgId identifier of the organization
 313  
      * @param comparisonOrgId identifier of the organization to be compared to
 314  
      * @param orgOrgRelationTypeKey type of relationship between the organizations
 315  
      * @return true if a relationship exists
 316  
      * @throws InvalidParameterException invalid orgId, comparisonOrgId, orgOrgRelationType
 317  
      * @throws MissingParameterException missing orgId, comparisonOrgId, orgOrgRelationType
 318  
      * @throws OperationFailedException unable to complete request
 319  
      * @throws PermissionDeniedException authorization failure
 320  
          */
 321  
     public Boolean hasOrgOrgRelation(@WebParam(name="orgId")String orgId, @WebParam(name="comparisonOrgId")String comparisonOrgId, @WebParam(name="orgOrgRelationTypeKey")String orgOrgRelationTypeKey) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 322  
 
 323  
     /** 
 324  
      * Tests if a specified organization is a descendant of the other specified organization in the given organization hierarchy.
 325  
      * @param orgId identifier of the "ancestor" organization
 326  
      * @param descendantOrgId identifier of the organization to be checked if it is a descendant
 327  
      * @param orgHierarchy identifier of the organization hierarchy to be checked against
 328  
      * @return True if the organization is a descendant of the other organization in that hierarchy
 329  
      * @throws InvalidParameterException invalid orgId, descendantOrgId, orgHierarchy
 330  
      * @throws MissingParameterException missing orgId, descendantOrgId, orgHierarchy
 331  
      * @throws OperationFailedException unable to complete request
 332  
      * @throws PermissionDeniedException authorization failure
 333  
          */
 334  
     public Boolean isDescendant(@WebParam(name="orgId")String orgId, @WebParam(name="descendantOrgId")String descendantOrgId, @WebParam(name="orgHierarchy")String orgHierarchy) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 335  
 
 336  
     /** 
 337  
      * Retrieves the list of identifiers for all "descendant" organizations of
 338  
      * the specified organization in the given organization hierarchy,
 339  
      * regardless of the distance from the specified organization. 
 340  
      * Information about the distance from the original organization is not
 341  
      * returned by this call, so this can be seen as a flattened and
 342  
      * de-duplicated representation.
 343  
      * 
 344  
      * @param orgId identifier of the "ancestor" organization
 345  
      * @param orgHierarchy identifier of the organization hierarchy to be checked against
 346  
      * @return list of identifiers for the "descendant" organizations for the specified organization
 347  
      * @throws InvalidParameterException invalid orgId, orgHierarchy
 348  
      * @throws MissingParameterException missing orgId, orgHierarchy
 349  
      * @throws OperationFailedException unable to complete request
 350  
      * @throws PermissionDeniedException authorization failure
 351  
          */
 352  
     public List<String> getAllDescendants(@WebParam(name="orgId")String orgId, @WebParam(name="orgHierarchy")String orgHierarchy) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 353  
 
 354  
     /** 
 355  
      * Retrieves the list of identifiers for all "ancestor" organizations of the
 356  
      * the specified organization in the given organization hierarchy,
 357  
      * regardless of the distance from the specified organization. 
 358  
      * Information about the distance from the original organization is not
 359  
      * returned by this call, so this can be seen as a flattened and
 360  
      * de-duplicated representation.
 361  
      * 
 362  
      * @param orgId identifier of the "descendant" organization
 363  
      * @param orgHierarchy identifier of the organization hierarchy to be checked against
 364  
      * @return list of identifiers for the "ancestor" organizations of the specified organization
 365  
      * @throws InvalidParameterException invalid orgId, orgHierarchy
 366  
      * @throws MissingParameterException missing orgId, orgHierarchy
 367  
      * @throws OperationFailedException unable to complete request
 368  
      * @throws PermissionDeniedException authorization failure
 369  
          */
 370  
     public List<String> getAllAncestors(@WebParam(name="orgId")String orgId, @WebParam(name="orgHierarchy")String orgHierarchy) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 371  
 
 372  
     /** 
 373  
      * Retrieves an existing org to person relation by the relation ID
 374  
      * @param orgPersonRelationId identifier for org to person relation to be retrieved
 375  
      * @return details of the orgPersonRelation for this id
 376  
      * @throws DoesNotExistException orgPersonRelationId not found
 377  
      * @throws InvalidParameterException invalid orgPersonRelationId
 378  
      * @throws MissingParameterException invalid orgPersonRelationId
 379  
      * @throws OperationFailedException unable to complete request
 380  
      * @throws PermissionDeniedException authorization failure
 381  
          */
 382  
     public OrgPersonRelationInfo getOrgPersonRelation(@WebParam(name="orgPersonRelationId")String orgPersonRelationId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 383  
 
 384  
     /** 
 385  
      * Retrieves a list of existing organization to person relations from a list of org person relation IDs
 386  
      * @param orgPersonRelationIdList identifiers for org person relations to be retrieved
 387  
      * @return details of the relations for these ids
 388  
      * @throws DoesNotExistException orgPersonRelationId not found
 389  
      * @throws InvalidParameterException invalid orgPersonRelationId
 390  
      * @throws MissingParameterException invalid orgPersonRelationId
 391  
      * @throws OperationFailedException unable to complete request
 392  
      * @throws PermissionDeniedException authorization failure
 393  
          */
 394  
     public List<OrgPersonRelationInfo> getOrgPersonRelationsByIdList(@WebParam(name="orgPersonRelationIdList")List<String> orgPersonRelationIdList) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 395  
 
 396  
     /** 
 397  
      * Retrieves the list of identifiers for people that have the specified type of relationship to this organization
 398  
      * The list of person ids are fetched for PersonRelations that are still active meaning the expiration date is greater than the current date
 399  
      * @param orgId identifier of the organization that members are being found for
 400  
      * @param orgPersonRelationTypeKey type of organization person relationship that is being looked for
 401  
      * @return list of person identifiers that match supplied criteria
 402  
      * @throws DoesNotExistException orgId, orgPersonRelationType not found
 403  
      * @throws InvalidParameterException invalid orgId, orgPersonRelationType
 404  
      * @throws MissingParameterException missing orgId, orgPersonRelationType
 405  
      * @throws OperationFailedException unable to complete request
 406  
      * @throws PermissionDeniedException authorization failure
 407  
          */
 408  
     public List<String> getPersonIdsForOrgByRelationType(@WebParam(name="orgId")String orgId, @WebParam(name="orgPersonRelationTypeKey")String orgPersonRelationTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 409  
 
 410  
     /** 
 411  
      * Retrieves the org to person relations for a particular organization
 412  
      * @param orgId identifier for the organization for which organization person relationships are to be found
 413  
      * @return list of organization person relationships found for the supplied organization
 414  
      * @throws DoesNotExistException orgId not found
 415  
      * @throws InvalidParameterException invalid orgId
 416  
      * @throws MissingParameterException missing orgId
 417  
      * @throws OperationFailedException unable to complete request
 418  
      * @throws PermissionDeniedException authorization failure
 419  
          */
 420  
     public List<OrgPersonRelationInfo> getOrgPersonRelationsByOrg(@WebParam(name="orgId")String orgId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 421  
 
 422  
     /** 
 423  
      * Retrieves all OrgPersonRelations for a particular Person and Organization
 424  
      * @param personId person to use to look for relationships
 425  
      * @param orgId organization to use to look for relationships
 426  
      * @return list of organization person relationships that exist for the supplied person and organization
 427  
      * @throws DoesNotExistException personId, orgId not found
 428  
      * @throws InvalidParameterException invalid personId, orgId
 429  
      * @throws MissingParameterException missing personId, orgId
 430  
      * @throws OperationFailedException unable to complete request
 431  
      * @throws PermissionDeniedException authorization failure
 432  
          */
 433  
     public List<OrgPersonRelationInfo> getOrgPersonRelationsByPerson(@WebParam(name="personId")String personId, @WebParam(name="orgId")String orgId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 434  
 
 435  
     /** 
 436  
      * Retrieves all organization person relationships for a person.
 437  
      * @param personId person to get all relationships for
 438  
      * @return List of organization person relationships that exist for this person
 439  
      * @throws DoesNotExistException personId not found
 440  
      * @throws InvalidParameterException invalid personId
 441  
      * @throws MissingParameterException missing personId
 442  
      * @throws OperationFailedException unable to complete request
 443  
      * @throws PermissionDeniedException authorization failure
 444  
          */
 445  
     public List<OrgPersonRelationInfo> getAllOrgPersonRelationsByPerson(@WebParam(name="personId")String personId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 446  
 
 447  
     /** 
 448  
      * Retrieves all organization person relationships for an organization.
 449  
      * @param orgId organization to get all relationships for
 450  
      * @return list of organization person relationships that exist for this organization
 451  
      * @throws DoesNotExistException orgId not found
 452  
      * @throws InvalidParameterException invalid orgId
 453  
      * @throws MissingParameterException missing orgId
 454  
      * @throws OperationFailedException unable to complete request
 455  
      * @throws PermissionDeniedException authorization failure
 456  
          */
 457  
     public List<OrgPersonRelationInfo> getAllOrgPersonRelationsByOrg(@WebParam(name="orgId")String orgId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 458  
 
 459  
     /** 
 460  
      * Tests if a person has a current relationship with a specified organization
 461  
      * @param orgId identifier of the organization
 462  
      * @param personId identifier of the person
 463  
      * @param orgPersonRelationTypeKey type of relationship between the person and organization
 464  
      * @return true if a relationship exists
 465  
      * @throws InvalidParameterException invalid orgId, personId, orgPersonRelationTypeKey
 466  
      * @throws MissingParameterException missing orgId, personId, orgPersonRelationTypeKey
 467  
      * @throws OperationFailedException unable to complete request
 468  
      * @throws PermissionDeniedException authorization failure
 469  
          */
 470  
     public Boolean hasOrgPersonRelation(@WebParam(name="orgId")String orgId, @WebParam(name="personId")String personId, @WebParam(name="orgPersonRelationTypeKey")String orgPersonRelationTypeKey) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 471  
 
 472  
     /** 
 473  
      * Retrieves a list of organization-specific restrictions on relationships with people for a particular organization.
 474  
      * @param orgId identifier of the organization
 475  
      * @return list of the organization-specific position restriction information
 476  
      * @throws DataValidationErrorException One or more values invalid for this operation
 477  
      * @throws DoesNotExistException the orgId not found
 478  
      * @throws InvalidParameterException invalid orgId
 479  
      * @throws MissingParameterException missing orgId
 480  
      * @throws PermissionDeniedException authorization failure
 481  
      * @throws OperationFailedException unable to complete request
 482  
          */
 483  
     public List<OrgPositionRestrictionInfo> getPositionRestrictionsByOrg(@WebParam(name="orgId")String orgId) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, PermissionDeniedException, OperationFailedException;
 484  
 
 485  
     /** 
 486  
      * Creates a new organization
 487  
      * @param orgTypeKey Unique identifier for an organization type.
 488  
      * @param orgInfo information about the organization to be created
 489  
      * @return newly created organization information
 490  
      * @throws AlreadyExistsException org already exists
 491  
      * @throws DataValidationErrorException one or more values invalid for this operation
 492  
      * @throws InvalidParameterException invalid orgInfo
 493  
      * @throws MissingParameterException missing orgInfo
 494  
      * @throws OperationFailedException unable to complete request
 495  
      * @throws PermissionDeniedException authorization failure
 496  
          */
 497  
     public OrgInfo createOrganization(@WebParam(name="orgTypeKey")String orgTypeKey, @WebParam(name="orgInfo")OrgInfo orgInfo) throws AlreadyExistsException, DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 498  
 
 499  
     /** 
 500  
      * Updates an existing organization
 501  
      * @param orgId identifier for org to be updated
 502  
      * @param orgInfo information about the organization to be updated
 503  
      * @return updated organization information
 504  
      * @throws DataValidationErrorException one or more values invalid for this operation
 505  
      * @throws DoesNotExistException orgId not found
 506  
      * @throws InvalidParameterException invalid orgInfo, orgID
 507  
      * @throws MissingParameterException missing orgInfo, orgID
 508  
      * @throws OperationFailedException unable to complete request
 509  
      * @throws PermissionDeniedException authorization failure
 510  
      * @throws VersionMismatchException action was attempted on an out of date version.
 511  
          */
 512  
     public OrgInfo updateOrganization(@WebParam(name="orgId")String orgId, @WebParam(name="orgInfo")OrgInfo orgInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException;
 513  
 
 514  
     /** 
 515  
      * Deletes an existing organization.
 516  
      * @param orgId identifier for org to be deleted
 517  
      * @return status of the operation (success or failure)
 518  
      * @throws DoesNotExistException orgId not found
 519  
      * @throws InvalidParameterException invalid orgId
 520  
      * @throws MissingParameterException missing orgId
 521  
      * @throws OperationFailedException unable to complete request
 522  
      * @throws PermissionDeniedException authorization failure
 523  
          */
 524  
     public StatusInfo deleteOrganization(@WebParam(name="orgId")String orgId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 525  
 
 526  
     /** 
 527  
      * Creates an organization to organization relationship between two organizations of a particular type.
 528  
      * @param orgId identifier of the organization
 529  
      * @param relatedOrgId identifier of the "child" organization
 530  
      * @param orgOrgRelationTypeKey identifier of the type of relationship between the organizations
 531  
      * @param orgOrgRelationInfo organization to organization relationship information to be created
 532  
      * @return information about the new organization to organization relationship
 533  
      * @throws AlreadyExistsException org org relationship already exists
 534  
      * @throws DataValidationErrorException one or more values invalid for this operation
 535  
      * @throws DoesNotExistException orgId, relatedOrgId, orgOrgRelationTypeKey not found
 536  
      * @throws InvalidParameterException invalid orgId, relatedOrgId, orgOrgRelationTypeKey create info
 537  
      * @throws MissingParameterException missing orgId, relatedOrgId, orgOrgRelationTypeKey create info
 538  
      * @throws PermissionDeniedException authorization failure
 539  
      * @throws OperationFailedException unable to complete request
 540  
          */
 541  
     public OrgOrgRelationInfo createOrgOrgRelation(@WebParam(name="orgId")String orgId, @WebParam(name="relatedOrgId")String relatedOrgId, @WebParam(name="orgOrgRelationTypeKey")String orgOrgRelationTypeKey, @WebParam(name="orgOrgRelationInfo")OrgOrgRelationInfo orgOrgRelationInfo) throws AlreadyExistsException, DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, PermissionDeniedException, OperationFailedException;
 542  
 
 543  
     /** 
 544  
      * Updates an organization to organization relationship.
 545  
      * @param orgOrgRelationId organization to organization relationship identifier
 546  
      * @param orgOrgRelationInfo detail information of the organization to organization relationship
 547  
      * @return updated organization to organization relationship information
 548  
      * @throws DataValidationErrorException one or more values invalid for this operation
 549  
      * @throws DoesNotExistException orgOrgRelationId not found
 550  
      * @throws InvalidParameterException invalid orgOrgRelationId, orgOrgRelation update info
 551  
      * @throws MissingParameterException missing orgOrgRelationId, orgOrgRelation update info
 552  
      * @throws OperationFailedException unable to complete request
 553  
      * @throws PermissionDeniedException authorization failure
 554  
      * @throws VersionMismatchException action was attempted on an out of date version.
 555  
          */
 556  
     public OrgOrgRelationInfo updateOrgOrgRelation(@WebParam(name="orgOrgRelationId")String orgOrgRelationId, @WebParam(name="orgOrgRelationInfo")OrgOrgRelationInfo orgOrgRelationInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException;
 557  
 
 558  
     /** 
 559  
      * Removes an organization to organization relationship.
 560  
      * @param orgOrgRelationId organization to organization relationship identifier
 561  
      * @return status of the operation
 562  
      * @throws DoesNotExistException orgOrgRelationId not found
 563  
      * @throws InvalidParameterException invalid orgOrgRelationId
 564  
      * @throws MissingParameterException missing orgOrgRelationId
 565  
      * @throws OperationFailedException unable to complete request
 566  
      * @throws PermissionDeniedException authorization failure
 567  
          */
 568  
     public StatusInfo removeOrgOrgRelation(@WebParam(name="orgOrgRelationId")String orgOrgRelationId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 569  
 
 570  
     /** 
 571  
      * Creates an organization to person relationship between an organization and a person with a particular type.
 572  
      * @param orgId organization
 573  
      * @param personId person
 574  
      * @param orgPersonRelationTypeKey organization person relationship type
 575  
      * @param orgPersonRelationInfo organization person relationship information
 576  
      * @return detail information of the new organization to person relationship
 577  
      * @throws AlreadyExistsException organization person relationship already exists
 578  
      * @throws DataValidationErrorException one or more values invalid for this operation
 579  
      * @throws DoesNotExistException personId, orgId, orgPersonRelationTypeKey not found
 580  
      * @throws InvalidParameterException invalid personId, orgId, orgPersonRelationTypeKey, orgPersonRelationInfo
 581  
      * @throws MissingParameterException missing personId, orgId, orgPersonRelationTypeKey, orgPersonRelationInfo
 582  
      * @throws PermissionDeniedException authorization failure
 583  
      * @throws OperationFailedException unable to complete request
 584  
          */
 585  
     public OrgPersonRelationInfo createOrgPersonRelation(@WebParam(name="orgId")String orgId, @WebParam(name="personId")String personId, @WebParam(name="orgPersonRelationTypeKey")String orgPersonRelationTypeKey, @WebParam(name="orgPersonRelationInfo")OrgPersonRelationInfo orgPersonRelationInfo) throws AlreadyExistsException, DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, PermissionDeniedException, OperationFailedException;
 586  
 
 587  
     /** 
 588  
      * Updates an organization to person relationship.
 589  
      * @param orgPersonRelationId organization person relationship identifier
 590  
      * @param orgPersonRelationInfo information about the organization to person relationship to be updated
 591  
      * @return updated organization to person relationship information
 592  
      * @throws DataValidationErrorException one or more values invalid for this operation
 593  
      * @throws DoesNotExistException orgPersonRelationId not found
 594  
      * @throws InvalidParameterException invalid orgPersonRelationId, orgPersonRelationInfo
 595  
      * @throws MissingParameterException missing orgPersonRelationId, orgPersonRelationInfo
 596  
      * @throws OperationFailedException unable to complete request
 597  
      * @throws PermissionDeniedException authorization failure
 598  
      * @throws VersionMismatchException action was attempted on an out of date version.
 599  
          */
 600  
     public OrgPersonRelationInfo updateOrgPersonRelation(@WebParam(name="orgPersonRelationId")String orgPersonRelationId, @WebParam(name="orgPersonRelationInfo")OrgPersonRelationInfo orgPersonRelationInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException;
 601  
 
 602  
     /** 
 603  
      * Removes an organization to person relationship.
 604  
      * @param orgPersonRelationId organization person relationship identifier
 605  
      * @return status of the operation
 606  
      * @throws DoesNotExistException orgPersonRelationId not found
 607  
      * @throws InvalidParameterException invalid orgPersonRelationId
 608  
      * @throws MissingParameterException missing orgPersonRelationId
 609  
      * @throws OperationFailedException unable to complete request
 610  
      * @throws PermissionDeniedException authorization failure
 611  
          */
 612  
     public StatusInfo removeOrgPersonRelation(@WebParam(name="orgPersonRelationId")String orgPersonRelationId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 613  
 
 614  
     /** 
 615  
      * Adds a description of the organization-specific usage of an organization person relationship type. This information typically coincides with constraints, such as how many relationships of a given type may be active at a particular time, etc.
 616  
      * @param orgId organization
 617  
      * @param orgPersonRelationTypeKey organization person relationship type
 618  
      * @param orgPositionRestrictionInfo organization position restriction information
 619  
      * @return information about the newly created organization position restriction
 620  
      * @throws AlreadyExistsException org position restriction already exists
 621  
      * @throws DataValidationErrorException one or more values invalid for this operation
 622  
      * @throws DoesNotExistException the orgId, orgPersonRelationTypeKey not found
 623  
      * @throws InvalidParameterException invalid orgId, orgPersonRelationTypeKey, orgPositionRestrictionInfo
 624  
      * @throws MissingParameterException missing orgId, orgPersonRelationTypeKey, orgPositionRestrictionInfo
 625  
      * @throws OperationFailedException unable to complete request
 626  
      * @throws PermissionDeniedException authorization failure
 627  
          */
 628  
     public OrgPositionRestrictionInfo addPositionRestrictionToOrg(@WebParam(name="orgId")String orgId, @WebParam(name="orgPersonRelationTypeKey")String orgPersonRelationTypeKey, @WebParam(name="orgPositionRestrictionInfo")OrgPositionRestrictionInfo orgPositionRestrictionInfo) throws AlreadyExistsException, DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 629  
 
 630  
     /** 
 631  
      * Updates a description of the organization-specific usage of an organization person relationship type.
 632  
      * @param orgId organization
 633  
      * @param orgPersonRelationTypeKey organization person relationship type
 634  
      * @param orgPositionRestrictionInfo organization position restriction information
 635  
      * @return information about the updated organization position restriction
 636  
      * @throws DataValidationErrorException one or more values invalid for this operation
 637  
      * @throws DoesNotExistException orgId, orgPersonRelationTypeKey not found
 638  
      * @throws InvalidParameterException invalid orgId, orgPersonRelationTypeKey, orgPositionRestrictionInfo
 639  
      * @throws MissingParameterException missing orgId, orgPersonRelationTypeKey, orgPositionRestrictionInfo
 640  
      * @throws OperationFailedException unable to complete request
 641  
      * @throws PermissionDeniedException authorization failure
 642  
      * @throws VersionMismatchException action was attempted on an out of date version.
 643  
          */
 644  
     public OrgPositionRestrictionInfo updatePositionRestrictionForOrg(@WebParam(name="orgId")String orgId, @WebParam(name="orgPersonRelationTypeKey")String orgPersonRelationTypeKey, @WebParam(name="orgPositionRestrictionInfo")OrgPositionRestrictionInfo orgPositionRestrictionInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException;
 645  
 
 646  
     /** 
 647  
      * Removes a description of the organization-specific usage of an organization person relationship type.
 648  
      * @param orgId organization
 649  
      * @param orgPersonRelationTypeKey organization person relationship type
 650  
      * @return status
 651  
      * @throws DoesNotExistException the orgId, orgPersonRelationTypeKey not found
 652  
      * @throws InvalidParameterException invalid orgId, orgPersonRelationTypeKey
 653  
      * @throws MissingParameterException missing orgId, orgPersonRelationTypeKey
 654  
      * @throws OperationFailedException unable to complete request
 655  
      * @throws PermissionDeniedException authorization failure
 656  
          */
 657  
     public StatusInfo removePositionRestrictionFromOrg(@WebParam(name="orgId")String orgId, @WebParam(name="orgPersonRelationTypeKey")String orgPersonRelationTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;
 658  
 
 659  
     
 660  
     /**
 661  
      * Finds a list of all orgs in the org hierarchy starting at the root org and going down maxLevels of the tree
 662  
      * @param rootOrgId 
 663  
      * @param orgHierarchyId
 664  
      * @param maxLevels the max number of levels in the tree to return. If set to 0 returns all nodes in the tree
 665  
      * @return List of OrgTreeInfo in
 666  
      * @throws DoesNotExistException
 667  
      * @throws InvalidParameterException
 668  
      * @throws MissingParameterException
 669  
      * @throws OperationFailedException
 670  
      * @throws PermissionDeniedException
 671  
      */
 672  
     public List<OrgTreeInfo> getOrgTree(@WebParam(name="rootOrgId")String rootOrgId,@WebParam(name="orgHierarchyId")String orgHierarchyId, @WebParam(name="maxLevels")int maxLevels) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException;;
 673  
 }