Changeset 4355 for openmrs/branches/api_refactoring/src/api/org/openmrs/api/impl/AdministrationServiceImpl.java
- Timestamp:
- 05/23/08 17:29:20 (6 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openmrs/branches/api_refactoring/src/api/org/openmrs/api/impl/AdministrationServiceImpl.java
r4240 r4355 208 208 209 209 /** 210 * Create a new FieldType 211 * 212 * @param FieldType to create 213 * @throws APIException 210 * @deprecated 214 211 */ 215 212 public void createFieldType(FieldType fieldType) throws APIException { 216 if (!Context.hasPrivilege(OpenmrsConstants.PRIV_MANAGE_FIELD_TYPES)) 217 throw new APIAuthenticationException("Privilege required: " 218 + OpenmrsConstants.PRIV_MANAGE_FIELD_TYPES); 219 220 dao.createFieldType(fieldType); 221 } 222 223 /** 224 * Update FieldType 225 * 226 * @param FieldType to update 227 * @throws APIException 213 Context.getFormService().saveFieldType(fieldType); 214 } 215 216 /** 217 * @deprecated 228 218 */ 229 219 public void updateFieldType(FieldType fieldType) throws APIException { 230 if (!Context.hasPrivilege(OpenmrsConstants.PRIV_MANAGE_FIELD_TYPES)) 231 throw new APIAuthenticationException("Privilege required: " 232 + OpenmrsConstants.PRIV_MANAGE_FIELD_TYPES); 233 234 dao.updateFieldType(fieldType); 235 } 236 237 /** 238 * Delete FieldType 239 * 240 * @param FieldType to delete 241 * @throws APIException 220 Context.getFormService().saveFieldType(fieldType); 221 } 222 223 /** 224 * @deprecated 242 225 */ 243 226 public void deleteFieldType(FieldType fieldType) throws APIException { 244 if (!Context.hasPrivilege(OpenmrsConstants.PRIV_MANAGE_FIELD_TYPES)) 245 throw new APIAuthenticationException("Privilege required: " 246 + OpenmrsConstants.PRIV_MANAGE_FIELD_TYPES); 247 248 dao.deleteFieldType(fieldType); 227 Context.getFormService().purgeFieldType(fieldType); 249 228 } 250 229 … … 253 232 */ 254 233 public void createMimeType(MimeType mimeType) throws APIException { 255 if (log.isInfoEnabled())256 log.info("Using deprecated createMimeType method: " + mimeType);257 258 234 Context.getObsService().saveMimeType(mimeType); 259 235 } … … 263 239 */ 264 240 public void updateMimeType(MimeType mimeType) throws APIException { 265 if (log.isInfoEnabled())266 log.info("Using deprecated updateMimeType method: " + mimeType);267 268 241 Context.getObsService().saveMimeType(mimeType); 269 242 } … … 273 246 */ 274 247 public void deleteMimeType(MimeType mimeType) throws APIException { 275 if (log.isInfoEnabled())276 log.info("Using deprecated updateMimeType method: " + mimeType);277 278 248 Context.getObsService().purgeMimeType(mimeType); 279 249 }