Tabnine Logo
AdministrationService.getGlobalPropertiesByPrefix
Code IndexAdd Tabnine to your IDE (free)

How to use
getGlobalPropertiesByPrefix
method
in
org.openmrs.api.AdministrationService

Best Java code snippets using org.openmrs.api.AdministrationService.getGlobalPropertiesByPrefix (Showing top 3 results out of 315)

origin: openmrs/openmrs-core

@Test
public void getGlobalPropertiesByPrefix_shouldReturnAllRelevantGlobalPropertiesInTheDatabase() {
  executeDataSet("org/openmrs/api/include/AdministrationServiceTest-globalproperties.xml");
  
  List<GlobalProperty> properties = adminService.getGlobalPropertiesByPrefix("fake.module.");
  
  for (GlobalProperty property : properties) {
    assertTrue(property.getProperty().startsWith("fake.module."));
    assertTrue(property.getPropertyValue().startsWith("correct-value"));
  }
}

origin: openmrs/openmrs-module-webservices.rest

/**
 * @return
 */
@ModelAttribute("globalPropertiesModel")
public GlobalPropertiesModel getModel() {
  List<GlobalProperty> editableProps = new ArrayList<GlobalProperty>();
  
  Set<String> props = new LinkedHashSet<String>();
  props.add(RestConstants.URI_PREFIX_GLOBAL_PROPERTY_NAME);
  props.add(RestConstants.ALLOWED_IPS_GLOBAL_PROPERTY_NAME);
  props.add(RestConstants.MAX_RESULTS_DEFAULT_GLOBAL_PROPERTY_NAME);
  props.add(RestConstants.MAX_RESULTS_ABSOLUTE_GLOBAL_PROPERTY_NAME);
  
  //remove the properties we dont want to edit
  for (GlobalProperty gp : Context.getAdministrationService().getGlobalPropertiesByPrefix(RestConstants.MODULE_ID)) {
    if (props.contains(gp.getProperty()))
      editableProps.add(gp);
  }
  
  return new GlobalPropertiesModel(editableProps);
}

origin: openmrs/openmrs-module-webservices.rest

/**
 * GlobalProperty searches support the following additional query parameters:
 * 
 * @see org.openmrs.module.webservices.rest.web.resource.impl.DelegatingCrudResource#doSearch(RequestContext)
 */
@Override
protected PageableResult doSearch(RequestContext context) {
  AdministrationService service = Context.getAdministrationService();
  List<GlobalProperty> searchResults;
  searchResults = service.getGlobalPropertiesByPrefix(context.getParameter("q"));
  PageableResult result = new NeedsPaging<GlobalProperty>(searchResults, context);
  return result;
}

org.openmrs.apiAdministrationServicegetGlobalPropertiesByPrefix

Javadoc

Gets all global properties that begin with prefix.

Popular methods of AdministrationService

  • saveGlobalProperty
    Save the given global property to the database
  • getGlobalProperty
    Gets the global property that has the given propertyName If propertyName is not found in the list of
  • getGlobalPropertyObject
    Gets the global property that has the given propertyName
  • getAllGlobalProperties
    Get a list of all global properties in the system
  • getAllowedLocales
    Gets the list of locales which the administrator has allowed for use on the system. This is specifie
  • executeSQL
    Runs the sql on the database. If selectOnly is flagged then any non-select sql statements will be re
  • getGlobalPropertyByUuid
    Get a global property by its uuid. There should be only one of these in the database (well, in the w
  • getGlobalPropertyValue
    Returns a global property according to the type specified
  • purgeGlobalProperty
    Completely remove the given global property from the database
  • addGlobalPropertyListener
    Allows code to be notified when a global property is created/edited/deleted.
  • getSearchLocales
    Returns a list of locales used by the user when searching.
  • getSystemVariables
    Get a listing or important variables used in openmrs
  • getSearchLocales,
  • getSystemVariables,
  • setGlobalProperty,
  • setImplementationId,
  • validate,
  • getGlobalPropertiesBySuffix,
  • getImplementationId,
  • getMaximumPropertyLength,
  • getPresentationLocales

Popular in Java

  • Making http requests using okhttp
  • compareTo (BigDecimal)
  • runOnUiThread (Activity)
  • addToBackStack (FragmentTransaction)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now