private CredentialStoreType getCredentialStoreType(Map<String, Object> properties) throws IllegalArgumentException {
    Object propertyValue = properties.get(CREDENTIAL_TYPE_PROPERTY_ID);
    if (propertyValue == null) {
      throw new IllegalArgumentException("Property " + CREDENTIAL_TYPE_PROPERTY_ID + " must be provided");
    } else if (propertyValue instanceof String) {
      try {
        return CredentialStoreType.valueOf(((String) propertyValue).toUpperCase());
      } catch (IllegalArgumentException e) {
        throw new IllegalArgumentException("Property " + CREDENTIAL_TYPE_PROPERTY_ID + " must be either 'persisted' or 'temporary'", e);
      }
    } else {
      throw new IllegalArgumentException("Property " + CREDENTIAL_TYPE_PROPERTY_ID + " must be a String");
    }
  }
Retrieves the <code>Credential/persist</code> property from the property map and determined if the value
represents Boolean true or false.
<p/>
If the <code>Credential/type</code> property is not is not available or is <code>null</code>,
an AmbariException will be thrown.

@param properties a map of properties
@return true or false
@throws IllegalArgumentException if the <code>Credential/type</code> property is not set to
                                 either <code>persisted</code> or <code>temporary</code>
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CredentialResourceProvider.java