Class LocalCapabilitiesEnvironment

java.lang.Object
com.google.appengine.tools.development.LocalCapabilitiesEnvironment

public class LocalCapabilitiesEnvironment extends Object
  • Field Details

    • KEY_PREFIX

      public static final String KEY_PREFIX
      prefix used to detect which properties are relevant to the Capability Service. All property keys not starting with this prefix will be ignored in the initialization on the service.
      See Also:
    • DATASTORE_WRITE_RPCS

      public static final com.google.common.collect.ImmutableSet<String> DATASTORE_WRITE_RPCS
    • DEFAULT_ENABLED_SERVICES

      public static final com.google.common.collect.ImmutableList<Capability> DEFAULT_ENABLED_SERVICES
  • Constructor Details

    • LocalCapabilitiesEnvironment

      public LocalCapabilitiesEnvironment(Properties properties)
      initialize a LocalCapabilitiesEnvironment with all the properties that start with the correct KEY_PREFIX
      Parameters:
      properties - setting up some capability states
  • Method Details

    • geCapabilityPropertyKey

      public static String geCapabilityPropertyKey(String packageName, String capability)
    • setCapabilitiesStatus

      public void setCapabilitiesStatus(String capabilityName, CapabilityStatus status)
      modify the capability status based on the capability property name property names that do not start with "capability.status" are ignored
      Parameters:
      capabilityName - property name with prefix as "capability.status.memcache"
      status - required status for the given capability
    • getStatusFromMethodName

      public CapabilityStatus getStatusFromMethodName(String capabilityName, String methodName)
      Parameters:
      capabilityName - name fo the capability (for ex "datastore_v3")
      methodName - RPC method name (for example "Get")
      Returns:
      the capability status for the given method
    • getStatusFromCapabilityName

      public CapabilityStatus getStatusFromCapabilityName(String packageName, String capabilityName)
      Parameters:
      packageName - package Name name of the capability (for ex "datastore_v3")
      capabilityName - name of the capability (for example, "write" or "*")
      Returns:
      the capability status for the given capability