Skip to content

Commit

Permalink
Formatting files according to the OpenMRS formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
dkayiwa committed Jul 27, 2013
1 parent 00a079a commit bfe938a
Show file tree
Hide file tree
Showing 5 changed files with 162 additions and 178 deletions.
91 changes: 44 additions & 47 deletions api/src/main/java/org/openmrs/api/ConceptService.java
Expand Up @@ -95,21 +95,21 @@ public interface ConceptService extends OpenmrsService {
* @deprecated use #saveConcept(Concept)
*/
@Deprecated
@Authorized({ PrivilegeConstants.MANAGE_CONCEPTS })
@Authorized( { PrivilegeConstants.MANAGE_CONCEPTS })
public void createConcept(Concept concept) throws APIException;

/**
* @deprecated use #saveConcept(Concept)
*/
@Deprecated
@Authorized({ PrivilegeConstants.MANAGE_CONCEPTS })
@Authorized( { PrivilegeConstants.MANAGE_CONCEPTS })
public void createConcept(ConceptNumeric concept) throws APIException;

/**
* @deprecated use #saveConcept(Concept)
*/
@Deprecated
@Authorized({ PrivilegeConstants.MANAGE_CONCEPTS })
@Authorized( { PrivilegeConstants.MANAGE_CONCEPTS })
public void updateConcept(Concept concept) throws APIException;

/**
Expand All @@ -127,35 +127,35 @@ public interface ConceptService extends OpenmrsService {
* @deprecated use #saveConcept(Concept)
*/
@Deprecated
@Authorized({ PrivilegeConstants.MANAGE_CONCEPTS })
@Authorized( { PrivilegeConstants.MANAGE_CONCEPTS })
public void updateConcept(ConceptNumeric concept) throws APIException;

/**
* @deprecated use #saveDrug(Drug)
*/
@Deprecated
@Authorized({ PrivilegeConstants.MANAGE_CONCEPTS })
@Authorized( { PrivilegeConstants.MANAGE_CONCEPTS })
public void createDrug(Drug drug) throws APIException;

/**
* @deprecated use #saveDrug(Drug)
*/
@Deprecated
@Authorized({ PrivilegeConstants.MANAGE_CONCEPTS })
@Authorized( { PrivilegeConstants.MANAGE_CONCEPTS })
public void updateDrug(Drug drug) throws APIException;

/**
* @deprecated use #purgeConcept(Concept concept)
*/
@Deprecated
@Authorized({ PrivilegeConstants.PURGE_CONCEPTS })
@Authorized( { PrivilegeConstants.PURGE_CONCEPTS })
public void deleteConcept(Concept concept) throws APIException;

/**
* @deprecated use {@link #retireConcept(Concept, String)}
*/
@Deprecated
@Authorized({ PrivilegeConstants.MANAGE_CONCEPTS })
@Authorized( { PrivilegeConstants.MANAGE_CONCEPTS })
public void voidConcept(Concept concept, String reason) throws APIException;

/**
Expand Down Expand Up @@ -190,7 +190,7 @@ public interface ConceptService extends OpenmrsService {
* @should set audit info if an item is added to any of its child collections
* @should pass when saving a concept after removing a name
*/
@Authorized({ PrivilegeConstants.MANAGE_CONCEPTS })
@Authorized( { PrivilegeConstants.MANAGE_CONCEPTS })
public Concept saveConcept(Concept concept) throws APIException;

/**
Expand All @@ -205,7 +205,7 @@ public interface ConceptService extends OpenmrsService {
* @should create new drug in database
* @should update drug already existing in database
*/
@Authorized({ PrivilegeConstants.MANAGE_CONCEPTS })
@Authorized( { PrivilegeConstants.MANAGE_CONCEPTS })
public Drug saveDrug(Drug drug) throws APIException;

/**
Expand Down Expand Up @@ -420,9 +420,9 @@ public interface ConceptService extends OpenmrsService {
@Deprecated
@Authorized(PrivilegeConstants.VIEW_CONCEPTS)
public List<ConceptWord> getConceptWords(String phrase, List<Locale> locales, boolean includeRetired,
List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses,
List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes,
Concept answersToConcept, Integer start, Integer size) throws APIException;
List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes,
List<ConceptDatatype> excludeDatatypes, Concept answersToConcept, Integer start, Integer size)
throws APIException;

/**
* @deprecated use {@link #getConcepts(String, Locale)} that returns a list of
Expand All @@ -447,9 +447,8 @@ public List<ConceptWord> getConceptWords(String phrase, List<Locale> locales, bo
@Deprecated
@Authorized(PrivilegeConstants.VIEW_CONCEPTS)
public List<ConceptWord> findConcepts(String phrase, Locale locale, boolean includeRetired,
List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses,
List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes)
throws APIException;
List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes,
List<ConceptDatatype> excludeDatatypes) throws APIException;

/**
* Get Drug by its UUID
Expand All @@ -469,7 +468,7 @@ public List<ConceptWord> findConcepts(String phrase, Locale locale, boolean incl
@Deprecated
@Authorized(PrivilegeConstants.VIEW_CONCEPTS)
public List<ConceptWord> findConcepts(String phrase, Locale locale, boolean includeRetired, int start, int size)
throws APIException;
throws APIException;

/**
* Return the drug object corresponding to the given name or drugId
Expand Down Expand Up @@ -697,7 +696,7 @@ public List<ConceptWord> findConcepts(String phrase, Locale locale, boolean incl
* @deprecated as of 1.9 because users should never change datatypes, it could harm data and
* other code expecting them to be here
*/
@Authorized({ PrivilegeConstants.MANAGE_CONCEPT_DATATYPES })
@Authorized( { PrivilegeConstants.MANAGE_CONCEPT_DATATYPES })
@Deprecated
public ConceptDatatype saveConceptDatatype(ConceptDatatype cd) throws NotImplementedException;

Expand Down Expand Up @@ -896,10 +895,10 @@ public List<ConceptWord> findConcepts(String phrase, Locale locale, boolean incl
* {@link #getConcepts(String, List, boolean, List, List, List, List, Concept, Integer, Integer)}
*/
@Deprecated
@Authorized({ "View Concepts" })
@Authorized( { "View Concepts" })
public List<ConceptWord> findConcepts(String phrase, List<Locale> searchLocales, boolean includeRetired,
List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses,
List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes);
List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes,
List<ConceptDatatype> excludeDatatypes);

/**
* @deprecated use {@link #saveConceptProposal(ConceptProposal)}
Expand All @@ -915,7 +914,7 @@ public List<ConceptWord> findConcepts(String phrase, List<Locale> searchLocales,
* @throws APIException
* @return the saved/updated ConceptProposal object
*/
@Authorized({ PrivilegeConstants.ADD_CONCEPT_PROPOSALS, PrivilegeConstants.EDIT_CONCEPT_PROPOSALS })
@Authorized( { PrivilegeConstants.ADD_CONCEPT_PROPOSALS, PrivilegeConstants.EDIT_CONCEPT_PROPOSALS })
public ConceptProposal saveConceptProposal(ConceptProposal conceptProposal) throws APIException;

/**
Expand Down Expand Up @@ -979,7 +978,7 @@ public List<ConceptWord> findConcepts(String phrase, List<Locale> searchLocales,
@Deprecated
@Authorized(PrivilegeConstants.VIEW_CONCEPTS)
public List<ConceptWord> findConceptAnswers(String phrase, Locale locale, Concept concept, boolean includeRetired)
throws APIException;
throws APIException;

/**
* @deprecated use {@link #findConceptAnswers(String, Locale, Concept)}
Expand Down Expand Up @@ -1058,14 +1057,14 @@ public List<ConceptWord> findConceptAnswers(String phrase, Locale locale, Concep
* @deprecated use {@link #updateConceptIndex(org.openmrs.Concept)}
*/
@Deprecated
@Authorized({ PrivilegeConstants.MANAGE_CONCEPTS })
@Authorized( { PrivilegeConstants.MANAGE_CONCEPTS })
public void updateConceptWord(Concept concept) throws APIException;

/**
* @deprecated use {@link #updateConceptIndexes()}
*/
@Deprecated
@Authorized({ PrivilegeConstants.MANAGE_CONCEPTS })
@Authorized( { PrivilegeConstants.MANAGE_CONCEPTS })
public void updateConceptWords() throws APIException;

/**
Expand All @@ -1086,7 +1085,7 @@ public List<ConceptWord> findConceptAnswers(String phrase, Locale locale, Concep
* @deprecated use {@link #updateConceptIndexes(Integer, Integer)}
*/
@Deprecated
@Authorized({ PrivilegeConstants.MANAGE_CONCEPTS })
@Authorized( { PrivilegeConstants.MANAGE_CONCEPTS })
public void updateConceptWords(Integer conceptIdStart, Integer conceptIdEnd) throws APIException;

/**
Expand All @@ -1110,7 +1109,7 @@ public List<ConceptWord> findConceptAnswers(String phrase, Locale locale, Concep
* @see Concept#getShortNameInLocale(Locale)
* @see Concept#getShortestName(Locale, Boolean)
*/
@Authorized({ PrivilegeConstants.VIEW_CONCEPTS })
@Authorized( { PrivilegeConstants.VIEW_CONCEPTS })
public ConceptNameTag getConceptNameTagByName(String tag);

/**
Expand Down Expand Up @@ -1231,7 +1230,7 @@ public List<ConceptWord> findConceptAnswers(String phrase, Locale locale, Concep
@Authorized(PrivilegeConstants.VIEW_CONCEPTS)
public Concept getConceptByMapping(String code, String sourceName) throws APIException;

/**
/**
* Looks up a concept via {@link ConceptMap} This will return the {@link Concept} which contains
* a {@link ConceptMap} entry whose <code>sourceCode</code> is equal to the passed
* <code>conceptCode</code> and whose {@link ConceptSource} has either a <code>name</code> or
Expand Down Expand Up @@ -1316,7 +1315,7 @@ public List<ConceptWord> findConceptAnswers(String phrase, Locale locale, Concep
* @return the matching {@link ConceptNameTag} or null if none found
* @since 1.5
*/
@Authorized({ PrivilegeConstants.VIEW_CONCEPTS })
@Authorized( { PrivilegeConstants.VIEW_CONCEPTS })
public ConceptNameTag getConceptNameTag(Integer id);

/**
Expand All @@ -1327,7 +1326,7 @@ public List<ConceptWord> findConceptAnswers(String phrase, Locale locale, Concep
* @should find object given valid uuid
* @should return null if no object found with given uuid
*/
@Authorized({ PrivilegeConstants.VIEW_CONCEPTS })
@Authorized( { PrivilegeConstants.VIEW_CONCEPTS })
public ConceptDescription getConceptDescriptionByUuid(String uuid);

/**
Expand Down Expand Up @@ -1392,7 +1391,7 @@ public List<ConceptWord> findConceptAnswers(String phrase, Locale locale, Concep
* @should explicitly add true concept as a value_Coded answer
* @should explicitly add false concept as a value_Coded answer
*/
@Authorized({ PrivilegeConstants.MANAGE_CONCEPTS })
@Authorized( { PrivilegeConstants.MANAGE_CONCEPTS })
public void convertBooleanConceptToCoded(Concept conceptToChange) throws APIException;

/**
Expand Down Expand Up @@ -1430,10 +1429,9 @@ public List<ConceptWord> findConceptAnswers(String phrase, Locale locale, Concep
*/
@Authorized(PrivilegeConstants.VIEW_CONCEPTS)
public List<ConceptSearchResult> getConcepts(String phrase, List<Locale> locales, boolean includeRetired,
List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses,
List<ConceptDatatype> requireDatatypes,
List<ConceptDatatype> excludeDatatypes, Concept answersToConcept,
Integer start, Integer size) throws APIException;
List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes,
List<ConceptDatatype> excludeDatatypes, Concept answersToConcept, Integer start, Integer size)
throws APIException;

/**
* Finds concepts that are possible value coded answers to concept parameter
Expand All @@ -1457,7 +1455,7 @@ public List<ConceptSearchResult> getConcepts(String phrase, List<Locale> locales
* @throws APIException
* @since 1.8
*/
@Authorized({ PrivilegeConstants.MANAGE_CONCEPTS })
@Authorized( { PrivilegeConstants.MANAGE_CONCEPTS })
public void updateConceptIndex(Concept concept) throws APIException;

/**
Expand All @@ -1466,7 +1464,7 @@ public List<ConceptSearchResult> getConcepts(String phrase, List<Locale> locales
* @throws APIException
* @since 1.8
*/
@Authorized({ PrivilegeConstants.MANAGE_CONCEPTS })
@Authorized( { PrivilegeConstants.MANAGE_CONCEPTS })
public void updateConceptIndexes() throws APIException;

/**
Expand All @@ -1478,7 +1476,7 @@ public List<ConceptSearchResult> getConcepts(String phrase, List<Locale> locales
* @throws APIException
* @since 1.8
*/
@Authorized({ PrivilegeConstants.MANAGE_CONCEPTS })
@Authorized( { PrivilegeConstants.MANAGE_CONCEPTS })
public void updateConceptIndexes(Integer conceptIdStart, Integer conceptIdEnd) throws APIException;

/**
Expand Down Expand Up @@ -1512,9 +1510,8 @@ public List<ConceptSearchResult> getConcepts(String phrase, List<Locale> locales
*/
@Authorized(PrivilegeConstants.VIEW_CONCEPTS)
public Integer getCountOfConcepts(String phrase, List<Locale> locales, boolean includeRetired,
List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses,
List<ConceptDatatype> requireDatatypes, List<ConceptDatatype> excludeDatatypes,
Concept answersToConcept);
List<ConceptClass> requireClasses, List<ConceptClass> excludeClasses, List<ConceptDatatype> requireDatatypes,
List<ConceptDatatype> excludeDatatypes, Concept answersToConcept);

/**
* Return the number of drugs with matching names or concept drug names
Expand All @@ -1532,7 +1529,7 @@ public Integer getCountOfConcepts(String phrase, List<Locale> locales, boolean i
*/
@Authorized(PrivilegeConstants.VIEW_CONCEPTS)
public Integer getCountOfDrugs(String drugName, Concept concept, boolean searchOnPhrase, boolean searchDrugConceptNames,
boolean includeRetired) throws APIException;
boolean includeRetired) throws APIException;

/**
* Returns a list of drugs with matching names or concept drug names and returns a specific
Expand All @@ -1554,7 +1551,7 @@ public Integer getCountOfDrugs(String drugName, Concept concept, boolean searchO
*/
@Authorized(PrivilegeConstants.VIEW_CONCEPTS)
public List<Drug> getDrugs(String drugName, Concept concept, boolean searchOnPhrase, boolean searchDrugConceptNames,
boolean includeRetired, Integer start, Integer length) throws APIException;
boolean includeRetired, Integer start, Integer length) throws APIException;

/**
* Gets the list of <code>ConceptStopWord</code> for given locale
Expand Down Expand Up @@ -1846,7 +1843,7 @@ public List<Drug> getDrugs(String drugName, Concept concept, boolean searchOnPhr
*/
@Authorized(PrivilegeConstants.MANAGE_CONCEPT_REFERENCE_TERMS)
public ConceptReferenceTerm retireConceptReferenceTerm(ConceptReferenceTerm conceptReferenceTerm, String retireReason)
throws APIException;
throws APIException;

/**
* Marks a concept reference term that is currently retired as not retired.
Expand Down Expand Up @@ -1885,9 +1882,9 @@ public ConceptReferenceTerm retireConceptReferenceTerm(ConceptReferenceTerm conc
* @should return unique terms with a code or name containing the search phrase
* @should return only the concept reference terms from the given concept source
*/
@Authorized({ PrivilegeConstants.VIEW_CONCEPT_REFERENCE_TERMS })
@Authorized( { PrivilegeConstants.VIEW_CONCEPT_REFERENCE_TERMS })
public List<ConceptReferenceTerm> getConceptReferenceTerms(String query, ConceptSource conceptSource, Integer start,
Integer length, boolean includeRetired) throws APIException;
Integer length, boolean includeRetired) throws APIException;

/**
* Returns the count of concept reference terms that match the specified arguments
Expand All @@ -1903,7 +1900,7 @@ public List<ConceptReferenceTerm> getConceptReferenceTerms(String query, Concept
*/
@Authorized(PrivilegeConstants.VIEW_CONCEPT_REFERENCE_TERMS)
public Integer getCountOfConceptReferenceTerms(String query, ConceptSource conceptSource, boolean includeRetired)
throws APIException;
throws APIException;

/**
* Fetches all the {@link ConceptReferenceTermMap} where the specified reference term is the
Expand Down

0 comments on commit bfe938a

Please sign in to comment.