src/main/java/org/opensrp/service/OrganizationService.java
/**
	 * Assigns the jurisdiction and /or plan to the organization with organizationId
	 * 
	 * @param organizationId the id of the organization
	 * @param jurisdictionId the identifier of the jurisdiction
	 * @param planId         the identifier of the plan
	 * @param fromDate
	 * @param toDate
	 */
Assigns the jurisdiction and /or plan to the organization with organizationId


Assigns the jurisdiction and / or plan to the organization with organizationId
public void assignLocationAndPlan(String identifier, String jurisdictionId, String planId, Date fromDate,
			Date toDate) {
		validateIdentifier(identifier);
		if (StringUtils.isBlank(identifier))
			throw new IllegalArgumentException("identifier cannot be null or empty");
		if (StringUtils.isBlank(jurisdictionId) && StringUtils.isBlank(planId))
			throw new IllegalArgumentException("jurisdictionId and planId cannot be null");
		Organization organization = getOrganization(identifier);
		if (organization == null)
			throw new IllegalArgumentException("Organization not found");
		organizationRepository.assignLocationAndPlan(organization.getId(), jurisdictionId,
				locationRepository.retrievePrimaryKey(jurisdictionId, true), planId,
				planRepository.retrievePrimaryKey(planId), fromDate == null ? new Date() : fromDate, toDate);
	}
public void assignLocationAndPlan ( String identifier , String jurisdictionId , String planId , Date fromDate , Date toDate ) { validateIdentifier ( identifier ) ; if ( StringUtils . isBlank ( identifier ) ) throw new IllegalArgumentException ( "identifier cannot be null or empty" ) ; if ( StringUtils . isBlank ( jurisdictionId ) && StringUtils . isBlank ( planId ) ) throw new IllegalArgumentException ( "jurisdictionId and planId cannot be null" ) ; Organization organization = getOrganization ( identifier ) ; if ( organization == null ) throw new IllegalArgumentException ( "Organization not found" ) ; organizationRepository . assignLocationAndPlan ( organization . getId ( ) , jurisdictionId , locationRepository . retrievePrimaryKey ( jurisdictionId , true ) , planId , planRepository . retrievePrimaryKey ( planId ) , fromDate == null ? new Date ( ) : fromDate , toDate ) ; }
Assigns the jurisdiction and /or plan to the organization with organizationId
Assigns the jurisdiction and / or plan to the organization with organizationId