You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2016/02/02 13:40:53 UTC

[08/11] ambari git commit: AMBARI-14869: Rename AdminSetting API to Setting (Ajit Kumar via smnaha)

AMBARI-14869: Rename AdminSetting API to Setting (Ajit Kumar via smnaha)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/774d689e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/774d689e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/774d689e

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 774d689eee8a26a0511e23f182a1d3e65c22c5eb
Parents: 6ce1565
Author: Nahappan Somasundaram <ns...@hortonworks.com>
Authored: Mon Feb 1 18:15:03 2016 -0800
Committer: Nahappan Somasundaram <ns...@hortonworks.com>
Committed: Mon Feb 1 18:15:03 2016 -0800

----------------------------------------------------------------------
 .../resources/ResourceInstanceFactoryImpl.java  |   4 +-
 .../api/services/AdminSettingService.java       | 148 --------
 .../server/api/services/SettingService.java     | 148 ++++++++
 .../internal/AdminSettingResourceProvider.java  | 250 -------------
 .../internal/DefaultProviderModule.java         |   4 +-
 .../internal/SettingResourceProvider.java       | 251 +++++++++++++
 .../ambari/server/controller/spi/Resource.java  |   4 +-
 .../ambari/server/orm/dao/AdminSettingDAO.java  | 100 ------
 .../ambari/server/orm/dao/SettingDAO.java       | 100 ++++++
 .../server/orm/entities/AdminSettingEntity.java | 149 --------
 .../server/orm/entities/SettingEntity.java      | 149 ++++++++
 .../authorization/RoleAuthorization.java        |   2 +-
 .../main/resources/Ambari-DDL-Derby-CREATE.sql  |   8 +-
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  |   8 +-
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql |   8 +-
 .../resources/Ambari-DDL-Postgres-CREATE.sql    |   8 +-
 .../Ambari-DDL-Postgres-EMBEDDED-CREATE.sql     |  10 +-
 .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql |   8 +-
 .../resources/Ambari-DDL-SQLServer-CREATE.sql   |   8 +-
 .../src/main/resources/META-INF/persistence.xml |   2 +-
 .../api/services/AdminSettingServiceTest.java   | 101 ------
 .../server/api/services/SettingServiceTest.java | 101 ++++++
 .../AdminSettingResourceProviderTest.java       | 356 -------------------
 .../internal/SettingResourceProviderTest.java   | 355 ++++++++++++++++++
 .../server/orm/dao/AdminSettingDAOTest.java     |  93 -----
 .../ambari/server/orm/dao/SettingDAOTest.java   |  93 +++++
 .../orm/entities/AdminSettingEntityTest.java    |  91 -----
 .../server/orm/entities/SettingEntityTest.java  |  90 +++++
 28 files changed, 1324 insertions(+), 1325 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
index 070a505..4c12094 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
@@ -408,8 +408,8 @@ public class ResourceInstanceFactoryImpl implements ResourceInstanceFactory {
         resourceDefinition = new SimpleResourceDefinition(Resource.Type.UserAuthorization, "authorization", "authorizations");
         break;
 
-      case AdminSetting:
-        resourceDefinition = new SimpleResourceDefinition(Resource.Type.AdminSetting, "admin-setting", "admin-settings");
+      case Setting:
+        resourceDefinition = new SimpleResourceDefinition(Resource.Type.Setting, "setting", "settings");
         break;
 
       default:

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/java/org/apache/ambari/server/api/services/AdminSettingService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AdminSettingService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AdminSettingService.java
deleted file mode 100644
index 2c5b77d..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AdminSettingService.java
+++ /dev/null
@@ -1,148 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ambari.server.api.services;
-
-import org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.controller.spi.Resource;
-
-
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-import java.util.Collections;
-
-/**
- * Service responsible for admin setting resource requests.
- */
-@Path("/admin-settings/")
-public class AdminSettingService extends BaseService {
-
-  /**
-   * Construct a AdminSettingService.
-   */
-  public AdminSettingService() {
-
-  }
-
-  /**
-   * Handles: GET  /settings
-   * Get all clusters.
-   *
-   * @param headers  http headers
-   * @param ui       uri info
-   *
-   * @return admin setting collection resource representation
-   */
-  @GET
-  @Produces("text/plain")
-  public Response getSettings(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, body, ui, Request.Type.GET, createSettingResource(null));
-  }
-
-  /**
-   * Handles: GET /admin-settings/{settingName}
-   * Get a specific admin setting.
-   *
-   * @param headers      http headers
-   * @param ui           uri info
-   * @param settingName  settingName
-   *
-   * @return admin setting instance representation
-   */
-  @GET
-  @Path("{settingName}")
-  @Produces("text/plain")
-  public Response getSetting(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                             @PathParam("settingName") String settingName) {
-    return handleRequest(headers, body, ui, Request.Type.GET, createSettingResource(settingName));
-  }
-
-  /**
-   * Handles: POST /admin-settings/{settingName}
-   * Create a specific admin setting.
-   *
-   * @param headers      http headers
-   * @param ui           uri info
-   *
-   * @return information regarding the created setting
-   */
-   @POST
-   @Produces("text/plain")
-   public Response createSetting(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-     return handleRequest(headers, body, ui, Request.Type.POST, createSettingResource(null));
-  }
-
-  /**
-   * Handles: PUT /admin-settings/{settingName}
-   * Update a specific admin setting.
-   *
-   * @param headers      http headers
-   * @param ui           uri info
-   * @param settingName  setting name
-   *
-   * @return information regarding the updated setting
-   */
-  @PUT
-  @Path("{settingName}")
-  @Produces("text/plain")
-  public Response updateSetting(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("settingName") String settingName) {
-    return handleRequest(headers, body, ui, Request.Type.PUT, createSettingResource(settingName));
-  }
-
-  /**
-   * Handles: DELETE /admin-settings/{settingName}
-   * Delete a specific admin setting.
-   *
-   * @param headers      http headers
-   * @param ui           uri info
-   * @param settingName  setting name
-   *
-   * @return information regarding the deleted setting
-   */
-  @DELETE
-  @Path("{settingName}")
-  @Produces("text/plain")
-  public Response deleteSetting(@Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("settingName") String settingName) {
-    return handleRequest(headers, null, ui, Request.Type.DELETE, createSettingResource(settingName));
-  }
-
-  // ----- helper methods ----------------------------------------------------
-
-  /**
-   * Create an admin setting resource instance.
-   *
-   * @param settingName setting name
-   *
-   * @return an admin setting resource instance
-   */
-  ResourceInstance createSettingResource(String settingName) {
-    return createResource(Resource.Type.AdminSetting,
-        Collections.singletonMap(Resource.Type.AdminSetting, settingName));
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingService.java
new file mode 100644
index 0000000..db6f002
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingService.java
@@ -0,0 +1,148 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.api.services;
+
+import org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.controller.spi.Resource;
+
+
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+import java.util.Collections;
+
+/**
+ * Service responsible for setting resource requests.
+ */
+@Path("/settings/")
+public class SettingService extends BaseService {
+
+  /**
+   * Construct a SettingService.
+   */
+  public SettingService() {
+
+  }
+
+  /**
+   * Handles: GET  /settings
+   * Get all clusters.
+   *
+   * @param headers  http headers
+   * @param ui       uri info
+   *
+   * @return setting collection resource representation
+   */
+  @GET
+  @Produces("text/plain")
+  public Response getSettings(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET, createSettingResource(null));
+  }
+
+  /**
+   * Handles: GET /settings/{settingName}
+   * Get a specific setting.
+   *
+   * @param headers      http headers
+   * @param ui           uri info
+   * @param settingName  settingName
+   *
+   * @return setting instance representation
+   */
+  @GET
+  @Path("{settingName}")
+  @Produces("text/plain")
+  public Response getSetting(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                             @PathParam("settingName") String settingName) {
+    return handleRequest(headers, body, ui, Request.Type.GET, createSettingResource(settingName));
+  }
+
+  /**
+   * Handles: POST /settings/{settingName}
+   * Create a specific setting.
+   *
+   * @param headers      http headers
+   * @param ui           uri info
+   *
+   * @return information regarding the created setting
+   */
+   @POST
+   @Produces("text/plain")
+   public Response createSetting(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+     return handleRequest(headers, body, ui, Request.Type.POST, createSettingResource(null));
+  }
+
+  /**
+   * Handles: PUT /settings/{settingName}
+   * Update a specific setting.
+   *
+   * @param headers      http headers
+   * @param ui           uri info
+   * @param settingName  setting name
+   *
+   * @return information regarding the updated setting
+   */
+  @PUT
+  @Path("{settingName}")
+  @Produces("text/plain")
+  public Response updateSetting(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                                @PathParam("settingName") String settingName) {
+    return handleRequest(headers, body, ui, Request.Type.PUT, createSettingResource(settingName));
+  }
+
+  /**
+   * Handles: DELETE /settings/{settingName}
+   * Delete a specific setting.
+   *
+   * @param headers      http headers
+   * @param ui           uri info
+   * @param settingName  setting name
+   *
+   * @return information regarding the deleted setting
+   */
+  @DELETE
+  @Path("{settingName}")
+  @Produces("text/plain")
+  public Response deleteSetting(@Context HttpHeaders headers, @Context UriInfo ui,
+                                @PathParam("settingName") String settingName) {
+    return handleRequest(headers, null, ui, Request.Type.DELETE, createSettingResource(settingName));
+  }
+
+  // ----- helper methods ----------------------------------------------------
+
+  /**
+   * Create a setting resource instance.
+   *
+   * @param settingName setting name
+   *
+   * @return a setting resource instance
+   */
+  ResourceInstance createSettingResource(String settingName) {
+    return createResource(Resource.Type.Setting,
+        Collections.singletonMap(Resource.Type.Setting, settingName));
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AdminSettingResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AdminSettingResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AdminSettingResourceProvider.java
deleted file mode 100644
index e8d5b5e..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AdminSettingResourceProvider.java
+++ /dev/null
@@ -1,250 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ambari.server.controller.internal;
-
-import com.google.inject.Inject;
-import org.apache.ambari.server.AmbariException;
-import org.apache.ambari.server.DuplicateResourceException;
-import org.apache.ambari.server.StaticallyInject;
-import org.apache.ambari.server.controller.spi.NoSuchParentResourceException;
-import org.apache.ambari.server.controller.spi.NoSuchResourceException;
-import org.apache.ambari.server.controller.spi.Predicate;
-import org.apache.ambari.server.controller.spi.Request;
-import org.apache.ambari.server.controller.spi.RequestStatus;
-import org.apache.ambari.server.controller.spi.Resource;
-import org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException;
-import org.apache.ambari.server.controller.spi.SystemException;
-import org.apache.ambari.server.controller.utilities.PropertyHelper;
-import org.apache.ambari.server.orm.dao.AdminSettingDAO;
-import org.apache.ambari.server.orm.entities.AdminSettingEntity;
-import org.apache.ambari.server.security.authorization.AuthorizationException;
-import org.apache.ambari.server.security.authorization.AuthorizationHelper;
-import org.apache.ambari.server.security.authorization.RoleAuthorization;
-import org.apache.commons.lang.ObjectUtils;
-import org.apache.commons.lang.StringUtils;
-
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.Set;
-
-/**
- * This class deals with managing CRUD operation on {@link AdminSettingEntity}.
- */
-@StaticallyInject
-public class AdminSettingResourceProvider extends AbstractAuthorizedResourceProvider {
-
-  protected static final String ID = "id";
-  protected static final String ADMINSETTING = "AdminSetting";
-  protected static final String ADMINSETTING_NAME_PROPERTY_ID = PropertyHelper.getPropertyId("AdminSettings", "name");
-  protected static final String ADMINSETTING_SETTING_TYPE_PROPERTY_ID = PropertyHelper.getPropertyId("AdminSettings", "setting_type");
-  protected static final String ADMINSETTING_CONTENT_PROPERTY_ID = PropertyHelper.getPropertyId("AdminSettings", "content");
-  protected static final String ADMINSETTING_UPDATED_BY_PROPERTY_ID = PropertyHelper.getPropertyId("AdminSettings", "updated_by");
-  protected static final String ADMINSETTING_UPDATE_TIMESTAMP_PROPERTY_ID = PropertyHelper.getPropertyId("AdminSettings", "update_timestamp");
-
-  /**
-   * The property ids for a admin setting resource.
-   */
-  private static final Set<String> propertyIds = new HashSet<>();
-
-  /**
-   * The key property ids for a admin setting resource.
-   */
-  private static final Map<Resource.Type, String> keyPropertyIds = new HashMap<>();
-
-  private static final Set<String> requiredProperties = new HashSet<>();
-
-  @Inject
-  private static AdminSettingDAO dao;
-
-  static {
-    propertyIds.add(ADMINSETTING_NAME_PROPERTY_ID);
-    propertyIds.add(ADMINSETTING_SETTING_TYPE_PROPERTY_ID);
-    propertyIds.add(ADMINSETTING_CONTENT_PROPERTY_ID);
-    propertyIds.add(ADMINSETTING_UPDATED_BY_PROPERTY_ID);
-    propertyIds.add(ADMINSETTING_UPDATE_TIMESTAMP_PROPERTY_ID);
-    propertyIds.add(ADMINSETTING_SETTING_TYPE_PROPERTY_ID);
-    propertyIds.add(ADMINSETTING);
-
-    keyPropertyIds.put(Resource.Type.AdminSetting, ADMINSETTING_NAME_PROPERTY_ID);
-
-    requiredProperties.add(ADMINSETTING_NAME_PROPERTY_ID);
-    requiredProperties.add(ADMINSETTING_SETTING_TYPE_PROPERTY_ID);
-    requiredProperties.add(ADMINSETTING_CONTENT_PROPERTY_ID);
-  }
-
-  protected AdminSettingResourceProvider() {
-    super(propertyIds, keyPropertyIds);
-    EnumSet<RoleAuthorization> requiredAuthorizations = EnumSet.of(RoleAuthorization.AMBARI_MANAGE_ADMIN_SETTINGS);
-    setRequiredCreateAuthorizations(requiredAuthorizations);
-    setRequiredDeleteAuthorizations(requiredAuthorizations);
-    setRequiredUpdateAuthorizations(requiredAuthorizations);
-  }
-
-  @Override
-  protected Set<String> getPKPropertyIds() {
-    return new HashSet<>(keyPropertyIds.values());
-  }
-
-  @Override
-  public RequestStatus createResourcesAuthorized(Request request)
-          throws NoSuchParentResourceException, ResourceAlreadyExistsException, SystemException {
-    Set<Resource> associatedResources = new HashSet<>();
-
-    for (Map<String, Object> properties : request.getProperties()) {
-      AdminSettingEntity settingEntity = createResources(newCreateCommand(request, properties));
-      Resource resource = new ResourceImpl(Resource.Type.AdminSetting);
-      resource.setProperty(ADMINSETTING_NAME_PROPERTY_ID, settingEntity.getName());
-      associatedResources.add(resource);
-    }
-
-    return getRequestStatus(null, associatedResources);
-  }
-
-  @Override
-  public Set<Resource> getResourcesAuthorized(Request request, Predicate predicate) throws NoSuchResourceException {
-    List<AdminSettingEntity> entities = new LinkedList<>();
-    final Set<Map<String, Object>> propertyMaps = getPropertyMaps(predicate);
-    if (propertyMaps.isEmpty()) {
-      entities = dao.findAll();
-    }
-    for (Map<String, Object> propertyMap: propertyMaps) {
-      if (propertyMap.containsKey(ADMINSETTING_NAME_PROPERTY_ID)) {
-        String name = propertyMap.get(ADMINSETTING_NAME_PROPERTY_ID).toString();
-        AdminSettingEntity entity = dao.findByName(name);
-        if (entity == null) {
-          throw new NoSuchResourceException(String.format("AdminSetting with name %s does not exists", name));
-        }
-        entities.add(entity);
-      } else {
-        entities = dao.findAll();
-        break;
-      }
-    }
-    Set<String> requestedIds = getRequestPropertyIds(request, predicate);
-    Set<Resource> resources = new HashSet<>();
-    for(AdminSettingEntity entity : entities) {
-      resources.add(toResource(entity, requestedIds));
-    }
-    return resources;
-  }
-
-  @Override
-  public RequestStatus updateResourcesAuthorized(Request request, Predicate predicate)
-          throws NoSuchResourceException, NoSuchParentResourceException, SystemException {
-    modifyResources(newUpdateCommand(request));
-    return getRequestStatus(null);
-  }
-
-  @Override
-  public RequestStatus deleteResourcesAuthorized(Predicate predicate) {
-    final Set<Map<String, Object>> propertyMaps = getPropertyMaps(predicate);
-    for (Map<String, Object> propertyMap : propertyMaps) {
-      if (propertyMap.containsKey(ADMINSETTING_NAME_PROPERTY_ID)) {
-        dao.removeByName(propertyMap.get(ADMINSETTING_NAME_PROPERTY_ID).toString());
-      }
-    }
-    return getRequestStatus(null);
-  }
-
-
-  private Command<AdminSettingEntity> newCreateCommand(final Request request, final Map<String, Object> properties) {
-    return new Command<AdminSettingEntity>() {
-      @Override
-      public AdminSettingEntity invoke() throws AmbariException, AuthorizationException {
-        AdminSettingEntity entity = toEntity(properties);
-        if (dao.findByName(entity.getName()) != null) {
-          throw new DuplicateResourceException(
-                  String.format("Setting already exists. setting name :%s ", entity.getName()));
-        }
-        dao.create(entity);
-        notifyCreate(Resource.Type.AdminSetting, request);
-        return entity;
-      }
-    };
-  }
-
-  private Command<Void> newUpdateCommand(final Request request) throws NoSuchResourceException, SystemException {
-    return new Command<Void>() {
-      @Override
-      public Void invoke() throws AmbariException {
-        final Set<Map<String, Object>> propertyMaps = request.getProperties();
-        for (Map<String, Object> propertyMap : propertyMaps) {
-          if (propertyMap.containsKey(ADMINSETTING_NAME_PROPERTY_ID)) {
-            String name = propertyMap.get(ADMINSETTING_NAME_PROPERTY_ID).toString();
-            AdminSettingEntity entity = dao.findByName(name);
-            if (entity == null) {
-              throw new AmbariException(String.format("There is no admin setting with name: %s ", name));
-            }
-            updateEntity(entity, propertyMap);
-            dao.merge(entity);
-          }
-        }
-        return null;
-      }
-    };
-  }
-
-  private void updateEntity(AdminSettingEntity entity, Map<String, Object> propertyMap) throws AmbariException {
-    String name = propertyMap.get(ADMINSETTING_NAME_PROPERTY_ID).toString();
-    if (!Objects.equals(name, entity.getName())) {
-      throw new AmbariException("Name for AdminSetting is immutable, cannot change name.");
-    }
-
-    if (StringUtils.isNotBlank(ObjectUtils.toString(propertyMap.get(ADMINSETTING_CONTENT_PROPERTY_ID)))) {
-      entity.setContent(propertyMap.get(ADMINSETTING_CONTENT_PROPERTY_ID).toString());
-    }
-
-    if (StringUtils.isNotBlank(ObjectUtils.toString(propertyMap.get(ADMINSETTING_SETTING_TYPE_PROPERTY_ID)))) {
-      entity.setSettingType(propertyMap.get(ADMINSETTING_SETTING_TYPE_PROPERTY_ID).toString());
-    }
-
-    entity.setUpdatedBy(AuthorizationHelper.getAuthenticatedName());
-    entity.setUpdateTimestamp(System.currentTimeMillis());
-  }
-
-  private Resource toResource(final AdminSettingEntity adminSettingEntity, final Set<String> requestedIds) {
-    Resource resource = new ResourceImpl(Resource.Type.AdminSetting);
-    setResourceProperty(resource, ADMINSETTING_NAME_PROPERTY_ID, adminSettingEntity.getName(), requestedIds);
-    setResourceProperty(resource, ADMINSETTING_SETTING_TYPE_PROPERTY_ID, adminSettingEntity.getSettingType(), requestedIds);
-    setResourceProperty(resource, ADMINSETTING_CONTENT_PROPERTY_ID, adminSettingEntity.getContent(), requestedIds);
-    setResourceProperty(resource, ADMINSETTING_UPDATED_BY_PROPERTY_ID, adminSettingEntity.getUpdatedBy(), requestedIds);
-    setResourceProperty(resource, ADMINSETTING_UPDATE_TIMESTAMP_PROPERTY_ID, adminSettingEntity.getUpdateTimestamp(), requestedIds);
-    return resource;
-  }
-
-  private AdminSettingEntity toEntity(final Map<String, Object> properties) throws AmbariException {
-    for (String propertyName: requiredProperties) {
-      if (properties.get(propertyName) == null) {
-        throw new AmbariException(String.format("Property %s should be provided", propertyName));
-      }
-    }
-
-    AdminSettingEntity entity = new AdminSettingEntity();
-    entity.setName(properties.get(ADMINSETTING_NAME_PROPERTY_ID).toString());
-    entity.setSettingType(properties.get(ADMINSETTING_SETTING_TYPE_PROPERTY_ID).toString());
-    entity.setContent(properties.get(ADMINSETTING_CONTENT_PROPERTY_ID).toString());
-    entity.setUpdatedBy(AuthorizationHelper.getAuthenticatedName());
-    entity.setUpdateTimestamp(System.currentTimeMillis());
-    return entity;
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DefaultProviderModule.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DefaultProviderModule.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DefaultProviderModule.java
index ab76458..da334b2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DefaultProviderModule.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DefaultProviderModule.java
@@ -112,8 +112,8 @@ public class DefaultProviderModule extends AbstractProviderModule {
         return new OperatingSystemResourceProvider(managementController);
       case Repository:
         return new RepositoryResourceProvider(managementController);
-      case AdminSetting:
-        return new AdminSettingResourceProvider();
+      case Setting:
+        return new SettingResourceProvider();
       case Artifact:
         return new ArtifactResourceProvider(managementController);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/SettingResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/SettingResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/SettingResourceProvider.java
new file mode 100644
index 0000000..e1f9015
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/SettingResourceProvider.java
@@ -0,0 +1,251 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ambari.server.controller.internal;
+
+import com.google.inject.Inject;
+import org.apache.ambari.server.AmbariException;
+import org.apache.ambari.server.DuplicateResourceException;
+import org.apache.ambari.server.StaticallyInject;
+import org.apache.ambari.server.controller.spi.NoSuchParentResourceException;
+import org.apache.ambari.server.controller.spi.NoSuchResourceException;
+import org.apache.ambari.server.controller.spi.Predicate;
+import org.apache.ambari.server.controller.spi.Request;
+import org.apache.ambari.server.controller.spi.RequestStatus;
+import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException;
+import org.apache.ambari.server.controller.spi.SystemException;
+import org.apache.ambari.server.controller.utilities.PropertyHelper;
+import org.apache.ambari.server.orm.dao.SettingDAO;
+import org.apache.ambari.server.orm.entities.SettingEntity;
+import org.apache.ambari.server.security.authorization.AuthorizationException;
+import org.apache.ambari.server.security.authorization.AuthorizationHelper;
+import org.apache.ambari.server.security.authorization.RoleAuthorization;
+import org.apache.commons.lang.ObjectUtils;
+import org.apache.commons.lang.StringUtils;
+
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Set;
+
+/**
+ * This class deals with managing CRUD operation on {@link SettingEntity}.
+ */
+@StaticallyInject
+public class SettingResourceProvider extends AbstractAuthorizedResourceProvider {
+
+  private static final String SETTINGS = "Settings";
+  protected static final String ID = "id";
+  protected static final String SETTING = "Setting";
+  protected static final String SETTING_NAME_PROPERTY_ID = PropertyHelper.getPropertyId(SETTINGS, "name");
+  protected static final String SETTING_SETTING_TYPE_PROPERTY_ID = PropertyHelper.getPropertyId(SETTINGS, "setting_type");
+  protected static final String SETTING_CONTENT_PROPERTY_ID = PropertyHelper.getPropertyId(SETTINGS, "content");
+  protected static final String SETTING_UPDATED_BY_PROPERTY_ID = PropertyHelper.getPropertyId(SETTINGS, "updated_by");
+  protected static final String SETTING_UPDATE_TIMESTAMP_PROPERTY_ID = PropertyHelper.getPropertyId(SETTINGS, "update_timestamp");
+
+  /**
+   * The property ids for setting resource.
+   */
+  private static final Set<String> propertyIds = new HashSet<>();
+
+  /**
+   * The key property ids for setting resource.
+   */
+  private static final Map<Resource.Type, String> keyPropertyIds = new HashMap<>();
+
+  private static final Set<String> requiredProperties = new HashSet<>();
+
+  @Inject
+  private static SettingDAO dao;
+
+  static {
+    propertyIds.add(SETTING_NAME_PROPERTY_ID);
+    propertyIds.add(SETTING_SETTING_TYPE_PROPERTY_ID);
+    propertyIds.add(SETTING_CONTENT_PROPERTY_ID);
+    propertyIds.add(SETTING_UPDATED_BY_PROPERTY_ID);
+    propertyIds.add(SETTING_UPDATE_TIMESTAMP_PROPERTY_ID);
+    propertyIds.add(SETTING_SETTING_TYPE_PROPERTY_ID);
+    propertyIds.add(SETTING);
+
+    keyPropertyIds.put(Resource.Type.Setting, SETTING_NAME_PROPERTY_ID);
+
+    requiredProperties.add(SETTING_NAME_PROPERTY_ID);
+    requiredProperties.add(SETTING_SETTING_TYPE_PROPERTY_ID);
+    requiredProperties.add(SETTING_CONTENT_PROPERTY_ID);
+  }
+
+  protected SettingResourceProvider() {
+    super(propertyIds, keyPropertyIds);
+    EnumSet<RoleAuthorization> requiredAuthorizations = EnumSet.of(RoleAuthorization.AMBARI_MANAGE_SETTINGS);
+    setRequiredCreateAuthorizations(requiredAuthorizations);
+    setRequiredDeleteAuthorizations(requiredAuthorizations);
+    setRequiredUpdateAuthorizations(requiredAuthorizations);
+  }
+
+  @Override
+  protected Set<String> getPKPropertyIds() {
+    return new HashSet<>(keyPropertyIds.values());
+  }
+
+  @Override
+  public RequestStatus createResourcesAuthorized(Request request)
+          throws NoSuchParentResourceException, ResourceAlreadyExistsException, SystemException {
+    Set<Resource> associatedResources = new HashSet<>();
+
+    for (Map<String, Object> properties : request.getProperties()) {
+      SettingEntity settingEntity = createResources(newCreateCommand(request, properties));
+      Resource resource = new ResourceImpl(Resource.Type.Setting);
+      resource.setProperty(SETTING_NAME_PROPERTY_ID, settingEntity.getName());
+      associatedResources.add(resource);
+    }
+
+    return getRequestStatus(null, associatedResources);
+  }
+
+  @Override
+  public Set<Resource> getResourcesAuthorized(Request request, Predicate predicate) throws NoSuchResourceException {
+    List<SettingEntity> entities = new LinkedList<>();
+    final Set<Map<String, Object>> propertyMaps = getPropertyMaps(predicate);
+    if (propertyMaps.isEmpty()) {
+      entities = dao.findAll();
+    }
+    for (Map<String, Object> propertyMap: propertyMaps) {
+      if (propertyMap.containsKey(SETTING_NAME_PROPERTY_ID)) {
+        String name = propertyMap.get(SETTING_NAME_PROPERTY_ID).toString();
+        SettingEntity entity = dao.findByName(name);
+        if (entity == null) {
+          throw new NoSuchResourceException(String.format("Setting with name %s does not exists", name));
+        }
+        entities.add(entity);
+      } else {
+        entities = dao.findAll();
+        break;
+      }
+    }
+    Set<String> requestedIds = getRequestPropertyIds(request, predicate);
+    Set<Resource> resources = new HashSet<>();
+    for(SettingEntity entity : entities) {
+      resources.add(toResource(entity, requestedIds));
+    }
+    return resources;
+  }
+
+  @Override
+  public RequestStatus updateResourcesAuthorized(Request request, Predicate predicate)
+          throws NoSuchResourceException, NoSuchParentResourceException, SystemException {
+    modifyResources(newUpdateCommand(request));
+    return getRequestStatus(null);
+  }
+
+  @Override
+  public RequestStatus deleteResourcesAuthorized(Predicate predicate) {
+    final Set<Map<String, Object>> propertyMaps = getPropertyMaps(predicate);
+    for (Map<String, Object> propertyMap : propertyMaps) {
+      if (propertyMap.containsKey(SETTING_NAME_PROPERTY_ID)) {
+        dao.removeByName(propertyMap.get(SETTING_NAME_PROPERTY_ID).toString());
+      }
+    }
+    return getRequestStatus(null);
+  }
+
+
+  private Command<SettingEntity> newCreateCommand(final Request request, final Map<String, Object> properties) {
+    return new Command<SettingEntity>() {
+      @Override
+      public SettingEntity invoke() throws AmbariException, AuthorizationException {
+        SettingEntity entity = toEntity(properties);
+        if (dao.findByName(entity.getName()) != null) {
+          throw new DuplicateResourceException(
+                  String.format("Setting already exists. setting name :%s ", entity.getName()));
+        }
+        dao.create(entity);
+        notifyCreate(Resource.Type.Setting, request);
+        return entity;
+      }
+    };
+  }
+
+  private Command<Void> newUpdateCommand(final Request request) throws NoSuchResourceException, SystemException {
+    return new Command<Void>() {
+      @Override
+      public Void invoke() throws AmbariException {
+        final Set<Map<String, Object>> propertyMaps = request.getProperties();
+        for (Map<String, Object> propertyMap : propertyMaps) {
+          if (propertyMap.containsKey(SETTING_NAME_PROPERTY_ID)) {
+            String name = propertyMap.get(SETTING_NAME_PROPERTY_ID).toString();
+            SettingEntity entity = dao.findByName(name);
+            if (entity == null) {
+              throw new AmbariException(String.format("There is no setting with name: %s ", name));
+            }
+            updateEntity(entity, propertyMap);
+            dao.merge(entity);
+          }
+        }
+        return null;
+      }
+    };
+  }
+
+  private void updateEntity(SettingEntity entity, Map<String, Object> propertyMap) throws AmbariException {
+    String name = propertyMap.get(SETTING_NAME_PROPERTY_ID).toString();
+    if (!Objects.equals(name, entity.getName())) {
+      throw new AmbariException("Name for Setting is immutable, cannot change name.");
+    }
+
+    if (StringUtils.isNotBlank(ObjectUtils.toString(propertyMap.get(SETTING_CONTENT_PROPERTY_ID)))) {
+      entity.setContent(propertyMap.get(SETTING_CONTENT_PROPERTY_ID).toString());
+    }
+
+    if (StringUtils.isNotBlank(ObjectUtils.toString(propertyMap.get(SETTING_SETTING_TYPE_PROPERTY_ID)))) {
+      entity.setSettingType(propertyMap.get(SETTING_SETTING_TYPE_PROPERTY_ID).toString());
+    }
+
+    entity.setUpdatedBy(AuthorizationHelper.getAuthenticatedName());
+    entity.setUpdateTimestamp(System.currentTimeMillis());
+  }
+
+  private Resource toResource(final SettingEntity settingEntity, final Set<String> requestedIds) {
+    Resource resource = new ResourceImpl(Resource.Type.Setting);
+    setResourceProperty(resource, SETTING_NAME_PROPERTY_ID, settingEntity.getName(), requestedIds);
+    setResourceProperty(resource, SETTING_SETTING_TYPE_PROPERTY_ID, settingEntity.getSettingType(), requestedIds);
+    setResourceProperty(resource, SETTING_CONTENT_PROPERTY_ID, settingEntity.getContent(), requestedIds);
+    setResourceProperty(resource, SETTING_UPDATED_BY_PROPERTY_ID, settingEntity.getUpdatedBy(), requestedIds);
+    setResourceProperty(resource, SETTING_UPDATE_TIMESTAMP_PROPERTY_ID, settingEntity.getUpdateTimestamp(), requestedIds);
+    return resource;
+  }
+
+  private SettingEntity toEntity(final Map<String, Object> properties) throws AmbariException {
+    for (String propertyName: requiredProperties) {
+      if (properties.get(propertyName) == null) {
+        throw new AmbariException(String.format("Property %s should be provided", propertyName));
+      }
+    }
+
+    SettingEntity entity = new SettingEntity();
+    entity.setName(properties.get(SETTING_NAME_PROPERTY_ID).toString());
+    entity.setSettingType(properties.get(SETTING_SETTING_TYPE_PROPERTY_ID).toString());
+    entity.setContent(properties.get(SETTING_CONTENT_PROPERTY_ID).toString());
+    entity.setUpdatedBy(AuthorizationHelper.getAuthenticatedName());
+    entity.setUpdateTimestamp(System.currentTimeMillis());
+    return entity;
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
index 9d6af76..f5fa5f1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
@@ -76,7 +76,7 @@ public interface Resource {
   enum InternalType {
     Cluster,
     Service,
-    AdminSetting,
+    Setting,
     Host,
     Component,
     HostComponent,
@@ -187,7 +187,7 @@ public interface Resource {
      */
     public static final Type Cluster = InternalType.Cluster.getType();
     public static final Type Service = InternalType.Service.getType();
-    public static final Type AdminSetting = InternalType.AdminSetting.getType();
+    public static final Type Setting = InternalType.Setting.getType();
     public static final Type Host = InternalType.Host.getType();
     public static final Type Component = InternalType.Component.getType();
     public static final Type HostComponent = InternalType.HostComponent.getType();

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AdminSettingDAO.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AdminSettingDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AdminSettingDAO.java
deleted file mode 100644
index 30e032f..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AdminSettingDAO.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ambari.server.orm.dao;
-
-import com.google.inject.Inject;
-import com.google.inject.Provider;
-import com.google.inject.Singleton;
-import com.google.inject.persist.Transactional;
-import org.apache.ambari.server.orm.RequiresSession;
-import org.apache.ambari.server.orm.entities.AdminSettingEntity;
-import org.apache.commons.lang.StringUtils;
-
-import javax.persistence.EntityManager;
-import javax.persistence.TypedQuery;
-import java.util.List;
-
-@Singleton
-public class AdminSettingDAO {
-
-  @Inject
-  Provider<EntityManager> entityManagerProvider;
-  @Inject
-  DaoUtils daoUtils;
-
-  /**
-   * Find an admin setting with the given name.
-   *
-   * @param name - name of admin setting.
-   * @return  a matching admin setting or null
-   */
-  @RequiresSession
-  public AdminSettingEntity findByName(String name) {
-    if (StringUtils.isBlank(name)) {
-      return null;
-    }
-    TypedQuery<AdminSettingEntity> query = entityManagerProvider.get()
-            .createNamedQuery("adminSettingByName", AdminSettingEntity.class);
-    query.setParameter("name", name);
-    return daoUtils.selectOne(query);
-  }
-
-  /**
-   * Find all admin settings.
-   *
-   * @return all admin setting instances.
-   */
-  @RequiresSession
-  public List<AdminSettingEntity> findAll() {
-    return daoUtils.selectAll(entityManagerProvider.get(), AdminSettingEntity.class);
-  }
-
-  /**
-   * Create a new admin setting entity.
-   *
-   * @param entity - entity to be created
-   */
-  @Transactional
-  public void create(AdminSettingEntity entity) {
-    entityManagerProvider.get().persist(entity);
-  }
-
-  /**
-   * Update admin setting instance.
-   *
-   * @param entity - entity to be updated.
-   * @return - updated admin entity.
-   */
-  @Transactional
-  public AdminSettingEntity merge(AdminSettingEntity entity) {
-    return entityManagerProvider.get().merge(entity);
-  }
-
-  /**
-   * Delete admin setting with given name.
-   *
-   * @param name - name of admin setting to be deleted.
-   */
-  @Transactional
-  public void removeByName(String name) {
-    AdminSettingEntity entity = findByName(name);
-    if (entity!= null) {
-      entityManagerProvider.get().remove(entity);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/SettingDAO.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/SettingDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/SettingDAO.java
new file mode 100644
index 0000000..2d0da20
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/SettingDAO.java
@@ -0,0 +1,100 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ambari.server.orm.dao;
+
+import com.google.inject.Inject;
+import com.google.inject.Provider;
+import com.google.inject.Singleton;
+import com.google.inject.persist.Transactional;
+import org.apache.ambari.server.orm.RequiresSession;
+import org.apache.ambari.server.orm.entities.SettingEntity;
+import org.apache.commons.lang.StringUtils;
+
+import javax.persistence.EntityManager;
+import javax.persistence.TypedQuery;
+import java.util.List;
+
+@Singleton
+public class SettingDAO {
+
+  @Inject
+  Provider<EntityManager> entityManagerProvider;
+  @Inject
+  DaoUtils daoUtils;
+
+  /**
+   * Find a setting with the given name.
+   *
+   * @param name - name of setting.
+   * @return  a matching setting or null
+   */
+  @RequiresSession
+  public SettingEntity findByName(String name) {
+    if (StringUtils.isBlank(name)) {
+      return null;
+    }
+    TypedQuery<SettingEntity> query = entityManagerProvider.get()
+            .createNamedQuery("settingByName", SettingEntity.class);
+    query.setParameter("name", name);
+    return daoUtils.selectOne(query);
+  }
+
+  /**
+   * Find all settings.
+   *
+   * @return all setting instances.
+   */
+  @RequiresSession
+  public List<SettingEntity> findAll() {
+    return daoUtils.selectAll(entityManagerProvider.get(), SettingEntity.class);
+  }
+
+  /**
+   * Create a new setting entity.
+   *
+   * @param entity - entity to be created
+   */
+  @Transactional
+  public void create(SettingEntity entity) {
+    entityManagerProvider.get().persist(entity);
+  }
+
+  /**
+   * Update setting instance.
+   *
+   * @param entity - entity to be updated.
+   * @return - updated entity.
+   */
+  @Transactional
+  public SettingEntity merge(SettingEntity entity) {
+    return entityManagerProvider.get().merge(entity);
+  }
+
+  /**
+   * Delete setting with given name.
+   *
+   * @param name - name of setting to be deleted.
+   */
+  @Transactional
+  public void removeByName(String name) {
+    SettingEntity entity = findByName(name);
+    if (entity!= null) {
+      entityManagerProvider.get().remove(entity);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AdminSettingEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AdminSettingEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AdminSettingEntity.java
deleted file mode 100644
index 9edc7b5..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AdminSettingEntity.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ambari.server.orm.entities;
-
-import javax.persistence.Basic;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Lob;
-import javax.persistence.NamedQuery;
-import javax.persistence.Table;
-import javax.persistence.TableGenerator;
-import java.util.Objects;
-
-/**
- * Entity representing AdminSetting.
- */
-@Table(name = "adminsetting")
-@TableGenerator(name = "admin_setting_id_generator",
-    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value",
-        pkColumnValue = "admin_setting_id_seq", initialValue = 0)
-
-@NamedQuery(name = "adminSettingByName", query = "SELECT adminSetting FROM AdminSettingEntity adminsetting WHERE adminSetting.name=:name")
-@Entity
-public class AdminSettingEntity {
-  @Id
-  @Column(name = "id", nullable = false, insertable = true, updatable = false)
-  @GeneratedValue(strategy = GenerationType.TABLE, generator = "admin_setting_id_generator")
-  private long id;
-
-  @Column(name = "name", nullable = false, insertable = true, updatable = false, unique = true)
-  @Basic
-  private String name;
-
-  @Column(name = "setting_type", nullable = false, insertable = true, updatable = true)
-  @Basic
-  private String settingType;
-
-  @Column(name = "content", nullable = false, insertable = true, updatable = true)
-  @Lob
-  @Basic
-  private String content;
-
-  @Column(name = "updated_by", nullable = false, insertable = true, updatable = true)
-  @Basic
-  private String updatedBy;
-
-  @Column(name = "update_timestamp", nullable = false, insertable = true, updatable = true)
-  @Basic
-  private long updateTimestamp;
-
-  public AdminSettingEntity() {
-  }
-
-  public long getId() {
-    return id;
-  }
-
-  public void setId(long id) {
-    this.id = id;
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  public String getSettingType() {
-    return settingType;
-  }
-
-  public void setSettingType(String settingType) {
-    this.settingType = settingType;
-  }
-
-  public String getContent() {
-    return content;
-  }
-
-  public void setContent(String content) {
-    this.content = content;
-  }
-
-  public String getUpdatedBy() {
-    return updatedBy;
-  }
-
-  public void setUpdatedBy(String updatedBy) {
-    this.updatedBy = updatedBy;
-  }
-
-  public long getUpdateTimestamp() {
-    return updateTimestamp;
-  }
-
-  public void setUpdateTimestamp(long updateTimestamp) {
-    this.updateTimestamp = updateTimestamp;
-  }
-
-  public AdminSettingEntity clone() {
-    AdminSettingEntity cloned = new AdminSettingEntity();
-    cloned.setId(id);
-    cloned.setName(name);
-    cloned.setContent(content);
-    cloned.setSettingType(settingType);
-    cloned.setUpdatedBy(updatedBy);
-    cloned.setUpdateTimestamp(updateTimestamp);
-    return cloned;
-  }
-
-  @Override
-  public boolean equals(Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
-
-    AdminSettingEntity entity = (AdminSettingEntity) o;
-    return id == entity.id &&
-            Objects.equals(name, entity.name) &&
-            Objects.equals(settingType, entity.settingType) &&
-            Objects.equals(content, entity.content) &&
-            Objects.equals(updatedBy, entity.updatedBy) &&
-            updateTimestamp == entity.updateTimestamp;
-  }
-
-  @Override
-  public int hashCode() {
-    return Objects.hash(id, name, settingType, content, updatedBy, updateTimestamp);
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/SettingEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/SettingEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/SettingEntity.java
new file mode 100644
index 0000000..20820cd
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/SettingEntity.java
@@ -0,0 +1,149 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.ambari.server.orm.entities;
+
+import javax.persistence.Basic;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Lob;
+import javax.persistence.NamedQuery;
+import javax.persistence.Table;
+import javax.persistence.TableGenerator;
+import java.util.Objects;
+
+/**
+ * Entity representing Setting.
+ */
+@Table(name = "setting")
+@TableGenerator(name = "setting_id_generator",
+    table = "ambari_sequences", pkColumnName = "sequence_name", valueColumnName = "sequence_value",
+        pkColumnValue = "setting_id_seq", initialValue = 0)
+
+@NamedQuery(name = "settingByName", query = "SELECT setting FROM SettingEntity setting WHERE setting.name=:name")
+@Entity
+public class SettingEntity {
+  @Id
+  @Column(name = "id", nullable = false, insertable = true, updatable = false)
+  @GeneratedValue(strategy = GenerationType.TABLE, generator = "setting_id_generator")
+  private long id;
+
+  @Column(name = "name", nullable = false, insertable = true, updatable = false, unique = true)
+  @Basic
+  private String name;
+
+  @Column(name = "setting_type", nullable = false, insertable = true, updatable = true)
+  @Basic
+  private String settingType;
+
+  @Column(name = "content", nullable = false, insertable = true, updatable = true)
+  @Lob
+  @Basic
+  private String content;
+
+  @Column(name = "updated_by", nullable = false, insertable = true, updatable = true)
+  @Basic
+  private String updatedBy;
+
+  @Column(name = "update_timestamp", nullable = false, insertable = true, updatable = true)
+  @Basic
+  private long updateTimestamp;
+
+  public SettingEntity() {
+  }
+
+  public long getId() {
+    return id;
+  }
+
+  public void setId(long id) {
+    this.id = id;
+  }
+
+  public String getName() {
+    return name;
+  }
+
+  public void setName(String name) {
+    this.name = name;
+  }
+
+  public String getSettingType() {
+    return settingType;
+  }
+
+  public void setSettingType(String settingType) {
+    this.settingType = settingType;
+  }
+
+  public String getContent() {
+    return content;
+  }
+
+  public void setContent(String content) {
+    this.content = content;
+  }
+
+  public String getUpdatedBy() {
+    return updatedBy;
+  }
+
+  public void setUpdatedBy(String updatedBy) {
+    this.updatedBy = updatedBy;
+  }
+
+  public long getUpdateTimestamp() {
+    return updateTimestamp;
+  }
+
+  public void setUpdateTimestamp(long updateTimestamp) {
+    this.updateTimestamp = updateTimestamp;
+  }
+
+  public SettingEntity clone() {
+    SettingEntity cloned = new SettingEntity();
+    cloned.setId(id);
+    cloned.setName(name);
+    cloned.setContent(content);
+    cloned.setSettingType(settingType);
+    cloned.setUpdatedBy(updatedBy);
+    cloned.setUpdateTimestamp(updateTimestamp);
+    return cloned;
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (this == o) return true;
+    if (o == null || getClass() != o.getClass()) return false;
+
+    SettingEntity entity = (SettingEntity) o;
+    return id == entity.id &&
+            Objects.equals(name, entity.name) &&
+            Objects.equals(settingType, entity.settingType) &&
+            Objects.equals(content, entity.content) &&
+            Objects.equals(updatedBy, entity.updatedBy) &&
+            updateTimestamp == entity.updateTimestamp;
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(id, name, settingType, content, updatedBy, updateTimestamp);
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/RoleAuthorization.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/RoleAuthorization.java b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/RoleAuthorization.java
index 1935d83..a77263d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/RoleAuthorization.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/RoleAuthorization.java
@@ -32,7 +32,7 @@ public enum RoleAuthorization {
   AMBARI_ADD_DELETE_CLUSTERS("AMBARI.ADD_DELETE_CLUSTERS"),
   AMBARI_ASSIGN_ROLES("AMBARI.ASSIGN_ROLES"),
   AMBARI_EDIT_STACK_REPOS("AMBARI.EDIT_STACK_REPOS"),
-  AMBARI_MANAGE_ADMIN_SETTINGS("AMBARI.MANAGE_ADMIN_SETTINGS"),
+  AMBARI_MANAGE_SETTINGS("AMBARI.MANAGE_SETTINGS"),
   AMBARI_MANAGE_GROUPS("AMBARI.MANAGE_GROUPS"),
   AMBARI_MANAGE_STACK_VERSIONS("AMBARI.MANAGE_STACK_VERSIONS"),
   AMBARI_MANAGE_USERS("AMBARI.MANAGE_USERS"),

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql
index 9982c2a..0fdfd2b 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Derby-CREATE.sql
@@ -655,7 +655,7 @@ CREATE TABLE topology_logical_task (
   PRIMARY KEY (id)
 );
 
-CREATE TABLE adminsetting (
+CREATE TABLE setting (
   id BIGINT NOT NULL,
   name VARCHAR(255) NOT NULL UNIQUE,
   setting_type VARCHAR(255) NOT NULL,
@@ -1033,7 +1033,7 @@ INSERT INTO ambari_sequences (sequence_name, sequence_value)
   union all
   select 'topology_host_group_id_seq', 0 FROM SYSIBM.SYSDUMMY1
   union all
-  select 'admin_setting_id_seq', 0 FROM SYSIBM.SYSDUMMY1
+  select 'setting_id_seq', 0 FROM SYSIBM.SYSDUMMY1
   union all
   select 'hostcomponentstate_id_seq', 0  FROM SYSIBM.SYSDUMMY1;
 
@@ -1111,7 +1111,7 @@ INSERT INTO roleauthorization(authorization_id, authorization_name)
   SELECT 'AMBARI.ADD_DELETE_CLUSTERS', 'Create new clusters' FROM SYSIBM.SYSDUMMY1 UNION ALL
   SELECT 'AMBARI.SET_SERVICE_USERS_GROUPS', 'Set service users and groups' FROM SYSIBM.SYSDUMMY1 UNION ALL
   SELECT 'AMBARI.RENAME_CLUSTER', 'Rename clusters' FROM SYSIBM.SYSDUMMY1 UNION ALL
-  SELECT 'AMBARI.MANAGE_ADMIN_SETTINGS', 'Manage administrative settings' FROM SYSIBM.SYSDUMMY1 UNION ALL
+  SELECT 'AMBARI.MANAGE_SETTINGS', 'Manage settings' FROM SYSIBM.SYSDUMMY1 UNION ALL
   SELECT 'AMBARI.MANAGE_USERS', 'Manage users' FROM SYSIBM.SYSDUMMY1 UNION ALL
   SELECT 'AMBARI.MANAGE_GROUPS', 'Manage groups' FROM SYSIBM.SYSDUMMY1 UNION ALL
   SELECT 'AMBARI.MANAGE_VIEWS', 'Manage Ambari Views' FROM SYSIBM.SYSDUMMY1 UNION ALL
@@ -1292,7 +1292,7 @@ INSERT INTO permission_roleauthorization(permission_id, authorization_id)
   SELECT permission_id, 'AMBARI.ADD_DELETE_CLUSTERS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR'  UNION ALL
   SELECT permission_id, 'AMBARI.SET_SERVICE_USERS_GROUPS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR'  UNION ALL
   SELECT permission_id, 'AMBARI.RENAME_CLUSTER' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR'  UNION ALL
-  SELECT permission_id, 'AMBARI.MANAGE_ADMIN_SETTINGS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR'  UNION ALL
+  SELECT permission_id, 'AMBARI.MANAGE_SETTINGS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR'  UNION ALL
   SELECT permission_id, 'AMBARI.MANAGE_USERS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR'  UNION ALL
   SELECT permission_id, 'AMBARI.MANAGE_GROUPS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR'  UNION ALL
   SELECT permission_id, 'AMBARI.MANAGE_VIEWS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR'  UNION ALL

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
index f05ebd2..11e43c2 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
@@ -662,7 +662,7 @@ CREATE TABLE topology_logical_task (
   PRIMARY KEY (id)
 );
 
-CREATE TABLE adminsetting (
+CREATE TABLE setting (
   id BIGINT NOT NULL,
   name VARCHAR(255) NOT NULL UNIQUE,
   setting_type VARCHAR(255) NOT NULL,
@@ -997,7 +997,7 @@ INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('topology_lo
 INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('topology_logical_task_id_seq', 0);
 INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('topology_request_id_seq', 0);
 INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('topology_host_group_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('admin_setting_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('setting_id_seq', 0);
 INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('hostcomponentstate_id_seq', 0);
 
 insert into adminresourcetype (resource_type_id, resource_type_name)
@@ -1076,7 +1076,7 @@ INSERT INTO roleauthorization(authorization_id, authorization_name)
   SELECT 'AMBARI.ADD_DELETE_CLUSTERS', 'Create new clusters' UNION ALL
   SELECT 'AMBARI.SET_SERVICE_USERS_GROUPS', 'Set service users and groups' UNION ALL
   SELECT 'AMBARI.RENAME_CLUSTER', 'Rename clusters' UNION ALL
-  SELECT 'AMBARI.MANAGE_ADMIN_SETTINGS', 'Manage administrative settings' UNION ALL
+  SELECT 'AMBARI.MANAGE_SETTINGS', 'Manage administrative settings' UNION ALL
   SELECT 'AMBARI.MANAGE_USERS', 'Manage users' UNION ALL
   SELECT 'AMBARI.MANAGE_GROUPS', 'Manage groups' UNION ALL
   SELECT 'AMBARI.MANAGE_VIEWS', 'Manage Ambari Views' UNION ALL
@@ -1263,7 +1263,7 @@ INSERT INTO permission_roleauthorization(permission_id, authorization_id)
   SELECT permission_id, 'AMBARI.ADD_DELETE_CLUSTERS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.SET_SERVICE_USERS_GROUPS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.RENAME_CLUSTER' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
-  SELECT permission_id, 'AMBARI.MANAGE_ADMIN_SETTINGS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
+  SELECT permission_id, 'AMBARI.MANAGE_SETTINGS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.MANAGE_USERS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.MANAGE_GROUPS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.MANAGE_VIEWS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
index 96ef3fa..8d4ba28 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql
@@ -651,7 +651,7 @@ CREATE TABLE topology_logical_task (
   PRIMARY KEY (id)
 );
 
-CREATE TABLE adminsetting (
+CREATE TABLE setting (
   id NUMBER(19) NOT NULL,
   name VARCHAR(255) NOT NULL UNIQUE,
   setting_type VARCHAR(255) NOT NULL,
@@ -987,7 +987,7 @@ INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('topology_lo
 INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('topology_logical_task_id_seq', 0);
 INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('topology_request_id_seq', 0);
 INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('topology_host_group_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('admin_setting_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('setting_id_seq', 0);
 INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('hostcomponentstate_id_seq', 0);
 
 INSERT INTO metainfo("metainfo_key", "metainfo_value") values ('version', '${ambariVersion}');
@@ -1068,7 +1068,7 @@ INSERT INTO roleauthorization(authorization_id, authorization_name)
   SELECT 'AMBARI.ADD_DELETE_CLUSTERS', 'Create new clusters' FROM dual UNION ALL
   SELECT 'AMBARI.SET_SERVICE_USERS_GROUPS', 'Set service users and groups' FROM dual UNION ALL
   SELECT 'AMBARI.RENAME_CLUSTER', 'Rename clusters' FROM dual UNION ALL
-  SELECT 'AMBARI.MANAGE_ADMIN_SETTINGS', 'Manage administrative settings' FROM dual UNION ALL
+  SELECT 'AMBARI.MANAGE_SETTINGS', 'Manage settings' FROM dual UNION ALL
   SELECT 'AMBARI.MANAGE_USERS', 'Manage users' FROM dual UNION ALL
   SELECT 'AMBARI.MANAGE_GROUPS', 'Manage groups' FROM dual UNION ALL
   SELECT 'AMBARI.MANAGE_VIEWS', 'Manage Ambari Views' FROM dual UNION ALL
@@ -1255,7 +1255,7 @@ INSERT INTO permission_roleauthorization(permission_id, authorization_id)
   SELECT permission_id, 'AMBARI.ADD_DELETE_CLUSTERS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.SET_SERVICE_USERS_GROUPS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.RENAME_CLUSTER' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
-  SELECT permission_id, 'AMBARI.MANAGE_ADMIN_SETTINGS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
+  SELECT permission_id, 'AMBARI.MANAGE_SETTINGS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.MANAGE_USERS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.MANAGE_GROUPS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.MANAGE_VIEWS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
index 8bd9d03..c762ac4 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql
@@ -655,7 +655,7 @@ CREATE TABLE topology_logical_task (
   PRIMARY KEY (id)
 );
 
-CREATE TABLE adminsetting (
+CREATE TABLE setting (
   id BIGINT NOT NULL,
   name VARCHAR(255) NOT NULL UNIQUE,
   setting_type VARCHAR(255) NOT NULL,
@@ -1033,7 +1033,7 @@ INSERT INTO ambari_sequences (sequence_name, sequence_value)
   union all
   select 'topology_host_group_id_seq', 0
   union all
-  select 'admin_setting_id_seq', 0
+  select 'setting_id_seq', 0
   union all
   select 'hostcomponentstate_id_seq', 0;
 
@@ -1113,7 +1113,7 @@ INSERT INTO roleauthorization(authorization_id, authorization_name)
   SELECT 'AMBARI.ADD_DELETE_CLUSTERS', 'Create new clusters' UNION ALL
   SELECT 'AMBARI.SET_SERVICE_USERS_GROUPS', 'Set service users and groups' UNION ALL
   SELECT 'AMBARI.RENAME_CLUSTER', 'Rename clusters' UNION ALL
-  SELECT 'AMBARI.MANAGE_ADMIN_SETTINGS', 'Manage administrative settings' UNION ALL
+  SELECT 'AMBARI.MANAGE_SETTINGS', 'Manage administrative settings' UNION ALL
   SELECT 'AMBARI.MANAGE_USERS', 'Manage users' UNION ALL
   SELECT 'AMBARI.MANAGE_GROUPS', 'Manage groups' UNION ALL
   SELECT 'AMBARI.MANAGE_VIEWS', 'Manage Ambari Views' UNION ALL
@@ -1300,7 +1300,7 @@ INSERT INTO permission_roleauthorization(permission_id, authorization_id)
   SELECT permission_id, 'AMBARI.ADD_DELETE_CLUSTERS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.SET_SERVICE_USERS_GROUPS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.RENAME_CLUSTER' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
-  SELECT permission_id, 'AMBARI.MANAGE_ADMIN_SETTINGS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
+  SELECT permission_id, 'AMBARI.MANAGE_SETTINGS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.MANAGE_USERS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.MANAGE_GROUPS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.MANAGE_VIEWS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
index 54999cb..81b41fe 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql
@@ -736,7 +736,7 @@ CREATE TABLE ambari.topology_logical_task (
 );
 GRANT ALL PRIVILEGES ON TABLE ambari.topology_logical_task TO :username;
 
-CREATE TABLE ambari.adminsetting (
+CREATE TABLE ambari.setting (
   id BIGINT NOT NULL,
   name VARCHAR(255) NOT NULL UNIQUE,
   setting_type VARCHAR(255) NOT NULL,
@@ -745,7 +745,7 @@ CREATE TABLE ambari.adminsetting (
   update_timestamp BIGINT NOT NULL,
   PRIMARY KEY (id)
 );
-GRANT ALL PRIVILEGES ON TABLE ambari.adminsetting TO :username;
+GRANT ALL PRIVILEGES ON TABLE ambari.setting TO :username;
 
 -- tasks indices --
 CREATE INDEX idx_stage_request_id ON ambari.stage (request_id);
@@ -1132,7 +1132,7 @@ INSERT INTO ambari.ambari_sequences (sequence_name, sequence_value)
   union all
   select 'topology_host_group_id_seq', 0
   union all
-  select 'admin_setting_id_seq', 0
+  select 'setting_id_seq', 0
   union all
   select 'hostcomponentstate_id_seq', 0;
 
@@ -1212,7 +1212,7 @@ INSERT INTO ambari.roleauthorization(authorization_id, authorization_name)
   SELECT 'AMBARI.ADD_DELETE_CLUSTERS', 'Create new clusters' UNION ALL
   SELECT 'AMBARI.SET_SERVICE_USERS_GROUPS', 'Set service users and groups' UNION ALL
   SELECT 'AMBARI.RENAME_CLUSTER', 'Rename clusters' UNION ALL
-  SELECT 'AMBARI.MANAGE_ADMIN_SETTINGS', 'Manage administrative settings' UNION ALL
+  SELECT 'AMBARI.MANAGE_SETTINGS', 'Manage settings' UNION ALL
   SELECT 'AMBARI.MANAGE_USERS', 'Manage users' UNION ALL
   SELECT 'AMBARI.MANAGE_GROUPS', 'Manage groups' UNION ALL
   SELECT 'AMBARI.MANAGE_VIEWS', 'Manage Ambari Views' UNION ALL
@@ -1399,7 +1399,7 @@ INSERT INTO ambari.permission_roleauthorization(permission_id, authorization_id)
   SELECT permission_id, 'AMBARI.ADD_DELETE_CLUSTERS' FROM ambari.adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.SET_SERVICE_USERS_GROUPS' FROM ambari.adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.RENAME_CLUSTER' FROM ambari.adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
-  SELECT permission_id, 'AMBARI.MANAGE_ADMIN_SETTINGS' FROM ambari.adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
+  SELECT permission_id, 'AMBARI.MANAGE_SETTINGS' FROM ambari.adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.MANAGE_USERS' FROM ambari.adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.MANAGE_GROUPS' FROM ambari.adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
   SELECT permission_id, 'AMBARI.MANAGE_VIEWS' FROM ambari.adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
index ce058e2..f8c9b8d 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-SQLAnywhere-CREATE.sql
@@ -652,7 +652,7 @@ CREATE TABLE topology_logical_task (
   PRIMARY KEY (id)
 );
 
-CREATE TABLE adminsetting (
+CREATE TABLE setting (
   id NUMERIC(19) NOT NULL,
   name VARCHAR(255) NOT NULL UNIQUE,
   setting_type VARCHAR(255) NOT NULL,
@@ -984,7 +984,7 @@ INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('topology_lo
 INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('topology_logical_task_id_seq', 0);
 INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('topology_request_id_seq', 0);
 INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('topology_host_group_id_seq', 0);
-INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('admin_setting_id_seq', 0);
+INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('setting_id_seq', 0);
 INSERT INTO ambari_sequences(sequence_name, sequence_value) values ('hostcomponentstate_id_seq', 0);
 
 insert into adminresourcetype (resource_type_id, resource_type_name)
@@ -1063,7 +1063,7 @@ insert into adminpermission(permission_id, permission_name, resource_type_id, pe
     SELECT 'AMBARI.ADD_DELETE_CLUSTERS', 'Create new clusters' UNION ALL
     SELECT 'AMBARI.SET_SERVICE_USERS_GROUPS', 'Set service users and groups' UNION ALL
     SELECT 'AMBARI.RENAME_CLUSTER', 'Rename clusters' UNION ALL
-    SELECT 'AMBARI.MANAGE_ADMIN_SETTINGS', 'Manage administrative settings' UNION ALL
+    SELECT 'AMBARI.MANAGE_SETTINGS', 'Manage settings' UNION ALL
     SELECT 'AMBARI.MANAGE_USERS', 'Manage users' UNION ALL
     SELECT 'AMBARI.MANAGE_GROUPS', 'Manage groups' UNION ALL
     SELECT 'AMBARI.MANAGE_VIEWS', 'Manage Ambari Views' UNION ALL
@@ -1250,7 +1250,7 @@ insert into adminpermission(permission_id, permission_name, resource_type_id, pe
     SELECT permission_id, 'AMBARI.ADD_DELETE_CLUSTERS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
     SELECT permission_id, 'AMBARI.SET_SERVICE_USERS_GROUPS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
     SELECT permission_id, 'AMBARI.RENAME_CLUSTER' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
-    SELECT permission_id, 'AMBARI.MANAGE_ADMIN_SETTINGS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
+    SELECT permission_id, 'AMBARI.MANAGE_SETTINGS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
     SELECT permission_id, 'AMBARI.MANAGE_USERS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
     SELECT permission_id, 'AMBARI.MANAGE_GROUPS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
     SELECT permission_id, 'AMBARI.MANAGE_VIEWS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
index 66ea512..324c24d 100644
--- a/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
+++ b/ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql
@@ -760,7 +760,7 @@ CREATE TABLE topology_logical_task (
   PRIMARY KEY CLUSTERED (id)
 );
 
-CREATE TABLE adminsetting (
+CREATE TABLE setting (
   id BIGINT NOT NULL,
   name VARCHAR(255) NOT NULL UNIQUE,
   setting_type VARCHAR(255) NOT NULL,
@@ -1100,7 +1100,7 @@ BEGIN TRANSACTION
     ('topology_logical_task_id_seq', 0),
     ('topology_request_id_seq', 0),
     ('topology_host_group_id_seq', 0),
-    ('admin_setting_id_seq', 0),
+    ('setting_id_seq', 0),
     ('hostcomponentstate_id_seq', 0);
 
   insert into adminresourcetype (resource_type_id, resource_type_name)
@@ -1173,7 +1173,7 @@ BEGIN TRANSACTION
     SELECT 'AMBARI.ADD_DELETE_CLUSTERS', 'Create new clusters' UNION ALL
     SELECT 'AMBARI.SET_SERVICE_USERS_GROUPS', 'Set service users and groups' UNION ALL
     SELECT 'AMBARI.RENAME_CLUSTER', 'Rename clusters' UNION ALL
-    SELECT 'AMBARI.MANAGE_ADMIN_SETTINGS', 'Manage administrative settings' UNION ALL
+    SELECT 'AMBARI.MANAGE_SETTINGS', 'Manage settings' UNION ALL
     SELECT 'AMBARI.MANAGE_USERS', 'Manage users' UNION ALL
     SELECT 'AMBARI.MANAGE_GROUPS', 'Manage groups' UNION ALL
     SELECT 'AMBARI.MANAGE_VIEWS', 'Manage Ambari Views' UNION ALL
@@ -1360,7 +1360,7 @@ BEGIN TRANSACTION
     SELECT permission_id, 'AMBARI.ADD_DELETE_CLUSTERS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
     SELECT permission_id, 'AMBARI.SET_SERVICE_USERS_GROUPS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
     SELECT permission_id, 'AMBARI.RENAME_CLUSTER' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
-    SELECT permission_id, 'AMBARI.MANAGE_ADMIN_SETTINGS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
+    SELECT permission_id, 'AMBARI.MANAGE_SETTINGS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
     SELECT permission_id, 'AMBARI.MANAGE_USERS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
     SELECT permission_id, 'AMBARI.MANAGE_GROUPS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL
     SELECT permission_id, 'AMBARI.MANAGE_VIEWS' FROM adminpermission WHERE permission_name='AMBARI.ADMINISTRATOR' UNION ALL

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/META-INF/persistence.xml b/ambari-server/src/main/resources/META-INF/persistence.xml
index 280b9b6..7fd0391 100644
--- a/ambari-server/src/main/resources/META-INF/persistence.xml
+++ b/ambari-server/src/main/resources/META-INF/persistence.xml
@@ -88,7 +88,7 @@
     <class>org.apache.ambari.server.orm.entities.TopologyHostInfoEntity</class>
     <class>org.apache.ambari.server.orm.entities.TopologyHostTaskEntity</class>
     <class>org.apache.ambari.server.orm.entities.TopologyLogicalTaskEntity</class>
-    <class>org.apache.ambari.server.orm.entities.AdminSettingEntity</class>
+    <class>org.apache.ambari.server.orm.entities.SettingEntity</class>
     <class>org.apache.ambari.server.orm.entities.KerberosDescriptorEntity</class>
 
     <properties>

http://git-wip-us.apache.org/repos/asf/ambari/blob/774d689e/ambari-server/src/test/java/org/apache/ambari/server/api/services/AdminSettingServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/AdminSettingServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/AdminSettingServiceTest.java
deleted file mode 100644
index d84c97d..0000000
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/AdminSettingServiceTest.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ambari.server.api.services;
-
-import org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
-import org.apache.ambari.server.api.services.serializers.ResultSerializer;
-
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.UriInfo;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.junit.Assert.assertEquals;
-
-/**
- * Unit test for {@link AdminSettingService}
- */
-public class AdminSettingServiceTest extends BaseServiceTest {
-  @Override
-  public List<ServiceTestInvocation> getTestInvocations() throws Exception {
-    List<ServiceTestInvocation> listInvocations = new ArrayList<>();
-
-    //getSetting
-    AdminSettingService adminSettingService = new TestAdminSettingService("settingName");
-    Method m = adminSettingService.getClass().getMethod("getSetting", String.class, HttpHeaders.class, UriInfo.class, String.class);
-    Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo(), "settingName"};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.GET, adminSettingService, m, args, null));
-
-    //getSettings
-    adminSettingService = new TestAdminSettingService(null);
-    m = adminSettingService.getClass().getMethod("getSettings", String.class, HttpHeaders.class, UriInfo.class);
-    args = new Object[] {null, getHttpHeaders(), getUriInfo()};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.GET, adminSettingService, m, args, null));
-
-    //createSetting
-    adminSettingService = new TestAdminSettingService(null);
-    m = adminSettingService.getClass().getMethod("createSetting", String.class, HttpHeaders.class, UriInfo.class);
-    args = new Object[] {"body", getHttpHeaders(), getUriInfo()};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.POST, adminSettingService, m, args, "body"));
-
-    //updateSetting
-    adminSettingService = new TestAdminSettingService("settingName");
-    m = adminSettingService.getClass().getMethod("updateSetting", String.class, HttpHeaders.class, UriInfo.class, String.class);
-    args = new Object[] {"body", getHttpHeaders(), getUriInfo(), "settingName"};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.PUT, adminSettingService, m, args, "body"));
-
-    //deleteSetting
-    adminSettingService = new TestAdminSettingService("settingName");
-    m = adminSettingService.getClass().getMethod("deleteSetting", HttpHeaders.class, UriInfo.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "settingName"};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.DELETE, adminSettingService, m, args, null));
-
-    return listInvocations;
-  }
-
-  private class TestAdminSettingService extends AdminSettingService {
-    private String adminSettingName;
-
-    private TestAdminSettingService(String settingName) {
-      this.adminSettingName = settingName;
-    }
-
-    @Override
-    ResourceInstance createSettingResource(String settingName) {
-      assertEquals(this.adminSettingName, settingName);
-      return getTestResource();
-    }
-
-    @Override
-    RequestFactory getRequestFactory() {
-      return getTestRequestFactory();
-    }
-
-    @Override
-    protected RequestBodyParser getBodyParser() {
-      return getTestBodyParser();
-    }
-
-    @Override
-    protected ResultSerializer getResultSerializer() {
-      return getTestResultSerializer();
-    }
-  }
-}