You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ad...@apache.org on 2017/05/23 10:33:59 UTC

[01/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Repository: ambari
Updated Branches:
  refs/heads/trunk 7c9295395 -> 0d688106a


http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/brunch-config.js
----------------------------------------------------------------------
diff --git a/ambari-web/brunch-config.js b/ambari-web/brunch-config.js
index 31eb1cb..2a625d7 100644
--- a/ambari-web/brunch-config.js
+++ b/ambari-web/brunch-config.js
@@ -27,7 +27,8 @@ module.exports.config = {
     },
     assetsmanager: {
       copyTo: {
-        'stylesheets/fonts' : ['vendor/theme/fonts/*']
+        'stylesheets/fonts' : ['vendor/theme/fonts/*'],
+        'api-docs' : ['api-docs/*']
       }
     }
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-web/pom.xml b/ambari-web/pom.xml
index 2d567cc..250159d 100644
--- a/ambari-web/pom.xml
+++ b/ambari-web/pom.xml
@@ -262,6 +262,7 @@
             <exclude>public/**</exclude>
             <exclude>public-static/**</exclude>
             <exclude>app/assets/**</exclude>
+            <exclude>api-docs/**</exclude>
             <exclude>vendor/**</exclude>
             <exclude>node_modules/**</exclude>
             <exclude>node/**</exclude>


[29/49] ambari git commit: Merge trunk to ambari-rest-api-explorer branch. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/MemberService.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/MemberService.java
index 0ccc472,0000000..f03b47f
mode 100644,000000..100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/MemberService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/MemberService.java
@@@ -1,200 -1,0 +1,200 @@@
 +/**
 + * 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.groups;
 +
 +import java.util.HashMap;
 +import java.util.Map;
 +
 +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 org.apache.ambari.server.api.resources.ResourceInstance;
 +import org.apache.ambari.server.api.services.BaseService;
 +import org.apache.ambari.server.api.services.Request;
 +import org.apache.ambari.server.controller.MemberResponse;
 +import org.apache.ambari.server.controller.spi.Resource;
 +
 +import io.swagger.annotations.Api;
 +import io.swagger.annotations.ApiImplicitParam;
 +import io.swagger.annotations.ApiImplicitParams;
 +import io.swagger.annotations.ApiOperation;
 +import io.swagger.annotations.ApiParam;
 +import io.swagger.annotations.ApiResponse;
 +import io.swagger.annotations.ApiResponses;
 +
 +/**
 + * Service responsible for user membership requests.
 + */
 +@Path("/groups/{groupName}/members")
 +@Api(value = "Groups", description = "Endpoint for group specific operations")
 +public class MemberService extends BaseService {
 +  /**
 +   * Creates new members.
 +   * Handles: POST /groups/{groupname}/members requests.
 +   *
 +   * @param headers      http headers
 +   * @param ui           uri info
 +   * @param groupName    group name
 +   * @return information regarding the created member
 +   */
 +   @POST
 +   @Produces("text/plain")
 +   public Response createMember(String body, @Context HttpHeaders headers, @Context UriInfo ui, @PathParam("groupName") String groupName) {
 +    return handleRequest(headers, body, ui, Request.Type.POST, createMemberResource(groupName, null));
 +  }
 +
 +  /**
 +   * Creates a new member.
 +   * Handles: POST /groups/{groupname}/members/{username} requests.
 +   *
 +   * @param headers      http headers
 +   * @param ui           uri info
 +   * @param groupName    group name
 +   * @param userName     the user name
 +   * @return information regarding the created member
 +   */
 +   @POST
 +   @Path("{userName}")
 +   @Produces("text/plain")
 +   public Response createMember(String body, @Context HttpHeaders headers, @Context UriInfo ui, @PathParam("groupName") String groupName,
 +                                 @PathParam("userName") String userName) {
 +    return handleRequest(headers, body, ui, Request.Type.POST, createMemberResource(groupName, userName));
 +  }
 +
 +   /**
 +    * Deletes a member.
 +    * Handles:  DELETE /groups/{groupname}/members/{username} requests.
 +    *
 +    * @param headers      http headers
 +    * @param ui           uri info
 +    * @param groupName    group name
 +    * @param userName     the user name
 +    * @return information regarding the deleted group
 +    */
 +   @DELETE
 +   @Path("{userName}")
 +   @Produces("text/plain")
 +   @ApiOperation(value = "Delete group member", nickname = "MemberService#deleteMember", notes = "Delete member resource.")
 +   @ApiResponses(value = {
 +     @ApiResponse(code = 200, message = "Successful operation"),
 +     @ApiResponse(code = 500, message = "Server Error")}
 +   )
 +   public Response deleteMember(@Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "group name", required = true) @PathParam("groupName") String groupName,
 +                                @ApiParam(value = "user name", required = true) @PathParam("userName") String userName) {
 +     return handleRequest(headers, null, ui, Request.Type.DELETE, createMemberResource(groupName, userName));
 +   }
 +
 +  /**
 +   * Gets all members.
 +   * Handles: GET /groups/{groupname}/members requests.
 +   *
 +   * @param headers    http headers
 +   * @param ui         uri info
 +   * @param groupName  group name
 +   * @return information regarding all members
 +   */
 +  @GET
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Get all group members", nickname = "MemberService#getMembers", notes = "Returns details of all members.", response = MemberResponse.class, responseContainer = "List")
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "fields", value = "Filter member details", defaultValue = "MemberInfo/*", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "sortBy", value = "Sort members (asc | desc)", defaultValue = "MemberInfo/user_name.asc", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
 +    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
 +  })
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation", response = MemberResponse.class, responseContainer = "List")}
 +  )
 +  public Response getMembers(@Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "group name", required = true) @PathParam("groupName") String groupName) {
 +    return handleRequest(headers, null, ui, Request.Type.GET, createMemberResource(groupName, null));
 +  }
 +
 +  /**
 +   * Gets member.
 +   * Handles: GET /groups/{groupname}/members/{username} requests.
 +   *
 +   * @param headers    http headers
 +   * @param ui         uri info
 +   * @param groupName    group name
 +   * @param userName   the user name
 +   * @return information regarding the specific member
 +   */
 +  @GET
 +  @Path("{userName}")
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Get group member", nickname = "MemberService#getMember", notes = "Returns member details.", response = MemberResponse.class)
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "fields", value = "Filter member details", defaultValue = "MemberInfo", dataType = "string", paramType = "query")
 +  })
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation", response = MemberResponse.class)}
 +  )
 +  public Response getMember(@Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "group name", required = true)  @PathParam("groupName") String groupName,
 +                            @ApiParam(value = "user name", required = true) @PathParam("userName") String userName) {
 +    return handleRequest(headers, null, ui, Request.Type.GET, createMemberResource(groupName, userName));
 +  }
 +
 +  /**
 +   * Updates all members.
 +   * Handles: PUT /groups/{groupname}/members requests.
 +   *
 +   * @param headers    http headers
 +   * @param ui         uri info
 +   * @param groupName    group name
 +   * @return status of the request
 +   */
 +  @PUT
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Update group members", nickname = "MemberService#updateMembers", notes = "Updates group member resources.", responseContainer = "List")
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.MemberRequest", paramType = "body")
 +  })
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation"),
 +    @ApiResponse(code = 500, message = "Server Error")}
 +  )
 +  public Response updateMembers(String body, @Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "group name", required = true)
 +                                 @PathParam("groupName") String groupName) {
 +    return handleRequest(headers, body, ui, Request.Type.PUT, createMemberResource(groupName, null));
 +  }
 +
 +  /**
 +   * Create a member resource instance.
 +   *
 +   * @param groupName  group name
 +   * @param userName   user name
 +   *
 +   * @return a member resource instance
 +   */
 +  private ResourceInstance createMemberResource(String groupName, String userName) {
-     final Map<Resource.Type, String> mapIds = new HashMap<Resource.Type, String>();
++    final Map<Resource.Type, String> mapIds = new HashMap<>();
 +    mapIds.put(Resource.Type.Group, groupName);
 +    mapIds.put(Resource.Type.Member, userName);
 +    return createResource(Resource.Type.Member, mapIds);
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/ActiveWidgetLayoutService.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/api/services/users/ActiveWidgetLayoutService.java
index 3dea1ca,0000000..561e7d3
mode 100644,000000..100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/ActiveWidgetLayoutService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/ActiveWidgetLayoutService.java
@@@ -1,111 -1,0 +1,111 @@@
 +/**
 + * 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.users;
 +
 +import java.util.HashMap;
 +import java.util.Map;
 +
 +import javax.ws.rs.GET;
 +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 org.apache.ambari.server.api.resources.ResourceInstance;
 +import org.apache.ambari.server.api.services.BaseService;
 +import org.apache.ambari.server.api.services.Request;
 +import org.apache.ambari.server.controller.ActiveWidgetLayoutResponse;
 +import org.apache.ambari.server.controller.spi.Resource;
 +import org.apache.commons.lang.StringUtils;
 +
 +import io.swagger.annotations.Api;
 +import io.swagger.annotations.ApiImplicitParam;
 +import io.swagger.annotations.ApiImplicitParams;
 +import io.swagger.annotations.ApiOperation;
 +import io.swagger.annotations.ApiParam;
 +import io.swagger.annotations.ApiResponse;
 +import io.swagger.annotations.ApiResponses;
 +
 +/**
 + * WidgetLayout Service
 + */
 +@Path("/users/{userName}/activeWidgetLayouts")
 +@Api(value = "Users", description = "Endpoint for User specific operations")
 +public class ActiveWidgetLayoutService extends BaseService {
 +
 +  /**
 +   * Handles URL: /users/{userName}/activeWidgetLayouts
 +   * Get all instances for a view.
 +   *
 +   * @param headers  http headers
 +   * @param ui       uri info
 +   * @param userName user name
 +   *
 +   * @return instance collection resource representation
 +   */
 +  @GET
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Get user widget layouts", nickname = "ActiveWidgetLayoutService#getServices", notes = "Returns all active widget layouts for user.", response = ActiveWidgetLayoutResponse.class, responseContainer = "List")
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "fields", value = "Filter user layout details", defaultValue = "WidgetLayoutInfo/*", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "sortBy", value = "Sort layouts (asc | desc)", defaultValue = "WidgetLayoutInfo/user_name.asc", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
 +    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
 +  })
 +  public Response getServices(String body, @Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "user name", required = true)
 +                              @PathParam("userName") String userName) {
 +
 +    return handleRequest(headers, body, ui, Request.Type.GET, createResource(userName));
 +  }
 +
 +  /**
 +   *
 +   * @param body      body
 +   * @param headers   http headers
 +   * @param ui        uri info
 +   * @param userName  user name
 +   * @return
 +   */
 +  @PUT
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Update user widget layouts", nickname = "ActiveWidgetLayoutService#updateServices", notes = "Updates user widget layout.")
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.ActiveWidgetLayoutRequest", paramType = "body")
 +  })
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation"),
 +    @ApiResponse(code = 500, message = "Server Error")}
 +  )
 +  public Response updateServices(String body, @Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "user name", required = true)
 +                                 @PathParam("userName") String userName) {
 +
 +    return handleRequest(headers, body, ui, Request.Type.PUT, createResource(userName));
 +  }
 +
 +  private ResourceInstance createResource(String userName) {
-     Map<Resource.Type,String> mapIds = new HashMap<Resource.Type, String>();
++    Map<Resource.Type,String> mapIds = new HashMap<>();
 +    mapIds.put(Resource.Type.User, StringUtils.lowerCase(userName));
 +    return createResource(Resource.Type.ActiveWidgetLayout, mapIds);
 +  }
 +
 +}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserAuthorizationService.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserAuthorizationService.java
index 195f2e7,0000000..505108e
mode 100644,000000..100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserAuthorizationService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserAuthorizationService.java
@@@ -1,120 -1,0 +1,120 @@@
 +/*
 + * 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.users;
 +
 +import java.util.HashMap;
 +import java.util.Map;
 +
 +import javax.ws.rs.GET;
 +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 org.apache.ambari.server.api.resources.ResourceInstance;
 +import org.apache.ambari.server.api.services.BaseService;
 +import org.apache.ambari.server.api.services.Request;
 +import org.apache.ambari.server.controller.UserAuthorizationResponse;
 +import org.apache.ambari.server.controller.spi.Resource;
 +import org.apache.commons.lang.StringUtils;
 +
 +import io.swagger.annotations.Api;
 +import io.swagger.annotations.ApiImplicitParam;
 +import io.swagger.annotations.ApiImplicitParams;
 +import io.swagger.annotations.ApiOperation;
 +import io.swagger.annotations.ApiParam;
 +import io.swagger.annotations.ApiResponse;
 +import io.swagger.annotations.ApiResponses;
 +
 +/**
 + * UserAuthorizationService is a read-only service responsible for user authorization resource requests.
 + * <p/>
 + * The result sets returned by this service represent the set of authorizations assigned to a given user.
 + * Authorizations are tied to a resource, so a user may have the multiple authorization entries for the
 + * same authorization id (for example VIEW.USE), however each will represnet a different view instance.
 + */
 +@Path("/users/{userName}/authorizations")
 +@Api(value = "Users", description = "Endpoint for user specific operations")
 +public class UserAuthorizationService extends BaseService {
 +
 +  /**
 +   * Handles: GET  /users/{user_name}/authorizations
 +   * Get all authorizations for the relative user.
 +   *
 +   * @param headers        http headers
 +   * @param ui             uri info
 +   * @param userName       user name
 +   * @return authorizations collection resource representation
 +   */
 +  @GET
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Get all authorizations", nickname = "UserAuthorizationService#getAuthorizations", notes = "Returns all authorization for user.", response = UserAuthorizationResponse.class, responseContainer = "List")
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "fields", value = "Filter user authorization details", defaultValue = "AuthorizationInfo/*", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "sortBy", value = "Sort user authorizations (asc | desc)", defaultValue = "AuthorizationInfo/user_name.asc", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
 +    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
 +  })
 +  public Response getAuthorizations(@Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "user name", required = true)
 +                                    @PathParam ("userName") String userName) {
 +    return handleRequest(headers, null, ui, Request.Type.GET, createAuthorizationResource(userName,null));
 +  }
 +
 +  /**
 +   * Handles: GET  /users/{userName}/authorizations/{authorization_id}
 +   * Get a specific authorization.
 +   *
 +   * @param headers         http headers
 +   * @param ui              uri info
 +   * @param userName        user name
 +   * @param authorizationId authorization ID
 +   * @return authorization instance representation
 +   */
 +  @GET
 +  @Path("{authorization_id}")
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Get user authorization", nickname = "UserAuthorizationService#getAuthorization", notes = "Returns user authorization details.", response = UserAuthorizationResponse.class)
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "fields", value = "Filter user authorization details", defaultValue = "AuthorizationInfo/*", dataType = "string", paramType = "query")
 +  })
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation", response = UserAuthorizationResponse.class)}
 +  )
 +  public Response getAuthorization(@Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "user name", required = true)
 +  @PathParam ("userName") String userName, @ApiParam(value = "Authorization Id", required = true) @PathParam("authorization_id") String authorizationId) {
 +    return handleRequest(headers, null, ui, Request.Type.GET, createAuthorizationResource(userName, authorizationId));
 +  }
 +
 +  /**
 +   * Create an authorization resource.
 +   * @param userName         user name
 +   * @param authorizationId authorization id
 +   * @return an authorization resource instance
 +   */
 +  protected ResourceInstance createAuthorizationResource(String userName, String authorizationId) {
-     Map<Resource.Type, String> mapIds = new HashMap<Resource.Type, String>();
++    Map<Resource.Type, String> mapIds = new HashMap<>();
 +    mapIds.put(Resource.Type.User, StringUtils.lowerCase(userName));
 +    mapIds.put(Resource.Type.UserAuthorization, authorizationId);
 +    return createResource(Resource.Type.UserAuthorization, mapIds);
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserPrivilegeService.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserPrivilegeService.java
index 293b45f,0000000..c0079d4
mode 100644,000000..100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserPrivilegeService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserPrivilegeService.java
@@@ -1,113 -1,0 +1,113 @@@
 +/**
 + * 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 privileges and
 + * limitations under the License.
 + */
 +
 +package org.apache.ambari.server.api.services.users;
 +
 +import java.util.HashMap;
 +import java.util.Map;
 +
 +import javax.ws.rs.GET;
 +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 org.apache.ambari.server.api.resources.ResourceInstance;
 +import org.apache.ambari.server.api.services.BaseService;
 +import org.apache.ambari.server.api.services.Request;
 +import org.apache.ambari.server.controller.UserPrivilegeResponse;
 +import org.apache.ambari.server.controller.spi.Resource;
 +import org.apache.commons.lang.StringUtils;
 +
 +import io.swagger.annotations.Api;
 +import io.swagger.annotations.ApiImplicitParam;
 +import io.swagger.annotations.ApiImplicitParams;
 +import io.swagger.annotations.ApiOperation;
 +import io.swagger.annotations.ApiParam;
 +import io.swagger.annotations.ApiResponse;
 +import io.swagger.annotations.ApiResponses;
 +
 +/**
 + *  Service responsible for user privilege resource requests.
 + */
 +@Path("/users/{userName}/privileges")
 +@Api(value = "Users", description = "Endpoint for user specific operations")
 +public class UserPrivilegeService extends BaseService {
 +
 +
 +  /**
 +   * Handles: GET  /users/{userName}/privileges
 +   * Get all privileges.
 +   * @param headers
 +   * @param ui
 +   * @param userName
 +   * @return
 +   */
 +  @GET
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Get all privileges", nickname = "UserPrivilegeService#getPrivileges", notes = "Returns all privileges for user.", response = UserPrivilegeResponse.class, responseContainer = "List")
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "fields", value = "Filter user privileges", defaultValue = "PrivilegeInfo/*", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "sortBy", value = "Sort user privileges (asc | desc)", defaultValue = "PrivilegeInfo/user_name.asc", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
 +    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
 +  })
 +
 +  public Response getPrivileges(@Context HttpHeaders headers, @Context UriInfo ui,
 +                                @ApiParam(value = "user name", required = true, defaultValue = "admin") @PathParam("userName") String userName) {
 +    return handleRequest(headers, null, ui, Request.Type.GET, createPrivilegeResource(userName, null));
 +  }
 +
 +  /**
 +   * Handles: GET /users/{userName}/privileges/{privilegeID}
 +   * Get a specific privilege.
 +   *
 +   * @param headers        http headers
 +   * @param ui             uri info
 +   * @param userName       user name
 +   * @param privilegeId   privilege id
 +   *
 +   * @return privilege instance representation
 +   */
 +  @GET
 +  @Path("{privilegeId}")
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Get user privilege", nickname = "UserPrivilegeService#getPrivilege", notes = "Returns user privilege details.", response = UserPrivilegeResponse.class)
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "fields", value = "Filter user privilege details", defaultValue = "PrivilegeInfo/*", dataType = "string", paramType = "query")
 +  })
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation", response = UserPrivilegeResponse.class)}
 +  )
 +  public Response getPrivilege(@Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "user name", required = true) @PathParam ("userName") String userName,
 +                               @ApiParam(value = "privilege id", required = true) @PathParam("privilegeId") String privilegeId) {
 +    return handleRequest(headers, null, ui, Request.Type.GET, createPrivilegeResource(userName, privilegeId));
 +  }
 +
 +
 +  protected ResourceInstance createPrivilegeResource(String userName, String privilegeId) {
-     final Map<Resource.Type, String> mapIds = new HashMap<Resource.Type, String>();
++    final Map<Resource.Type, String> mapIds = new HashMap<>();
 +    mapIds.put(Resource.Type.User, StringUtils.lowerCase(userName));
 +    mapIds.put(Resource.Type.UserPrivilege, privilegeId);
 +    return createResource(Resource.Type.UserPrivilege, mapIds);
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewExternalSubResourceService.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewExternalSubResourceService.java
index bca0f05,0000000..27b4463
mode 100644,000000..100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewExternalSubResourceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewExternalSubResourceService.java
@@@ -1,148 -1,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.views;
 +
 +import java.io.IOException;
 +import java.util.HashMap;
 +import java.util.Map;
 +
 +import javax.ws.rs.GET;
 +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 org.apache.ambari.server.api.resources.ResourceInstance;
 +import org.apache.ambari.server.api.services.BaseService;
 +import org.apache.ambari.server.api.services.Request;
 +import org.apache.ambari.server.controller.spi.Resource;
 +import org.apache.ambari.server.orm.entities.ViewEntity;
 +import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
 +
 +/**
 + * Service responsible for view sub-resource requests.
 + */
 +public class ViewExternalSubResourceService  extends BaseService {
 +
 +  /**
 +   * The resource type.
 +   */
 +  private final Resource.Type type;
 +
 +  /**
 +   * The view name.
 +   */
 +  private final String viewName;
 +
 +  /**
 +   * The view version.
 +   */
 +  private final String version;
 +
 +  /**
 +   * The instance name.
 +   */
 +  private final String instanceName;
 +
 +  /**
 +   * Mapping of resource names to services.
 +   */
-   private final Map<String, Object> resourceServiceMap = new HashMap<String, Object>();
++  private final Map<String, Object> resourceServiceMap = new HashMap<>();
 +
 +
 +  // ----- Constructors ------------------------------------------------------
 +
 +  public ViewExternalSubResourceService(Resource.Type type, ViewInstanceEntity viewInstanceDefinition) {
 +    ViewEntity viewEntity = viewInstanceDefinition.getViewEntity();
 +
 +    this.type         = type;
 +    this.viewName     = viewEntity.getCommonName();
 +    this.version      = viewEntity.getVersion();
 +    this.instanceName = viewInstanceDefinition.getName();
 +  }
 +
 +  /**
 +   * Handles URL: /resources
 +   * Get all external resources for a view.
 +   *
 +   * @param headers  http headers
 +   * @param ui       uri info
 +   *
 +   * @return instance collection resource representation
 +   */
 +  @GET
 +  @Produces("text/plain")
 +  public Response getResources(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
 +    return handleRequest(headers, body, ui, Request.Type.GET,
 +        createResource(viewName, instanceName));
 +  }
 +
 +  /**
 +   * Handles: GET /resources/{resourceName} Get a specific external resource.
 +   *
 +   * @param resourceName  resource name
 +   *
 +   * @return resource service instance representation
 +   *
 +   * @throws IllegalArgumentException if the given resource name is unknown
 +   */
 +  @Path("{resourceName}")
 +  public Object getResource(@PathParam("resourceName") String resourceName) throws IOException {
 +
 +    Object service = resourceServiceMap.get(resourceName);
 +    if (service == null) {
 +      throw new IllegalArgumentException("A resource type " + resourceName + " for view instance " +
 +          viewName + "/" + instanceName + " can not be found.");
 +    }
 +
 +    return service;
 +  }
 +
 +
 +  // ----- helper methods ----------------------------------------------------
 +
 +  /**
 +   * Register a sub-resource service.
 +   *
 +   * @param resourceName  the resource name
 +   * @param service       the service
 +   */
 +  public void addResourceService(String resourceName, Object service) {
 +    resourceServiceMap.put(resourceName, service);
 +  }
 +
 +  /**
 +   * Create an view instance resource.
 +   *
 +   * @param viewName      view name
 +   * @param instanceName  instance name
 +   *
 +   * @return a view instance resource
 +   */
 +  private ResourceInstance createResource(String viewName, String instanceName) {
-     Map<Resource.Type,String> mapIds = new HashMap<Resource.Type, String>();
++    Map<Resource.Type,String> mapIds = new HashMap<>();
 +    mapIds.put(Resource.Type.View, viewName);
 +    mapIds.put(Resource.Type.ViewVersion, version);
 +    mapIds.put(Resource.Type.ViewInstance, instanceName);
 +    return createResource(type, mapIds);
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
index 639933a,0000000..8e87e6f
mode 100644,000000..100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
@@@ -1,313 -1,0 +1,313 @@@
 +/*
 + * 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.views;
 +
 +import java.util.HashMap;
 +import java.util.Map;
 +
 +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.WebApplicationException;
 +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 org.apache.ambari.server.api.resources.ResourceInstance;
 +import org.apache.ambari.server.api.services.BaseService;
 +import org.apache.ambari.server.api.services.Request;
 +import org.apache.ambari.server.controller.ViewInstanceResponse;
 +import org.apache.ambari.server.controller.spi.Resource;
 +import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
 +import org.apache.ambari.server.security.authorization.AuthorizationException;
 +import org.apache.ambari.server.view.ViewRegistry;
 +
 +import io.swagger.annotations.Api;
 +import io.swagger.annotations.ApiImplicitParam;
 +import io.swagger.annotations.ApiImplicitParams;
 +import io.swagger.annotations.ApiOperation;
 +import io.swagger.annotations.ApiParam;
 +import io.swagger.annotations.ApiResponse;
 +import io.swagger.annotations.ApiResponses;
 +
 +/**
 + * Service responsible for instances resource requests.
 + */
 +@Path("/views/{viewName}/versions/{version}/instances")
 +@Api(tags = "Views", description = "Endpoint for view specific operations")
 +public class ViewInstanceService extends BaseService {
 +  /**
 +   * The view registry;
 +   */
 +  private final ViewRegistry viewRegistry = ViewRegistry.getInstance();
 +
 +  /**
 +   * Handles URL: /views/{viewName}/versions/{version}/instances
 +   * Get all instances for a view.
 +   *
 +   * @param headers    http headers
 +   * @param ui         uri info
 +   * @param viewName   view id
 +   * @param version    version id
 +   *
 +   * @return instance collection resource representation
 +   */
 +  @GET
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Get all view instances", nickname = "ViewInstanceService#getServices", notes = "Returns all instances for a view version.", response = ViewInstanceResponse.class, responseContainer = "List")
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "fields", value = "Filter view instance details", defaultValue = "ViewInstanceInfo/*", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "sortBy", value = "Sort users (asc | desc)", defaultValue = "ViewInstanceInfo/instance_name.desc", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
 +    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
 +  })
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation", response = ViewInstanceResponse.class, responseContainer = "List")}
 +  )
 +  public Response getServices(String body, @Context HttpHeaders headers, @Context UriInfo ui,
 +                              @PathParam("viewName") String viewName, @PathParam("version") String version) throws AuthorizationException {
 +    return handleRequest(headers, body, ui, Request.Type.GET, createResource(viewName, version, null));
 +  }
 +
 +
 +  /**
 +   * Handles URL: /views/{viewName}/versions/{version}/instances/{instanceID}
 +   * Get a specific instance.
 +   *
 +   * @param headers       http headers
 +   * @param ui            uri info
 +   * @param viewName      view id
 +   * @param version       version id
 +   * @param instanceName  instance id
 +   *
 +   * @return instance resource representation
 +   */
 +  @GET
 +  @Path("{instanceName}")
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Get single view instance", nickname = "ViewInstanceService#getService", notes = "Returns view instance details.", response = ViewInstanceResponse.class)
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "fields", value = "Filter view instance details", defaultValue = "ViewInstanceInfo", dataType = "string", paramType = "query")
 +  })
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation", response = ViewInstanceResponse.class)}
 +  )
 +  public Response getService(String body, @Context HttpHeaders headers, @Context UriInfo ui,
 +                             @ApiParam(value = "view name") @PathParam("viewName") String viewName, @PathParam("version") String version,
 +                             @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName) throws AuthorizationException {
 +    return handleRequest(headers, body, ui, Request.Type.GET, createResource(viewName, version, instanceName));
 +  }
 +
 +
 +  /**
 +   * Handles: POST /views/{viewName}/versions/{version}/instances/{instanceId}
 +   * Create a specific instance.
 +   *
 +   * @param body          http body
 +   * @param headers       http headers
 +   * @param ui            uri info
 +   * @param viewName      view id
 +   * @param version       version id
 +   * @param instanceName  instance id
 +   *
 +   * @return information regarding the created instance
 +   */
 +  @POST
 +  @Path("{instanceName}")
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Create view instance", nickname = "ViewInstanceService#createService", notes = "Creates view instance resource.")
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.ViewInstanceRequest", paramType = "body")
 +  })
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation"),
 +    @ApiResponse(code = 500, message = "Server Error")}
 +  )
 +  public Response createService(String body, @Context HttpHeaders headers, @Context UriInfo ui,
 +                                @ApiParam(value = "view name") @PathParam("viewName") String viewName, @PathParam("version") String version,
 +                                @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName) throws AuthorizationException {
 +    return handleRequest(headers, body, ui, Request.Type.POST, createResource(viewName, version, instanceName));
 +  }
 +
 +  /**
 +   * Handles: POST /views/{viewName}/versions/{version}/instances
 +   * Create multiple instances.
 +   *
 +   * @param body       http body
 +   * @param headers    http headers
 +   * @param ui         uri info
 +   * @param viewName   view id
 +   * @param version    version id
 +   *
 +   * @return information regarding the created instances
 +   */
 +  @POST
 +  @Produces("text/plain")
 +  public Response createServices(String body, @Context HttpHeaders headers, @Context UriInfo ui,
 +                                 @PathParam("viewName") String viewName, @PathParam("version") String version) throws AuthorizationException {
 +    return handleRequest(headers, body, ui, Request.Type.POST, createResource(viewName, version, null));
 +  }
 +
 +  /**
 +   * Handles: PUT /views/{viewName}/versions/{version}/instances/{instanceId}
 +   * Update a specific instance.
 +   *
 +   * @param body          http body
 +   * @param headers       http headers
 +   * @param ui            uri info
 +   * @param viewName   view id
 +   * @param version    version id
 +   * @param instanceName  instance id
 +   *
 +   * @return information regarding the updated instance
 +   */
 +  @PUT
 +  @Path("{instanceName}")
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Update view instance detail", nickname = "ViewInstanceService#updateService", notes = "Updates view instance resource.")
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.ViewInstanceRequest", paramType = "body")
 +  })
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation"),
 +    @ApiResponse(code = 500, message = "Server Error")}
 +  )
 +  public Response updateService(String body, @Context HttpHeaders headers, @Context UriInfo ui,
 +                                @ApiParam(value = "view name") @PathParam("viewName") String viewName, @PathParam("version") String version,
 +                                @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName) throws AuthorizationException {
 +    return handleRequest(headers, body, ui, Request.Type.PUT, createResource(viewName, version, instanceName));
 +  }
 +
 +  /**
 +   * Handles: PUT /views/{viewName}/versions/{version}/instances
 +   * Update multiple instances.
 +   *
 +   * @param body     http body
 +   * @param headers  http headers
 +   * @param ui       uri info
 +   * @param viewName   view id
 +   * @param version    version id
 +   *
 +   * @return information regarding the updated instance
 +   */
 +  @PUT
 +  @Produces("text/plain")
 +  public Response updateServices(String body, @Context HttpHeaders headers, @Context UriInfo ui,
 +                                 @PathParam("viewName") String viewName, @PathParam("version") String version) throws AuthorizationException {
 +    return handleRequest(headers, body, ui, Request.Type.PUT, createResource(viewName, version, null));
 +  }
 +
 +  /**
 +   * Handles: DELETE /views/{viewName}/versions/{version}/instances/{instanceId}
 +   * Delete a specific instance.
 +   *
 +   * @param headers       http headers
 +   * @param ui            uri info
 +   * @param viewName   view id
 +   * @param version    version id
 +   * @param instanceName  instance id
 +   *
 +   * @return information regarding the deleted instance
 +   */
 +  @DELETE
 +  @Path("{instanceName}")
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Delete view instance", nickname = "ViewInstanceService#deleteService", notes = "Delete view resource.")
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation"),
 +    @ApiResponse(code = 500, message = "Server Error")}
 +  )
 +  public Response deleteService(@Context HttpHeaders headers, @Context UriInfo ui,
 +                                @ApiParam(value = "view name") @PathParam("viewName") String viewName, @PathParam("version") String version,
 +                                @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName) throws AuthorizationException {
 +    return handleRequest(headers, null, ui, Request.Type.DELETE, createResource(viewName, version, instanceName));
 +  }
 +
 +  /**
 +   * Get the sub-resource
 +   *
 +   * @param instanceName  the instance id
 +   *
 +   * @return the service
 +   */
 +  @Path("{instanceName}/{resources}")
 +  public Object getResourceHandler(@Context javax.ws.rs.core.Request request,
 +                                   @PathParam("viewName") String viewName, @PathParam("version") String version,
 +                                   @PathParam("instanceName") String instanceName,
 +                                   @PathParam("resources") String resources) {
 +
 +    hasPermission(viewName, version, Request.Type.valueOf(request.getMethod()), instanceName);
 +
 +    ViewInstanceEntity instanceDefinition =
 +        ViewRegistry.getInstance().getInstanceDefinition(viewName, version, instanceName);
 +
 +    if (instanceDefinition == null) {
 +      throw new IllegalArgumentException("A view instance " +
 +          viewName + "/" + instanceName + " can not be found.");
 +    }
 +
 +    Object service = instanceDefinition.getService(resources);
 +
 +    if (service == null) {
 +      throw new IllegalArgumentException("A resource type " + resources + " for view instance " +
 +          viewName + "/" + instanceName + " can not be found.");
 +    }
 +    return service;
 +  }
 +
 +  // ----- helper methods ----------------------------------------------------
 +
 +  /**
 +   * Create an view instance resource.
 +   *
 +   * @param viewName      view name
 +   * @param instanceName  instance name
 +   *
 +   * @return a view instance resource
 +   */
 +  private ResourceInstance createResource(String viewName, String viewVersion, String instanceName) {
-     Map<Resource.Type, String> mapIds = new HashMap<Resource.Type, String>();
++    Map<Resource.Type, String> mapIds = new HashMap<>();
 +    mapIds.put(Resource.Type.View, viewName);
 +    mapIds.put(Resource.Type.ViewVersion, viewVersion);
 +    mapIds.put(Resource.Type.ViewInstance, instanceName);
 +    return createResource(Resource.Type.ViewInstance, mapIds);
 +  }
 +
 +  /**
 +   * Determine whether or not the access specified by the given request type
 +   * is permitted for the current user on the view instance resource identified
 +   * by the given instance name.
 +   *
 +   * @param requestType   the request method type
 +   * @param instanceName  the name of the view instance resource
 +   *
 +   * @throws WebApplicationException if access is forbidden
 +   */
 +  private void hasPermission(String viewName, String version, Request.Type requestType, String instanceName) {
 +    if (!viewRegistry.checkPermission(viewName, version, instanceName, requestType == Request.Type.GET)) {
 +      throw new WebApplicationException(Response.Status.FORBIDDEN);
 +    }
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java
index f8e2a56,0000000..c8499e3
mode 100644,000000..100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java
@@@ -1,208 -1,0 +1,208 @@@
 +/**
 + * 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.views;
 +
 +import java.util.HashMap;
 +import java.util.Map;
 +
 +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 org.apache.ambari.server.api.resources.ResourceInstance;
 +import org.apache.ambari.server.api.services.BaseService;
 +import org.apache.ambari.server.api.services.Request;
 +import org.apache.ambari.server.controller.ViewPermissionResponse;
 +import org.apache.ambari.server.controller.spi.Resource;
 +
 +import io.swagger.annotations.Api;
 +import io.swagger.annotations.ApiImplicitParam;
 +import io.swagger.annotations.ApiImplicitParams;
 +import io.swagger.annotations.ApiOperation;
 +import io.swagger.annotations.ApiParam;
 +import io.swagger.annotations.ApiResponse;
 +import io.swagger.annotations.ApiResponses;
 +
 +
 +/**
 + * Service responsible for custom view permission resource requests.
 + */
 +@Path("/views/{viewName}/versions/{version}/permissions")
 +@Api(value = "Views", description = "Endpoint for view specific operations")
 +public class ViewPermissionService extends BaseService {
 +
 +  /**
 +   * Handles: GET  /permissions
 +   * Get all permissions.
 +   *
 +   * @param headers    http headers
 +   * @param ui         uri info
 +   * @param viewName   view id
 +   * @param version    version id
 +   *
 +   * @return permission collection resource representation
 +   */
 +  @GET
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Get all permissions for a view", nickname = "ViewPermissionService#getPermissions", notes = "Returns all permission details for the version of a view.", response = ViewPermissionResponse.class, responseContainer = "List")
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "fields", value = "Filter privileges", defaultValue = "PermissionInfo/*", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
 +    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
 +  })
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation", response = ViewPermissionResponse.class, responseContainer = "List")}
 +  )
 +  public Response getPermissions(@Context HttpHeaders headers, @Context UriInfo ui,
 +                                 @ApiParam(value = "view name") @PathParam("viewName") String viewName,
 +                                 @ApiParam(value = "view version") @PathParam("version") String version) {
 +    return handleRequest(headers, null, ui, Request.Type.GET, createPermissionResource(
 +      viewName, version, null));
 +  }
 +
 +  /**
 +   * Handles: GET /views/{viewName}/versions/{version}/permissions/{permissionID}
 +   * Get a specific permission.
 +   *
 +   * @param headers        http headers
 +   * @param ui             uri info
 +   * @param viewName       view id
 +   * @param version        version id
 +   * @param permissionId   permission id
 +   *
 +   * @return permission instance representation
 +   */
 +  @GET
 +  @Path("{permissionId}")
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Get single view permission", nickname = "ViewPermissionService#getPermission", notes = "Returns permission details for a single version of a view.", response = ViewPermissionResponse.class)
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "fields", value = "Filter view permission details", defaultValue = "PermissionInfo", dataType = "string", paramType = "query")
 +  })
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation", response = ViewPermissionResponse.class)}
 +  )
 +  public Response getPermission(@Context HttpHeaders headers, @Context UriInfo ui,
 +                                @ApiParam(value = "view name") @PathParam("viewName") String viewName,
 +                                @ApiParam(value = "view version") @PathParam("version") String version,
 +                                @ApiParam(value = "permission id") @PathParam("permissionId") String permissionId) {
 +
 +    return handleRequest(headers, null, ui, Request.Type.GET, createPermissionResource(
 +        viewName, version, permissionId));
 +  }
 +
 +  /**
 +   * Handles: POST /views/{viewName}/versions/{version}/permissions/{permissionID}
 +   * Create a specific permission.
 +   *
 +   * @param headers        http headers
 +   * @param ui             uri info
 +   * @param viewName       view id
 +   * @param version        version id
 +   * @param permissionId   permission id
 +   *
 +   * @return information regarding the created permission
 +   */
 +  @POST
 +  @Path("{permissionId}")
 +  @Produces("text/plain")
 +  public Response createPermission(String body, @Context HttpHeaders headers, @Context UriInfo ui,
 +                                   @ApiParam(value = "view name") @PathParam("viewName") String viewName,
 +                                   @ApiParam(value = "view version") @PathParam("version") String version,
 +                                   @ApiParam(value = "permission id") @PathParam("permissionId") String permissionId) {
 +
 +    return handleRequest(headers, body, ui, Request.Type.POST, createPermissionResource(
 +        viewName, version, permissionId));
 +  }
 +
 +  /**
 +   * Handles: PUT /views/{viewName}/versions/{version}/permissions/{permissionID}
 +   * Update a specific permission.
 +   *
 +   * @param headers       http headers
 +   * @param ui            uri info
 +   * @param viewName      view id
 +   * @param version       version id
 +   * @param permissionId  permission id
 +   * @return information regarding the updated permission
 +   */
 +  @PUT
 +  @Path("{permissionId}")
 +  @Produces("text/plain")
 +  public Response updatePermission(String body, @Context HttpHeaders headers, @Context UriInfo ui,
 +                                   @ApiParam(value = "view name") @PathParam("viewName") String viewName,
 +                                   @ApiParam(value = "view version") @PathParam("version") String version,
 +                                   @ApiParam(value = "permission id") @PathParam("permissionId") String permissionId) {
 +
 +    return handleRequest(headers, body, ui, Request.Type.PUT, createPermissionResource(
 +        viewName, version, permissionId));
 +  }
 +
 +  /**
 +   * Handles: DELETE /views/{viewName}/versions/{version}/permissions/{permissionID}
 +   * Delete a specific permission.
 +   *
 +   * @param headers       http headers
 +   * @param ui            uri info
 +   * @param viewName      view id
 +   * @param version       version id
 +   * @param permissionId  permission id
 +   *
 +   * @return information regarding the deleted permission
 +   */
 +  @DELETE
 +  @Path("{permissionId}")
 +  @Produces("text/plain")
 +  public Response deletePermission(@Context HttpHeaders headers, @Context UriInfo ui,
 +                                   @ApiParam(value = "view name") @PathParam("viewName") String viewName,
 +                                   @ApiParam(value = "view version") @PathParam("version") String version,
 +                                   @ApiParam(value = "permission id") @PathParam("permissionId") String permissionId) {
 +
 +    return handleRequest(headers, null, ui, Request.Type.DELETE, createPermissionResource(
 +        viewName, version, permissionId));
 +  }
 +
 +
 +  // ----- helper methods ----------------------------------------------------
 +
 +  /**
 +   * Create a permission resource.
 +   *
 +   * @param permissionId permission name
 +   *
 +   * @return a permission resource instance
 +   */
 +  protected ResourceInstance createPermissionResource(String viewName, String viewVersion, String permissionId) {
-     Map<Resource.Type,String> mapIds = new HashMap<Resource.Type, String>();
++    Map<Resource.Type,String> mapIds = new HashMap<>();
 +    mapIds.put(Resource.Type.View, viewName);
 +    mapIds.put(Resource.Type.ViewVersion, viewVersion);
 +    mapIds.put(Resource.Type.ViewPermission, permissionId);
 +
 +    return createResource(Resource.Type.ViewPermission, mapIds);
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPrivilegeService.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPrivilegeService.java
index 047d463,0000000..08e250b
mode 100644,000000..100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPrivilegeService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPrivilegeService.java
@@@ -1,268 -1,0 +1,268 @@@
 +/**
 + * 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 privileges and
 + * limitations under the License.
 + */
 +
 +package org.apache.ambari.server.api.services.views;
 +
 +import java.util.HashMap;
 +import java.util.Map;
 +
 +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 org.apache.ambari.server.api.resources.ResourceInstance;
 +import org.apache.ambari.server.api.services.BaseService;
 +import org.apache.ambari.server.api.services.Request;
 +import org.apache.ambari.server.controller.ViewPrivilegeResponse;
 +import org.apache.ambari.server.controller.spi.Resource;
 +
 +import io.swagger.annotations.Api;
 +import io.swagger.annotations.ApiImplicitParam;
 +import io.swagger.annotations.ApiImplicitParams;
 +import io.swagger.annotations.ApiOperation;
 +import io.swagger.annotations.ApiParam;
 +import io.swagger.annotations.ApiResponse;
 +import io.swagger.annotations.ApiResponses;
 +
 +/**
 + *  Service responsible for view privilege resource requests.
 + */
 +@Api(tags = "Views", description = "Endpoint for view specific operations")
 +@Path("/views/{viewName}/versions/{version}/instances/{instanceName}/privileges")
 +public class ViewPrivilegeService extends BaseService {
 +  /**
 +   * Handles: GET  /views/{viewName}/versions/{version}/instances/{instanceName}/privileges
 +   * Get all privileges.
 +   *
 +   * @param headers       http headers
 +   * @param ui            uri info
 +   * @param viewName      view id
 +   * @param version       version id
 +   * @param instanceName  instance id
 +   *
 +   * @return privilege collection representation
 +   */
 +  @GET
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Get all view instance privileges", nickname = "ViewPrivilegeService#getPrivileges", notes = "Returns all privileges for the resource.", response = ViewPrivilegeResponse.class, responseContainer = "List")
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "fields", value = "Filter privileges", defaultValue = "PrivilegeInfo/*", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "sortBy", value = "Sort privileges (asc | desc)", defaultValue = "PrivilegeInfo/user_name.asc", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
 +    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
 +  })
 +  public Response getPrivileges(@Context HttpHeaders headers, @Context UriInfo ui,
 +                                @ApiParam(value = "view name") @PathParam("viewName") String viewName,
 +                                @ApiParam(value = "view version") @PathParam("version") String version,
 +                                @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName) {
 +    return handleRequest(headers, null, ui, Request.Type.GET, createPrivilegeResource(viewName, version, instanceName,null));
 +  }
 +
 +  /**
 +   * Handles: GET /views/{viewName}/versions/{version}/instances/{instanceName}/privileges/{privilegeID}
 +   * Get a specific privilege.
 +   *
 +   * @param headers        http headers
 +   * @param ui             uri info
 +   * @param viewName       view id
 +   * @param version        version id
 +   * @param instanceName   instance id
 +   * @param privilegeId    privilege id
 +   *
 +   * @return privilege instance representation
 +   */
 +  @GET
 +  @Path("/{privilegeId}")
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Get single view instance privilege", nickname = "ViewPrivilegeService#getPrivilege", notes = "Returns privilege details.", response = ViewPrivilegeResponse.class)
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "fields", value = "Filter privilege details", defaultValue = "PrivilegeInfo", dataType = "string", paramType = "query")
 +  })
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation", response = ViewPrivilegeResponse.class)}
 +  )
 +  public Response getPrivilege(@Context HttpHeaders headers, @Context UriInfo ui,
 +                               @ApiParam(value = "view name") @PathParam("viewName") String viewName,
 +                               @ApiParam(value = "view version") @PathParam("version") String version,
 +                               @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName,
 +                               @ApiParam(value = "privilege id", required = true) @PathParam("privilegeId") String privilegeId) {
 +
 +    return handleRequest(headers, null, ui, Request.Type.GET, createPrivilegeResource(viewName, version, instanceName,privilegeId));
 +  }
 +
 +  /**
 +   * Handles: POST /views/{viewName}/versions/{version}/instances/{instanceName}/privileges
 +   * Create a privilege.
 +   *
 +   * @param body          request body
 +   * @param headers       http headers
 +   * @param ui            uri info
 +   * @param viewName      view id
 +   * @param version       version id
 +   * @param instanceName  instance id
 +   *
 +   * @return information regarding the created privilege
 +   */
 +  @POST
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Create view instance privilege", nickname = "ViewPrivilegeService#createPrivilege", notes = "Create privilege resource for view instance.")
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.ViewPrivilegeRequest", paramType = "body")
 +  })
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation"),
 +    @ApiResponse(code = 500, message = "Server Error")}
 +  )
 +  public Response createPrivilege(String body, @Context HttpHeaders headers, @Context UriInfo ui,
 +                                  @ApiParam(value = "view name") @PathParam("viewName") String viewName,
 +                                  @ApiParam(value = "view version") @PathParam("version") String version,
 +                                  @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName) {
 +
 +    return handleRequest(headers, body, ui, Request.Type.POST, createPrivilegeResource(viewName, version, instanceName,null));
 +  }
 +
 +  /**
 +   * Handles: PUT /views/{viewName}/versions/{version}/instances/{instanceName}/privileges/{privilegeID}
 +   * Update a specific privilege.
 +   *
 +   * @param headers       http headers
 +   * @param ui            uri info
 +   * @param viewName      view id
 +   * @param version       version id
 +   * @param instanceName  instance id
 +   * @param privilegeId   privilege id
 +   *
 +   * @return information regarding the updated privilege
 +   */
 +  @PUT
 +  // Remove comments when the below API call is fixed
 +  /*@Path("{privilegeId}")
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Update view instance privilege", notes = "Update privilege resource for view instance.")
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.ViewPrivilegeRequest", paramType = "body")
 +  })
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation"),
 +    @ApiResponse(code = 500, message = "Server Error")}
 +  ) */
 +  public Response updatePrivilege(String body, @Context HttpHeaders headers, @Context UriInfo ui,
 +                                  @ApiParam(value = "view name") @PathParam("viewName") String viewName,
 +                                  @ApiParam(value = "view version") @PathParam("version") String version,
 +                                  @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName,
 +                                  @ApiParam(value = "privilege id") @PathParam("privilegeId") String privilegeId) {
 +
 +    return handleRequest(headers, body, ui, Request.Type.PUT, createPrivilegeResource(viewName, version, instanceName, privilegeId));
 +  }
 +
 +  /**
 +   * Handles: PUT /views/{viewName}/versions/{version}/instances/{instanceName}/privileges
 +   * Update a set of privileges for the resource.
 +   *
 +   * @param body          request body
 +   * @param headers       http headers
 +   * @param ui            uri info
 +   * @param viewName      view id
 +   * @param version       version id
 +   * @param instanceName  instance id
 +   *
 +   * @return information regarding the updated privileges
 +   */
 +  @PUT
 +  @Produces("text/plain")
 +  public Response updatePrivileges(String body, @Context HttpHeaders headers, @Context UriInfo ui,
 +                                   @ApiParam(value = "view name") @PathParam("viewName") String viewName,
 +                                   @ApiParam(value = "view version") @PathParam("version") String version,
 +                                   @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName) {
 +    return handleRequest(headers, body, ui, Request.Type.PUT, createPrivilegeResource(viewName, version, instanceName,null));
 +  }
 +
 +  /**
 +   * Handles: DELETE /views/{viewName}/versions/{version}/instances/{instanceName}/privileges
 +   * Delete privileges.
 +   *
 +   * @param body          request body
 +   * @param headers       http headers
 +   * @param ui            uri info
 +   * @param viewName      view id
 +   * @param version       version id
 +   * @param instanceName  instance id
 +   *
 +   * @return information regarding the deleted privileges
 +   */
 +  @DELETE
 +  @Produces("text/plain")
 +  public Response deletePrivileges(String body, @Context HttpHeaders headers, @Context UriInfo ui,
 +                                   @ApiParam(value = "view name") @PathParam("viewName") String viewName,
 +                                   @ApiParam(value = "view version") @PathParam("viewVersion") String version,
 +                                   @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName) {
 +
 +    return handleRequest(headers, body, ui, Request.Type.DELETE, createPrivilegeResource(viewName, version, instanceName,null));
 +  }
 +
 +  /**
 +   * Handles: DELETE /views/{viewName}/versions/{version}/instances/{instanceName}/privileges/{privilegeID}
 +   * Delete a specific privilege.
 +   *
 +   * @param headers       http headers
 +   * @param ui            uri info
 +   * @param viewName      view id
 +   * @param version       version id
 +   * @param instanceName  instance id
 +   * @param privilegeId   privilege id
 +   *
 +   * @return information regarding the deleted privilege
 +   */
 +  @DELETE
 +  @Path("{privilegeId}")
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Delete view instance privilege", nickname = "ViewPrivilegeService#deletePrivilege", notes = "Delete view instance privilege resource.")
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation"),
 +    @ApiResponse(code = 500, message = "Server Error")}
 +  )
 +  public Response deletePrivilege(@Context HttpHeaders headers, @Context UriInfo ui,
 +                                  @ApiParam(value = "view name") @PathParam("viewName") String viewName,
 +                                  @ApiParam(value = "view version") @PathParam("version") String version,
 +                                  @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName,
 +                                  @ApiParam(value = "privilege id") @PathParam("privilegeId") String privilegeId) {
 +
 +    return handleRequest(headers, null, ui, Request.Type.DELETE, createPrivilegeResource(viewName, version, instanceName, privilegeId));
 +  }
 +
 +
 +  protected ResourceInstance createPrivilegeResource(String viewName, String viewVersion, String instanceName, String privilegeId) {
-     Map<Resource.Type,String> mapIds = new HashMap<Resource.Type, String>();
++    Map<Resource.Type,String> mapIds = new HashMap<>();
 +    mapIds.put(Resource.Type.View, viewName);
 +    mapIds.put(Resource.Type.ViewVersion, viewVersion);
 +    mapIds.put(Resource.Type.ViewInstance, instanceName);
 +    mapIds.put(Resource.Type.ViewPrivilege, privilegeId);
 +
 +    return createResource(Resource.Type.ViewPrivilege, mapIds);
 +  }
 +}
 +

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewSubResourceService.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewSubResourceService.java
index 081d699,0000000..d680f04
mode 100644,000000..100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewSubResourceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewSubResourceService.java
@@@ -1,136 -1,0 +1,136 @@@
 +/**
 + * 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.views;
 +
 +import java.util.HashMap;
 +import java.util.Map;
 +
 +import javax.ws.rs.core.HttpHeaders;
 +import javax.ws.rs.core.Response;
 +import javax.ws.rs.core.UriInfo;
 +
 +import org.apache.ambari.server.api.resources.ResourceInstance;
 +import org.apache.ambari.server.api.services.BaseService;
 +import org.apache.ambari.server.api.services.Request;
 +import org.apache.ambari.server.controller.spi.Resource;
 +import org.apache.ambari.server.orm.entities.ViewEntity;
 +import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
 +import org.apache.ambari.view.ViewResourceHandler;
 +
 +/**
 + * View sub-resource service.
 + */
 +public class ViewSubResourceService extends BaseService implements ViewResourceHandler {
 +  /**
 +   * The type of the sub-resource.
 +   */
 +  private final Resource.Type type;
 +
 +  /**
 +   * The associated view name.
 +   */
 +  private final String viewName;
 +
 +  /**
 +   * The view version.
 +   */
 +  private final String version;
 +
 +  /**
 +   * The associated view instance name.
 +   */
 +  private final String instanceName;
 +
 +
 +  // ----- Constructors ------------------------------------------------------
 +
 +  /**
 +   * Construct a view sub-resource service.
 +   */
 +  public ViewSubResourceService(Resource.Type type, ViewInstanceEntity viewInstanceDefinition) {
 +    ViewEntity viewEntity = viewInstanceDefinition.getViewEntity();
 +
 +    this.type         = type;
 +    this.viewName     = viewEntity.getCommonName();
 +    this.version      = viewEntity.getVersion();
 +    this.instanceName = viewInstanceDefinition.getName();
 +  }
 +
 +
 +  // ----- ViewResourceHandler -----------------------------------------------
 +
 +  @Override
 +  public Response handleRequest(HttpHeaders headers, UriInfo ui,
 +                                RequestType requestType, MediaType mediaType,
 +                                String resourceId) {
 +    return handleRequest(headers, null, ui, getRequestType(requestType),
 +        getMediaType(mediaType), createResource(resourceId));
 +  }
 +
 +  @Override
 +  public Response handleRequest(HttpHeaders headers, UriInfo ui, String resourceId) {
 +    return handleRequest(headers, null, ui, Request.Type.GET,
 +        createResource(resourceId));
 +  }
 +
 +
 +  // ----- helper methods ----------------------------------------------------
 +
 +  // create a resource with the given id
 +  protected ResourceInstance createResource(String resourceId) {
-     Map<Resource.Type,String> mapIds = new HashMap<Resource.Type,String>();
++    Map<Resource.Type,String> mapIds = new HashMap<>();
 +
 +    mapIds.put(Resource.Type.View, viewName);
 +    mapIds.put(Resource.Type.ViewVersion, version);
 +    mapIds.put(Resource.Type.ViewInstance, instanceName);
 +
 +    if (resourceId != null) {
 +      mapIds.put(type, resourceId);
 +    }
 +    return super.createResource(type, mapIds);
 +  }
 +
 +  // get the internal request type from the view API request type
 +  private Request.Type getRequestType(RequestType type) {
 +    switch (type) {
 +      case GET:
 +        return Request.Type.GET;
 +      case POST:
 +        return Request.Type.POST;
 +      case PUT:
 +        return Request.Type.PUT;
 +      case DELETE:
 +        return Request.Type.DELETE;
 +      case QUERY_POST:
 +        return Request.Type.QUERY_POST;
 +    }
 +    throw new IllegalArgumentException("Unknown resource type " + type);
 +  }
 +
 +  // get the JAX-RS media type from the view media type
 +  private javax.ws.rs.core.MediaType getMediaType(MediaType type) {
 +    switch (type) {
 +      case TEXT_PLAIN:
 +        return javax.ws.rs.core.MediaType.TEXT_PLAIN_TYPE;
 +      case APPLICATION_JSON:
 +        return javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE;
 +    }
 +    throw new IllegalArgumentException("Unknown media type " + type);
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewVersionService.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewVersionService.java
index 95ebb39,0000000..ab329f8
mode 100644,000000..100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewVersionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewVersionService.java
@@@ -1,208 -1,0 +1,208 @@@
 +/**
 + * 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.views;
 +
 +import java.util.HashMap;
 +import java.util.Map;
 +
 +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 org.apache.ambari.server.api.resources.ResourceInstance;
 +import org.apache.ambari.server.api.services.BaseService;
 +import org.apache.ambari.server.api.services.Request;
 +import org.apache.ambari.server.controller.ViewVersionResponse;
 +import org.apache.ambari.server.controller.spi.Resource;
 +
 +import io.swagger.annotations.Api;
 +import io.swagger.annotations.ApiImplicitParam;
 +import io.swagger.annotations.ApiImplicitParams;
 +import io.swagger.annotations.ApiOperation;
 +import io.swagger.annotations.ApiParam;
 +import io.swagger.annotations.ApiResponse;
 +import io.swagger.annotations.ApiResponses;
 +
 +
 +/**
 + * Service responsible for view version resource requests.
 + */
 +@Path("/views/{viewName}/versions")
 +@Api(value = "Views", description = "Endpoint for view specific operations")
 +public class ViewVersionService extends BaseService {
 +
 +  /**
 +   * Handles: GET  /views/{viewName}/versions
 +   * Get all views versions.
 +   *
 +   * @param headers  http headers
 +   * @param ui       uri info
 +   * @param viewName   view id
 +   *
 +   * @return view collection resource representation
 +   */
 +  @GET
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Get all versions for a view", nickname = "ViewVersionService#getVersions", notes = "Returns details of all versions for a view.", response = ViewVersionResponse.class, responseContainer = "List")
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "fields", value = "Filter view version details", defaultValue = "ViewVersionInfo/*", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "sortBy", value = "Sort users (asc | desc)", defaultValue = "ViewVersionInfo/version.desc", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
 +    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
 +  })
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation", response = ViewVersionResponse.class, responseContainer = "List")}
 +  )
 +  public Response getVersions(String body, @Context HttpHeaders headers, @Context UriInfo ui,
 +                              @ApiParam(value = "view name") @PathParam("viewName") String viewName) {
 +
 +    return handleRequest(headers, body, ui, Request.Type.GET, createResource(viewName, null));
 +  }
 +
 +
 +  /**
 +   * Handles: GET /views/{viewName}/versions/{version}
 +   * Get a specific view version.
 +   *
 +   * @param headers  http headers
 +   * @param ui       uri info
 +   * @param viewName   view id
 +   * @param version  version id
 +   *
 +   * @return view instance representation
 +   */
 +  @GET
 +  @Path("{version}")
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Get single view version", nickname = "ViewVersionService#getVersion", notes = "Returns view details.", response = ViewVersionResponse.class)
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "fields", value = "Filter view details", defaultValue = "ViewVersionInfo", dataType = "string", paramType = "query")
 +  })
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation", response = ViewVersionResponse.class)}
 +  )
 +  public Response getVersion(String body, @Context HttpHeaders headers, @Context UriInfo ui,
 +                              @ApiParam(value = "view name") @PathParam("viewName") String viewName,
 +                              @PathParam("version") String version) {
 +
 +    return handleRequest(headers, body, ui, Request.Type.GET, createResource(viewName, version));
 +  }
 +
 +  /**
 +   * Handles: POST /views/{viewName}/versions/{version}
 +   * Create a specific view version.
 +   *
 +   * @param headers    http headers
 +   * @param ui         uri info
 +   * @param viewName   view id
 +   * @param version    the version
 +   *
 +   * @return information regarding the created view
 +   */
 +  @POST
 +  @Path("{version}")
 +  @Produces("text/plain")
 +  public Response createVersions(String body, @Context HttpHeaders headers, @Context UriInfo ui,
 +                                 @ApiParam(value = "view name") @PathParam("viewName") String viewName,
 +                                 @PathParam("version") String version) {
 +
 +    return handleRequest(headers, body, ui, Request.Type.POST, createResource(viewName, version));
 +  }
 +
 +  /**
 +   * Handles: PUT /views/{viewName}/versions/{version}
 +   * Update a specific view version.
 +   *
 +   * @param headers   http headers
 +   * @param ui        uri info
 +   * @param viewName  view id
 +   * @param version   the version
 +   *
 +   * @return information regarding the updated view
 +   */
 +  @PUT
 +  @Path("{version}")
 +  @Produces("text/plain")
 +  public Response updateVersions(String body, @Context HttpHeaders headers, @Context UriInfo ui,
 +                                 @ApiParam(value = "view name") @PathParam("viewName") String viewName,
 +                                 @PathParam("version") String version) {
 +
 +    return handleRequest(headers, body, ui, Request.Type.PUT, createResource(viewName, version));
 +  }
 +
 +  /**
 +   * Handles: DELETE /views/{viewName}/versions/{version}
 +   * Delete a specific view version.
 +   *
 +   * @param headers   http headers
 +   * @param ui        uri info
 +   * @param viewName   view id
 +   * @param version   version id
 +   *
 +   * @return information regarding the deleted view version
 +   */
 +  @DELETE
 +  @Path("{version}")
 +  @Produces("text/plain")
 +  public Response deleteVersions(@Context HttpHeaders headers, @Context UriInfo ui,
 +                                 @PathParam("viewName") String viewName, @PathParam("version") String version) {
 +
 +    return handleRequest(headers, null, ui, Request.Type.DELETE, createResource(viewName, version));
 +  }
 +
 +
 +  /**
 +   * Get the permissions sub-resource
 +   *
 +   * @param version  the version
 +   *
 +   * @return the permission service
 +
 +  @Path("{version}/permissions")
 +  public ViewPermissionService getPermissionHandler(@PathParam("version") String version) {
 +
 +    return new ViewPermissionService(viewName, version);
 +  }
 +
 +
 +  // ----- helper methods ----------------------------------------------------
 +
 +  /**
 +   * Create a view resource.
 +   *
 +   * @param viewName view name
 +   *
 +   * @return a view resource instance
 +   */
 +  private ResourceInstance createResource(String viewName, String version) {
-     Map<Resource.Type,String> mapIds = new HashMap<Resource.Type, String>();
++    Map<Resource.Type,String> mapIds = new HashMap<>();
 +    mapIds.put(Resource.Type.View, viewName);
 +    mapIds.put(Resource.Type.ViewVersion, version);
 +    return createResource(Resource.Type.ViewVersion, mapIds);
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/controller/UserRequest.java
----------------------------------------------------------------------


[05/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/lib/jsoneditor.js
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/lib/jsoneditor.js b/ambari-web/api-docs/lib/jsoneditor.js
new file mode 100644
index 0000000..ba48b06
--- /dev/null
+++ b/ambari-web/api-docs/lib/jsoneditor.js
@@ -0,0 +1,7287 @@
+/*! JSON Editor v0.7.22 - JSON Schema -> HTML Editor
+ * By Jeremy Dorn - https://github.com/jdorn/json-editor/
+ * Released under the MIT license
+ *
+ * Date: 2015-08-12
+ */
+
+/**
+ * See README.md for requirements and usage info
+ */
+
+(function() {
+
+/*jshint loopfunc: true */
+/* Simple JavaScript Inheritance
+ * By John Resig http://ejohn.org/
+ * MIT Licensed.
+ */
+// Inspired by base2 and Prototype
+var Class;
+(function(){
+  var initializing = false, fnTest = /xyz/.test(function(){window.postMessage("xyz");}) ? /\b_super\b/ : /.*/;
+ 
+  // The base Class implementation (does nothing)
+  Class = function(){};
+ 
+  // Create a new Class that inherits from this class
+  Class.extend = function(prop) {
+    var _super = this.prototype;
+   
+    // Instantiate a base class (but only create the instance,
+    // don't run the init constructor)
+    initializing = true;
+    var prototype = new this();
+    initializing = false;
+   
+    // Copy the properties over onto the new prototype
+    for (var name in prop) {
+      // Check if we're overwriting an existing function
+      prototype[name] = typeof prop[name] == "function" &&
+        typeof _super[name] == "function" && fnTest.test(prop[name]) ?
+        (function(name, fn){
+          return function() {
+            var tmp = this._super;
+           
+            // Add a new ._super() method that is the same method
+            // but on the super-class
+            this._super = _super[name];
+           
+            // The method only need to be bound temporarily, so we
+            // remove it when we're done executing
+            var ret = fn.apply(this, arguments);        
+            this._super = tmp;
+           
+            return ret;
+          };
+        })(name, prop[name]) :
+        prop[name];
+    }
+   
+    // The dummy class constructor
+    function Class() {
+      // All construction is actually done in the init method
+      if ( !initializing && this.init )
+        this.init.apply(this, arguments);
+    }
+   
+    // Populate our constructed prototype object
+    Class.prototype = prototype;
+   
+    // Enforce the constructor to be what we expect
+    Class.prototype.constructor = Class;
+ 
+    // And make this class extendable
+    Class.extend = arguments.callee;
+   
+    return Class;
+  };
+  
+  return Class;
+})();
+
+// CustomEvent constructor polyfill
+// From MDN
+(function () {
+  function CustomEvent ( event, params ) {
+    params = params || { bubbles: false, cancelable: false, detail: undefined };
+    var evt = document.createEvent( 'CustomEvent' );
+    evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );
+    return evt;
+  }
+
+  CustomEvent.prototype = window.Event.prototype;
+
+  window.CustomEvent = CustomEvent;
+})();
+
+// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
+// MIT license
+(function() {
+    var lastTime = 0;
+    var vendors = ['ms', 'moz', 'webkit', 'o'];
+    for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
+        window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame'];
+        window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] || 
+                                      window[vendors[x]+'CancelRequestAnimationFrame'];
+    }
+ 
+    if (!window.requestAnimationFrame)
+        window.requestAnimationFrame = function(callback, element) {
+            var currTime = new Date().getTime();
+            var timeToCall = Math.max(0, 16 - (currTime - lastTime));
+            var id = window.setTimeout(function() { callback(currTime + timeToCall); }, 
+              timeToCall);
+            lastTime = currTime + timeToCall;
+            return id;
+        };
+ 
+    if (!window.cancelAnimationFrame)
+        window.cancelAnimationFrame = function(id) {
+            clearTimeout(id);
+        };
+}());
+
+// Array.isArray polyfill
+// From MDN
+(function() {
+	if(!Array.isArray) {
+	  Array.isArray = function(arg) {
+		return Object.prototype.toString.call(arg) === '[object Array]';
+	  };
+	}
+}());
+/**
+ * Taken from jQuery 2.1.3
+ *
+ * @param obj
+ * @returns {boolean}
+ */
+var $isplainobject = function( obj ) {
+  // Not plain objects:
+  // - Any object or value whose internal [[Class]] property is not "[object Object]"
+  // - DOM nodes
+  // - window
+  if (typeof obj !== "object" || obj.nodeType || (obj !== null && obj === obj.window)) {
+    return false;
+  }
+
+  if (obj.constructor && !Object.prototype.hasOwnProperty.call(obj.constructor.prototype, "isPrototypeOf")) {
+    return false;
+  }
+
+  // If the function hasn't returned already, we're confident that
+  // |obj| is a plain object, created by {} or constructed with new Object
+  return true;
+};
+
+var $extend = function(destination) {
+  var source, i,property;
+  for(i=1; i<arguments.length; i++) {
+    source = arguments[i];
+    for (property in source) {
+      if(!source.hasOwnProperty(property)) continue;
+      if(source[property] && $isplainobject(source[property])) {
+        if(!destination.hasOwnProperty(property)) destination[property] = {};
+        $extend(destination[property], source[property]);
+      }
+      else {
+        destination[property] = source[property];
+      }
+    }
+  }
+  return destination;
+};
+
+var $each = function(obj,callback) {
+  if(!obj || typeof obj !== "object") return;
+  var i;
+  if(Array.isArray(obj) || (typeof obj.length === 'number' && obj.length > 0 && (obj.length - 1) in obj)) {
+    for(i=0; i<obj.length; i++) {
+      if(callback(i,obj[i])===false) return;
+    }
+  }
+  else {
+    if (Object.keys) {
+      var keys = Object.keys(obj);
+      for(i=0; i<keys.length; i++) {
+        if(callback(keys[i],obj[keys[i]])===false) return;
+      }
+    }
+    else {
+      for(i in obj) {
+        if(!obj.hasOwnProperty(i)) continue;
+        if(callback(i,obj[i])===false) return;
+      }
+    }
+  }
+};
+
+var $trigger = function(el,event) {
+  var e = document.createEvent('HTMLEvents');
+  e.initEvent(event, true, true);
+  el.dispatchEvent(e);
+};
+var $triggerc = function(el,event) {
+  var e = new CustomEvent(event,{
+    bubbles: true,
+    cancelable: true
+  });
+
+  el.dispatchEvent(e);
+};
+
+var JSONEditor = function(element,options) {
+  if (!(element instanceof Element)) {
+    throw new Error('element should be an instance of Element');
+  }
+  options = $extend({},JSONEditor.defaults.options,options||{});
+  this.element = element;
+  this.options = options;
+  this.init();
+};
+JSONEditor.prototype = {
+  // necessary since we remove the ctor property by doing a literal assignment. Without this
+  // the $isplainobject function will think that this is a plain object.
+  constructor: JSONEditor,
+  init: function() {
+    var self = this;
+    
+    this.ready = false;
+
+    var theme_class = JSONEditor.defaults.themes[this.options.theme || JSONEditor.defaults.theme];
+    if(!theme_class) throw "Unknown theme " + (this.options.theme || JSONEditor.defaults.theme);
+    
+    this.schema = this.options.schema;
+    this.theme = new theme_class();
+    this.template = this.options.template;
+    this.refs = this.options.refs || {};
+    this.uuid = 0;
+    this.__data = {};
+    
+    var icon_class = JSONEditor.defaults.iconlibs[this.options.iconlib || JSONEditor.defaults.iconlib];
+    if(icon_class) this.iconlib = new icon_class();
+
+    this.root_container = this.theme.getContainer();
+    this.element.appendChild(this.root_container);
+    
+    this.translate = this.options.translate || JSONEditor.defaults.translate;
+
+    // Fetch all external refs via ajax
+    this._loadExternalRefs(this.schema, function() {
+      self._getDefinitions(self.schema);
+      self.validator = new JSONEditor.Validator(self);
+      
+      // Create the root editor
+      var editor_class = self.getEditorClass(self.schema);
+      self.root = self.createEditor(editor_class, {
+        jsoneditor: self,
+        schema: self.schema,
+        required: true,
+        container: self.root_container
+      });
+      
+      self.root.preBuild();
+      self.root.build();
+      self.root.postBuild();
+
+      // Starting data
+      if(self.options.startval) self.root.setValue(self.options.startval);
+
+      self.validation_results = self.validator.validate(self.root.getValue());
+      self.root.showValidationErrors(self.validation_results);
+      self.ready = true;
+
+      // Fire ready event asynchronously
+      window.requestAnimationFrame(function() {
+        if(!self.ready) return;
+        self.validation_results = self.validator.validate(self.root.getValue());
+        self.root.showValidationErrors(self.validation_results);
+        self.trigger('ready');
+        self.trigger('change');
+      });
+    });
+  },
+  getValue: function() {
+    if(!this.ready) throw "JSON Editor not ready yet.  Listen for 'ready' event before getting the value";
+
+    return this.root.getValue();
+  },
+  setValue: function(value) {
+    if(!this.ready) throw "JSON Editor not ready yet.  Listen for 'ready' event before setting the value";
+
+    this.root.setValue(value);
+    return this;
+  },
+  validate: function(value) {
+    if(!this.ready) throw "JSON Editor not ready yet.  Listen for 'ready' event before validating";
+    
+    // Custom value
+    if(arguments.length === 1) {
+      return this.validator.validate(value);
+    }
+    // Current value (use cached result)
+    else {
+      return this.validation_results;
+    }
+  },
+  destroy: function() {
+    if(this.destroyed) return;
+    if(!this.ready) return;
+    
+    this.schema = null;
+    this.options = null;
+    this.root.destroy();
+    this.root = null;
+    this.root_container = null;
+    this.validator = null;
+    this.validation_results = null;
+    this.theme = null;
+    this.iconlib = null;
+    this.template = null;
+    this.__data = null;
+    this.ready = false;
+    this.element.innerHTML = '';
+    
+    this.destroyed = true;
+  },
+  on: function(event, callback) {
+    this.callbacks = this.callbacks || {};
+    this.callbacks[event] = this.callbacks[event] || [];
+    this.callbacks[event].push(callback);
+    
+    return this;
+  },
+  off: function(event, callback) {
+    // Specific callback
+    if(event && callback) {
+      this.callbacks = this.callbacks || {};
+      this.callbacks[event] = this.callbacks[event] || [];
+      var newcallbacks = [];
+      for(var i=0; i<this.callbacks[event].length; i++) {
+        if(this.callbacks[event][i]===callback) continue;
+        newcallbacks.push(this.callbacks[event][i]);
+      }
+      this.callbacks[event] = newcallbacks;
+    }
+    // All callbacks for a specific event
+    else if(event) {
+      this.callbacks = this.callbacks || {};
+      this.callbacks[event] = [];
+    }
+    // All callbacks for all events
+    else {
+      this.callbacks = {};
+    }
+    
+    return this;
+  },
+  trigger: function(event) {
+    if(this.callbacks && this.callbacks[event] && this.callbacks[event].length) {
+      for(var i=0; i<this.callbacks[event].length; i++) {
+        this.callbacks[event][i]();
+      }
+    }
+    
+    return this;
+  },
+  setOption: function(option, value) {
+    if(option === "show_errors") {
+      this.options.show_errors = value;
+      this.onChange();
+    }
+    // Only the `show_errors` option is supported for now
+    else {
+      throw "Option "+option+" must be set during instantiation and cannot be changed later";
+    }
+    
+    return this;
+  },
+  getEditorClass: function(schema) {
+    var classname;
+
+    schema = this.expandSchema(schema);
+
+    $each(JSONEditor.defaults.resolvers,function(i,resolver) {
+      var tmp = resolver(schema);
+      if(tmp) {
+        if(JSONEditor.defaults.editors[tmp]) {
+          classname = tmp;
+          return false;
+        }
+      }
+    });
+
+    if(!classname) throw "Unknown editor for schema "+JSON.stringify(schema);
+    if(!JSONEditor.defaults.editors[classname]) throw "Unknown editor "+classname;
+
+    return JSONEditor.defaults.editors[classname];
+  },
+  createEditor: function(editor_class, options) {
+    options = $extend({},editor_class.options||{},options);
+    return new editor_class(options);
+  },
+  onChange: function() {
+    if(!this.ready) return;
+    
+    if(this.firing_change) return;
+    this.firing_change = true;
+    
+    var self = this;
+    
+    window.requestAnimationFrame(function() {
+      self.firing_change = false;
+      if(!self.ready) return;
+
+      // Validate and cache results
+      self.validation_results = self.validator.validate(self.root.getValue());
+      
+      if(self.options.show_errors !== "never") {
+        self.root.showValidationErrors(self.validation_results);
+      }
+      else {
+        self.root.showValidationErrors([]);
+      }
+      
+      // Fire change event
+      self.trigger('change');
+    });
+    
+    return this;
+  },
+  compileTemplate: function(template, name) {
+    name = name || JSONEditor.defaults.template;
+
+    var engine;
+
+    // Specifying a preset engine
+    if(typeof name === 'string') {
+      if(!JSONEditor.defaults.templates[name]) throw "Unknown template engine "+name;
+      engine = JSONEditor.defaults.templates[name]();
+
+      if(!engine) throw "Template engine "+name+" missing required library.";
+    }
+    // Specifying a custom engine
+    else {
+      engine = name;
+    }
+
+    if(!engine) throw "No template engine set";
+    if(!engine.compile) throw "Invalid template engine set";
+
+    return engine.compile(template);
+  },
+  _data: function(el,key,value) {
+    // Setting data
+    if(arguments.length === 3) {
+      var uuid;
+      if(el.hasAttribute('data-jsoneditor-'+key)) {
+        uuid = el.getAttribute('data-jsoneditor-'+key);
+      }
+      else {
+        uuid = this.uuid++;
+        el.setAttribute('data-jsoneditor-'+key,uuid);
+      }
+
+      this.__data[uuid] = value;
+    }
+    // Getting data
+    else {
+      // No data stored
+      if(!el.hasAttribute('data-jsoneditor-'+key)) return null;
+      
+      return this.__data[el.getAttribute('data-jsoneditor-'+key)];
+    }
+  },
+  registerEditor: function(editor) {
+    this.editors = this.editors || {};
+    this.editors[editor.path] = editor;
+    return this;
+  },
+  unregisterEditor: function(editor) {
+    this.editors = this.editors || {};
+    this.editors[editor.path] = null;
+    return this;
+  },
+  getEditor: function(path) {
+    if(!this.editors) return;
+    return this.editors[path];
+  },
+  watch: function(path,callback) {
+    this.watchlist = this.watchlist || {};
+    this.watchlist[path] = this.watchlist[path] || [];
+    this.watchlist[path].push(callback);
+    
+    return this;
+  },
+  unwatch: function(path,callback) {
+    if(!this.watchlist || !this.watchlist[path]) return this;
+    // If removing all callbacks for a path
+    if(!callback) {
+      this.watchlist[path] = null;
+      return this;
+    }
+    
+    var newlist = [];
+    for(var i=0; i<this.watchlist[path].length; i++) {
+      if(this.watchlist[path][i] === callback) continue;
+      else newlist.push(this.watchlist[path][i]);
+    }
+    this.watchlist[path] = newlist.length? newlist : null;
+    return this;
+  },
+  notifyWatchers: function(path) {
+    if(!this.watchlist || !this.watchlist[path]) return this;
+    for(var i=0; i<this.watchlist[path].length; i++) {
+      this.watchlist[path][i]();
+    }
+  },
+  isEnabled: function() {
+    return !this.root || this.root.isEnabled();
+  },
+  enable: function() {
+    this.root.enable();
+  },
+  disable: function() {
+    this.root.disable();
+  },
+  _getDefinitions: function(schema,path) {
+    path = path || '#/definitions/';
+    if(schema.definitions) {
+      for(var i in schema.definitions) {
+        if(!schema.definitions.hasOwnProperty(i)) continue;
+        this.refs[path+i] = schema.definitions[i];
+        if(schema.definitions[i].definitions) {
+          this._getDefinitions(schema.definitions[i],path+i+'/definitions/');
+        }
+      }
+    }
+  },
+  _getExternalRefs: function(schema) {
+    var refs = {};
+    var merge_refs = function(newrefs) {
+      for(var i in newrefs) {
+        if(newrefs.hasOwnProperty(i)) {
+          refs[i] = true;
+        }
+      }
+    };
+    
+    if(schema.$ref && typeof schema.$ref !== "object" && schema.$ref.substr(0,1) !== "#" && !this.refs[schema.$ref]) {
+      refs[schema.$ref] = true;
+    }
+    
+    for(var i in schema) {
+      if(!schema.hasOwnProperty(i)) continue;
+      if(schema[i] && typeof schema[i] === "object" && Array.isArray(schema[i])) {
+        for(var j=0; j<schema[i].length; j++) {
+          if(typeof schema[i][j]==="object") {
+            merge_refs(this._getExternalRefs(schema[i][j]));
+          }
+        }
+      }
+      else if(schema[i] && typeof schema[i] === "object") {
+        merge_refs(this._getExternalRefs(schema[i]));
+      }
+    }
+    
+    return refs;
+  },
+  _loadExternalRefs: function(schema, callback) {
+    var self = this;
+    var refs = this._getExternalRefs(schema);
+    
+    var done = 0, waiting = 0, callback_fired = false;
+    
+    $each(refs,function(url) {
+      if(self.refs[url]) return;
+      if(!self.options.ajax) throw "Must set ajax option to true to load external ref "+url;
+      self.refs[url] = 'loading';
+      waiting++;
+
+      var r = new XMLHttpRequest(); 
+      r.open("GET", url, true);
+      r.onreadystatechange = function () {
+        if (r.readyState != 4) return; 
+        // Request succeeded
+        if(r.status === 200) {
+          var response;
+          try {
+            response = JSON.parse(r.responseText);
+          }
+          catch(e) {
+            window.console.log(e);
+            throw "Failed to parse external ref "+url;
+          }
+          if(!response || typeof response !== "object") throw "External ref does not contain a valid schema - "+url;
+          
+          self.refs[url] = response;
+          self._loadExternalRefs(response,function() {
+            done++;
+            if(done >= waiting && !callback_fired) {
+              callback_fired = true;
+              callback();
+            }
+          });
+        }
+        // Request failed
+        else {
+          window.console.log(r);
+          throw "Failed to fetch ref via ajax- "+url;
+        }
+      };
+      r.send();
+    });
+    
+    if(!waiting) {
+      callback();
+    }
+  },
+  expandRefs: function(schema) {
+    schema = $extend({},schema);
+    
+    while (schema.$ref) {
+      var ref = schema.$ref;
+      delete schema.$ref;
+      
+      if(!this.refs[ref]) ref = decodeURIComponent(ref);
+      
+      schema = this.extendSchemas(schema,this.refs[ref]);
+    }
+    return schema;
+  },
+  expandSchema: function(schema) {
+    var self = this;
+    var extended = $extend({},schema);
+    var i;
+
+    // Version 3 `type`
+    if(typeof schema.type === 'object') {
+      // Array of types
+      if(Array.isArray(schema.type)) {
+        $each(schema.type, function(key,value) {
+          // Schema
+          if(typeof value === 'object') {
+            schema.type[key] = self.expandSchema(value);
+          }
+        });
+      }
+      // Schema
+      else {
+        schema.type = self.expandSchema(schema.type);
+      }
+    }
+    // Version 3 `disallow`
+    if(typeof schema.disallow === 'object') {
+      // Array of types
+      if(Array.isArray(schema.disallow)) {
+        $each(schema.disallow, function(key,value) {
+          // Schema
+          if(typeof value === 'object') {
+            schema.disallow[key] = self.expandSchema(value);
+          }
+        });
+      }
+      // Schema
+      else {
+        schema.disallow = self.expandSchema(schema.disallow);
+      }
+    }
+    // Version 4 `anyOf`
+    if(schema.anyOf) {
+      $each(schema.anyOf, function(key,value) {
+        schema.anyOf[key] = self.expandSchema(value);
+      });
+    }
+    // Version 4 `dependencies` (schema dependencies)
+    if(schema.dependencies) {
+      $each(schema.dependencies,function(key,value) {
+        if(typeof value === "object" && !(Array.isArray(value))) {
+          schema.dependencies[key] = self.expandSchema(value);
+        }
+      });
+    }
+    // Version 4 `not`
+    if(schema.not) {
+      schema.not = this.expandSchema(schema.not);
+    }
+    
+    // allOf schemas should be merged into the parent
+    if(schema.allOf) {
+      for(i=0; i<schema.allOf.length; i++) {
+        extended = this.extendSchemas(extended,this.expandSchema(schema.allOf[i]));
+      }
+      delete extended.allOf;
+    }
+    // extends schemas should be merged into parent
+    if(schema["extends"]) {
+      // If extends is a schema
+      if(!(Array.isArray(schema["extends"]))) {
+        extended = this.extendSchemas(extended,this.expandSchema(schema["extends"]));
+      }
+      // If extends is an array of schemas
+      else {
+        for(i=0; i<schema["extends"].length; i++) {
+          extended = this.extendSchemas(extended,this.expandSchema(schema["extends"][i]));
+        }
+      }
+      delete extended["extends"];
+    }
+    // parent should be merged into oneOf schemas
+    if(schema.oneOf) {
+      var tmp = $extend({},extended);
+      delete tmp.oneOf;
+      for(i=0; i<schema.oneOf.length; i++) {
+        extended.oneOf[i] = this.extendSchemas(this.expandSchema(schema.oneOf[i]),tmp);
+      }
+    }
+    
+    return this.expandRefs(extended);
+  },
+  extendSchemas: function(obj1, obj2) {
+    obj1 = $extend({},obj1);
+    obj2 = $extend({},obj2);
+
+    var self = this;
+    var extended = {};
+    $each(obj1, function(prop,val) {
+      // If this key is also defined in obj2, merge them
+      if(typeof obj2[prop] !== "undefined") {
+        // Required arrays should be unioned together
+        if(prop === 'required' && typeof val === "object" && Array.isArray(val)) {
+          // Union arrays and unique
+          extended.required = val.concat(obj2[prop]).reduce(function(p, c) {
+            if (p.indexOf(c) < 0) p.push(c);
+            return p;
+          }, []);
+        }
+        // Type should be intersected and is either an array or string
+        else if(prop === 'type' && (typeof val === "string" || Array.isArray(val))) {
+          // Make sure we're dealing with arrays
+          if(typeof val === "string") val = [val];
+          if(typeof obj2.type === "string") obj2.type = [obj2.type];
+
+
+          extended.type = val.filter(function(n) {
+            return obj2.type.indexOf(n) !== -1;
+          });
+
+          // If there's only 1 type and it's a primitive, use a string instead of array
+          if(extended.type.length === 1 && typeof extended.type[0] === "string") {
+            extended.type = extended.type[0];
+          }
+        }
+        // All other arrays should be intersected (enum, etc.)
+        else if(typeof val === "object" && Array.isArray(val)){
+          extended[prop] = val.filter(function(n) {
+            return obj2[prop].indexOf(n) !== -1;
+          });
+        }
+        // Objects should be recursively merged
+        else if(typeof val === "object" && val !== null) {
+          extended[prop] = self.extendSchemas(val,obj2[prop]);
+        }
+        // Otherwise, use the first value
+        else {
+          extended[prop] = val;
+        }
+      }
+      // Otherwise, just use the one in obj1
+      else {
+        extended[prop] = val;
+      }
+    });
+    // Properties in obj2 that aren't in obj1
+    $each(obj2, function(prop,val) {
+      if(typeof obj1[prop] === "undefined") {
+        extended[prop] = val;
+      }
+    });
+
+    return extended;
+  }
+};
+
+JSONEditor.defaults = {
+  themes: {},
+  templates: {},
+  iconlibs: {},
+  editors: {},
+  languages: {},
+  resolvers: [],
+  custom_validators: []
+};
+
+JSONEditor.Validator = Class.extend({
+  init: function(jsoneditor,schema) {
+    this.jsoneditor = jsoneditor;
+    this.schema = schema || this.jsoneditor.schema;
+    this.options = {};
+    this.translate = this.jsoneditor.translate || JSONEditor.defaults.translate;
+  },
+  validate: function(value) {
+    return this._validateSchema(this.schema, value);
+  },
+  _validateSchema: function(schema,value,path) {
+    var self = this;
+    var errors = [];
+    var valid, i, j;
+    var stringified = JSON.stringify(value);
+
+    path = path || 'root';
+
+    // Work on a copy of the schema
+    schema = $extend({},this.jsoneditor.expandRefs(schema));
+
+    /*
+     * Type Agnostic Validation
+     */
+
+    // Version 3 `required`
+    if(schema.required && schema.required === true) {
+      if(typeof value === "undefined") {
+        errors.push({
+          path: path,
+          property: 'required',
+          message: this.translate("error_notset")
+        });
+
+        // Can't do any more validation at this point
+        return errors;
+      }
+    }
+    // Value not defined
+    else if(typeof value === "undefined") {
+      // If required_by_default is set, all fields are required
+      if(this.jsoneditor.options.required_by_default) {
+        errors.push({
+          path: path,
+          property: 'required',
+          message: this.translate("error_notset")
+        });
+      }
+      // Not required, no further validation needed
+      else {
+        return errors;
+      }
+    }
+
+    // `enum`
+    if(schema["enum"]) {
+      valid = false;
+      for(i=0; i<schema["enum"].length; i++) {
+        if(stringified === JSON.stringify(schema["enum"][i])) valid = true;
+      }
+      if(!valid) {
+        errors.push({
+          path: path,
+          property: 'enum',
+          message: this.translate("error_enum")
+        });
+      }
+    }
+
+    // `extends` (version 3)
+    if(schema["extends"]) {
+      for(i=0; i<schema["extends"].length; i++) {
+        errors = errors.concat(this._validateSchema(schema["extends"][i],value,path));
+      }
+    }
+
+    // `allOf`
+    if(schema.allOf) {
+      for(i=0; i<schema.allOf.length; i++) {
+        errors = errors.concat(this._validateSchema(schema.allOf[i],value,path));
+      }
+    }
+
+    // `anyOf`
+    if(schema.anyOf) {
+      valid = false;
+      for(i=0; i<schema.anyOf.length; i++) {
+        if(!this._validateSchema(schema.anyOf[i],value,path).length) {
+          valid = true;
+          break;
+        }
+      }
+      if(!valid) {
+        errors.push({
+          path: path,
+          property: 'anyOf',
+          message: this.translate('error_anyOf')
+        });
+      }
+    }
+
+    // `oneOf`
+    if(schema.oneOf) {
+      valid = 0;
+      var oneof_errors = [];
+      for(i=0; i<schema.oneOf.length; i++) {
+        // Set the error paths to be path.oneOf[i].rest.of.path
+        var tmp = this._validateSchema(schema.oneOf[i],value,path);
+        if(!tmp.length) {
+          valid++;
+        }
+
+        for(j=0; j<tmp.length; j++) {
+          tmp[j].path = path+'.oneOf['+i+']'+tmp[j].path.substr(path.length);
+        }
+        oneof_errors = oneof_errors.concat(tmp);
+
+      }
+      if(valid !== 1) {
+        errors.push({
+          path: path,
+          property: 'oneOf',
+          message: this.translate('error_oneOf', [valid])
+        });
+        errors = errors.concat(oneof_errors);
+      }
+    }
+
+    // `not`
+    if(schema.not) {
+      if(!this._validateSchema(schema.not,value,path).length) {
+        errors.push({
+          path: path,
+          property: 'not',
+          message: this.translate('error_not')
+        });
+      }
+    }
+
+    // `type` (both Version 3 and Version 4 support)
+    if(schema.type) {
+      // Union type
+      if(Array.isArray(schema.type)) {
+        valid = false;
+        for(i=0;i<schema.type.length;i++) {
+          if(this._checkType(schema.type[i], value)) {
+            valid = true;
+            break;
+          }
+        }
+        if(!valid) {
+          errors.push({
+            path: path,
+            property: 'type',
+            message: this.translate('error_type_union')
+          });
+        }
+      }
+      // Simple type
+      else {
+        if(!this._checkType(schema.type, value)) {
+          errors.push({
+            path: path,
+            property: 'type',
+            message: this.translate('error_type', [schema.type])
+          });
+        }
+      }
+    }
+
+
+    // `disallow` (version 3)
+    if(schema.disallow) {
+      // Union type
+      if(Array.isArray(schema.disallow)) {
+        valid = true;
+        for(i=0;i<schema.disallow.length;i++) {
+          if(this._checkType(schema.disallow[i], value)) {
+            valid = false;
+            break;
+          }
+        }
+        if(!valid) {
+          errors.push({
+            path: path,
+            property: 'disallow',
+            message: this.translate('error_disallow_union')
+          });
+        }
+      }
+      // Simple type
+      else {
+        if(this._checkType(schema.disallow, value)) {
+          errors.push({
+            path: path,
+            property: 'disallow',
+            message: this.translate('error_disallow', [schema.disallow])
+          });
+        }
+      }
+    }
+
+    /*
+     * Type Specific Validation
+     */
+
+    // Number Specific Validation
+    if(typeof value === "number") {
+      // `multipleOf` and `divisibleBy`
+      if(schema.multipleOf || schema.divisibleBy) {
+        valid = value / (schema.multipleOf || schema.divisibleBy);
+        if(valid !== Math.floor(valid)) {
+          errors.push({
+            path: path,
+            property: schema.multipleOf? 'multipleOf' : 'divisibleBy',
+            message: this.translate('error_multipleOf', [schema.multipleOf || schema.divisibleBy])
+          });
+        }
+      }
+
+      // `maximum`
+      if(schema.hasOwnProperty('maximum')) {
+        if(schema.exclusiveMaximum && value >= schema.maximum) {
+          errors.push({
+            path: path,
+            property: 'maximum',
+            message: this.translate('error_maximum_excl', [schema.maximum])
+          });
+        }
+        else if(!schema.exclusiveMaximum && value > schema.maximum) {
+          errors.push({
+            path: path,
+            property: 'maximum',
+            message: this.translate('error_maximum_incl', [schema.maximum])
+          });
+        }
+      }
+
+      // `minimum`
+      if(schema.hasOwnProperty('minimum')) {
+        if(schema.exclusiveMinimum && value <= schema.minimum) {
+          errors.push({
+            path: path,
+            property: 'minimum',
+            message: this.translate('error_minimum_excl', [schema.minimum])
+          });
+        }
+        else if(!schema.exclusiveMinimum && value < schema.minimum) {
+          errors.push({
+            path: path,
+            property: 'minimum',
+            message: this.translate('error_minimum_incl', [schema.minimum])
+          });
+        }
+      }
+    }
+    // String specific validation
+    else if(typeof value === "string") {
+      // `maxLength`
+      if(schema.maxLength) {
+        if((value+"").length > schema.maxLength) {
+          errors.push({
+            path: path,
+            property: 'maxLength',
+            message: this.translate('error_maxLength', [schema.maxLength])
+          });
+        }
+      }
+
+      // `minLength`
+      if(schema.minLength) {
+        if((value+"").length < schema.minLength) {          
+          errors.push({
+            path: path,
+            property: 'minLength',
+            message: this.translate((schema.minLength===1?'error_notempty':'error_minLength'), [schema.minLength])
+          });
+        }
+      }
+
+      // `pattern`
+      if(schema.pattern) {
+        if(!(new RegExp(schema.pattern)).test(value)) {
+          errors.push({
+            path: path,
+            property: 'pattern',
+            message: this.translate('error_pattern')
+          });
+        }
+      }
+    }
+    // Array specific validation
+    else if(typeof value === "object" && value !== null && Array.isArray(value)) {
+      // `items` and `additionalItems`
+      if(schema.items) {
+        // `items` is an array
+        if(Array.isArray(schema.items)) {
+          for(i=0; i<value.length; i++) {
+            // If this item has a specific schema tied to it
+            // Validate against it
+            if(schema.items[i]) {
+              errors = errors.concat(this._validateSchema(schema.items[i],value[i],path+'.'+i));
+            }
+            // If all additional items are allowed
+            else if(schema.additionalItems === true) {
+              break;
+            }
+            // If additional items is a schema
+            // TODO: Incompatibility between version 3 and 4 of the spec
+            else if(schema.additionalItems) {
+              errors = errors.concat(this._validateSchema(schema.additionalItems,value[i],path+'.'+i));
+            }
+            // If no additional items are allowed
+            else if(schema.additionalItems === false) {
+              errors.push({
+                path: path,
+                property: 'additionalItems',
+                message: this.translate('error_additionalItems')
+              });
+              break;
+            }
+            // Default for `additionalItems` is an empty schema
+            else {
+              break;
+            }
+          }
+        }
+        // `items` is a schema
+        else {
+          // Each item in the array must validate against the schema
+          for(i=0; i<value.length; i++) {
+            errors = errors.concat(this._validateSchema(schema.items,value[i],path+'.'+i));
+          }
+        }
+      }
+
+      // `maxItems`
+      if(schema.maxItems) {
+        if(value.length > schema.maxItems) {
+          errors.push({
+            path: path,
+            property: 'maxItems',
+            message: this.translate('error_maxItems', [schema.maxItems])
+          });
+        }
+      }
+
+      // `minItems`
+      if(schema.minItems) {
+        if(value.length < schema.minItems) {
+          errors.push({
+            path: path,
+            property: 'minItems',
+            message: this.translate('error_minItems', [schema.minItems])
+          });
+        }
+      }
+
+      // `uniqueItems`
+      if(schema.uniqueItems) {
+        var seen = {};
+        for(i=0; i<value.length; i++) {
+          valid = JSON.stringify(value[i]);
+          if(seen[valid]) {
+            errors.push({
+              path: path,
+              property: 'uniqueItems',
+              message: this.translate('error_uniqueItems')
+            });
+            break;
+          }
+          seen[valid] = true;
+        }
+      }
+    }
+    // Object specific validation
+    else if(typeof value === "object" && value !== null) {
+      // `maxProperties`
+      if(schema.maxProperties) {
+        valid = 0;
+        for(i in value) {
+          if(!value.hasOwnProperty(i)) continue;
+          valid++;
+        }
+        if(valid > schema.maxProperties) {
+          errors.push({
+            path: path,
+            property: 'maxProperties',
+            message: this.translate('error_maxProperties', [schema.maxProperties])
+          });
+        }
+      }
+
+      // `minProperties`
+      if(schema.minProperties) {
+        valid = 0;
+        for(i in value) {
+          if(!value.hasOwnProperty(i)) continue;
+          valid++;
+        }
+        if(valid < schema.minProperties) {
+          errors.push({
+            path: path,
+            property: 'minProperties',
+            message: this.translate('error_minProperties', [schema.minProperties])
+          });
+        }
+      }
+      // [TODO] find why defaultProperties is not functioning.
+      // Version 4 `required`
+      //if(schema.required && Array.isArray(schema.required)) {
+      //  for(i=0; i<schema.required.length; i++) {
+      //    if(typeof value[schema.required[i]] === "undefined") {
+      //      errors.push({
+      //        path: path,
+      //        property: 'required',
+      //        message: this.translate('error_required', [schema.required[i]])
+      //      });
+      //    }
+      //  }
+      //}
+
+      // `properties`
+      var validated_properties = {};
+      if(schema.properties) {
+        for(i in schema.properties) {
+          if(!schema.properties.hasOwnProperty(i)) continue;
+          validated_properties[i] = true;
+          errors = errors.concat(this._validateSchema(schema.properties[i],value[i],path+'.'+i));
+        }
+      }
+
+      // `patternProperties`
+      if(schema.patternProperties) {
+        for(i in schema.patternProperties) {
+          if(!schema.patternProperties.hasOwnProperty(i)) continue;
+
+          var regex = new RegExp(i);
+
+          // Check which properties match
+          for(j in value) {
+            if(!value.hasOwnProperty(j)) continue;
+            if(regex.test(j)) {
+              validated_properties[j] = true;
+              errors = errors.concat(this._validateSchema(schema.patternProperties[i],value[j],path+'.'+j));
+            }
+          }
+        }
+      }
+
+      // The no_additional_properties option currently doesn't work with extended schemas that use oneOf or anyOf
+      if(typeof schema.additionalProperties === "undefined" && this.jsoneditor.options.no_additional_properties && !schema.oneOf && !schema.anyOf) {
+        schema.additionalProperties = false;
+      }
+
+      // `additionalProperties`
+      if(typeof schema.additionalProperties !== "undefined") {
+        for(i in value) {
+          if(!value.hasOwnProperty(i)) continue;
+          if(!validated_properties[i]) {
+            // No extra properties allowed
+            if(!schema.additionalProperties) {
+              errors.push({
+                path: path,
+                property: 'additionalProperties',
+                message: this.translate('error_additional_properties', [i])
+              });
+              break;
+            }
+            // Allowed
+            else if(schema.additionalProperties === true) {
+              break;
+            }
+            // Must match schema
+            // TODO: incompatibility between version 3 and 4 of the spec
+            else {
+              errors = errors.concat(this._validateSchema(schema.additionalProperties,value[i],path+'.'+i));
+            }
+          }
+        }
+      }
+
+      // `dependencies`
+      if(schema.dependencies) {
+        for(i in schema.dependencies) {
+          if(!schema.dependencies.hasOwnProperty(i)) continue;
+
+          // Doesn't need to meet the dependency
+          if(typeof value[i] === "undefined") continue;
+
+          // Property dependency
+          if(Array.isArray(schema.dependencies[i])) {
+            for(j=0; j<schema.dependencies[i].length; j++) {
+              if(typeof value[schema.dependencies[i][j]] === "undefined") {
+                errors.push({
+                  path: path,
+                  property: 'dependencies',
+                  message: this.translate('error_dependency', [schema.dependencies[i][j]])
+                });
+              }
+            }
+          }
+          // Schema dependency
+          else {
+            errors = errors.concat(this._validateSchema(schema.dependencies[i],value,path));
+          }
+        }
+      }
+    }
+
+    // Custom type validation
+    $each(JSONEditor.defaults.custom_validators,function(i,validator) {
+      errors = errors.concat(validator.call(self,schema,value,path));
+    });
+
+    return errors;
+  },
+  _checkType: function(type, value) {
+    // Simple types
+    if(typeof type === "string") {
+      if(type==="string") return typeof value === "string";
+      else if(type==="number") return typeof value === "number";
+      else if(type==="integer") return typeof value === "number" && value === Math.floor(value);
+      else if(type==="boolean") return typeof value === "boolean";
+      else if(type==="array") return Array.isArray(value);
+      else if(type === "object") return value !== null && !(Array.isArray(value)) && typeof value === "object";
+      else if(type === "null") return value === null;
+      else return true;
+    }
+    // Schema
+    else {
+      return !this._validateSchema(type,value).length;
+    }
+  }
+});
+
+/**
+ * All editors should extend from this class
+ */
+JSONEditor.AbstractEditor = Class.extend({
+  onChildEditorChange: function(editor) {
+    this.onChange(true);
+  },
+  notify: function() {
+    this.jsoneditor.notifyWatchers(this.path);
+  },
+  change: function() {
+    if(this.parent) this.parent.onChildEditorChange(this);
+    else this.jsoneditor.onChange();
+  },
+  onChange: function(bubble) {
+    this.notify();
+    if(this.watch_listener) this.watch_listener();
+    if(bubble) this.change();
+  },
+  register: function() {
+    this.jsoneditor.registerEditor(this);
+    this.onChange();
+  },
+  unregister: function() {
+    if(!this.jsoneditor) return;
+    this.jsoneditor.unregisterEditor(this);
+  },
+  getNumColumns: function() {
+    return 12;
+  },
+  init: function(options) {
+    this.jsoneditor = options.jsoneditor;
+    
+    this.theme = this.jsoneditor.theme;
+    this.template_engine = this.jsoneditor.template;
+    this.iconlib = this.jsoneditor.iconlib;
+    
+    this.original_schema = options.schema;
+    this.schema = this.jsoneditor.expandSchema(this.original_schema);
+    
+    this.options = $extend({}, (this.options || {}), (options.schema.options || {}), options);
+    
+    if(!options.path && !this.schema.id) this.schema.id = 'root';
+    this.path = options.path || 'root';
+    this.formname = options.formname || this.path.replace(/\.([^.]+)/g,'[$1]');
+    if(this.jsoneditor.options.form_name_root) this.formname = this.formname.replace(/^root\[/,this.jsoneditor.options.form_name_root+'[');
+    this.key = this.path.split('.').pop();
+    this.parent = options.parent;
+    
+    this.link_watchers = [];
+    
+    if(options.container) this.setContainer(options.container);
+  },
+  setContainer: function(container) {
+    this.container = container;
+    if(this.schema.id) this.container.setAttribute('data-schemaid',this.schema.id);
+    if(this.schema.type && typeof this.schema.type === "string") this.container.setAttribute('data-schematype',this.schema.type);
+    this.container.setAttribute('data-schemapath',this.path);
+  },
+  
+  preBuild: function() {
+
+  },
+  build: function() {
+    
+  },
+  postBuild: function() {
+    this.setupWatchListeners();
+    this.addLinks();
+    this.setValue(this.getDefault(), true);
+    this.updateHeaderText();
+    this.register();
+    this.onWatchedFieldChange();
+  },
+  
+  setupWatchListeners: function() {
+    var self = this;
+    
+    // Watched fields
+    this.watched = {};
+    if(this.schema.vars) this.schema.watch = this.schema.vars;
+    this.watched_values = {};
+    this.watch_listener = function() {
+      if(self.refreshWatchedFieldValues()) {
+        self.onWatchedFieldChange();
+      }
+    };
+    
+    this.register();
+    if(this.schema.hasOwnProperty('watch')) {
+      var path,path_parts,first,root,adjusted_path;
+
+      for(var name in this.schema.watch) {
+        if(!this.schema.watch.hasOwnProperty(name)) continue;
+        path = this.schema.watch[name];
+
+        if(Array.isArray(path)) {
+          path_parts = [path[0]].concat(path[1].split('.'));
+        }
+        else {
+          path_parts = path.split('.');
+          if(!self.theme.closest(self.container,'[data-schemaid="'+path_parts[0]+'"]')) path_parts.unshift('#');
+        }
+        first = path_parts.shift();
+
+        if(first === '#') first = self.jsoneditor.schema.id || 'root';
+
+        // Find the root node for this template variable
+        root = self.theme.closest(self.container,'[data-schemaid="'+first+'"]');
+        if(!root) throw "Could not find ancestor node with id "+first;
+
+        // Keep track of the root node and path for use when rendering the template
+        adjusted_path = root.getAttribute('data-schemapath') + '.' + path_parts.join('.');
+        
+        self.jsoneditor.watch(adjusted_path,self.watch_listener);
+        
+        self.watched[name] = adjusted_path;
+      }
+    }
+    
+    // Dynamic header
+    if(this.schema.headerTemplate) {
+      this.header_template = this.jsoneditor.compileTemplate(this.schema.headerTemplate, this.template_engine);
+    }
+  },
+  
+  addLinks: function() {
+    // Add links
+    if(!this.no_link_holder) {
+      this.link_holder = this.theme.getLinksHolder();
+      this.container.appendChild(this.link_holder);
+      if(this.schema.links) {
+        for(var i=0; i<this.schema.links.length; i++) {
+          this.addLink(this.getLink(this.schema.links[i]));
+        }
+      }
+    }
+  },
+  
+  
+  getButton: function(text, icon, title) {
+    var btnClass = 'btn-xs btn-info json-editor-btn-'+icon;
+    if(!this.iconlib) icon = null;
+    else icon = this.iconlib.getIcon(icon);
+    
+    if(!icon && title) {
+      text = title;
+      title = null;
+    }
+    
+    var btn = this.theme.getButton(text, icon, title);
+    btn.className += ' ' + btnClass + ' ';
+    return btn;
+  },
+  setButtonText: function(button, text, icon, title) {
+    if(!this.iconlib) icon = null;
+    else icon = this.iconlib.getIcon(icon);
+    
+    if(!icon && title) {
+      text = title;
+      title = null;
+    }
+    
+    return this.theme.setButtonText(button, text, icon, title);
+  },
+  addLink: function(link) {
+    if(this.link_holder) this.link_holder.appendChild(link);
+  },
+  getLink: function(data) {
+    var holder, link;
+        
+    // Get mime type of the link
+    var mime = data.mediaType || 'application/javascript';
+    var type = mime.split('/')[0];
+    
+    // Template to generate the link href
+    var href = this.jsoneditor.compileTemplate(data.href,this.template_engine);
+    
+    // Image links
+    if(type === 'image') {
+      holder = this.theme.getBlockLinkHolder();
+      link = document.createElement('a');
+      link.setAttribute('target','_blank');
+      var image = document.createElement('img');
+      
+      this.theme.createImageLink(holder,link,image);
+    
+      // When a watched field changes, update the url  
+      this.link_watchers.push(function(vars) {
+        var url = href(vars);
+        link.setAttribute('href',url);
+        link.setAttribute('title',data.rel || url);
+        image.setAttribute('src',url);
+      });
+    }
+    // Audio/Video links
+    else if(['audio','video'].indexOf(type) >=0) {
+      holder = this.theme.getBlockLinkHolder();
+      
+      link = this.theme.getBlockLink();
+      link.setAttribute('target','_blank');
+      
+      var media = document.createElement(type);
+      media.setAttribute('controls','controls');
+      
+      this.theme.createMediaLink(holder,link,media);
+      
+      // When a watched field changes, update the url  
+      this.link_watchers.push(function(vars) {
+        var url = href(vars);
+        link.setAttribute('href',url);
+        link.textContent = data.rel || url;
+        media.setAttribute('src',url);
+      });
+    }
+    // Text links
+    else {
+      holder = this.theme.getBlockLink();
+      holder.setAttribute('target','_blank');
+      holder.textContent = data.rel;
+      
+      // When a watched field changes, update the url  
+      this.link_watchers.push(function(vars) {
+        var url = href(vars);
+        holder.setAttribute('href',url);
+        holder.textContent = data.rel || url;
+      });
+    }
+    
+    return holder;
+  },
+  refreshWatchedFieldValues: function() {
+    if(!this.watched_values) return;
+    var watched = {};
+    var changed = false;
+    var self = this;
+    
+    if(this.watched) {
+      var val,editor;
+      for(var name in this.watched) {
+        if(!this.watched.hasOwnProperty(name)) continue;
+        editor = self.jsoneditor.getEditor(this.watched[name]);
+        val = editor? editor.getValue() : null;
+        if(self.watched_values[name] !== val) changed = true;
+        watched[name] = val;
+      }
+    }
+    
+    watched.self = this.getValue();
+    if(this.watched_values.self !== watched.self) changed = true;
+    
+    this.watched_values = watched;
+    
+    return changed;
+  },
+  getWatchedFieldValues: function() {
+    return this.watched_values;
+  },
+  updateHeaderText: function() {
+    if(this.header) {
+      // If the header has children, only update the text node's value
+      if(this.header.children.length) {
+        for(var i=0; i<this.header.childNodes.length; i++) {
+          if(this.header.childNodes[i].nodeType===3) {
+            this.header.childNodes[i].nodeValue = this.getHeaderText();
+            break;
+          }
+        }
+      }
+      // Otherwise, just update the entire node
+      else {
+        this.header.textContent = this.getHeaderText();
+      }
+    }
+  },
+  getHeaderText: function(title_only) {
+    if(this.header_text) return this.header_text;
+    else if(title_only) return this.schema.title;
+    else return this.getTitle();
+  },
+  onWatchedFieldChange: function() {
+    var vars;
+    if(this.header_template) {      
+      vars = $extend(this.getWatchedFieldValues(),{
+        key: this.key,
+        i: this.key,
+        i0: (this.key*1),
+        i1: (this.key*1+1),
+        title: this.getTitle()
+      });
+      var header_text = this.header_template(vars);
+      
+      if(header_text !== this.header_text) {
+        this.header_text = header_text;
+        this.updateHeaderText();
+        this.notify();
+        //this.fireChangeHeaderEvent();
+      }
+    }
+    if(this.link_watchers.length) {
+      vars = this.getWatchedFieldValues();
+      for(var i=0; i<this.link_watchers.length; i++) {
+        this.link_watchers[i](vars);
+      }
+    }
+  },
+  setValue: function(value) {
+    this.value = value;
+  },
+  getValue: function() {
+    return this.value;
+  },
+  refreshValue: function() {
+
+  },
+  getChildEditors: function() {
+    return false;
+  },
+  destroy: function() {
+    var self = this;
+    this.unregister(this);
+    $each(this.watched,function(name,adjusted_path) {
+      self.jsoneditor.unwatch(adjusted_path,self.watch_listener);
+    });
+    this.watched = null;
+    this.watched_values = null;
+    this.watch_listener = null;
+    this.header_text = null;
+    this.header_template = null;
+    this.value = null;
+    if(this.container && this.container.parentNode) this.container.parentNode.removeChild(this.container);
+    this.container = null;
+    this.jsoneditor = null;
+    this.schema = null;
+    this.path = null;
+    this.key = null;
+    this.parent = null;
+  },
+  getDefault: function() {
+    if(this.schema["default"]) return this.schema["default"];
+    if(this.schema["enum"]) return this.schema["enum"][0];
+    
+    var type = this.schema.type || this.schema.oneOf;
+    if(type && Array.isArray(type)) type = type[0];
+    if(type && typeof type === "object") type = type.type;
+    if(type && Array.isArray(type)) type = type[0];
+    
+    if(typeof type === "string") {
+      if(type === "number") return 0.0;
+      if(type === "boolean") return false;
+      if(type === "integer") return 0;
+      if(type === "string") return "";
+      if(type === "object") return {};
+      if(type === "array") return [];
+    }
+    
+    return null;
+  },
+  getTitle: function() {
+    return this.schema.title || this.key;
+  },
+  enable: function() {
+    this.disabled = false;
+  },
+  disable: function() {
+    this.disabled = true;
+  },
+  isEnabled: function() {
+    return !this.disabled;
+  },
+  isRequired: function() {
+    if(typeof this.schema.required === "boolean") return this.schema.required;
+    else if(this.parent && this.parent.schema && Array.isArray(this.parent.schema.required)) return this.parent.schema.required.indexOf(this.key) > -1;
+    else if(this.jsoneditor.options.required_by_default) return true;
+    else return false;
+  },  
+  getDisplayText: function(arr) {
+    var disp = [];
+    var used = {};
+    
+    // Determine how many times each attribute name is used.
+    // This helps us pick the most distinct display text for the schemas.
+    $each(arr,function(i,el) {
+      if(el.title) {
+        used[el.title] = used[el.title] || 0;
+        used[el.title]++;
+      }
+      if(el.description) {
+        used[el.description] = used[el.description] || 0;
+        used[el.description]++;
+      }
+      if(el.format) {
+        used[el.format] = used[el.format] || 0;
+        used[el.format]++;
+      }
+      if(el.type) {
+        used[el.type] = used[el.type] || 0;
+        used[el.type]++;
+      }
+    });
+    
+    // Determine display text for each element of the array
+    $each(arr,function(i,el)  {
+      var name;
+      
+      // If it's a simple string
+      if(typeof el === "string") name = el;
+      // Object
+      else if(el.title && used[el.title]<=1) name = el.title;
+      else if(el.format && used[el.format]<=1) name = el.format;
+      else if(el.type && used[el.type]<=1) name = el.type;
+      else if(el.description && used[el.description]<=1) name = el.descripton;
+      else if(el.title) name = el.title;
+      else if(el.format) name = el.format;
+      else if(el.type) name = el.type;
+      else if(el.description) name = el.description;
+      else if(JSON.stringify(el).length < 50) name = JSON.stringify(el);
+      else name = "type";
+      
+      disp.push(name);
+    });
+    
+    // Replace identical display text with "text 1", "text 2", etc.
+    var inc = {};
+    $each(disp,function(i,name) {
+      inc[name] = inc[name] || 0;
+      inc[name]++;
+      
+      if(used[name] > 1) disp[i] = name + " " + inc[name];
+    });
+    
+    return disp;
+  },
+  getOption: function(key) {
+    try {
+      throw "getOption is deprecated";
+    }
+    catch(e) {
+      window.console.error(e);
+    }
+    
+    return this.options[key];
+  },
+  showValidationErrors: function(errors) {
+
+  }
+});
+
+JSONEditor.defaults.editors["null"] = JSONEditor.AbstractEditor.extend({
+  getValue: function() {
+    return null;
+  },
+  setValue: function() {
+    this.onChange();
+  },
+  getNumColumns: function() {
+    return 2;
+  }
+});
+
+JSONEditor.defaults.editors.string = JSONEditor.AbstractEditor.extend({
+  register: function() {
+    this._super();
+    if(!this.input) return;
+    this.input.setAttribute('name',this.formname);
+  },
+  unregister: function() {
+    this._super();
+    if(!this.input) return;
+    this.input.removeAttribute('name');
+  },
+  setValue: function(value,initial,from_template) {
+    var self = this;
+    
+    if(this.template && !from_template) {
+      return;
+    }
+    
+    if(value === null || typeof value === 'undefined') value = "";
+    else if(typeof value === "object") value = JSON.stringify(value);
+    else if(typeof value !== "string") value = ""+value;
+    
+    if(value === this.serialized) return;
+
+    // Sanitize value before setting it
+    var sanitized = this.sanitize(value);
+
+    if(this.input.value === sanitized) {
+      return;
+    }
+
+    this.input.value = sanitized;
+    
+    // If using SCEditor, update the WYSIWYG
+    if(this.sceditor_instance) {
+      this.sceditor_instance.val(sanitized);
+    }
+    else if(this.epiceditor) {
+      this.epiceditor.importFile(null,sanitized);
+    }
+    else if(this.ace_editor) {
+      this.ace_editor.setValue(sanitized);
+    }
+    
+    var changed = from_template || this.getValue() !== value;
+    
+    this.refreshValue();
+    
+    if(initial) this.is_dirty = false;
+    else if(this.jsoneditor.options.show_errors === "change") this.is_dirty = true;
+    
+    if(this.adjust_height) this.adjust_height(this.input);
+
+    // Bubble this setValue to parents if the value changed
+    this.onChange(changed);
+  },
+  getNumColumns: function() {
+    var min = Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);
+    var num;
+    
+    if(this.input_type === 'textarea') num = 6;
+    else if(['text','email'].indexOf(this.input_type) >= 0) num = 4;
+    else num = 2;
+    
+    return Math.min(12,Math.max(min,num));
+  },
+  build: function() {
+    var self = this, i;
+    if(!this.options.compact) this.header = this.label = this.theme.getFormInputLabel(this.getTitle());
+    if(this.schema.description) this.description = this.theme.getFormInputDescription(this.schema.description);
+
+    this.format = this.schema.format;
+    if(!this.format && this.schema.media && this.schema.media.type) {
+      this.format = this.schema.media.type.replace(/(^(application|text)\/(x-)?(script\.)?)|(-source$)/g,'');
+    }
+    if(!this.format && this.options.default_format) {
+      this.format = this.options.default_format;
+    }
+    if(this.options.format) {
+      this.format = this.options.format;
+    }
+
+    // Specific format
+    if(this.format) {
+      // Text Area
+      if(this.format === 'textarea') {
+        this.input_type = 'textarea';
+        this.input = this.theme.getTextareaInput();
+      }
+      // Range Input
+      else if(this.format === 'range') {
+        this.input_type = 'range';
+        var min = this.schema.minimum || 0;
+        var max = this.schema.maximum || Math.max(100,min+1);
+        var step = 1;
+        if(this.schema.multipleOf) {
+          if(min%this.schema.multipleOf) min = Math.ceil(min/this.schema.multipleOf)*this.schema.multipleOf;
+          if(max%this.schema.multipleOf) max = Math.floor(max/this.schema.multipleOf)*this.schema.multipleOf;
+          step = this.schema.multipleOf;
+        }
+
+        this.input = this.theme.getRangeInput(min,max,step);
+      }
+      // Source Code
+      else if([
+          'actionscript',
+          'batchfile',
+          'bbcode',
+          'c',
+          'c++',
+          'cpp',
+          'coffee',
+          'csharp',
+          'css',
+          'dart',
+          'django',
+          'ejs',
+          'erlang',
+          'golang',
+          'handlebars',
+          'haskell',
+          'haxe',
+          'html',
+          'ini',
+          'jade',
+          'java',
+          'javascript',
+          'json',
+          'less',
+          'lisp',
+          'lua',
+          'makefile',
+          'markdown',
+          'matlab',
+          'mysql',
+          'objectivec',
+          'pascal',
+          'perl',
+          'pgsql',
+          'php',
+          'python',
+          'r',
+          'ruby',
+          'sass',
+          'scala',
+          'scss',
+          'smarty',
+          'sql',
+          'stylus',
+          'svg',
+          'twig',
+          'vbscript',
+          'xml',
+          'yaml'
+        ].indexOf(this.format) >= 0
+      ) {
+        this.input_type = this.format;
+        this.source_code = true;
+        
+        this.input = this.theme.getTextareaInput();
+      }
+      // HTML5 Input type
+      else {
+        this.input_type = this.format;
+        this.input = this.theme.getFormInputField(this.input_type);
+      }
+    }
+    // Normal text input
+    else {
+      this.input_type = 'text';
+      this.input = this.theme.getFormInputField(this.input_type);
+    }
+    
+    // minLength, maxLength, and pattern
+    if(typeof this.schema.maxLength !== "undefined") this.input.setAttribute('maxlength',this.schema.maxLength);
+    if(typeof this.schema.pattern !== "undefined") this.input.setAttribute('pattern',this.schema.pattern);
+    else if(typeof this.schema.minLength !== "undefined") this.input.setAttribute('pattern','.{'+this.schema.minLength+',}');
+
+    if(this.options.compact) {
+      this.container.className += ' compact';
+    }
+    else {
+      if(this.options.input_width) this.input.style.width = this.options.input_width;
+    }
+
+    if(this.schema.readOnly || this.schema.readonly || this.schema.template) {
+      this.always_disabled = true;
+      this.input.disabled = true;
+    }
+
+    this.input
+      .addEventListener('change',function(e) {        
+        e.preventDefault();
+        e.stopPropagation();
+        
+        // Don't allow changing if this field is a template
+        if(self.schema.template) {
+          this.value = self.value;
+          return;
+        }
+
+        var val = this.value;
+        
+        // sanitize value
+        var sanitized = self.sanitize(val);
+        if(val !== sanitized) {
+          this.value = sanitized;
+        }
+        
+        self.is_dirty = true;
+
+        self.refreshValue();
+        self.onChange(true);
+      });
+      
+    if(this.options.input_height) this.input.style.height = this.options.input_height;
+    if(this.options.expand_height) {
+      this.adjust_height = function(el) {
+        if(!el) return;
+        var i, ch=el.offsetHeight;
+        // Input too short
+        if(el.offsetHeight < el.scrollHeight) {
+          i=0;
+          while(el.offsetHeight < el.scrollHeight+3) {
+            if(i>100) break;
+            i++;
+            ch++;
+            el.style.height = ch+'px';
+          }
+        }
+        else {
+          i=0;
+          while(el.offsetHeight >= el.scrollHeight+3) {
+            if(i>100) break;
+            i++;
+            ch--;
+            el.style.height = ch+'px';
+          }
+          el.style.height = (ch+1)+'px';
+        }
+      };
+      
+      this.input.addEventListener('keyup',function(e) {
+        self.adjust_height(this);
+      });
+      this.input.addEventListener('change',function(e) {
+        self.adjust_height(this);
+      });
+      this.adjust_height();
+    }
+
+    if(this.format) this.input.setAttribute('data-schemaformat',this.format);
+
+    this.control = this.theme.getFormControl(this.label, this.input, this.description);
+    this.container.appendChild(this.control);
+
+    // Any special formatting that needs to happen after the input is added to the dom
+    window.requestAnimationFrame(function() {
+      // Skip in case the input is only a temporary editor,
+      // otherwise, in the case of an ace_editor creation,
+      // it will generate an error trying to append it to the missing parentNode
+      if(self.input.parentNode) self.afterInputReady();
+      if(self.adjust_height) self.adjust_height(self.input);
+    });
+
+    // Compile and store the template
+    if(this.schema.template) {
+      this.template = this.jsoneditor.compileTemplate(this.schema.template, this.template_engine);
+      this.refreshValue();
+    }
+    else {
+      this.refreshValue();
+    }
+  },
+  enable: function() {
+    if(!this.always_disabled) {
+      this.input.disabled = false;
+      // TODO: WYSIWYG and Markdown editors
+    }
+    this._super();
+  },
+  disable: function() {
+    this.input.disabled = true;
+    // TODO: WYSIWYG and Markdown editors
+    this._super();
+  },
+  afterInputReady: function() {
+    var self = this, options;
+    
+    // Code editor
+    if(this.source_code) {      
+      // WYSIWYG html and bbcode editor
+      if(this.options.wysiwyg && 
+        ['html','bbcode'].indexOf(this.input_type) >= 0 && 
+        window.jQuery && window.jQuery.fn && window.jQuery.fn.sceditor
+      ) {
+        options = $extend({},{
+          plugins: self.input_type==='html'? 'xhtml' : 'bbcode',
+          emoticonsEnabled: false,
+          width: '100%',
+          height: 300
+        },JSONEditor.plugins.sceditor,self.options.sceditor_options||{});
+        
+        window.jQuery(self.input).sceditor(options);
+        
+        self.sceditor_instance = window.jQuery(self.input).sceditor('instance');
+        
+        self.sceditor_instance.blur(function() {
+          // Get editor's value
+          var val = window.jQuery("<div>"+self.sceditor_instance.val()+"</div>");
+          // Remove sceditor spans/divs
+          window.jQuery('#sceditor-start-marker,#sceditor-end-marker,.sceditor-nlf',val).remove();
+          // Set the value and update
+          self.input.value = val.html();
+          self.value = self.input.value;
+          self.is_dirty = true;
+          self.onChange(true);
+        });
+      }
+      // EpicEditor for markdown (if it's loaded)
+      else if (this.input_type === 'markdown' && window.EpicEditor) {
+        this.epiceditor_container = document.createElement('div');
+        this.input.parentNode.insertBefore(this.epiceditor_container,this.input);
+        this.input.style.display = 'none';
+        
+        options = $extend({},JSONEditor.plugins.epiceditor,{
+          container: this.epiceditor_container,
+          clientSideStorage: false
+        });
+        
+        this.epiceditor = new window.EpicEditor(options).load();
+        
+        this.epiceditor.importFile(null,this.getValue());
+      
+        this.epiceditor.on('update',function() {
+          var val = self.epiceditor.exportFile();
+          self.input.value = val;
+          self.value = val;
+          self.is_dirty = true;
+          self.onChange(true);
+        });
+      }
+      // ACE editor for everything else
+      else if(window.ace) {
+        var mode = this.input_type;
+        // aliases for c/cpp
+        if(mode === 'cpp' || mode === 'c++' || mode === 'c') {
+          mode = 'c_cpp';
+        }
+        
+        this.ace_container = document.createElement('div');
+        this.ace_container.style.width = '100%';
+        this.ace_container.style.position = 'relative';
+        this.ace_container.style.height = '400px';
+        this.input.parentNode.insertBefore(this.ace_container,this.input);
+        this.input.style.display = 'none';
+        this.ace_editor = window.ace.edit(this.ace_container);
+        
+        this.ace_editor.setValue(this.getValue());
+        
+        // The theme
+        if(JSONEditor.plugins.ace.theme) this.ace_editor.setTheme('ace/theme/'+JSONEditor.plugins.ace.theme);
+        // The mode
+        mode = window.ace.require("ace/mode/"+mode);
+        if(mode) this.ace_editor.getSession().setMode(new mode.Mode());
+        
+        // Listen for changes
+        this.ace_editor.on('change',function() {
+          var val = self.ace_editor.getValue();
+          self.input.value = val;
+          self.refreshValue();
+          self.is_dirty = true;
+          self.onChange(true);
+        });
+      }
+    }
+    
+    self.theme.afterInputReady(self.input);
+  },
+  refreshValue: function() {
+    this.value = this.input.value;
+    if(typeof this.value !== "string") this.value = '';
+    this.serialized = this.value;
+  },
+  destroy: function() {
+    // If using SCEditor, destroy the editor instance
+    if(this.sceditor_instance) {
+      this.sceditor_instance.destroy();
+    }
+    else if(this.epiceditor) {
+      this.epiceditor.unload();
+    }
+    else if(this.ace_editor) {
+      this.ace_editor.destroy();
+    }
+    
+    
+    this.template = null;
+    if(this.input && this.input.parentNode) this.input.parentNode.removeChild(this.input);
+    if(this.label && this.label.parentNode) this.label.parentNode.removeChild(this.label);
+    if(this.description && this.description.parentNode) this.description.parentNode.removeChild(this.description);
+
+    this._super();
+  },
+  /**
+   * This is overridden in derivative editors
+   */
+  sanitize: function(value) {
+    return value;
+  },
+  /**
+   * Re-calculates the value if needed
+   */
+  onWatchedFieldChange: function() {    
+    var self = this, vars, j;
+    
+    // If this editor needs to be rendered by a macro template
+    if(this.template) {
+      vars = this.getWatchedFieldValues();
+      this.setValue(this.template(vars),false,true);
+    }
+    
+    this._super();
+  },
+  showValidationErrors: function(errors) {
+    var self = this;
+    
+    if(this.jsoneditor.options.show_errors === "always") {}
+    else if(!this.is_dirty && this.previous_error_setting===this.jsoneditor.options.show_errors) return;
+    
+    this.previous_error_setting = this.jsoneditor.options.show_errors;
+
+    var messages = [];
+    $each(errors,function(i,error) {
+      if(error.path === self.path) {
+        messages.push(error.message);
+      }
+    });
+
+    if(messages.length) {
+      this.theme.addInputError(this.input, messages.join('. ')+'.');
+    }
+    else {
+      this.theme.removeInputError(this.input);
+    }
+  }
+});
+
+JSONEditor.defaults.editors.number = JSONEditor.defaults.editors.string.extend({
+  sanitize: function(value) {
+    return (value+"").replace(/[^0-9\.\-eE]/g,'');
+  },
+  getNumColumns: function() {
+    return 2;
+  },
+  getValue: function() {
+    return this.value*1;
+  }
+});
+
+JSONEditor.defaults.editors.integer = JSONEditor.defaults.editors.number.extend({
+  sanitize: function(value) {
+    value = value + "";
+    return value.replace(/[^0-9\-]/g,'');
+  },
+  getNumColumns: function() {
+    return 2;
+  }
+});
+
+JSONEditor.defaults.editors.object = JSONEditor.AbstractEditor.extend({
+  getDefault: function() {
+    return $extend({},this.schema["default"] || {});
+  },
+  getChildEditors: function() {
+    return this.editors;
+  },
+  register: function() {
+    this._super();
+    if(this.editors) {
+      for(var i in this.editors) {
+        if(!this.editors.hasOwnProperty(i)) continue;
+        this.editors[i].register();
+      }
+    }
+  },
+  unregister: function() {
+    this._super();
+    if(this.editors) {
+      for(var i in this.editors) {
+        if(!this.editors.hasOwnProperty(i)) continue;
+        this.editors[i].unregister();
+      }
+    }
+  },
+  getNumColumns: function() {
+    return Math.max(Math.min(12,this.maxwidth),3);
+  },
+  enable: function() {
+    if(this.editjson_button) this.editjson_button.disabled = false;
+    if(this.addproperty_button) this.addproperty_button.disabled = false;
+    
+    this._super();
+    if(this.editors) {
+      for(var i in this.editors) {
+        if(!this.editors.hasOwnProperty(i)) continue;
+        this.editors[i].enable();
+      }
+    }
+  },
+  disable: function() {
+    if(this.editjson_button) this.editjson_button.disabled = true;
+    if(this.addproperty_button) this.addproperty_button.disabled = true;
+    this.hideEditJSON();
+    
+    this._super();
+    if(this.editors) {
+      for(var i in this.editors) {
+        if(!this.editors.hasOwnProperty(i)) continue;
+        this.editors[i].disable();
+      }
+    }
+  },
+  layoutEditors: function() {
+    var self = this, i, j;
+    
+    if(!this.row_container) return;
+
+    // Sort editors by propertyOrder
+    this.property_order = Object.keys(this.editors);
+    this.property_order = this.property_order.sort(function(a,b) {
+      var ordera = self.editors[a].schema.propertyOrder;
+      var orderb = self.editors[b].schema.propertyOrder;
+      if(typeof ordera !== "number") ordera = 1000;
+      if(typeof orderb !== "number") orderb = 1000;
+
+      return ordera - orderb;
+    });
+    
+    var container;
+    
+    if(this.format === 'grid') {
+      var rows = [];
+      $each(this.property_order, function(j,key) {
+        var editor = self.editors[key];
+        if(editor.property_removed) return;
+        var found = false;
+        var width = editor.options.hidden? 0 : (editor.options.grid_columns || editor.getNumColumns());
+        var height = editor.options.hidden? 0 : editor.container.offsetHeight;
+        // See if the editor will fit in any of the existing rows first
+        for(var i=0; i<rows.length; i++) {
+          // If the editor will fit in the row horizontally
+          if(rows[i].width + width <= 12) {
+            // If the editor is close to the other elements in height
+            // i.e. Don't put a really tall editor in an otherwise short row or vice versa
+            if(!height || (rows[i].minh*0.5 < height && rows[i].maxh*2 > height)) {
+              found = i;
+            }
+          }
+        }
+        
+        // If there isn't a spot in any of the existing rows, start a new row
+        if(found === false) {
+          rows.push({
+            width: 0,
+            minh: 999999,
+            maxh: 0,
+            editors: []
+          });
+          found = rows.length-1;
+        }
+        
+        rows[found].editors.push({
+          key: key,
+          //editor: editor,
+          width: width,
+          height: height
+        });
+        rows[found].width += width;
+        rows[found].minh = Math.min(rows[found].minh,height);
+        rows[found].maxh = Math.max(rows[found].maxh,height);
+      });
+      
+      // Make almost full rows width 12
+      // Do this by increasing all editors' sizes proprotionately
+      // Any left over space goes to the biggest editor
+      // Don't touch rows with a width of 6 or less
+      for(i=0; i<rows.length; i++) {
+        if(rows[i].width < 12) {
+          var biggest = false;
+          var new_width = 0;
+          for(j=0; j<rows[i].editors.length; j++) {
+            if(biggest === false) biggest = j;
+            else if(rows[i].editors[j].width > rows[i].editors[biggest].width) biggest = j;
+            rows[i].editors[j].width *= 12/rows[i].width;
+            rows[i].editors[j].width = Math.floor(rows[i].editors[j].width);
+            new_width += rows[i].editors[j].width;
+          }
+          if(new_width < 12) rows[i].editors[biggest].width += 12-new_width;
+          rows[i].width = 12;
+        }
+      }
+      
+      // layout hasn't changed
+      if(this.layout === JSON.stringify(rows)) return false;
+      this.layout = JSON.stringify(rows);
+      
+      // Layout the form
+      container = document.createElement('div');
+      for(i=0; i<rows.length; i++) {
+        var row = this.theme.getGridRow();
+        container.appendChild(row);
+        for(j=0; j<rows[i].editors.length; j++) {
+          var key = rows[i].editors[j].key;
+          var editor = this.editors[key];
+          
+          if(editor.options.hidden) editor.container.style.display = 'none';
+          else this.theme.setGridColumnSize(editor.container,rows[i].editors[j].width);
+          row.appendChild(editor.container);
+        }
+      }
+    }
+    // Normal layout
+    else {
+      container = document.createElement('div');
+      $each(this.property_order, function(i,key) {
+        var editor = self.editors[key];
+        if(editor.property_removed) return;
+        var row = self.theme.getGridRow();
+        container.appendChild(row);
+        
+        if(editor.options.hidden) editor.container.style.display = 'none';
+        else self.theme.setGridColumnSize(editor.container,12);
+        row.appendChild(editor.container);
+      });
+    }
+    this.row_container.innerHTML = '';
+    this.row_container.appendChild(container);
+  },
+  getPropertySchema: function(key) {
+    // Schema declared directly in properties
+    var schema = this.schema.properties[key] || {};
+    schema = $extend({},schema);
+    var matched = this.schema.properties[key]? true : false;
+    
+    // Any matching patternProperties should be merged in
+    if(this.schema.patternProperties) {
+      for(var i in this.schema.patternProperties) {
+        if(!this.schema.patternProperties.hasOwnProperty(i)) continue;
+        var regex = new RegExp(i);
+        if(regex.test(key)) {
+          schema.allOf = schema.allOf || [];
+          schema.allOf.push(this.schema.patternProperties[i]);
+          matched = true;
+        }
+      }
+    }
+    
+    // Hasn't matched other rules, use additionalProperties schema
+    if(!matched && this.schema.additionalProperties && typeof this.schema.additionalProperties === "object") {
+      schema = $extend({},this.schema.additionalProperties);
+    }
+    
+    return schema;
+  },
+  preBuild: function() {
+    this._super();
+
+    this.editors = {};
+    this.cached_editors = {};
+    var self = this;
+
+    this.format = this.options.layout || this.options.object_layout || this.schema.format || this.jsoneditor.options.object_layout || 'normal';
+
+    this.schema.properties = this.schema.properties || {};
+
+    this.minwidth = 0;
+    this.maxwidth = 0;
+
+    // If the object should be rendered as a table row
+    if(this.options.table_row) {
+      $each(this.schema.properties, function(key,schema) {
+        var editor = self.jsoneditor.getEditorClass(schema);
+        self.editors[key] = self.jsoneditor.createEditor(editor,{
+          jsoneditor: self.jsoneditor,
+          schema: schema,
+          path: self.path+'.'+key,
+          parent: self,
+          compact: true,
+          required: true
+        });
+        self.editors[key].preBuild();
+
+        var width = self.editors[key].options.hidden? 0 : (self.editors[key].options.grid_columns || self.editors[key].getNumColumns());
+
+        self.minwidth += width;
+        self.maxwidth += width;
+      });
+      this.no_link_holder = true;
+    }
+    // If the object should be rendered as a table
+    else if(this.options.table) {
+      // TODO: table display format
+      throw "Not supported yet";
+    }
+    // If the object should be rendered as a div
+    else {
+      this.defaultProperties = this.schema.defaultProperties || Object.keys(this.schema.properties);
+
+      // Increase the grid width to account for padding
+      self.maxwidth += 1;
+
+      $each(this.defaultProperties, function(i,key) {
+        self.addObjectProperty(key, true);
+
+        if(self.editors[key]) {
+          self.minwidth = Math.max(self.minwidth,(self.editors[key].options.grid_columns || self.editors[key].getNumColumns()));
+          self.maxwidth += (self.editors[key].options.grid_columns || self.editors[key].getNumColumns());
+        }
+      });
+    }
+    
+    // Sort editors by propertyOrder
+    this.property_order = Object.keys(this.editors);
+    this.property_order = this.property_order.sort(function(a,b) {
+      var ordera = self.editors[a].schema.propertyOrder;
+      var orderb = self.editors[b].schema.propertyOrder;
+      if(typeof ordera !== "number") ordera = 1000;
+      if(typeof orderb !== "number") orderb = 1000;
+
+      return ordera - orderb;
+    });
+  },
+  build: function() {
+    var self = this;
+
+    // If the object should be rendered as a table row
+    if(this.options.table_row) {
+      this.editor_holder = this.container;
+      $each(this.editors, function(key,editor) {
+        var holder = self.theme.getTableCell();
+        self.editor_holder.appendChild(holder);
+
+        editor.setContainer(holder);
+        editor.build();
+        editor.postBuild();
+
+        if(self.editors[key].options.hidden) {
+          holder.style.display = 'none';
+        }
+        if(self.editors[key].options.input_width) {
+          holder.style.width = self.editors[key].options.input_width;
+        }
+      });
+    }
+    // If the object should be rendered as a table
+    else if(this.options.table) {
+      // TODO: table display format
+      throw "Not supported yet";
+    }
+    // If the object should be rendered as a div
+    else {
+      this.header = document.createElement('span');
+      this.header.textContent = this.getTitle();
+      this.title = this.theme.getHeader(this.header);
+      this.container.appendChild(this.title);
+      this.container.style.position = 'relative';
+      
+      // Edit JSON modal
+      this.editjson_holder = this.theme.getModal();
+      this.editjson_textarea = this.theme.getTextareaInput();
+      this.editjson_textarea.style.height = '170px';
+      this.editjson_textarea.style.width = '300px';
+      this.editjson_textarea.style.display = 'block';
+      this.editjson_save = this.getButton('Save','save','Save');
+      this.editjson_save.addEventListener('click',function(e) {
+        e.preventDefault();
+        e.stopPropagation();
+        self.saveJSON();
+      });
+      this.editjson_cancel = this.getButton('Cancel','cancel','Cancel');
+      this.editjson_cancel.addEventListener('click',function(e) {
+        e.preventDefault();
+        e.stopPropagation();
+        self.hideEditJSON();
+      });
+      this.editjson_holder.appendChild(this.editjson_textarea);
+      this.editjson_holder.appendChild(this.editjson_save);
+      this.editjson_holder.appendChild(this.editjson_cancel);
+      
+      // Manage Properties modal
+      this.addproperty_holder = this.theme.getModal();
+      this.addproperty_list = document.createElement('div');
+      this.addproperty_list.style.width = '295px';
+      this.addproperty_list.style.maxHeight = '160px';
+      this.addproperty_list.style.padding = '5px 0';
+      this.addproperty_list.style.overflowY = 'auto';
+      this.addproperty_list.style.overflowX = 'hidden';
+      this.addproperty_list.style.paddingLeft = '5px';
+      this.addproperty_list.setAttribute('class', 'property-selector');
+      this.addproperty_add = this.getButton('add','add','add');
+      this.addproperty_input = this.theme.getFormInputField('text');
+      this.addproperty_input.setAttribute('placeholder','Property name...');
+      this.addproperty_input.style.width = '220px';
+      this.addproperty_input.style.marginBottom = '0';
+      this.addproperty_input.style.display = 'inline-block';
+      this.addproperty_add.addEventListener('click',function(e) {
+        e.preventDefault();
+        e.stopPropagation();
+        if(self.addproperty_input.value) {
+          if(self.editors[self.addproperty_input.value]) {
+            window.alert('there is already a property with that name');
+            return;
+          }
+          
+          self.addObjectProperty(self.addproperty_input.value);
+          if(self.editors[self.addproperty_input.value]) {
+            self.editors[self.addproperty_input.value].disable();
+          }
+          self.onChange(true);
+        }
+      });
+      this.addproperty_holder.appendChild(this.addproperty_list);
+      this.addproperty_holder.appendChild(this.addproperty_input);
+      this.addproperty_holder.appendChild(this.addproperty_add);
+      var spacer = document.createElement('div');
+      spacer.style.clear = 'both';
+      this.addproperty_holder.appendChild(spacer);
+      
+      
+      // Description
+      if(this.schema.description) {
+        this.description = this.theme.getDescription(this.schema.description);
+        this.container.appendChild(this.description);
+      }
+      
+      // Validation error placeholder area
+      this.error_holder = document.createElement('div');
+      this.container.appendChild(this.error_holder);
+      
+      // Container for child editor area
+      this.editor_holder = this.theme.getIndentedPanel();
+      this.editor_holder.style.paddingBottom = '0';
+      this.container.appendChild(this.editor_holder);
+
+      // Container for rows of child editors
+      this.row_container = this.theme.getGridContainer();
+      this.editor_holder.appendChild(this.row_container);
+
+      $each(this.editors, function(key,editor) {
+        var holder = self.theme.getGridColumn();
+        self.row_container.appendChild(holder);
+
+        editor.setContainer(holder);
+        editor.build();
+        editor.postBuild();
+      });
+
+      // Control buttons
+      this.title_controls = this.theme.getHeaderButtonHolder();
+      this.editjson_controls = this.theme.getHeaderButtonHolder();
+      this.addproperty_controls = this.theme.getHeaderButtonHolder();
+      this.title.appendChild(this.title_controls);
+      this.title.appendChild(this.editjson_controls);
+      this.title.appendChild(this.addproperty_controls);
+
+      // Show/Hide button
+      this.collapsed = false;
+      this.toggle_button = this.getButton('','collapse','Collapse');
+      this.title_controls.appendChild(this.toggle_button);
+      this.toggle_button.addEventListener('click',function(e) {
+        e.preventDefault();
+        e.stopPropagation();
+        if(self.collapsed) {
+          self.editor_holder.style.display = '';
+          self.collapsed = false;
+          self.setButtonText(self.toggle_button,'','collapse','Collapse');
+        }
+        else {
+          self.editor_holder.style.display = 'none';
+          self.collapsed = true;
+          self.setButtonText(self.toggle_button,'','expand','Expand');
+        }
+      });
+
+      // If it should start collapsed
+      if(this.options.collapsed) {
+        $trigger(this.toggle_button,'click');
+      }
+      
+      // Collapse button disabled
+      if(this.schema.options && typeof this.schema.options.disable_collapse !== "undefined") {
+        if(this.schema.options.disable_collapse) this.toggle_button.style.display = 'none';
+      }
+      else if(this.jsoneditor.options.disable_collapse) {
+        this.toggle_button.style.display = 'none';
+      }
+      
+      // Edit JSON Button
+      this.editjson_button = this.getButton('JSON','edit','Edit JSON');
+      this.editjson_button.addEventListener('click',function(e) {
+        e.preventDefault();
+        e.stopPropagation();
+        self.toggleEditJSON();
+      });
+      this.editjson_controls.appendChild(this.editjson_button);
+      this.editjson_controls.appendChild(this.editjson_holder);
+      
+      // Edit JSON Buttton disabled
+      if(this.schema.options && typeof this.schema.options.disable_edit_json !== "undefined") {
+        if(this.schema.options.disable_edit_json) this.editjson_button.style.display = 'none';
+      }
+      else if(this.jsoneditor.options.disable_edit_json) {
+        this.editjson_button.style.display = 'none';
+      }
+      
+      // Object Properties Button
+      this.addproperty_button = this.getButton('Properties','edit','Object Properties');
+      this.addproperty_button.addEventListener('click',function(e) {
+        e.preventDefault();
+        e.stopPropagation();
+        self.toggleAddProperty();
+      });
+      this.addproperty_controls.appendChild(this.addproperty_button);
+      this.addproperty_controls.appendChild(this.addproperty_holder);
+      this.refreshAddProperties();
+    }
+    
+    // Fix table cell ordering
+    if(this.options.table_row) {
+      this.editor_holder = this.container;
+      $each(this.property_order,function(i,key) {
+        self.editor_holder.appendChild(self.editors[key].container);
+      });
+    }
+    // Layout object editors in grid if needed
+    else {
+      // Initial layout
+      this.layoutEditors();
+      // Do it again now that we know the approximate heights of elements
+      this.layoutEditors();
+    }
+  },
+  showEditJSON: function() {
+    if(!this.editjson_holder) return;
+    this.hideAddProperty();
+    
+    // Position the form directly beneath the button
+    // TODO: edge detection
+    this.editjson_holder.style.left = this.editjson_button.offsetLeft+"px";
+    this.editjson_holder.style.top = this.editjson_button.offsetTop + this.editjson_button.offsetHeight+"px";
+    
+    // Start the textarea with the current value
+    this.editjson_textarea.value = JSON.stringify(this.getValue(),null,2);
+    
+    // Disable the rest of the form while editing JSON
+    this.disable();
+    
+    this.editjson_holder.style.display = '';
+    this.editjson_button.disabled = false;
+    this.editing_json = true;
+  },
+  hideEditJSON: function() {
+    if(!this.editjson_holder) return;
+    if(!this.editing_json) return;
+    
+    this.editjson_holder.style.display = 'none';
+    this.enable();
+    this.editing_json = false;
+  },
+  saveJSON: function() {
+    if(!this.editjson_holder) return;
+    
+    try {
+      var json = JSON.parse(this.editjson_textarea.value);
+      this.setValue(json);
+      this.hideEditJSON();
+    }
+    catch(e) {
+      window.alert('invalid JSON');
+      throw e;
+    }
+  },
+  toggleEditJSON: function() {
+    if(this.editing_json) this.hideEditJSON();
+    else this.showEditJSON();
+  },
+  insertPropertyControlUsingPropertyOrder: function (property, control, container) {
+    var propertyOrder;
+    if (this.schema.properties[property])
+      propertyOrder = this.schema.properties[property].propertyOrder;
+    if (typeof propertyOrder !== "number") propertyOrder = 1000;
+    control.propertyOrder = propertyOrder;
+
+    for (var i = 0; i < container.childNodes.length; i++) {
+      var child = container.childNodes[i];
+      if (control.propertyOrder < child.propertyOrder) {
+        this.addproper

<TRUNCATED>

[06/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/lib/jquery.ba-bbq.min.js
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/lib/jquery.ba-bbq.min.js b/ambari-web/api-docs/lib/jquery.ba-bbq.min.js
new file mode 100644
index 0000000..bcbf248
--- /dev/null
+++ b/ambari-web/api-docs/lib/jquery.ba-bbq.min.js
@@ -0,0 +1,18 @@
+/*
+ * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010
+ * http://benalman.com/projects/jquery-bbq-plugin/
+ * 
+ * Copyright (c) 2010 "Cowboy" Ben Alman
+ * Dual licensed under the MIT and GPL licenses.
+ * http://benalman.com/about/license/
+ */
+(function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.no
 Escape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function(){var L=$(this)
 ,J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return G}else{H=F.handler;F.handler=G}}})})(jQuery,this);
+/*
+ * jQuery hashchange event - v1.2 - 2/11/2010
+ * http://benalman.com/projects/jquery-hashchange-plugin/
+ * 
+ * Copyright (c) 2010 "Cowboy" Ben Alman
+ * Dual licensed under the MIT and GPL licenses.
+ * http://benalman.com/about/license/
+ */
+(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/lib/jquery.slideto.min.js
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/lib/jquery.slideto.min.js b/ambari-web/api-docs/lib/jquery.slideto.min.js
new file mode 100644
index 0000000..ba32cff
--- /dev/null
+++ b/ambari-web/api-docs/lib/jquery.slideto.min.js
@@ -0,0 +1 @@
+(function(b){b.fn.slideto=function(a){a=b.extend({slide_duration:"slow",highlight_duration:3E3,highlight:true,highlight_color:"#FFFF99"},a);return this.each(function(){obj=b(this);b("body").animate({scrollTop:obj.offset().top},a.slide_duration,function(){a.highlight&&b.ui.version&&obj.effect("highlight",{color:a.highlight_color},a.highlight_duration)})})}})(jQuery);

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/lib/jquery.wiggle.min.js
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/lib/jquery.wiggle.min.js b/ambari-web/api-docs/lib/jquery.wiggle.min.js
new file mode 100644
index 0000000..2adb0d6
--- /dev/null
+++ b/ambari-web/api-docs/lib/jquery.wiggle.min.js
@@ -0,0 +1,8 @@
+/*
+jQuery Wiggle
+Author: WonderGroup, Jordan Thomas
+URL: http://labs.wondergroup.com/demos/mini-ui/index.html
+License: MIT (http://en.wikipedia.org/wiki/MIT_License)
+*/
+jQuery.fn.wiggle=function(o){var d={speed:50,wiggles:3,travel:5,callback:null};var o=jQuery.extend(d,o);return this.each(function(){var cache=this;var wrap=jQuery(this).wrap('<div class="wiggle-wrap"></div>').css("position","relative");var calls=0;for(i=1;i<=o.wiggles;i++){jQuery(this).animate({left:"-="+o.travel},o.speed).animate({left:"+="+o.travel*2},o.speed*2).animate({left:"-="+o.travel},o.speed,function(){calls++;if(jQuery(cache).parent().hasClass('wiggle-wrap')){jQuery(cache).parent().replaceWith(cache);}
+if(calls==o.wiggles&&jQuery.isFunction(o.callback)){o.callback();}});}});};
\ No newline at end of file


[43/49] ambari git commit: AMBARI-21026. Integrate BlueprintService with Swagger (Balazs Bence Sari via adoroszlai)

Posted by ad...@apache.org.
AMBARI-21026. Integrate BlueprintService with Swagger (Balazs Bence Sari via adoroszlai)


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

Branch: refs/heads/trunk
Commit: f678794617f6e221bd63b8abd9b1c54618680831
Parents: 9763993
Author: Balazs Bence Sari <bs...@hortonworks.com>
Authored: Thu May 18 11:42:38 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Thu May 18 11:42:38 2017 +0200

----------------------------------------------------------------------
 .../ambari/server/api/services/BaseService.java |   4 +-
 .../server/api/services/BlueprintService.java   | 105 +++++++++++++++++--
 .../server/controller/BlueprintSwagger.java     |  91 ++++++++++++++++
 3 files changed, 188 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f6787946/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
index 5f6474c..ce668ee 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
@@ -76,6 +76,9 @@ public abstract class BaseService {
   static final String QUERY_TO_DESCRIPTION = "The ending page resource (inclusive).  \"end\" is also accepted.";
   static final String QUERY_TO_TYPE = "integer";
   static final String QUERY_TO_VALUES = "range[1, infinity]";
+  static final String QUERY_PREDICATE = "{predicate}";
+  static final String QUERY_PREDICATE_DESCRIPTION = "The predicate to filter resources by. Omitting the predicate will " +
+      "match all resources.";
 
   static final String RESPONSE_CONTAINER_LIST = "List";
 
@@ -85,7 +88,6 @@ public abstract class BaseService {
   static final String PARAM_TYPE_QUERY = "query";
   static final String PARAM_TYPE_BODY = "body";
 
-
   static final String FIELDS_SEPARATOR = ", ";
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6787946/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java
index 8159ea4..b23752f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BlueprintService.java
@@ -28,11 +28,22 @@ 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.MediaType;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 
 import org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.controller.BlueprintSwagger;
 import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.http.HttpStatus;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 
 /**
  * Service responsible for handling REST requests for the /blueprints endpoint.
@@ -41,8 +52,10 @@ import org.apache.ambari.server.controller.spi.Resource;
  * immutable.
  */
 @Path("/blueprints/")
+@Api(value = "Blueprints", description = "Endpoint for blueprint specific operations")
 public class BlueprintService extends BaseService {
 
+  public static final String BLUEPRINT_REQUEST_TYPE = "org.apache.ambari.server.controller.BlueprintSwagger";
   /**
    * Handles: GET  /blueprints
    * Get all blueprints.
@@ -52,7 +65,27 @@ public class BlueprintService extends BaseService {
    * @return blueprint collection resource representation
    */
   @GET
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get all blueprints",
+      nickname = "BlueprintService#getBlueprints",
+      response = BlueprintSwagger.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION,
+          defaultValue = "Blueprints/blueprint_name",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION,
+          defaultValue = "Blueprints/blueprint_name.asc",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getBlueprints(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
     return handleRequest(headers, body, ui, Request.Type.GET, createBlueprintResource(null));
   }
@@ -68,11 +101,25 @@ public class BlueprintService extends BaseService {
    */
   @GET
   @Path("{blueprintName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get the details of a blueprint",
+      nickname = "BlueprintService#getBlueprint",
+      response = BlueprintSwagger.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION,
+          defaultValue = "Blueprints/*",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getBlueprint(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                             @PathParam("blueprintName") String blueprintName) {
-
-    return handleRequest(headers, body, ui, Request.Type.GET, createBlueprintResource(blueprintName));
+                             @ApiParam @PathParam("blueprintName") String blueprintName) {
+  return handleRequest(headers, body, ui, Request.Type.GET, createBlueprintResource(blueprintName));
   }
 
   /**
@@ -86,9 +133,25 @@ public class BlueprintService extends BaseService {
    */
   @POST
   @Path("{blueprintName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Creates a blueprint",
+      nickname = "BlueprintService#createBlueprint"
+  )
+  @ApiImplicitParams({
+      @ApiImplicitParam(dataType = BLUEPRINT_REQUEST_TYPE, paramType = PARAM_TYPE_BODY, allowMultiple = false)
+  })
+  @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+      @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_CONFLICT, message = MSG_RESOURCE_ALREADY_EXISTS),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response createBlueprint(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                                  @PathParam("blueprintName") String blueprintName) {
+                                  @ApiParam @PathParam("blueprintName") String blueprintName) {
 
     return handleRequest(headers, body, ui, Request.Type.POST, createBlueprintResource(blueprintName));
   }
@@ -104,10 +167,19 @@ public class BlueprintService extends BaseService {
    */
   @DELETE
   @Path("{blueprintName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Deletes a blueprint",
+      nickname = "BlueprintService#deleteBlueprint"
+  )
+  @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response deleteBlueprint(@Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("blueprintName") String blueprintName) {
-
+                                @ApiParam @PathParam("blueprintName") String blueprintName) {
     return handleRequest(headers, null, ui, Request.Type.DELETE, createBlueprintResource(blueprintName));
   }
 
@@ -120,7 +192,18 @@ public class BlueprintService extends BaseService {
    * @return information regarding the deleted blueprint
    */
   @DELETE
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Deletes multiple blueprints that match the predicate. Omitting the predicate will delete all " +
+      "blueprints.",
+      nickname = "BlueprintService#deleteBlueprints"
+  )
+  @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response deleteBlueprints(@Context HttpHeaders headers, @Context UriInfo ui) {
     return handleRequest(headers, null, ui, Request.Type.DELETE, createBlueprintResource(null));
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/f6787946/ambari-server/src/main/java/org/apache/ambari/server/controller/BlueprintSwagger.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/BlueprintSwagger.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/BlueprintSwagger.java
new file mode 100644
index 0000000..69bd192
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/BlueprintSwagger.java
@@ -0,0 +1,91 @@
+/**
+ * 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;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ambari.server.state.SecurityType;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Request / response schema for blueprint API Swagger documentation generation. The interface only serves documentation
+ * generation purposes, it is not meant to be implemented.
+ */
+public interface BlueprintSwagger extends ApiModel {
+
+  @ApiModelProperty(name = "Blueprints")
+  BlueprintInfo getBlueprintInfo();
+
+  @ApiModelProperty(name = "configurations")
+  List<Map<String, Object>> getConfigurations();
+
+  @ApiModelProperty(name = "host_groups")
+  List<HostGroupInfo> getHostGroups();
+
+  interface BlueprintInfo {
+    @ApiModelProperty(name = "blueprint_name")
+    String getBlueprintName();
+
+    @ApiModelProperty(name = "stack_name")
+    String getStackName();
+
+    @ApiModelProperty(name = "stack_version")
+    String getStackVersion();
+
+    @ApiModelProperty(name = "security")
+    SecurityInfo getSecurity();
+  }
+
+  interface SecurityInfo {
+    @ApiModelProperty(name = "security_type")
+    SecurityType getSecurityType();
+
+    @ApiModelProperty(name = "kerberos_descriptor")
+    Map<String, Object> getKerberosDescriptor();
+
+    @ApiModelProperty(name = "kerberos_descriptor_reference")
+    String getKerberosDescriptorReference();
+  }
+
+  interface HostGroupInfo {
+    @ApiModelProperty(name = "name")
+    String getHostGroupName();
+
+    @ApiModelProperty(name = "cardinality")
+    int getCardinality();
+
+    @ApiModelProperty(name = "components")
+    List<ComponentInfo> getComponents();
+
+    @ApiModelProperty(name = "configurations")
+    List<Map<String, Object>> getConfigurations();
+
+  }
+
+  interface ComponentInfo {
+    @ApiModelProperty(name = "name")
+    String getComponentName();
+
+    @ApiModelProperty(name = "provision_action")
+    String getProvisionAction();
+  }
+
+}


[13/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/css/index.css
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/css/index.css b/ambari-web/api-docs/css/index.css
new file mode 100644
index 0000000..b013939
--- /dev/null
+++ b/ambari-web/api-docs/css/index.css
@@ -0,0 +1,17432 @@
+@charset "UTF-8";
+.color {
+    background: #f00;
+    border-radius: 3px;
+    color: #fff;
+    padding: 20px;
+    margin-bottom: 20px;
+    padding-top: 100px;
+}
+.color span {
+    font-size: 16px;
+    display: block;
+    margin-bottom: 10px;
+}
+.color strong {
+    display: block;
+    text-transform: uppercase;
+}
+.color.color-blue {
+    background: #16214d;
+}
+.color.color-blue-light {
+    background: #44c7f4;
+}
+.color.color-red {
+    background: #eb5424;
+}
+.color.color-grey {
+    background: #d0d2d3;
+    color: #000;
+}
+.color.color-orange {
+    background: #ff9a57;
+    color: #000;
+}
+.color.color-orange {
+    background: #ff9a57;
+    color: #000;
+}
+.color.color-green {
+    background: #01b48f;
+    color: #000;
+}
+.color.color-oil {
+    background: #5c666f;
+}
+.color.color-yellow {
+    background: #eaca2c;
+    color: #000;
+}
+/*!
+ * Bootstrap v3.3.4 (http://getbootstrap.com)
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
+html {
+    font-family: sans-serif;
+    -webkit-text-size-adjust: 100%;
+    -ms-text-size-adjust: 100%;
+}
+body {
+    margin: 0;
+}
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+menu,
+nav,
+section,
+summary {
+    display: block;
+}
+audio,
+canvas,
+progress,
+video {
+    display: inline-block;
+    vertical-align: baseline;
+}
+audio:not([controls]) {
+    display: none;
+    height: 0;
+}
+[hidden],
+template {
+    display: none;
+}
+a {
+    background-color: transparent;
+}
+a:active,
+a:hover {
+    outline: 0;
+}
+abbr[title] {
+    border-bottom: 1px dotted;
+}
+b,
+strong {
+    font-weight: bold;
+}
+dfn {
+    font-style: italic;
+}
+h1 {
+    margin: .67em 0;
+    font-size: 2em;
+}
+mark {
+    color: #000;
+    background: #ff0;
+}
+small {
+    font-size: 80%;
+}
+sub,
+sup {
+    position: relative;
+    font-size: 75%;
+    line-height: 0;
+    vertical-align: baseline;
+}
+sup {
+    top: -.5em;
+}
+sub {
+    bottom: -.25em;
+}
+img {
+    border: 0;
+}
+svg:not(:root) {
+    overflow: hidden;
+}
+figure {
+    margin: 1em 40px;
+}
+hr {
+    height: 0;
+    -webkit-box-sizing: content-box;
+    -moz-box-sizing: content-box;
+    box-sizing: content-box;
+}
+pre {
+    overflow: auto;
+}
+code,
+kbd,
+pre,
+samp {
+    font-family: monospace, monospace;
+    font-size: 1em;
+}
+button,
+input,
+optgroup,
+select,
+textarea {
+    margin: 0;
+    font: inherit;
+    color: inherit;
+}
+button {
+    overflow: visible;
+}
+button,
+select {
+    text-transform: none;
+}
+button,
+html input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+    -webkit-appearance: button;
+    cursor: pointer;
+}
+button[disabled],
+html input[disabled] {
+    cursor: default;
+}
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+    padding: 0;
+    border: 0;
+}
+input {
+    line-height: normal;
+}
+input[type="checkbox"],
+input[type="radio"] {
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+    padding: 0;
+}
+input[type="number"]::-webkit-inner-spin-button,
+input[type="number"]::-webkit-outer-spin-button {
+    height: auto;
+}
+input[type="search"] {
+    -webkit-box-sizing: content-box;
+    -moz-box-sizing: content-box;
+    box-sizing: content-box;
+    -webkit-appearance: textfield;
+}
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+    -webkit-appearance: none;
+}
+fieldset {
+    padding: .35em .625em .75em;
+    margin: 0 2px;
+    border: 1px solid #c0c0c0;
+}
+legend {
+    padding: 0;
+    border: 0;
+}
+textarea {
+    overflow: auto;
+}
+optgroup {
+    font-weight: bold;
+}
+table {
+    border-spacing: 0;
+    border-collapse: collapse;
+}
+td,
+th {
+    padding: 0;
+}
+/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
+@media print {
+    *,
+    *:before,
+    *:after {
+        color: #000 !important;
+        text-shadow: none !important;
+        background: transparent !important;
+        -webkit-box-shadow: none !important;
+        box-shadow: none !important;
+    }
+    a,
+    a:visited {
+        text-decoration: underline;
+    }
+    a[href]:after {
+        content: " (" attr(href) ")";
+    }
+    abbr[title]:after {
+        content: " (" attr(title) ")";
+    }
+    a[href^="#"]:after,
+    a[href^="javascript:"]:after {
+        content: "";
+    }
+    pre,
+    blockquote {
+        border: 1px solid #999;
+
+        page-break-inside: avoid;
+    }
+    thead {
+        display: table-header-group;
+    }
+    tr,
+    img {
+        page-break-inside: avoid;
+    }
+    img {
+        max-width: 100% !important;
+    }
+    p,
+    h2,
+    h3 {
+        orphans: 3;
+        widows: 3;
+    }
+    h2,
+    h3 {
+        page-break-after: avoid;
+    }
+    select {
+        background: #fff !important;
+    }
+    .navbar {
+        display: none;
+    }
+    .btn > .caret,
+    .dropup > .btn > .caret {
+        border-top-color: #000 !important;
+    }
+    .label {
+        border: 1px solid #000;
+    }
+    .table {
+        border-collapse: collapse !important;
+    }
+    .table td,
+    .table th {
+        background-color: #fff !important;
+    }
+    .table-bordered th,
+    .table-bordered td {
+        border: 1px solid #ddd !important;
+    }
+}
+@font-face {
+    font-family: 'Glyphicons Halflings';
+
+    src: url('../fonts/glyphicons-halflings-regular.eot');
+    src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
+}
+.glyphicon {
+    position: relative;
+    top: 1px;
+    display: inline-block;
+    font-family: 'Glyphicons Halflings';
+    font-style: normal;
+    font-weight: normal;
+    line-height: 1;
+
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+}
+.glyphicon-asterisk:before {
+    content: "\2a";
+}
+.glyphicon-plus:before {
+    content: "\2b";
+}
+.glyphicon-euro:before,
+.glyphicon-eur:before {
+    content: "\20ac";
+}
+.glyphicon-minus:before {
+    content: "\2212";
+}
+.glyphicon-cloud:before {
+    content: "\2601";
+}
+.glyphicon-envelope:before {
+    content: "\2709";
+}
+.glyphicon-pencil:before {
+    content: "\270f";
+}
+.glyphicon-glass:before {
+    content: "\e001";
+}
+.glyphicon-music:before {
+    content: "\e002";
+}
+.glyphicon-search:before {
+    content: "\e003";
+}
+.glyphicon-heart:before {
+    content: "\e005";
+}
+.glyphicon-star:before {
+    content: "\e006";
+}
+.glyphicon-star-empty:before {
+    content: "\e007";
+}
+.glyphicon-user:before {
+    content: "\e008";
+}
+.glyphicon-film:before {
+    content: "\e009";
+}
+.glyphicon-th-large:before {
+    content: "\e010";
+}
+.glyphicon-th:before {
+    content: "\e011";
+}
+.glyphicon-th-list:before {
+    content: "\e012";
+}
+.glyphicon-ok:before {
+    content: "\e013";
+}
+.glyphicon-remove:before {
+    content: "\e014";
+}
+.glyphicon-zoom-in:before {
+    content: "\e015";
+}
+.glyphicon-zoom-out:before {
+    content: "\e016";
+}
+.glyphicon-off:before {
+    content: "\e017";
+}
+.glyphicon-signal:before {
+    content: "\e018";
+}
+.glyphicon-cog:before {
+    content: "\e019";
+}
+.glyphicon-trash:before {
+    content: "\e020";
+}
+.glyphicon-home:before {
+    content: "\e021";
+}
+.glyphicon-file:before {
+    content: "\e022";
+}
+.glyphicon-time:before {
+    content: "\e023";
+}
+.glyphicon-road:before {
+    content: "\e024";
+}
+.glyphicon-download-alt:before {
+    content: "\e025";
+}
+.glyphicon-download:before {
+    content: "\e026";
+}
+.glyphicon-upload:before {
+    content: "\e027";
+}
+.glyphicon-inbox:before {
+    content: "\e028";
+}
+.glyphicon-play-circle:before {
+    content: "\e029";
+}
+.glyphicon-repeat:before {
+    content: "\e030";
+}
+.glyphicon-refresh:before {
+    content: "\e031";
+}
+.glyphicon-list-alt:before {
+    content: "\e032";
+}
+.glyphicon-lock:before {
+    content: "\e033";
+}
+.glyphicon-flag:before {
+    content: "\e034";
+}
+.glyphicon-headphones:before {
+    content: "\e035";
+}
+.glyphicon-volume-off:before {
+    content: "\e036";
+}
+.glyphicon-volume-down:before {
+    content: "\e037";
+}
+.glyphicon-volume-up:before {
+    content: "\e038";
+}
+.glyphicon-qrcode:before {
+    content: "\e039";
+}
+.glyphicon-barcode:before {
+    content: "\e040";
+}
+.glyphicon-tag:before {
+    content: "\e041";
+}
+.glyphicon-tags:before {
+    content: "\e042";
+}
+.glyphicon-book:before {
+    content: "\e043";
+}
+.glyphicon-bookmark:before {
+    content: "\e044";
+}
+.glyphicon-print:before {
+    content: "\e045";
+}
+.glyphicon-camera:before {
+    content: "\e046";
+}
+.glyphicon-font:before {
+    content: "\e047";
+}
+.glyphicon-bold:before {
+    content: "\e048";
+}
+.glyphicon-italic:before {
+    content: "\e049";
+}
+.glyphicon-text-height:before {
+    content: "\e050";
+}
+.glyphicon-text-width:before {
+    content: "\e051";
+}
+.glyphicon-align-left:before {
+    content: "\e052";
+}
+.glyphicon-align-center:before {
+    content: "\e053";
+}
+.glyphicon-align-right:before {
+    content: "\e054";
+}
+.glyphicon-align-justify:before {
+    content: "\e055";
+}
+.glyphicon-list:before {
+    content: "\e056";
+}
+.glyphicon-indent-left:before {
+    content: "\e057";
+}
+.glyphicon-indent-right:before {
+    content: "\e058";
+}
+.glyphicon-facetime-video:before {
+    content: "\e059";
+}
+.glyphicon-picture:before {
+    content: "\e060";
+}
+.glyphicon-map-marker:before {
+    content: "\e062";
+}
+.glyphicon-adjust:before {
+    content: "\e063";
+}
+.glyphicon-tint:before {
+    content: "\e064";
+}
+.glyphicon-edit:before {
+    content: "\e065";
+}
+.glyphicon-share:before {
+    content: "\e066";
+}
+.glyphicon-check:before {
+    content: "\e067";
+}
+.glyphicon-move:before {
+    content: "\e068";
+}
+.glyphicon-step-backward:before {
+    content: "\e069";
+}
+.glyphicon-fast-backward:before {
+    content: "\e070";
+}
+.glyphicon-backward:before {
+    content: "\e071";
+}
+.glyphicon-play:before {
+    content: "\e072";
+}
+.glyphicon-pause:before {
+    content: "\e073";
+}
+.glyphicon-stop:before {
+    content: "\e074";
+}
+.glyphicon-forward:before {
+    content: "\e075";
+}
+.glyphicon-fast-forward:before {
+    content: "\e076";
+}
+.glyphicon-step-forward:before {
+    content: "\e077";
+}
+.glyphicon-eject:before {
+    content: "\e078";
+}
+.glyphicon-chevron-left:before {
+    content: "\e079";
+}
+.glyphicon-chevron-right:before {
+    content: "\e080";
+}
+.glyphicon-plus-sign:before {
+    content: "\e081";
+}
+.glyphicon-minus-sign:before {
+    content: "\e082";
+}
+.glyphicon-remove-sign:before {
+    content: "\e083";
+}
+.glyphicon-ok-sign:before {
+    content: "\e084";
+}
+.glyphicon-question-sign:before {
+    content: "\e085";
+}
+.glyphicon-info-sign:before {
+    content: "\e086";
+}
+.glyphicon-screenshot:before {
+    content: "\e087";
+}
+.glyphicon-remove-circle:before {
+    content: "\e088";
+}
+.glyphicon-ok-circle:before {
+    content: "\e089";
+}
+.glyphicon-ban-circle:before {
+    content: "\e090";
+}
+.glyphicon-arrow-left:before {
+    content: "\e091";
+}
+.glyphicon-arrow-right:before {
+    content: "\e092";
+}
+.glyphicon-arrow-up:before {
+    content: "\e093";
+}
+.glyphicon-arrow-down:before {
+    content: "\e094";
+}
+.glyphicon-share-alt:before {
+    content: "\e095";
+}
+.glyphicon-resize-full:before {
+    content: "\e096";
+}
+.glyphicon-resize-small:before {
+    content: "\e097";
+}
+.glyphicon-exclamation-sign:before {
+    content: "\e101";
+}
+.glyphicon-gift:before {
+    content: "\e102";
+}
+.glyphicon-leaf:before {
+    content: "\e103";
+}
+.glyphicon-fire:before {
+    content: "\e104";
+}
+.glyphicon-eye-open:before {
+    content: "\e105";
+}
+.glyphicon-eye-close:before {
+    content: "\e106";
+}
+.glyphicon-warning-sign:before {
+    content: "\e107";
+}
+.glyphicon-plane:before {
+    content: "\e108";
+}
+.glyphicon-calendar:before {
+    content: "\e109";
+}
+.glyphicon-random:before {
+    content: "\e110";
+}
+.glyphicon-comment:before {
+    content: "\e111";
+}
+.glyphicon-magnet:before {
+    content: "\e112";
+}
+.glyphicon-chevron-up:before {
+    content: "\e113";
+}
+.glyphicon-chevron-down:before {
+    content: "\e114";
+}
+.glyphicon-retweet:before {
+    content: "\e115";
+}
+.glyphicon-shopping-cart:before {
+    content: "\e116";
+}
+.glyphicon-folder-close:before {
+    content: "\e117";
+}
+.glyphicon-folder-open:before {
+    content: "\e118";
+}
+.glyphicon-resize-vertical:before {
+    content: "\e119";
+}
+.glyphicon-resize-horizontal:before {
+    content: "\e120";
+}
+.glyphicon-hdd:before {
+    content: "\e121";
+}
+.glyphicon-bullhorn:before {
+    content: "\e122";
+}
+.glyphicon-bell:before {
+    content: "\e123";
+}
+.glyphicon-certificate:before {
+    content: "\e124";
+}
+.glyphicon-thumbs-up:before {
+    content: "\e125";
+}
+.glyphicon-thumbs-down:before {
+    content: "\e126";
+}
+.glyphicon-hand-right:before {
+    content: "\e127";
+}
+.glyphicon-hand-left:before {
+    content: "\e128";
+}
+.glyphicon-hand-up:before {
+    content: "\e129";
+}
+.glyphicon-hand-down:before {
+    content: "\e130";
+}
+.glyphicon-circle-arrow-right:before {
+    content: "\e131";
+}
+.glyphicon-circle-arrow-left:before {
+    content: "\e132";
+}
+.glyphicon-circle-arrow-up:before {
+    content: "\e133";
+}
+.glyphicon-circle-arrow-down:before {
+    content: "\e134";
+}
+.glyphicon-globe:before {
+    content: "\e135";
+}
+.glyphicon-wrench:before {
+    content: "\e136";
+}
+.glyphicon-tasks:before {
+    content: "\e137";
+}
+.glyphicon-filter:before {
+    content: "\e138";
+}
+.glyphicon-briefcase:before {
+    content: "\e139";
+}
+.glyphicon-fullscreen:before {
+    content: "\e140";
+}
+.glyphicon-dashboard:before {
+    content: "\e141";
+}
+.glyphicon-paperclip:before {
+    content: "\e142";
+}
+.glyphicon-heart-empty:before {
+    content: "\e143";
+}
+.glyphicon-link:before {
+    content: "\e144";
+}
+.glyphicon-phone:before {
+    content: "\e145";
+}
+.glyphicon-pushpin:before {
+    content: "\e146";
+}
+.glyphicon-usd:before {
+    content: "\e148";
+}
+.glyphicon-gbp:before {
+    content: "\e149";
+}
+.glyphicon-sort:before {
+    content: "\e150";
+}
+.glyphicon-sort-by-alphabet:before {
+    content: "\e151";
+}
+.glyphicon-sort-by-alphabet-alt:before {
+    content: "\e152";
+}
+.glyphicon-sort-by-order:before {
+    content: "\e153";
+}
+.glyphicon-sort-by-order-alt:before {
+    content: "\e154";
+}
+.glyphicon-sort-by-attributes:before {
+    content: "\e155";
+}
+.glyphicon-sort-by-attributes-alt:before {
+    content: "\e156";
+}
+.glyphicon-unchecked:before {
+    content: "\e157";
+}
+.glyphicon-expand:before {
+    content: "\e158";
+}
+.glyphicon-collapse-down:before {
+    content: "\e159";
+}
+.glyphicon-collapse-up:before {
+    content: "\e160";
+}
+.glyphicon-log-in:before {
+    content: "\e161";
+}
+.glyphicon-flash:before {
+    content: "\e162";
+}
+.glyphicon-log-out:before {
+    content: "\e163";
+}
+.glyphicon-new-window:before {
+    content: "\e164";
+}
+.glyphicon-record:before {
+    content: "\e165";
+}
+.glyphicon-save:before {
+    content: "\e166";
+}
+.glyphicon-open:before {
+    content: "\e167";
+}
+.glyphicon-saved:before {
+    content: "\e168";
+}
+.glyphicon-import:before {
+    content: "\e169";
+}
+.glyphicon-export:before {
+    content: "\e170";
+}
+.glyphicon-send:before {
+    content: "\e171";
+}
+.glyphicon-floppy-disk:before {
+    content: "\e172";
+}
+.glyphicon-floppy-saved:before {
+    content: "\e173";
+}
+.glyphicon-floppy-remove:before {
+    content: "\e174";
+}
+.glyphicon-floppy-save:before {
+    content: "\e175";
+}
+.glyphicon-floppy-open:before {
+    content: "\e176";
+}
+.glyphicon-credit-card:before {
+    content: "\e177";
+}
+.glyphicon-transfer:before {
+    content: "\e178";
+}
+.glyphicon-cutlery:before {
+    content: "\e179";
+}
+.glyphicon-header:before {
+    content: "\e180";
+}
+.glyphicon-compressed:before {
+    content: "\e181";
+}
+.glyphicon-earphone:before {
+    content: "\e182";
+}
+.glyphicon-phone-alt:before {
+    content: "\e183";
+}
+.glyphicon-tower:before {
+    content: "\e184";
+}
+.glyphicon-stats:before {
+    content: "\e185";
+}
+.glyphicon-sd-video:before {
+    content: "\e186";
+}
+.glyphicon-hd-video:before {
+    content: "\e187";
+}
+.glyphicon-subtitles:before {
+    content: "\e188";
+}
+.glyphicon-sound-stereo:before {
+    content: "\e189";
+}
+.glyphicon-sound-dolby:before {
+    content: "\e190";
+}
+.glyphicon-sound-5-1:before {
+    content: "\e191";
+}
+.glyphicon-sound-6-1:before {
+    content: "\e192";
+}
+.glyphicon-sound-7-1:before {
+    content: "\e193";
+}
+.glyphicon-copyright-mark:before {
+    content: "\e194";
+}
+.glyphicon-registration-mark:before {
+    content: "\e195";
+}
+.glyphicon-cloud-download:before {
+    content: "\e197";
+}
+.glyphicon-cloud-upload:before {
+    content: "\e198";
+}
+.glyphicon-tree-conifer:before {
+    content: "\e199";
+}
+.glyphicon-tree-deciduous:before {
+    content: "\e200";
+}
+.glyphicon-cd:before {
+    content: "\e201";
+}
+.glyphicon-save-file:before {
+    content: "\e202";
+}
+.glyphicon-open-file:before {
+    content: "\e203";
+}
+.glyphicon-level-up:before {
+    content: "\e204";
+}
+.glyphicon-copy:before {
+    content: "\e205";
+}
+.glyphicon-paste:before {
+    content: "\e206";
+}
+.glyphicon-alert:before {
+    content: "\e209";
+}
+.glyphicon-equalizer:before {
+    content: "\e210";
+}
+.glyphicon-king:before {
+    content: "\e211";
+}
+.glyphicon-queen:before {
+    content: "\e212";
+}
+.glyphicon-pawn:before {
+    content: "\e213";
+}
+.glyphicon-bishop:before {
+    content: "\e214";
+}
+.glyphicon-knight:before {
+    content: "\e215";
+}
+.glyphicon-baby-formula:before {
+    content: "\e216";
+}
+.glyphicon-tent:before {
+    content: "\26fa";
+}
+.glyphicon-blackboard:before {
+    content: "\e218";
+}
+.glyphicon-bed:before {
+    content: "\e219";
+}
+.glyphicon-apple:before {
+    content: "\f8ff";
+}
+.glyphicon-erase:before {
+    content: "\e221";
+}
+.glyphicon-hourglass:before {
+    content: "\231b";
+}
+.glyphicon-lamp:before {
+    content: "\e223";
+}
+.glyphicon-duplicate:before {
+    content: "\e224";
+}
+.glyphicon-piggy-bank:before {
+    content: "\e225";
+}
+.glyphicon-scissors:before {
+    content: "\e226";
+}
+.glyphicon-bitcoin:before {
+    content: "\e227";
+}
+.glyphicon-btc:before {
+    content: "\e227";
+}
+.glyphicon-xbt:before {
+    content: "\e227";
+}
+.glyphicon-yen:before {
+    content: "\00a5";
+}
+.glyphicon-jpy:before {
+    content: "\00a5";
+}
+.glyphicon-ruble:before {
+    content: "\20bd";
+}
+.glyphicon-rub:before {
+    content: "\20bd";
+}
+.glyphicon-scale:before {
+    content: "\e230";
+}
+.glyphicon-ice-lolly:before {
+    content: "\e231";
+}
+.glyphicon-ice-lolly-tasted:before {
+    content: "\e232";
+}
+.glyphicon-education:before {
+    content: "\e233";
+}
+.glyphicon-option-horizontal:before {
+    content: "\e234";
+}
+.glyphicon-option-vertical:before {
+    content: "\e235";
+}
+.glyphicon-menu-hamburger:before {
+    content: "\e236";
+}
+.glyphicon-modal-window:before {
+    content: "\e237";
+}
+.glyphicon-oil:before {
+    content: "\e238";
+}
+.glyphicon-grain:before {
+    content: "\e239";
+}
+.glyphicon-sunglasses:before {
+    content: "\e240";
+}
+.glyphicon-text-size:before {
+    content: "\e241";
+}
+.glyphicon-text-color:before {
+    content: "\e242";
+}
+.glyphicon-text-background:before {
+    content: "\e243";
+}
+.glyphicon-object-align-top:before {
+    content: "\e244";
+}
+.glyphicon-object-align-bottom:before {
+    content: "\e245";
+}
+.glyphicon-object-align-horizontal:before {
+    content: "\e246";
+}
+.glyphicon-object-align-left:before {
+    content: "\e247";
+}
+.glyphicon-object-align-vertical:before {
+    content: "\e248";
+}
+.glyphicon-object-align-right:before {
+    content: "\e249";
+}
+.glyphicon-triangle-right:before {
+    content: "\e250";
+}
+.glyphicon-triangle-left:before {
+    content: "\e251";
+}
+.glyphicon-triangle-bottom:before {
+    content: "\e252";
+}
+.glyphicon-triangle-top:before {
+    content: "\e253";
+}
+.glyphicon-console:before {
+    content: "\e254";
+}
+.glyphicon-superscript:before {
+    content: "\e255";
+}
+.glyphicon-subscript:before {
+    content: "\e256";
+}
+.glyphicon-menu-left:before {
+    content: "\e257";
+}
+.glyphicon-menu-right:before {
+    content: "\e258";
+}
+.glyphicon-menu-down:before {
+    content: "\e259";
+}
+.glyphicon-menu-up:before {
+    content: "\e260";
+}
+* {
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+}
+*:before,
+*:after {
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+}
+html {
+    font-size: 10px;
+
+    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+body {
+    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+    font-size: 14px;
+    line-height: 1.42857143;
+    color: #333;
+    background-color: #fff;
+}
+input,
+button,
+select,
+textarea {
+    font-family: inherit;
+    font-size: inherit;
+    line-height: inherit;
+}
+a {
+    color: #337ab7;
+    text-decoration: none;
+}
+a:hover,
+a:focus {
+    color: #23527c;
+    text-decoration: underline;
+}
+a:focus {
+    outline: thin dotted;
+    outline: 5px auto -webkit-focus-ring-color;
+    outline-offset: -2px;
+}
+figure {
+    margin: 0;
+}
+img {
+    vertical-align: middle;
+}
+.img-responsive,
+.thumbnail > img,
+.thumbnail a > img,
+.carousel-inner > .item > img,
+.carousel-inner > .item > a > img {
+    display: block;
+    max-width: 100%;
+    height: auto;
+}
+.img-rounded {
+    border-radius: 6px;
+}
+.img-thumbnail {
+    display: inline-block;
+    max-width: 100%;
+    height: auto;
+    padding: 4px;
+    line-height: 1.42857143;
+    background-color: #fff;
+    border: 1px solid #ddd;
+    border-radius: 4px;
+    -webkit-transition: all .2s ease-in-out;
+    -o-transition: all .2s ease-in-out;
+    transition: all .2s ease-in-out;
+}
+.img-circle {
+    border-radius: 50%;
+}
+hr {
+    margin-top: 20px;
+    margin-bottom: 20px;
+    border: 0;
+    border-top: 1px solid #eee;
+}
+.sr-only {
+    position: absolute;
+    width: 1px;
+    height: 1px;
+    padding: 0;
+    margin: -1px;
+    overflow: hidden;
+    clip: rect(0, 0, 0, 0);
+    border: 0;
+}
+.sr-only-focusable:active,
+.sr-only-focusable:focus {
+    position: static;
+    width: auto;
+    height: auto;
+    margin: 0;
+    overflow: visible;
+    clip: auto;
+}
+[role="button"] {
+    cursor: pointer;
+}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+.h1,
+.h2,
+.h3,
+.h4,
+.h5,
+.h6 {
+    font-family: inherit;
+    font-weight: 500;
+    line-height: 1.1;
+    color: inherit;
+}
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small,
+.h1 small,
+.h2 small,
+.h3 small,
+.h4 small,
+.h5 small,
+.h6 small,
+h1 .small,
+h2 .small,
+h3 .small,
+h4 .small,
+h5 .small,
+h6 .small,
+.h1 .small,
+.h2 .small,
+.h3 .small,
+.h4 .small,
+.h5 .small,
+.h6 .small {
+    font-weight: normal;
+    line-height: 1;
+    color: #777;
+}
+h1,
+.h1,
+h2,
+.h2,
+h3,
+.h3 {
+    margin-top: 20px;
+    margin-bottom: 10px;
+}
+h1 small,
+.h1 small,
+h2 small,
+.h2 small,
+h3 small,
+.h3 small,
+h1 .small,
+.h1 .small,
+h2 .small,
+.h2 .small,
+h3 .small,
+.h3 .small {
+    font-size: 65%;
+}
+h4,
+.h4,
+h5,
+.h5,
+h6,
+.h6 {
+    margin-top: 10px;
+    margin-bottom: 10px;
+}
+h4 small,
+.h4 small,
+h5 small,
+.h5 small,
+h6 small,
+.h6 small,
+h4 .small,
+.h4 .small,
+h5 .small,
+.h5 .small,
+h6 .small,
+.h6 .small {
+    font-size: 75%;
+}
+h1,
+.h1 {
+    font-size: 36px;
+}
+h2,
+.h2 {
+    font-size: 30px;
+}
+h3,
+.h3 {
+    font-size: 24px;
+}
+h4,
+.h4 {
+    font-size: 18px;
+}
+h5,
+.h5 {
+    font-size: 14px;
+}
+h6,
+.h6 {
+    font-size: 12px;
+}
+p {
+    margin: 0 0 10px;
+}
+.lead {
+    margin-bottom: 20px;
+    font-size: 16px;
+    font-weight: 300;
+    line-height: 1.4;
+}
+@media (min-width: 768px) {
+    .lead {
+        font-size: 21px;
+    }
+}
+small,
+.small {
+    font-size: 85%;
+}
+mark,
+.mark {
+    padding: .2em;
+    background-color: #fcf8e3;
+}
+.text-left {
+    text-align: left;
+}
+.text-right {
+    text-align: right;
+}
+.text-center {
+    text-align: center;
+}
+.text-justify {
+    text-align: justify;
+}
+.text-nowrap {
+    white-space: nowrap;
+}
+.text-lowercase {
+    text-transform: lowercase;
+}
+.text-uppercase {
+    text-transform: uppercase;
+}
+.text-capitalize {
+    text-transform: capitalize;
+}
+.text-muted {
+    color: #777;
+}
+.text-primary {
+    color: #337ab7;
+}
+a.text-primary:hover {
+    color: #286090;
+}
+.text-success {
+    color: #3c763d;
+}
+a.text-success:hover {
+    color: #2b542c;
+}
+.text-info {
+    color: #31708f;
+}
+a.text-info:hover {
+    color: #245269;
+}
+.text-warning {
+    color: #8a6d3b;
+}
+a.text-warning:hover {
+    color: #66512c;
+}
+.text-danger {
+    color: #a94442;
+}
+a.text-danger:hover {
+    color: #843534;
+}
+.bg-primary {
+    color: #fff;
+    background-color: #337ab7;
+}
+a.bg-primary:hover {
+    background-color: #286090;
+}
+.bg-success {
+    background-color: #dff0d8;
+}
+a.bg-success:hover {
+    background-color: #c1e2b3;
+}
+.bg-info {
+    background-color: #d9edf7;
+}
+a.bg-info:hover {
+    background-color: #afd9ee;
+}
+.bg-warning {
+    background-color: #fcf8e3;
+}
+a.bg-warning:hover {
+    background-color: #f7ecb5;
+}
+.bg-danger {
+    background-color: #f2dede;
+}
+a.bg-danger:hover {
+    background-color: #e4b9b9;
+}
+.page-header {
+    padding-bottom: 9px;
+    margin: 40px 0 20px;
+    border-bottom: 1px solid #eee;
+}
+ul,
+ol {
+    margin-top: 0;
+    margin-bottom: 10px;
+}
+ul ul,
+ol ul,
+ul ol,
+ol ol {
+    margin-bottom: 0;
+}
+.list-unstyled {
+    padding-left: 0;
+    list-style: none;
+}
+.list-inline {
+    padding-left: 0;
+    margin-left: -5px;
+    list-style: none;
+}
+.list-inline > li {
+    display: inline-block;
+    padding-right: 5px;
+    padding-left: 5px;
+}
+dl {
+    margin-top: 0;
+    margin-bottom: 20px;
+}
+dt,
+dd {
+    line-height: 1.42857143;
+}
+dt {
+    font-weight: bold;
+}
+dd {
+    margin-left: 0;
+}
+@media (min-width: 768px) {
+    .dl-horizontal dt {
+        float: left;
+        width: 160px;
+        overflow: hidden;
+        clear: left;
+        text-align: right;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+    }
+    .dl-horizontal dd {
+        margin-left: 180px;
+    }
+}
+abbr[title],
+abbr[data-original-title] {
+    cursor: help;
+    border-bottom: 1px dotted #777;
+}
+.initialism {
+    font-size: 90%;
+    text-transform: uppercase;
+}
+blockquote {
+    padding: 10px 20px;
+    margin: 0 0 20px;
+    font-size: 17.5px;
+    border-left: 5px solid #eee;
+}
+blockquote p:last-child,
+blockquote ul:last-child,
+blockquote ol:last-child {
+    margin-bottom: 0;
+}
+blockquote footer,
+blockquote small,
+blockquote .small {
+    display: block;
+    font-size: 80%;
+    line-height: 1.42857143;
+    color: #777;
+}
+blockquote footer:before,
+blockquote small:before,
+blockquote .small:before {
+    content: '\2014 \00A0';
+}
+.blockquote-reverse,
+blockquote.pull-right {
+    padding-right: 15px;
+    padding-left: 0;
+    text-align: right;
+    border-right: 5px solid #eee;
+    border-left: 0;
+}
+.blockquote-reverse footer:before,
+blockquote.pull-right footer:before,
+.blockquote-reverse small:before,
+blockquote.pull-right small:before,
+.blockquote-reverse .small:before,
+blockquote.pull-right .small:before {
+    content: '';
+}
+.blockquote-reverse footer:after,
+blockquote.pull-right footer:after,
+.blockquote-reverse small:after,
+blockquote.pull-right small:after,
+.blockquote-reverse .small:after,
+blockquote.pull-right .small:after {
+    content: '\00A0 \2014';
+}
+address {
+    margin-bottom: 20px;
+    font-style: normal;
+    line-height: 1.42857143;
+}
+code,
+kbd,
+pre,
+samp {
+    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
+}
+code {
+    padding: 2px 4px;
+    font-size: 90%;
+    color: #c7254e;
+    background-color: #f9f2f4;
+    border-radius: 4px;
+}
+kbd {
+    padding: 2px 4px;
+    font-size: 90%;
+    color: #fff;
+    background-color: #333;
+    border-radius: 3px;
+    -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
+    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
+}
+kbd kbd {
+    padding: 0;
+    font-size: 100%;
+    font-weight: bold;
+    -webkit-box-shadow: none;
+    box-shadow: none;
+}
+pre {
+    display: block;
+    padding: 9.5px;
+    margin: 0 0 10px;
+    font-size: 13px;
+    line-height: 1.42857143;
+    color: #333;
+    word-break: break-all;
+    word-wrap: break-word;
+    background-color: #f5f5f5;
+    border: 1px solid #ccc;
+    border-radius: 4px;
+}
+pre code {
+    padding: 0;
+    font-size: inherit;
+    color: inherit;
+    white-space: pre-wrap;
+    background-color: transparent;
+    border-radius: 0;
+}
+.pre-scrollable {
+    max-height: 340px;
+    overflow-y: scroll;
+}
+.container {
+    padding-right: 15px;
+    padding-left: 15px;
+    margin-right: auto;
+    margin-left: auto;
+}
+@media (min-width: 768px) {
+    .container {
+        width: 750px;
+    }
+}
+@media (min-width: 992px) {
+    .container {
+        width: 970px;
+    }
+}
+@media (min-width: 1200px) {
+    .container {
+        width: 1170px;
+    }
+}
+.container-fluid {
+    padding-right: 15px;
+    padding-left: 15px;
+    margin-right: auto;
+    margin-left: auto;
+}
+.row {
+    margin-right: -15px;
+    margin-left: -15px;
+}
+
+.row {
+    margin-right: -15px;
+    margin-left: -15px;
+}
+
+.editor_holder .row {
+    margin-right: 0 !important;
+    margin-left: 0 !important;
+}
+
+.editor_holder .row {
+    margin-right: 0 !important;
+    margin-left: 0 !important;
+}
+.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
+    position: relative;
+    min-height: 1px;
+    padding-right: 15px;
+    padding-left: 15px;
+}
+.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
+    float: left;
+}
+.col-xs-12 {
+    width: 100%;
+}
+.col-xs-11 {
+    width: 91.66666667%;
+}
+.col-xs-10 {
+    width: 83.33333333%;
+}
+.col-xs-9 {
+    width: 75%;
+}
+.col-xs-8 {
+    width: 66.66666667%;
+}
+.col-xs-7 {
+    width: 58.33333333%;
+}
+.col-xs-6 {
+    width: 50%;
+}
+.col-xs-5 {
+    width: 41.66666667%;
+}
+.col-xs-4 {
+    width: 33.33333333%;
+}
+.col-xs-3 {
+    width: 25%;
+}
+.col-xs-2 {
+    width: 16.66666667%;
+}
+.col-xs-1 {
+    width: 8.33333333%;
+}
+.col-xs-pull-12 {
+    right: 100%;
+}
+.col-xs-pull-11 {
+    right: 91.66666667%;
+}
+.col-xs-pull-10 {
+    right: 83.33333333%;
+}
+.col-xs-pull-9 {
+    right: 75%;
+}
+.col-xs-pull-8 {
+    right: 66.66666667%;
+}
+.col-xs-pull-7 {
+    right: 58.33333333%;
+}
+.col-xs-pull-6 {
+    right: 50%;
+}
+.col-xs-pull-5 {
+    right: 41.66666667%;
+}
+.col-xs-pull-4 {
+    right: 33.33333333%;
+}
+.col-xs-pull-3 {
+    right: 25%;
+}
+.col-xs-pull-2 {
+    right: 16.66666667%;
+}
+.col-xs-pull-1 {
+    right: 8.33333333%;
+}
+.col-xs-pull-0 {
+    right: auto;
+}
+.col-xs-push-12 {
+    left: 100%;
+}
+.col-xs-push-11 {
+    left: 91.66666667%;
+}
+.col-xs-push-10 {
+    left: 83.33333333%;
+}
+.col-xs-push-9 {
+    left: 75%;
+}
+.col-xs-push-8 {
+    left: 66.66666667%;
+}
+.col-xs-push-7 {
+    left: 58.33333333%;
+}
+.col-xs-push-6 {
+    left: 50%;
+}
+.col-xs-push-5 {
+    left: 41.66666667%;
+}
+.col-xs-push-4 {
+    left: 33.33333333%;
+}
+.col-xs-push-3 {
+    left: 25%;
+}
+.col-xs-push-2 {
+    left: 16.66666667%;
+}
+.col-xs-push-1 {
+    left: 8.33333333%;
+}
+.col-xs-push-0 {
+    left: auto;
+}
+.col-xs-offset-12 {
+    margin-left: 100%;
+}
+.col-xs-offset-11 {
+    margin-left: 91.66666667%;
+}
+.col-xs-offset-10 {
+    margin-left: 83.33333333%;
+}
+.col-xs-offset-9 {
+    margin-left: 75%;
+}
+.col-xs-offset-8 {
+    margin-left: 66.66666667%;
+}
+.col-xs-offset-7 {
+    margin-left: 58.33333333%;
+}
+.col-xs-offset-6 {
+    margin-left: 50%;
+}
+.col-xs-offset-5 {
+    margin-left: 41.66666667%;
+}
+.col-xs-offset-4 {
+    margin-left: 33.33333333%;
+}
+.col-xs-offset-3 {
+    margin-left: 25%;
+}
+.col-xs-offset-2 {
+    margin-left: 16.66666667%;
+}
+.col-xs-offset-1 {
+    margin-left: 8.33333333%;
+}
+.col-xs-offset-0 {
+    margin-left: 0;
+}
+@media (min-width: 768px) {
+    .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
+        float: left;
+    }
+    .col-sm-12 {
+        width: 100%;
+    }
+    .col-sm-11 {
+        width: 91.66666667%;
+    }
+    .col-sm-10 {
+        width: 83.33333333%;
+    }
+    .col-sm-9 {
+        width: 75%;
+    }
+    .col-sm-8 {
+        width: 66.66666667%;
+    }
+    .col-sm-7 {
+        width: 58.33333333%;
+    }
+    .col-sm-6 {
+        width: 50%;
+    }
+    .col-sm-5 {
+        width: 41.66666667%;
+    }
+    .col-sm-4 {
+        width: 33.33333333%;
+    }
+    .col-sm-3 {
+        width: 25%;
+    }
+    .col-sm-2 {
+        width: 16.66666667%;
+    }
+    .col-sm-1 {
+        width: 8.33333333%;
+    }
+    .col-sm-pull-12 {
+        right: 100%;
+    }
+    .col-sm-pull-11 {
+        right: 91.66666667%;
+    }
+    .col-sm-pull-10 {
+        right: 83.33333333%;
+    }
+    .col-sm-pull-9 {
+        right: 75%;
+    }
+    .col-sm-pull-8 {
+        right: 66.66666667%;
+    }
+    .col-sm-pull-7 {
+        right: 58.33333333%;
+    }
+    .col-sm-pull-6 {
+        right: 50%;
+    }
+    .col-sm-pull-5 {
+        right: 41.66666667%;
+    }
+    .col-sm-pull-4 {
+        right: 33.33333333%;
+    }
+    .col-sm-pull-3 {
+        right: 25%;
+    }
+    .col-sm-pull-2 {
+        right: 16.66666667%;
+    }
+    .col-sm-pull-1 {
+        right: 8.33333333%;
+    }
+    .col-sm-pull-0 {
+        right: auto;
+    }
+    .col-sm-push-12 {
+        left: 100%;
+    }
+    .col-sm-push-11 {
+        left: 91.66666667%;
+    }
+    .col-sm-push-10 {
+        left: 83.33333333%;
+    }
+    .col-sm-push-9 {
+        left: 75%;
+    }
+    .col-sm-push-8 {
+        left: 66.66666667%;
+    }
+    .col-sm-push-7 {
+        left: 58.33333333%;
+    }
+    .col-sm-push-6 {
+        left: 50%;
+    }
+    .col-sm-push-5 {
+        left: 41.66666667%;
+    }
+    .col-sm-push-4 {
+        left: 33.33333333%;
+    }
+    .col-sm-push-3 {
+        left: 25%;
+    }
+    .col-sm-push-2 {
+        left: 16.66666667%;
+    }
+    .col-sm-push-1 {
+        left: 8.33333333%;
+    }
+    .col-sm-push-0 {
+        left: auto;
+    }
+    .col-sm-offset-12 {
+        margin-left: 100%;
+    }
+    .col-sm-offset-11 {
+        margin-left: 91.66666667%;
+    }
+    .col-sm-offset-10 {
+        margin-left: 83.33333333%;
+    }
+    .col-sm-offset-9 {
+        margin-left: 75%;
+    }
+    .col-sm-offset-8 {
+        margin-left: 66.66666667%;
+    }
+    .col-sm-offset-7 {
+        margin-left: 58.33333333%;
+    }
+    .col-sm-offset-6 {
+        margin-left: 50%;
+    }
+    .col-sm-offset-5 {
+        margin-left: 41.66666667%;
+    }
+    .col-sm-offset-4 {
+        margin-left: 33.33333333%;
+    }
+    .col-sm-offset-3 {
+        margin-left: 25%;
+    }
+    .col-sm-offset-2 {
+        margin-left: 16.66666667%;
+    }
+    .col-sm-offset-1 {
+        margin-left: 8.33333333%;
+    }
+    .col-sm-offset-0 {
+        margin-left: 0;
+    }
+}
+@media (min-width: 992px) {
+    .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
+        float: left;
+    }
+    .col-md-12 {
+        width: 100%;
+    }
+    .col-md-11 {
+        width: 91.66666667%;
+    }
+    .col-md-10 {
+        width: 83.33333333%;
+    }
+    .col-md-9 {
+        width: 75%;
+    }
+    .col-md-8 {
+        width: 66.66666667%;
+    }
+    .col-md-7 {
+        width: 58.33333333%;
+    }
+    .col-md-6 {
+        width: 50%;
+    }
+    .col-md-5 {
+        width: 41.66666667%;
+    }
+    .col-md-4 {
+        width: 33.33333333%;
+    }
+    .col-md-3 {
+        width: 25%;
+    }
+    .col-md-2 {
+        width: 16.66666667%;
+    }
+    .col-md-1 {
+        width: 8.33333333%;
+    }
+    .col-md-pull-12 {
+        right: 100%;
+    }
+    .col-md-pull-11 {
+        right: 91.66666667%;
+    }
+    .col-md-pull-10 {
+        right: 83.33333333%;
+    }
+    .col-md-pull-9 {
+        right: 75%;
+    }
+    .col-md-pull-8 {
+        right: 66.66666667%;
+    }
+    .col-md-pull-7 {
+        right: 58.33333333%;
+    }
+    .col-md-pull-6 {
+        right: 50%;
+    }
+    .col-md-pull-5 {
+        right: 41.66666667%;
+    }
+    .col-md-pull-4 {
+        right: 33.33333333%;
+    }
+    .col-md-pull-3 {
+        right: 25%;
+    }
+    .col-md-pull-2 {
+        right: 16.66666667%;
+    }
+    .col-md-pull-1 {
+        right: 8.33333333%;
+    }
+    .col-md-pull-0 {
+        right: auto;
+    }
+    .col-md-push-12 {
+        left: 100%;
+    }
+    .col-md-push-11 {
+        left: 91.66666667%;
+    }
+    .col-md-push-10 {
+        left: 83.33333333%;
+    }
+    .col-md-push-9 {
+        left: 75%;
+    }
+    .col-md-push-8 {
+        left: 66.66666667%;
+    }
+    .col-md-push-7 {
+        left: 58.33333333%;
+    }
+    .col-md-push-6 {
+        left: 50%;
+    }
+    .col-md-push-5 {
+        left: 41.66666667%;
+    }
+    .col-md-push-4 {
+        left: 33.33333333%;
+    }
+    .col-md-push-3 {
+        left: 25%;
+    }
+    .col-md-push-2 {
+        left: 16.66666667%;
+    }
+    .col-md-push-1 {
+        left: 8.33333333%;
+    }
+    .col-md-push-0 {
+        left: auto;
+    }
+    .col-md-offset-12 {
+        margin-left: 100%;
+    }
+    .col-md-offset-11 {
+        margin-left: 91.66666667%;
+    }
+    .col-md-offset-10 {
+        margin-left: 83.33333333%;
+    }
+    .col-md-offset-9 {
+        margin-left: 75%;
+    }
+    .col-md-offset-8 {
+        margin-left: 66.66666667%;
+    }
+    .col-md-offset-7 {
+        margin-left: 58.33333333%;
+    }
+    .col-md-offset-6 {
+        margin-left: 50%;
+    }
+    .col-md-offset-5 {
+        margin-left: 41.66666667%;
+    }
+    .col-md-offset-4 {
+        margin-left: 33.33333333%;
+    }
+    .col-md-offset-3 {
+        margin-left: 25%;
+    }
+    .col-md-offset-2 {
+        margin-left: 16.66666667%;
+    }
+    .col-md-offset-1 {
+        margin-left: 8.33333333%;
+    }
+    .col-md-offset-0 {
+        margin-left: 0;
+    }
+}
+@media (min-width: 1200px) {
+    .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
+        float: left;
+    }
+    .col-lg-12 {
+        width: 100%;
+    }
+    .col-lg-11 {
+        width: 91.66666667%;
+    }
+    .col-lg-10 {
+        width: 83.33333333%;
+    }
+    .col-lg-9 {
+        width: 75%;
+    }
+    .col-lg-8 {
+        width: 66.66666667%;
+    }
+    .col-lg-7 {
+        width: 58.33333333%;
+    }
+    .col-lg-6 {
+        width: 50%;
+    }
+    .col-lg-5 {
+        width: 41.66666667%;
+    }
+    .col-lg-4 {
+        width: 33.33333333%;
+    }
+    .col-lg-3 {
+        width: 25%;
+    }
+    .col-lg-2 {
+        width: 16.66666667%;
+    }
+    .col-lg-1 {
+        width: 8.33333333%;
+    }
+    .col-lg-pull-12 {
+        right: 100%;
+    }
+    .col-lg-pull-11 {
+        right: 91.66666667%;
+    }
+    .col-lg-pull-10 {
+        right: 83.33333333%;
+    }
+    .col-lg-pull-9 {
+        right: 75%;
+    }
+    .col-lg-pull-8 {
+        right: 66.66666667%;
+    }
+    .col-lg-pull-7 {
+        right: 58.33333333%;
+    }
+    .col-lg-pull-6 {
+        right: 50%;
+    }
+    .col-lg-pull-5 {
+        right: 41.66666667%;
+    }
+    .col-lg-pull-4 {
+        right: 33.33333333%;
+    }
+    .col-lg-pull-3 {
+        right: 25%;
+    }
+    .col-lg-pull-2 {
+        right: 16.66666667%;
+    }
+    .col-lg-pull-1 {
+        right: 8.33333333%;
+    }
+    .col-lg-pull-0 {
+        right: auto;
+    }
+    .col-lg-push-12 {
+        left: 100%;
+    }
+    .col-lg-push-11 {
+        left: 91.66666667%;
+    }
+    .col-lg-push-10 {
+        left: 83.33333333%;
+    }
+    .col-lg-push-9 {
+        left: 75%;
+    }
+    .col-lg-push-8 {
+        left: 66.66666667%;
+    }
+    .col-lg-push-7 {
+        left: 58.33333333%;
+    }
+    .col-lg-push-6 {
+        left: 50%;
+    }
+    .col-lg-push-5 {
+        left: 41.66666667%;
+    }
+    .col-lg-push-4 {
+        left: 33.33333333%;
+    }
+    .col-lg-push-3 {
+        left: 25%;
+    }
+    .col-lg-push-2 {
+        left: 16.66666667%;
+    }
+    .col-lg-push-1 {
+        left: 8.33333333%;
+    }
+    .col-lg-push-0 {
+        left: auto;
+    }
+    .col-lg-offset-12 {
+        margin-left: 100%;
+    }
+    .col-lg-offset-11 {
+        margin-left: 91.66666667%;
+    }
+    .col-lg-offset-10 {
+        margin-left: 83.33333333%;
+    }
+    .col-lg-offset-9 {
+        margin-left: 75%;
+    }
+    .col-lg-offset-8 {
+        margin-left: 66.66666667%;
+    }
+    .col-lg-offset-7 {
+        margin-left: 58.33333333%;
+    }
+    .col-lg-offset-6 {
+        margin-left: 50%;
+    }
+    .col-lg-offset-5 {
+        margin-left: 41.66666667%;
+    }
+    .col-lg-offset-4 {
+        margin-left: 33.33333333%;
+    }
+    .col-lg-offset-3 {
+        margin-left: 25%;
+    }
+    .col-lg-offset-2 {
+        margin-left: 16.66666667%;
+    }
+    .col-lg-offset-1 {
+        margin-left: 8.33333333%;
+    }
+    .col-lg-offset-0 {
+        margin-left: 0;
+    }
+}
+table {
+    background-color: transparent;
+}
+caption {
+    padding-top: 8px;
+    padding-bottom: 8px;
+    color: #777;
+    text-align: left;
+}
+th {
+    text-align: left;
+}
+.table {
+    width: 100%;
+    max-width: 100%;
+    margin-bottom: 20px;
+}
+.table > thead > tr > th,
+.table > tbody > tr > th,
+.table > tfoot > tr > th,
+.table > thead > tr > td,
+.table > tbody > tr > td,
+.table > tfoot > tr > td {
+    padding: 8px;
+    line-height: 1.42857143;
+    vertical-align: top;
+    border-top: 1px solid #ddd;
+}
+.table > thead > tr > th {
+    vertical-align: bottom;
+    border-bottom: 2px solid #ddd;
+}
+.table > caption + thead > tr:first-child > th,
+.table > colgroup + thead > tr:first-child > th,
+.table > thead:first-child > tr:first-child > th,
+.table > caption + thead > tr:first-child > td,
+.table > colgroup + thead > tr:first-child > td,
+.table > thead:first-child > tr:first-child > td {
+    border-top: 0;
+}
+.table > tbody + tbody {
+    border-top: 2px solid #ddd;
+}
+.table .table {
+    background-color: #fff;
+}
+.table-condensed > thead > tr > th,
+.table-condensed > tbody > tr > th,
+.table-condensed > tfoot > tr > th,
+.table-condensed > thead > tr > td,
+.table-condensed > tbody > tr > td,
+.table-condensed > tfoot > tr > td {
+    padding: 5px;
+}
+.table-bordered {
+    border: 1px solid #ddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > tbody > tr > th,
+.table-bordered > tfoot > tr > th,
+.table-bordered > thead > tr > td,
+.table-bordered > tbody > tr > td,
+.table-bordered > tfoot > tr > td {
+    border: 1px solid #ddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > thead > tr > td {
+    border-bottom-width: 2px;
+}
+.table-striped > tbody > tr:nth-of-type(odd) {
+    background-color: #f9f9f9;
+}
+.table-hover > tbody > tr:hover {
+    background-color: #f5f5f5;
+}
+table col[class*="col-"] {
+    position: static;
+    display: table-column;
+    float: none;
+}
+table td[class*="col-"],
+table th[class*="col-"] {
+    position: static;
+    display: table-cell;
+    float: none;
+}
+.table > thead > tr > td.active,
+.table > tbody > tr > td.active,
+.table > tfoot > tr > td.active,
+.table > thead > tr > th.active,
+.table > tbody > tr > th.active,
+.table > tfoot > tr > th.active,
+.table > thead > tr.active > td,
+.table > tbody > tr.active > td,
+.table > tfoot > tr.active > td,
+.table > thead > tr.active > th,
+.table > tbody > tr.active > th,
+.table > tfoot > tr.active > th {
+    background-color: #f5f5f5;
+}
+.table-hover > tbody > tr > td.active:hover,
+.table-hover > tbody > tr > th.active:hover,
+.table-hover > tbody > tr.active:hover > td,
+.table-hover > tbody > tr:hover > .active,
+.table-hover > tbody > tr.active:hover > th {
+    background-color: #e8e8e8;
+}
+.table > thead > tr > td.success,
+.table > tbody > tr > td.success,
+.table > tfoot > tr > td.success,
+.table > thead > tr > th.success,
+.table > tbody > tr > th.success,
+.table > tfoot > tr > th.success,
+.table > thead > tr.success > td,
+.table > tbody > tr.success > td,
+.table > tfoot > tr.success > td,
+.table > thead > tr.success > th,
+.table > tbody > tr.success > th,
+.table > tfoot > tr.success > th {
+    background-color: #dff0d8;
+}
+.table-hover > tbody > tr > td.success:hover,
+.table-hover > tbody > tr > th.success:hover,
+.table-hover > tbody > tr.success:hover > td,
+.table-hover > tbody > tr:hover > .success,
+.table-hover > tbody > tr.success:hover > th {
+    background-color: #d0e9c6;
+}
+.table > thead > tr > td.info,
+.table > tbody > tr > td.info,
+.table > tfoot > tr > td.info,
+.table > thead > tr > th.info,
+.table > tbody > tr > th.info,
+.table > tfoot > tr > th.info,
+.table > thead > tr.info > td,
+.table > tbody > tr.info > td,
+.table > tfoot > tr.info > td,
+.table > thead > tr.info > th,
+.table > tbody > tr.info > th,
+.table > tfoot > tr.info > th {
+    background-color: #d9edf7;
+}
+.table-hover > tbody > tr > td.info:hover,
+.table-hover > tbody > tr > th.info:hover,
+.table-hover > tbody > tr.info:hover > td,
+.table-hover > tbody > tr:hover > .info,
+.table-hover > tbody > tr.info:hover > th {
+    background-color: #c4e3f3;
+}
+.table > thead > tr > td.warning,
+.table > tbody > tr > td.warning,
+.table > tfoot > tr > td.warning,
+.table > thead > tr > th.warning,
+.table > tbody > tr > th.warning,
+.table > tfoot > tr > th.warning,
+.table > thead > tr.warning > td,
+.table > tbody > tr.warning > td,
+.table > tfoot > tr.warning > td,
+.table > thead > tr.warning > th,
+.table > tbody > tr.warning > th,
+.table > tfoot > tr.warning > th {
+    background-color: #fcf8e3;
+}
+.table-hover > tbody > tr > td.warning:hover,
+.table-hover > tbody > tr > th.warning:hover,
+.table-hover > tbody > tr.warning:hover > td,
+.table-hover > tbody > tr:hover > .warning,
+.table-hover > tbody > tr.warning:hover > th {
+    background-color: #faf2cc;
+}
+.table > thead > tr > td.danger,
+.table > tbody > tr > td.danger,
+.table > tfoot > tr > td.danger,
+.table > thead > tr > th.danger,
+.table > tbody > tr > th.danger,
+.table > tfoot > tr > th.danger,
+.table > thead > tr.danger > td,
+.table > tbody > tr.danger > td,
+.table > tfoot > tr.danger > td,
+.table > thead > tr.danger > th,
+.table > tbody > tr.danger > th,
+.table > tfoot > tr.danger > th {
+    background-color: #f2dede;
+}
+.table-hover > tbody > tr > td.danger:hover,
+.table-hover > tbody > tr > th.danger:hover,
+.table-hover > tbody > tr.danger:hover > td,
+.table-hover > tbody > tr:hover > .danger,
+.table-hover > tbody > tr.danger:hover > th {
+    background-color: #ebcccc;
+}
+.table-responsive {
+    min-height: .01%;
+    overflow-x: auto;
+}
+@media screen and (max-width: 767px) {
+    .table-responsive {
+        width: 100%;
+        margin-bottom: 15px;
+        overflow-y: hidden;
+        -ms-overflow-style: -ms-autohiding-scrollbar;
+        border: 1px solid #ddd;
+    }
+    .table-responsive > .table {
+        margin-bottom: 0;
+    }
+    .table-responsive > .table > thead > tr > th,
+    .table-responsive > .table > tbody > tr > th,
+    .table-responsive > .table > tfoot > tr > th,
+    .table-responsive > .table > thead > tr > td,
+    .table-responsive > .table > tbody > tr > td,
+    .table-responsive > .table > tfoot > tr > td {
+        white-space: nowrap;
+    }
+    .table-responsive > .table-bordered {
+        border: 0;
+    }
+    .table-responsive > .table-bordered > thead > tr > th:first-child,
+    .table-responsive > .table-bordered > tbody > tr > th:first-child,
+    .table-responsive > .table-bordered > tfoot > tr > th:first-child,
+    .table-responsive > .table-bordered > thead > tr > td:first-child,
+    .table-responsive > .table-bordered > tbody > tr > td:first-child,
+    .table-responsive > .table-bordered > tfoot > tr > td:first-child {
+        border-left: 0;
+    }
+    .table-responsive > .table-bordered > thead > tr > th:last-child,
+    .table-responsive > .table-bordered > tbody > tr > th:last-child,
+    .table-responsive > .table-bordered > tfoot > tr > th:last-child,
+    .table-responsive > .table-bordered > thead > tr > td:last-child,
+    .table-responsive > .table-bordered > tbody > tr > td:last-child,
+    .table-responsive > .table-bordered > tfoot > tr > td:last-child {
+        border-right: 0;
+    }
+    .table-responsive > .table-bordered > tbody > tr:last-child > th,
+    .table-responsive > .table-bordered > tfoot > tr:last-child > th,
+    .table-responsive > .table-bordered > tbody > tr:last-child > td,
+    .table-responsive > .table-bordered > tfoot > tr:last-child > td {
+        border-bottom: 0;
+    }
+}
+fieldset {
+    min-width: 0;
+    padding: 0;
+    margin: 0;
+    border: 0;
+}
+legend {
+    display: block;
+    width: 100%;
+    padding: 0;
+    margin-bottom: 20px;
+    font-size: 21px;
+    line-height: inherit;
+    color: #333;
+    border: 0;
+    border-bottom: 1px solid #e5e5e5;
+}
+label {
+    display: inline-block;
+    max-width: 100%;
+    margin-bottom: 5px;
+    font-weight: bold;
+}
+input[type="search"] {
+    -webkit-box-sizing: border-box;
+    -moz-box-sizing: border-box;
+    box-sizing: border-box;
+}
+input[type="radio"],
+input[type="checkbox"] {
+    margin: 4px 0 0;
+    margin-top: 1px \9;
+    line-height: normal;
+}
+input[type="file"] {
+    display: block;
+}
+input[type="range"] {
+    display: block;
+    width: 100%;
+}
+select[multiple],
+select[size] {
+    height: auto;
+}
+input[type="file"]:focus,
+input[type="radio"]:focus,
+input[type="checkbox"]:focus {
+    outline: thin dotted;
+    outline: 5px auto -webkit-focus-ring-color;
+    outline-offset: -2px;
+}
+output {
+    display: block;
+    padding-top: 7px;
+    font-size: 14px;
+    line-height: 1.42857143;
+    color: #555;
+}
+.ui-form-control {
+    display: block;
+    width: 100%;
+    height: 34px;
+    padding: 6px 12px;
+    font-size: 14px;
+    line-height: 1.42857143;
+    color: #555;
+    background-color: #fff;
+    background-image: none;
+    border: 1px solid #ccc;
+    border-radius: 4px;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+    -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
+    -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+    transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+}
+.ui-form-control:focus {
+    border-color: #66afe9;
+    outline: 0;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
+    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
+}
+.ui-form-control::-moz-placeholder {
+    color: #999;
+    opacity: 1;
+}
+.ui-form-control:-ms-input-placeholder {
+    color: #999;
+}
+.ui-form-control::-webkit-input-placeholder {
+    color: #999;
+}
+.ui-form-control[disabled],
+.ui-form-control[readonly],
+fieldset[disabled] .ui-form-control {
+    background-color: #eee;
+    opacity: 1;
+}
+.ui-form-control[disabled],
+fieldset[disabled] .ui-form-control {
+    cursor: not-allowed;
+}
+textarea.ui-form-control {
+    height: auto;
+}
+input[type="search"] {
+    -webkit-appearance: none;
+}
+@media screen and (-webkit-min-device-pixel-ratio: 0) {
+    input[type="date"],
+    input[type="time"],
+    input[type="datetime-local"],
+    input[type="month"] {
+        line-height: 34px;
+    }
+    input[type="date"].input-sm,
+    input[type="time"].input-sm,
+    input[type="datetime-local"].input-sm,
+    input[type="month"].input-sm,
+    .input-group-sm input[type="date"],
+    .input-group-sm input[type="time"],
+    .input-group-sm input[type="datetime-local"],
+    .input-group-sm input[type="month"] {
+        line-height: 30px;
+    }
+    input[type="date"].input-lg,
+    input[type="time"].input-lg,
+    input[type="datetime-local"].input-lg,
+    input[type="month"].input-lg,
+    .input-group-lg input[type="date"],
+    .input-group-lg input[type="time"],
+    .input-group-lg input[type="datetime-local"],
+    .input-group-lg input[type="month"] {
+        line-height: 46px;
+    }
+}
+.form-group {
+    margin-bottom: 15px;
+}
+.radio,
+.checkbox {
+    position: relative;
+    display: block;
+    margin-top: 10px;
+    margin-bottom: 10px;
+}
+.radio label,
+.checkbox label {
+    min-height: 20px;
+    padding-left: 20px;
+    margin-bottom: 0;
+    font-weight: normal;
+    cursor: pointer;
+}
+.radio input[type="radio"],
+.radio-inline input[type="radio"],
+.checkbox input[type="checkbox"],
+.checkbox-inline input[type="checkbox"] {
+    position: absolute;
+    margin-top: 4px \9;
+    margin-left: -20px;
+}
+.radio + .radio,
+.checkbox + .checkbox {
+    margin-top: -5px;
+}
+.radio-inline,
+.checkbox-inline {
+    position: relative;
+    display: inline-block;
+    padding-left: 20px;
+    margin-bottom: 0;
+    font-weight: normal;
+    vertical-align: middle;
+    cursor: pointer;
+}
+.radio-inline + .radio-inline,
+.checkbox-inline + .checkbox-inline {
+    margin-top: 0;
+    margin-left: 10px;
+}
+input[type="radio"][disabled],
+input[type="checkbox"][disabled],
+input[type="radio"].disabled,
+input[type="checkbox"].disabled,
+fieldset[disabled] input[type="radio"],
+fieldset[disabled] input[type="checkbox"] {
+    cursor: not-allowed;
+}
+.radio-inline.disabled,
+.checkbox-inline.disabled,
+fieldset[disabled] .radio-inline,
+fieldset[disabled] .checkbox-inline {
+    cursor: not-allowed;
+}
+.radio.disabled label,
+.checkbox.disabled label,
+fieldset[disabled] .radio label,
+fieldset[disabled] .checkbox label {
+    cursor: not-allowed;
+}
+.ui-form-control-static {
+    min-height: 34px;
+    padding-top: 7px;
+    padding-bottom: 7px;
+    margin-bottom: 0;
+}
+.ui-form-control-static.input-lg,
+.ui-form-control-static.input-sm {
+    padding-right: 0;
+    padding-left: 0;
+}
+.input-sm {
+    height: 30px;
+    padding: 5px 10px;
+    font-size: 12px;
+    line-height: 1.5;
+    border-radius: 3px;
+}
+select.input-sm {
+    height: 30px;
+    line-height: 30px;
+}
+textarea.input-sm,
+select[multiple].input-sm {
+    height: auto;
+}
+.form-group-sm .ui-form-control {
+    height: 30px;
+    padding: 5px 10px;
+    font-size: 12px;
+    line-height: 1.5;
+    border-radius: 3px;
+}
+select.form-group-sm .ui-form-control {
+    height: 30px;
+    line-height: 30px;
+}
+textarea.form-group-sm .ui-form-control,
+select[multiple].form-group-sm .ui-form-control {
+    height: auto;
+}
+.form-group-sm .ui-form-control-static {
+    height: 30px;
+    min-height: 32px;
+    padding: 5px 10px;
+    font-size: 12px;
+    line-height: 1.5;
+}
+.input-lg {
+    height: 46px;
+    padding: 10px 16px;
+    font-size: 18px;
+    line-height: 1.3333333;
+    border-radius: 6px;
+}
+select.input-lg {
+    height: 46px;
+    line-height: 46px;
+}
+textarea.input-lg,
+select[multiple].input-lg {
+    height: auto;
+}
+.form-group-lg .ui-form-control {
+    height: 46px;
+    padding: 10px 16px;
+    font-size: 18px;
+    line-height: 1.3333333;
+    border-radius: 6px;
+}
+select.form-group-lg .ui-form-control {
+    height: 46px;
+    line-height: 46px;
+}
+textarea.form-group-lg .ui-form-control,
+select[multiple].form-group-lg .ui-form-control {
+    height: auto;
+}
+.form-group-lg .ui-form-control-static {
+    height: 46px;
+    min-height: 38px;
+    padding: 10px 16px;
+    font-size: 18px;
+    line-height: 1.3333333;
+}
+.has-feedback {
+    position: relative;
+}
+.has-feedback .ui-form-control {
+    padding-right: 42.5px;
+}
+.ui-form-control-feedback {
+    position: absolute;
+    top: 0;
+    right: 0;
+    z-index: 2;
+    display: block;
+    width: 34px;
+    height: 34px;
+    line-height: 34px;
+    text-align: center;
+    pointer-events: none;
+}
+.input-lg + .ui-form-control-feedback {
+    width: 46px;
+    height: 46px;
+    line-height: 46px;
+}
+.input-sm + .ui-form-control-feedback {
+    width: 30px;
+    height: 30px;
+    line-height: 30px;
+}
+.has-success .help-block,
+.has-success .control-label,
+.has-success .radio,
+.has-success .checkbox,
+.has-success .radio-inline,
+.has-success .checkbox-inline,
+.has-success.radio label,
+.has-success.checkbox label,
+.has-success.radio-inline label,
+.has-success.checkbox-inline label {
+    color: #3c763d;
+}
+.has-success .ui-form-control {
+    border-color: #3c763d;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+}
+.has-success .ui-form-control:focus {
+    border-color: #2b542c;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
+}
+.has-success .input-group-addon {
+    color: #3c763d;
+    background-color: #dff0d8;
+    border-color: #3c763d;
+}
+.has-success .ui-form-control-feedback {
+    color: #3c763d;
+}
+.has-warning .help-block,
+.has-warning .control-label,
+.has-warning .radio,
+.has-warning .checkbox,
+.has-warning .radio-inline,
+.has-warning .checkbox-inline,
+.has-warning.radio label,
+.has-warning.checkbox label,
+.has-warning.radio-inline label,
+.has-warning.checkbox-inline label {
+    color: #8a6d3b;
+}
+.has-warning .ui-form-control {
+    border-color: #8a6d3b;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+}
+.has-warning .ui-form-control:focus {
+    border-color: #66512c;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
+}
+.has-warning .input-group-addon {
+    color: #8a6d3b;
+    background-color: #fcf8e3;
+    border-color: #8a6d3b;
+}
+.has-warning .ui-form-control-feedback {
+    color: #8a6d3b;
+}
+.has-error .help-block,
+.has-error .control-label,
+.has-error .radio,
+.has-error .checkbox,
+.has-error .radio-inline,
+.has-error .checkbox-inline,
+.has-error.radio label,
+.has-error.checkbox label,
+.has-error.radio-inline label,
+.has-error.checkbox-inline label {
+    color: #a94442;
+}
+.has-error .ui-form-control {
+    border-color: #a94442;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+}
+.has-error .ui-form-control:focus {
+    border-color: #843534;
+    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
+    box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
+}
+.has-error .input-group-addon {
+    color: #a94442;
+    background-color: #f2dede;
+    border-color: #a94442;
+}
+.has-error .ui-form-control-feedback {
+    color: #a94442;
+}
+.has-feedback label ~ .ui-form-control-feedback {
+    top: 25px;
+}
+.has-feedback label.sr-only ~ .ui-form-control-feedback {
+    top: 0;
+}
+.help-block {
+    display: block;
+    margin-top: 5px;
+    margin-bottom: 10px;
+    color: #737373;
+}
+@media (min-width: 768px) {
+    .form-inline .form-group {
+        display: inline-block;
+        margin-bottom: 0;
+        vertical-align: middle;
+    }
+    .form-inline .ui-form-control {
+        display: inline-block;
+        width: auto;
+        vertical-align: middle;
+    }
+    .form-inline .ui-form-control-static {
+        display: inline-block;
+    }
+    .form-inline .input-group {
+        display: inline-table;
+        vertical-align: middle;
+    }
+    .form-inline .input-group .input-group-addon,
+    .form-inline .input-group .input-group-btn,
+    .form-inline .input-group .ui-form-control {
+        width: auto;
+    }
+    .form-inline .input-group > .ui-form-control {
+        width: 100%;
+    }
+    .form-inline .control-label {
+        margin-bottom: 0;
+        vertical-align: middle;
+    }
+    .form-inline .radio,
+    .form-inline .checkbox {
+        display: inline-block;
+        margin-top: 0;
+        margin-bottom: 0;
+        vertical-align: middle;
+    }
+    .form-inline .radio label,
+    .form-inline .checkbox label {
+        padding-left: 0;
+    }
+    .form-inline .radio input[type="radio"],
+    .form-inline .checkbox input[type="checkbox"] {
+        position: relative;
+        margin-left: 0;
+    }
+    .form-inline .has-feedback .ui-form-control-feedback {
+        top: 0;
+    }
+}
+.form-horizontal .radio,
+.form-horizontal .checkbox,
+.form-horizontal .radio-inline,
+.form-horizontal .checkbox-inline {
+    padding-top: 7px;
+    margin-top: 0;
+    margin-bottom: 0;
+}
+.form-horizontal .radio,
+.form-horizontal .checkbox {
+    min-height: 27px;
+}
+.form-horizontal .form-group {
+    margin-right: -15px;
+    margin-left: -15px;
+}
+@media (min-width: 768px) {
+    .form-horizontal .control-label {
+        padding-top: 7px;
+        margin-bottom: 0;
+        text-align: right;
+    }
+}
+.form-horizontal .has-feedback .ui-form-control-feedback {
+    right: 15px;
+}
+@media (min-width: 768px) {
+    .form-horizontal .form-group-lg .control-label {
+        padding-top: 14.333333px;
+    }
+}
+@media (min-width: 768px) {
+    .form-horizontal .form-group-sm .control-label {
+        padding-top: 6px;
+    }
+}
+.btn {
+    display: inline-block;
+    padding: 6px 12px;
+    margin-bottom: 0;
+    font-size: 14px;
+    font-weight: normal;
+    line-height: 1.42857143;
+    text-align: center;
+    white-space: nowrap;
+    vertical-align: middle;
+    -ms-touch-action: manipulation;
+    touch-action: manipulation;
+    cursor: pointer;
+    -webkit-user-select: none;
+    -moz-user-select: none;
+    -ms-user-select: none;
+    user-select: none;
+    background-image: none;
+    border: 1px solid transparent;
+    border-radius: 4px;
+}
+.btn:focus,
+.btn:active:focus,
+.btn.active:focus,
+.btn.focus,
+.btn:active.focus,
+.btn.active.focus {
+    outline: thin dotted;
+    outline: 5px auto -webkit-focus-ring-color;
+    outline-offset: -2px;
+}
+.btn:hover,
+.btn:focus,
+.btn.focus {
+    color: #333;
+    text-decoration: none;
+}
+.btn:active,
+.btn.active {
+    background-image: none;
+    outline: 0;
+    -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+    box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+}
+.btn.disabled,
+.btn[disabled],
+fieldset[disabled] .btn {
+    pointer-events: none;
+    cursor: not-allowed;
+    filter: alpha(opacity=65);
+    -webkit-box-shadow: none;
+    box-shadow: none;
+    opacity: .65;
+}
+.btn-default {
+    color: #333;
+    background-color: #fff;
+    border-color: #ccc;
+}
+.btn-default:hover,
+.btn-default:focus,
+.btn-default.focus,
+.btn-default:active,
+.btn-default.active,
+.open > .dropdown-toggle.btn-default {
+    color: #333;
+    background-color: #e6e6e6;
+    border-color: #adadad;
+}
+.btn-default:active,
+.btn-default.active,
+.open > .dropdown-toggle.btn-default {
+    background-image: none;
+}
+.btn-default.disabled,
+.btn-default[disabled],
+fieldset[disabled] .btn-default,
+.btn-default.disabled:hover,
+.btn-default[disabled]:hover,
+fieldset[disabled] .btn-default:hover,
+.btn-default.disabled:focus,
+.btn-default[disabled]:focus,
+fieldset[disabled] .btn-default:focus,
+.btn-default.disabled.focus,
+.btn-default[disabled].focus,
+fieldset[disabled] .btn-default.focus,
+.btn-default.disabled:active,
+.btn-default[disabled]:active,
+fieldset[disabled] .btn-default:active,
+.btn-default.disabled.active,
+.btn-default[disabled].active,
+fieldset[disabled] .btn-default.active {
+    background-color: #fff;
+    border-color: #ccc;
+}
+.btn-default .badge {
+    color: #fff;
+    background-color: #333;
+}
+.btn-primary {
+    color: #fff;
+    background-color: #337ab7;
+    border-color: #2e6da4;
+}
+.btn-primary:hover,
+.btn-primary:focus,
+.btn-primary.focus,
+.btn-primary:active,
+.btn-primary.active,
+.open > .dropdown-toggle.btn-primary {
+    color: #fff;
+    background-color: #286090;
+    border-color: #204d74;
+}
+.btn-primary:active,
+.btn-primary.active,
+.open > .dropdown-toggle.btn-primary {
+    background-image: none;
+}
+.btn-primary.disabled,
+.btn-primary[disabled],
+fieldset[disabled] .btn-primary,
+.btn-primary.disabled:hover,
+.btn-primary[disabled]:hover,
+fieldset[disabled] .btn-primary:hover,
+.btn-primary.disabled:focus,
+.btn-primary[disabled]:focus,
+fieldset[disabled] .btn-primary:focus,
+.btn-primary.disabled.focus,
+.btn-primary[disabled].focus,
+fieldset[disabled] .btn-primary.focus,
+.btn-primary.disabled:active,
+.btn-primary[disabled]:active,
+fieldset[disabled] .btn-primary:active,
+.btn-primary.disabled.active,
+.btn-primary[disabled].active,
+fieldset[disabled] .btn-primary.active {
+    background-color: #337ab7;
+    border-color: #2e6da4;
+}
+.btn-primary .badge {
+    color: #337ab7;
+    background-color: #fff;
+}
+.btn-success {
+    color: #fff;
+    background-color: #5cb85c;
+    border-color: #4cae4c;
+}
+.btn-success:hover,
+.btn-success:focus,
+.btn-success.focus,
+.btn-success:active,
+.btn-success.active,
+.open > .dropdown-toggle.btn-success {
+    color: #fff;
+    background-color: #449d44;
+    border-color: #398439;
+}
+.btn-success:active,
+.btn-success.active,
+.open > .dropdown-toggle.btn-success {
+    background-image: none;
+}
+.btn-success.disabled,
+.btn-success[disabled],
+fieldset[disabled] .btn-success,
+.btn-success.disabled:hover,
+.btn-success[disabled]:hover,
+fieldset[disabled] .btn-success:hover,
+.btn-success.disabled:focus,
+.btn-success[disabled]:focus,
+fieldset[disabled] .btn-success:focus,
+.btn-success.disabled.focus,
+.btn-success[disabled].focus,
+fieldset[disabled] .btn-success.focus,
+.btn-success.disabled:active,
+.btn-success[disabled]:active,
+fieldset[disabled] .btn-success:active,
+.btn-success.disabled.active,
+.btn-success[disabled].active,
+fieldset[disabled] .btn-success.active {
+    background-color: #5cb85c;
+    border-color: #4cae4c;
+}
+.btn-success .badge {
+    color: #5cb85c;
+    background-color: #fff;
+}
+.btn-info {
+    color: #fff;
+    background-color: #5bc0de;
+    border-color: transparent;
+}
+.btn-info:hover,
+.btn-info:focus,
+.btn-info.focus,
+.btn-info:active,
+.btn-info.active,
+.open > .dropdown-toggle.btn-info {
+    color: #fff;
+    background-color: #31b0d5;
+    border-color: transparent;
+}
+.btn-info:active,
+.btn-info.active,
+.open > .dropdown-toggle.btn-info {
+    background-image: none;
+}
+.btn-info.disabled,
+.btn-info[disabled],
+fieldset[disabled] .btn-info,
+.btn-info.disabled:hover,
+.btn-info[disabled]:hover,
+fieldset[disabled] .btn-info:hover,
+.btn-info.disabled:focus,
+.btn-info[disabled]:focus,
+fieldset[disabled] .btn-info:focus,
+.btn-info.disabled.focus,
+.btn-info[disabled].focus,
+fieldset[disabled] .btn-info.focus,
+.btn-info.disabled:active,
+.btn-info[disabled]:active,
+fieldset[disabled] .btn-info:active,
+.btn-info.disabled.active,
+.btn-info[disabled].active,
+fieldset[disabled] .btn-info.active {
+    background-color: #5bc0de;
+    border-color: transparent;
+}
+.btn-info .badge {
+    color: #5bc0de;
+    background-color: #fff;
+}
+.btn-warning {
+    color: #fff;
+    background-color: #f0ad4e;
+    border-color: #eea236;
+}
+.btn-warning:hover,
+.btn-warning:focus,
+.btn-warning.focus,
+.btn-warning:active,
+.btn-warning.active,
+.open > .dropdown-toggle.btn-warning {
+    color: #fff;
+    background-color: #ec971f;
+    border-color: #d58512;
+}
+.btn-warning:active,
+.btn-warning.active,
+.open > .dropdown-toggle.btn-warning {
+    background-image: none;
+}
+.btn-warning.disabled,
+.btn-warning[disabled],
+fieldset[disabled] .btn-warning,
+.btn-warning.disabled:hover,
+.btn-warning[disabled]:hover,
+fieldset[disabled] .btn-warning:hover,
+.btn-warning.disabled:focus,
+.btn-warning[disabled]:focus,
+fieldset[disabled] .btn-warning:focus,
+.btn-warning.disabled.focus,
+.btn-warning[disabled].focus,
+fieldset[disabled] .btn-warning.focus,
+.btn-warning.disabled:active,
+.btn-warning[disabled]:active,
+fieldset[disabled] .btn-warning:active,
+.btn-warning.disabled.active,
+.btn-warning[disabled].active,
+fieldset[disabled] .btn-warning.active {
+    background-color: #f0ad4e;
+    border-color: #eea236;
+}
+.btn-warning .badge {
+    color: #f0ad4e;
+    background-color: #fff;
+}
+.btn-danger {
+    color: #fff;
+    background-color: #d9534f;
+    border-color: #d43f3a;
+}
+.btn-danger:hover,
+.btn-danger:focus,
+.btn-danger.focus,
+.btn-danger:active,
+.btn-danger.active,
+.open > .dropdown-toggle.btn-danger {
+    color: #fff;
+    background-color: #c9302c;
+    border-color: #ac2925;
+}
+.btn-danger:active,
+.btn-danger.active,
+.open > .dropdown-toggle.btn-danger {
+    background-image: none;
+}
+.btn-danger.disabled,
+.btn-danger[disabled],
+fieldset[disabled] .btn-danger,
+.btn-danger.disabled:hover,
+.btn-danger[disabled]:hover,
+fieldset[disabled] .btn-danger:hover,
+.btn-danger.disabled:focus,
+.btn-danger[disabled]:focus,
+fieldset[disabled] .btn-danger:focus,
+.btn-danger.disabled.focus,
+.btn-danger[disabled].focus,
+fieldset[disabled] .btn-danger.focus,
+.btn-danger.disabled:active,
+.btn-danger[disabled]:active,
+fieldset[disabled] .btn-danger:active,
+.btn-danger.disabled.active,
+.btn-danger[disabled].active,
+fieldset[disabled] .btn-danger.active {
+    background-color: #d9534f;
+    border-color: #d43f3a;
+}
+.btn-danger .badge {
+    color: #d9534f;
+    background-color: #fff;
+}
+.btn-link {
+    font-weight: normal;
+    color: #337ab7;
+    border-radius: 0;
+}
+.btn-link,
+.btn-link:active,
+.btn-link.active,
+.btn-link[disabled],
+fieldset[disabled] .btn-link {
+    background-color: transparent;
+    -webkit-box-shadow: none;
+    box-shadow: none;
+}
+.btn-link,
+.btn-link:hover,
+.btn-link:focus,
+.btn-link:active {
+    border-color: transparent;
+}
+.btn-link:hover,
+.btn-link:focus {
+    color: #23527c;
+    text-decoration: underline;
+    background-color: transparent;
+}
+.btn-link[disabled]:hover,
+fieldset[disabled] .btn-link:hover,
+.btn-link[disabled]:focus,
+fieldset[disabled] .btn-link:focus {
+    color: #777;
+    text-decoration: none;
+}
+.btn-lg,
+.btn-group-lg > .btn {
+    padding: 10px 16px;
+    font-size: 18px;
+    line-height: 1.3333333;
+    border-radius: 6px;
+}
+.btn-sm,
+.btn-group-sm > .btn {
+    padding: 5px 10px;
+    font-size: 12px;
+    line-height: 1.5;
+    border-radius: 3px;
+}
+.btn-xs,
+.btn-group-xs > .btn {
+    padding: 1px 5px;
+    font-size: 12px;
+    line-height: 1.5;
+    border-radius: 3px;
+    margin: 1px;
+}
+.btn-block {
+    display: block;
+    width: 100%;
+}
+.btn-block + .btn-block {
+    margin-top: 5px;
+}
+input[type="submit"].btn-block,
+input[type="reset"].btn-block,
+input[type="button"].btn-block {
+    width: 100%;
+}
+.fade {
+    opacity: 0;
+    -webkit-transition: opacity .15s linear;
+    -o-transition: opacity .15s linear;
+    transition: opacity .15s linear;
+}
+.fade.in {
+    opacity: 1;
+}
+.collapse {
+    display: none;
+}
+.collapse.in {
+    display: block;
+}
+tr.collapse.in {
+    display: table-row;
+}
+tbody.collapse.in {
+    display: table-row-group;
+}
+.collapsing {
+    position: relative;
+    height: 0;
+    overflow: hidden;
+    -webkit-transition-timing-function: ease;
+    -o-transition-timing-function: ease;
+    transition-timing-function: ease;
+    -webkit-transition-duration: .35s;
+    -o-transition-duration: .35s;
+    transition-duration: .35s;
+    -webkit-transition-property: height, visibility;
+    -o-transition-property: height, visibility;
+    transition-property: height, visibility;
+}
+.caret {
+    display: inline-block;
+    width: 0;
+    height: 0;
+    margin-left: 2px;
+    vertical-align: middle;
+    border-top: 4px dashed;
+    border-right: 4px solid transparent;
+    border-left: 4px solid transparent;
+}
+.dropup,
+.dropdown {
+    position: relative;
+}
+.dropdown-toggle:focus {
+    outline: 0;
+}
+.dropdown-menu {
+    position: absolute;
+    top: 100%;
+    left: 0;
+    z-index: 1000;
+    display: none;
+    float: left;
+    min-width: 160px;
+    padding: 5px 0;
+    margin: 2px 0 0;
+    font-size: 14px;
+    text-align: left;
+    list-style: none;
+    background-color: #fff;
+    -webkit-background-clip: padding-box;
+    background-clip: padding-box;
+    border: 1px solid #ccc;
+    border: 1px solid rgba(0, 0, 0, .15);
+    border-radius: 4px;
+    -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
+    box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
+}
+.dropdown-menu.pull-right {
+    right: 0;
+    left: auto;
+}
+.dropdown-menu .divider {
+    height: 1px;
+    margin: 9px 0;
+    overflow: hidden;
+    background-color: #e5e5e5;
+}
+.dropdown-menu > li > a {
+    display: block;
+    padding: 3px 20px;
+    clear: both;
+    font-weight: normal;
+    line-height: 1.42857143;
+    color: #333;
+    white-space: nowrap;
+}
+.dropdown-menu > li > a:hover,
+.dropdown-menu > li > a:focus {
+    color: #262626;
+    text-decoration: none;
+    background-color: #f5f5f5;
+}
+.dropdown-menu > .active > a,
+.dropdown-menu > .active > a:hover,
+.dropdown-menu > .active > a:focus {
+    color: #fff;
+    text-decoration: none;
+    background-color: #337ab7;
+    outline: 0;
+}
+.dropdown-menu > .disabled > a,
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+    color: #777;
+}
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+    text-decoration: none;
+    cursor: not-allowed;
+    background-color: transparent;
+    background-image: none;
+    filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.open > .dropdown-menu {
+    display: block;
+}
+.open > a {
+    outline: 0;
+}
+.dropdown-menu-right {
+    right: 0;
+    left: auto;
+}
+.dropdown-menu-left {
+    right: auto;
+    left: 0;
+}
+.dropdown-header {
+    display: block;
+    padding: 3px 20px;
+    font-size: 12px;
+    line-height: 1.42857143;
+    color: #777;
+    white-space: nowrap;
+}
+.dropdown-backdrop {
+    position: fixed;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    z-index: 990;
+}
+.pull-right > .dropdown-menu {
+    right: 0;
+    left: auto;
+}
+.dropup .caret,
+.navbar-fixed-bottom .dropdown .caret {
+    content: "";
+    border-top: 0;
+    border-bottom: 4px solid;
+}
+.dropup .dropdown-menu,
+.navbar-fixed-bottom .dropdown .dropdown-menu {
+    top: auto;
+    bottom: 100%;
+    margin-bottom: 2px;
+}
+@media (min-width: 768px) {
+    .navbar-right .dropdown-menu {
+        right: 0;
+        left: auto;
+    }
+    .navbar-right .dropdown-menu-left {
+        right: auto;
+        left: 0;
+    }
+}
+.btn-group,
+.btn-group-vertical {
+    position: relative;
+    display: inline-block;
+    vertical-align: middle;
+}
+.btn-group > .btn,
+.btn-group-vertical > .btn {
+    position: relative;
+    float: left;
+}
+.btn-group > .btn:hover,
+.btn-group-vertical > .btn:hover,
+.btn-group > .btn:focus,
+.btn-group-vertical > .btn:focus,
+.btn-group > .btn:active,
+.btn-group-vertical > .btn:active,
+.btn-group > .btn.active,
+.btn-group-vertical > .btn.active {
+    z-index: 2;
+}
+.btn-group .btn + .btn,
+.btn-group .btn + .btn-group,
+.btn-group .btn-group + .btn,
+.btn-group .btn-group + .btn-group {
+    margin-left: -1px;
+}
+.btn-toolbar {
+    margin-left: -5px;
+}
+.btn-toolbar .btn-group,
+.btn-toolbar .input-group {
+    float: left;
+}
+.btn-toolbar > .btn,
+.btn-toolbar > .btn-group,
+.btn-toolbar > .input-group {
+    margin-left: 5px;
+}
+.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
+    border-radius: 0;
+}
+.btn-group > .btn:first-child {
+    margin-left: 0;
+}
+.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
+    border-top-right-radius: 0;
+    border-bottom-right-radius: 0;
+}
+.btn-group > .btn:last-child:not(:first-child),
+.btn-group > .dropdown-toggle:not(:first-child) {
+    border-top-left-radius: 0;
+    border-bottom-left-radius: 0;
+}
+.btn-group > .btn-group {
+    float: left;
+}
+.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
+    border-radius: 0;
+}
+.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,
+.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
+    border-top-right-radius: 0;
+    border-bottom-right-radius: 0;
+}
+.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
+    border-top-left-radius: 0;
+    border-bottom-left-radius: 0;
+}
+.btn-group .dropdown-toggle:active,
+.btn-group.open .dropdown-toggle {
+    outline: 0;
+}
+.btn-group > .btn + .dropdown-toggle {
+    padding-right: 8px;
+    padding-left: 8px;
+}
+.btn-group > .btn-lg + .dropdown-toggle {
+    padding-right: 12px;
+    padding-left: 12px;
+}
+.btn-group.open .dropdown-toggle {
+    -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+    box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+}
+.btn-group.open .dropdown-toggle.btn-link {
+    -webkit-box-shadow: none;
+    box-shadow: none;
+}
+.btn .caret {
+    margin-left: 0;
+}
+.btn-lg .caret {
+    border-width: 5px 5px 0;
+    border-bottom-width: 0;
+}
+.dropup .btn-lg .caret {
+    border-width: 0 5px 5px;
+}
+.btn-group-vertical > .btn,
+.btn-group-vertical > .btn-group,
+.btn-group-vertical > .btn-group > .btn {
+    display: block;
+    float: none;
+    width: 100%;
+    max-width: 100%;
+}
+.btn-group-vertical > .btn-group > .btn {
+    float: none;
+}
+.btn-group-vertical > .btn + .btn,
+.btn-group-vertical > .btn + .btn-group,
+.btn-group-vertical > .btn-group + .btn,
+.btn-group-vertical > .btn-group + .btn-group {
+    margin-top: -1px;
+    margin-left: 0;
+}
+.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
+    border-radius: 0;
+}
+.btn-group-vertical > .btn:first-child:not(:last-child) {
+    border-top-right-radius: 4px;
+    border-bottom-right-radius: 0;
+    border-bottom-left-radius: 0;
+}
+.btn-group-vertical > .btn:last-child:not(:first-child) {
+    border-top-left-radius: 0;
+    border-top-right-radius: 0;
+    border-bottom-left-radius: 4px;
+}
+.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
+    border-radius: 0;
+}
+.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
+.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
+    border-bottom-right-radius: 0;
+    border-bottom-left-radius: 0;
+}
+.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
+    border-top-left-radius: 0;
+    border-top-right-radius: 0;
+}
+.btn-group-justified {
+    display: table;
+    width: 100%;
+    table-layout: fixed;
+    border-collapse: separate;
+}
+.btn-group-justified > .btn,
+.btn-group-justified > .btn-group {
+    display: table-cell;
+    float: none;
+    width: 1%;
+}
+.btn-group-justified > .btn-group .btn {
+    width: 100%;
+}
+.btn-group-justified > .btn-group .dropdown-menu {
+    left: auto;
+}
+[data-toggle="buttons"] > .btn input[type="radio"],
+[data-toggle="buttons"] > .btn-group > .btn input[type="radio"],
+[data-toggle="buttons"] > .btn input[type="checkbox"],
+[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {
+    position: absolute;
+    clip: rect(0, 0, 0, 0);
+    pointer-events: none;
+}
+.input-group {
+    position: relative;
+    display: table;
+    border-collapse: separate;
+}
+.input-group[class*="col-"] {
+    float: none;
+    padding-right: 0;
+    padding-left: 0;
+}
+.input-group .ui-form-control {
+    position: relative;
+    z-index: 2;
+    float: left;
+    width: 100%;
+    margin-bottom: 0;
+}
+.input-group-lg > .ui-form-control,
+.input-group-lg > .input-group-addon,
+.input-group-lg > .input-group-btn > .btn {
+    height: 46px;
+    padding: 10px 16px;
+    font-size: 18px;
+    line-height: 1.3333333;
+    border-radius: 6px;
+}
+select.input-group-lg > .ui-form-control,
+select.input-group-lg > .input-group-addon,
+select.input-group-lg > .input-group-btn > .btn {
+    height: 46px;
+    line-height: 46px;
+}
+textarea.input-group-lg > .ui-form-control,
+textarea.input-group-lg > .input-group-addon,
+textarea.input-group-lg > .input-group-btn > .btn,
+select[multiple].input-group-lg > .ui-form-control,
+select[multiple].input-group-lg > .input-group-addon,
+select[multiple].input-group-lg > .input-group-btn > .btn {
+    height: auto;
+}
+.input-group-sm > .ui-form-control,
+.input-group-sm > .input-group-addon,
+.input-group-sm > .input-group-btn > .btn {
+    height: 30px;
+    padding: 5px 10px;
+    font-size: 12px;
+    line-height: 1.5;
+    border-radius: 3px;
+}
+select.input-group-sm > .ui-form-control,
+select.input-group-sm > .input-group-addon,
+select.input-group-sm > .input-group-btn > .btn {
+    height: 30px;
+    line-height: 30px;
+}
+textarea.input-group-sm > .ui-form-control,
+textarea.input-group-sm > .input-group-addon,
+textarea.input-group-sm > .input-group-btn > .btn,
+select[multiple].input-group-sm > .ui-form-control,
+select[multiple].input-group-sm > .input-group-addon,
+select[multiple].input-group-sm > .input-group-btn > .btn {
+    height: auto;
+}
+.input-group-addon,
+.input-group-btn,
+.input-group .ui-form-control {
+    display: table-cell;
+}
+.input-group-addon:not(:first-child):not(:last-child),
+.input-group-btn:not(:first-child):not(:last-child),
+.input-group .ui-form-control:not(:first-child):not(:last-child) {
+    border-radius: 0;
+}
+.input-group-addon,
+.input-group-btn {
+    width: 1%;
+    white-space: nowrap;
+    vertical-align: middle;
+}
+.input-group-addon {
+    padding: 6px 12px;
+    font-size: 14px;
+    font-weight: normal;
+    line-height: 1;
+    color: #555;
+    text-align: center;
+    background-color: #eee;
+    border: 1px solid #ccc;
+    border-radius: 4px;
+}
+.input-group-addon.input-sm {
+    padding: 5px 10px;
+    font-size: 12px;
+    border-radius: 3px;
+}
+.input-group-addon.input-lg {
+    padding: 10px 16px;
+    font-size: 18px;
+    border-radius: 6px;
+}
+.input-group-addon input[type="radio"],
+.input-group-addon input[type="checkbox"] {
+    margin-top: 0;
+}
+.input-group .ui-form-control:first-child,
+.input-group-addon:first-child,
+.input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .btn-group > .btn,
+.input-group-btn:first-child > .dropdown-toggle,
+.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
+.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
+    border-top-right-radius: 0;
+    border-bottom-right-radius: 0;
+}
+.input-group-addon:first-child {
+    border-right: 0;
+}
+.input-group .ui-form-control:last-child,
+.input-group-addon:last-child,
+.input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .btn-group > .btn,
+.input-group-btn:last-child > .dropdown-toggle,
+.input-group-btn:first-child > .btn:not(:first-child),
+.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
+    border-top-left-radius: 0;
+    border-bottom-left-radius: 0;
+}
+.input-group-addon:last-child {
+    border-left: 0;
+}
+.input-group-btn {
+    position: relative;
+    font-size: 0;
+    white-space: nowrap;
+}
+.input-group-btn > .btn {
+    position: relative;
+}
+.input-group-btn > .btn + .btn {
+    margin-left: -1px;
+}
+.input-group-btn > .btn:hover,
+.input-group-btn > .btn:focus,
+.input-group-btn > .btn:active {
+    z-index: 2;
+}
+.input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .btn-group {
+    margin-right: -1px;
+}
+.input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .btn-group {
+    margin-left: -1px;
+}
+.nav {
+    padding-left: 0;
+    margin-bottom: 0;
+    list-style: none;
+}
+.nav > li {
+    position: relative;
+    display: block;
+}
+.nav > li > a {
+    position: relative;
+    display: block;
+    padding: 10px 15px;
+}
+.nav > li > a:hover,
+.nav > li > a:focus {
+    text-decoration: none;
+    background-color: #eee;
+}
+.nav > li.disabled > a {
+    color: #777;
+}
+.nav > li.disabled > a:hover,
+.nav > li.disabled > a:focus {
+    color: #777;
+    text-decoration: none;
+    cursor: not-allowed;
+    background-color: transparent;
+}
+.nav .open > a,
+.nav .open > a:hover,
+.nav .open > a:focus {
+    background-color: #eee;
+    border-color: #337ab7;
+}
+.nav .nav-divider {
+    height: 1px;
+    margin: 9px 0;
+    overflow: hidden;
+    background-color: #e5e5e5;
+}
+.nav > li > a > img {
+    max-width: none;
+}
+.nav-tabs {
+    border-bottom: 1px solid #ddd;
+}
+.nav-tabs > li {
+    float: left;
+    margin-bottom: -1px;
+}
+.nav-tabs > li > a {
+    margin-right: 2px;
+    line-height: 1.42857143;
+    border: 1px solid transparent;
+    border-radius: 4px 4px 0 0;
+}
+.nav-tabs > li > a:hover {
+    border-color: #eee #eee #ddd;
+}
+.nav-tabs > li.active > a,
+.nav-tabs > li.active > a:hover,
+.nav-tabs > li.active > a:focus {
+    color: #555;
+    cursor: default;
+    background-color: #fff;
+    border: 1px solid #ddd;
+    border-bottom-color: transparent;
+}
+.nav-tabs.nav-justified {
+    width: 100%;
+    border-bottom: 0;
+}
+.nav-tabs.nav-justified > li {
+    float: none;
+}
+.nav-tabs.nav-justified > li > a {
+    margin-bottom: 5px;
+    text-align: center;
+}
+.nav-tabs.nav-justified > .dropdown .dropdown-menu {
+    top: auto;
+    left: auto;
+}
+@media (min-width: 768px) {
+    .nav-tabs.nav-justified > li {
+        display: table-cell;
+        width: 1%;
+    }
+    .nav-tabs.nav-justified > li > a {
+        margin-bottom: 0;
+    }
+}
+.nav-tabs.nav-justified > li > a {
+    margin-right: 0;
+    border-radius: 4px;
+}
+.nav-tabs.nav-justified > .active > a,
+.nav-tabs.nav-justified > .active > a:hover,
+.nav-tabs.nav-justified > .active > a:focus {
+    border: 1px solid #ddd;
+}
+@media (min-width: 768px) {
+    .nav-tabs.nav-justified > li > a {
+        border-bottom: 1px solid #ddd;
+        border-radius: 4px 4px 0 0;
+    }
+    .nav-tabs.nav-justified > .active > a,
+    .nav-tabs.nav-justified > .active > a:hover,
+    .nav-tabs.nav-justified > .active > a:focus {
+        border-bottom-color: #fff;
+    }
+}
+.nav-pills > li {
+    float: left;
+}
+.nav-pills > li > a {
+    border-radius: 4px;
+}
+.nav-pills > li + li {
+    margin-left: 2px;
+}
+.nav-pills > li.active > a,
+.nav-pills > li.active > a:hover,
+.nav-pills > li.active > a:focus {
+    color: #fff;
+    background-color: #337ab7;
+}
+.nav-stacked > li {
+    float: none;
+}
+.nav-stacked > li + li {
+    margin-top: 2px;
+    margin-left: 0;
+}
+.nav-justified {
+    width: 100%;
+}
+.nav-justified > li {
+    float: none;
+}
+.nav-justified > li > a {
+    margin-bottom: 5px;
+    text-align: center;
+}
+.nav-justified > .dropdown .dropdown-menu {
+    top: auto;
+    left: auto;
+}
+@media (min-width: 768px) {
+    .nav-justified > li {
+        display: table-cell;
+        width: 1%;
+    }
+    .nav-justified > li > a {
+        margin-bottom: 0;
+    }
+}
+.nav-tabs-justified {
+    border-bottom: 0;
+}
+.nav-tabs-justified > li > a {
+    margin-right: 0;
+    border-radius: 4px;
+}
+.nav-tabs-justified > .active > a,
+.nav-tabs-justified > .active > a:hover,
+.nav-tabs-justified > .active > a:focus {
+    border: 1px solid #ddd;
+}
+@me

<TRUNCATED>

[02/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/swagger-ui.min.js
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/swagger-ui.min.js b/ambari-web/api-docs/swagger-ui.min.js
new file mode 100644
index 0000000..0ec399e
--- /dev/null
+++ b/ambari-web/api-docs/swagger-ui.min.js
@@ -0,0 +1,12 @@
+(function(){function e(){e.history=e.history||[],e.history.push(arguments),this.console&&console.log(Array.prototype.slice.call(arguments)[0])}function t(e){if(e instanceof Object)for(var n in e)e.hasOwnProperty("type")&&"object"==e.type&&(e.defaultProperties=e.required?e.required:[]),t(e[n])}this.Handlebars=this.Handlebars||{},this.Handlebars.templates=this.Handlebars.templates||{},this.Handlebars.templates.apikey_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"<div class='auth_button' id='apikey_button'>\n    <!--img class='auth_icon' alt='apply api key' src='images/apikey.jpeg'-->\n</div>\n<div class='auth_container' id='apikey_container'>\n  <div class='key_input_container'>\n    <div class='auth_label'>"+s((i=null!=(i=t.keyName||(null!=e?e.keyName:e))?i:o,typeof i===a?i.call(e,{name:"keyName",hash:{},data:r}):i))+'</div>\n    <input placeholder="api_key" class="auth_input"
  id="input_apiKey_entry" name="apiKey" type="text"/>\n    <div class=\'auth_submit\'><a class=\'auth_submit_button\' id="apply_api_key" href="#">apply</a></div>\n  </div>\n</div>\n\n'},useData:!0}),this.Handlebars.templates.basic_auth_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){return'<div class=\'auth_button\' id=\'basic_auth_button\'><img class=\'auth_icon\' src=\'images/password.jpeg\'></div>\n<div class=\'auth_container\' id=\'basic_auth_container\'>\n  <div class=\'key_input_container\'>\n    <div class="auth_label">Username</div>\n    <input placeholder="username" class="auth_input" id="input_username" name="username" type="text"/>\n    <div class="auth_label">Password</div>\n    <input placeholder="password" class="auth_input" id="input_password" name="password" type="password"/>\n    <div class=\'auth_submit\'><a class=\'auth_submit_button\' id="apply_basic_auth" href="#">apply</a></div>\n  </div>\n</div>\n\n'},useData:!0}),this.Han
 dlebars.templates.content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a=this.lambda,o='	<option value="';return i=a(e,e),null!=i&&(o+=i),o+='">',i=a(e,e),null!=i&&(o+=i),o+"</option>\n"},4:function(e,t,n,r){return'  <option value="application/json">application/json</option>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a='<label for="contentType"></label>\n<select name="contentType">\n';return i=t["if"].call(e,null!=e?e.produces:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(4,r),data:r}),null!=i&&(a+=i),a+"</select>\n"},useData:!0}),$(function(){$.fn.vAlign=function(){return this.each(function(){var e=$(this).height(),t=$(this).parent().height(),n=(t-e)/2;$(this).css("margin-top",n)})},$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var e=$(this).cl
 osest("form").innerWidth(),t=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10),n=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",e-t-n)})},$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent(),$("ul.downplayed li div.content p").vAlign(),$("form.sandbox").submit(function(){var e=!0;return $(this).find("input.required").each(function(){$(this).removeClass("error"),""===$(this).val()&&($(this).addClass("error"),$(this).wiggle(),e=!1)}),e})}),Function.prototype.bind&&console&&"object"==typeof console.log&&["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call),window.Docs={shebang:function(){var e=$.param.fragment().split("/");switch(e.shift(),e.length){case 1:break;case 2:var t="#resources_nav [data-resource] [data-
 endpoint="+e[0]+"_"+e[1]+"]",n=$("#swagger_sidebar").find(t),r=n.attr("data-selected");"undefined"==typeof r&&n.trigger("click")}}},Handlebars.registerHelper("sanitize",function(e){return e=e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""),new Handlebars.SafeString(e)}),this.Handlebars.templates.main=Handlebars.template({1:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression,s='                        <span class="info_title">'+o(a(null!=(i=null!=e?e.info:e)?i.title:i,e))+'</span>\n                        <span class="markdown">';return i=a(null!=(i=null!=e?e.info:e)?i.description:i,e),null!=i&&(s+=i),s+"</span>\n"},3:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return"                        <span class='info_email'>\n                            Contact: <a href=\"mailto:"+o(a(null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.email:i,e))+"?subject="+o(a(null!=(i=null!=e?e.info:e)?i.title:i,e))+'">'+o(a(null!=(i=null!=(i=null!=e?e.info:e)
 ?i.contact:i)?i.email:i,e))+"</a>\n                        </span><br><br>\n"},5:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return'                    <span style="font-variant: small-caps">api version</span>: '+o(a(null!=(i=null!=e?e.info:e)?i.version:i,e))+"\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='<div id="swagger_sidebar">\n    <div class="sticky-nav-placeholder">\n        <div class="sticky-nav">\n            <div class="mobile-nav">\n                <span class="select-label">API Reference: </span><span data-selected-value></span>\n            </div>\n\n            <div class="token-generator hide">\n                <span data-close class="icon-budicon-471"></span>\n                <label for="input-api-token">Url</label>\n                <input type="text" autocorrect="off" class="ui-form-control" id="input_baseUrl"\n                       placeholder="http://example.com/api"
 >\n\n                <div class="scope-selector">\n                    <label for="scopes">Token</label>\n\n                    <div class="area controls">\n                        <input type="text" autocorrect="off" class="ui-form-control" id="input_apiKey"\n                               placeholder="Enter api key or token">\n                    </div>\n\n                    <div class="area cta">\n                        <div data-add-scope id="explore" class="btn"><span class="icon-budicon-519"></span>\n                        </div>\n                    </div>\n                </div>\n\n            </div>\n            <div data-navigator>\n                <div data-resource="" label="Tools">\n                    <div class="item" data-tg-switch="">Swagger resource <span class="status"></span></div>\n                </div>\n                <div id="resources_nav">\n                </div>\n            </div>\n\n            <p class="changes-disclaimer">\n                <span cl
 ass=\'info\' id=\'api_info\'>\n';return i=t["if"].call(e,null!=e?e.info:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+="\n                </span>\n\n                <span class='info' id='api_info'>\n",i=t["if"].call(e,null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.email:i,{name:"if",hash:{},fn:this.program(3,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+='                </span>\n\n                <span style="font-variant: small-caps">base url</span>: '+l((a=null!=(a=t.basePath||(null!=e?e.basePath:e))?a:s,typeof a===o?a.call(e,{name:"basePath",hash:{},data:r}):a))+"\n",i=t["if"].call(e,null!=(i=null!=e?e.info:e)?i.version:i,{name:"if",hash:{},fn:this.program(5,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+"            </p>\n        </div>\n    </div>\n</div>\n\n<div id='resources_container'>\n    <ul id='resources' class=\"samples-collapsed\"></ul>\n</div>\n"},useData:!0}),this.Handlebars.templates.operation=Handlebars.template({1:
 function(e,t,n,r){return"deprecated"},3:function(e,t,n,r){return"                <h4>Warning: Deprecated</h4>\n"},5:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l='                <div class="markdown action-summary">';return a=null!=(a=t.description||(null!=e?e.description:e))?a:s,i=typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a,null!=i&&(l+=i),l+"</div>\n"},7:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return'                    <h4 data-control data-parm-toggle data-toggle="collapse"\n                        data-target="#parm-'+s((i=null!=(i=t.parentId||(null!=e?e.parentId:e))?i:o,typeof i===a?i.call(e,{name:"parentId",hash:{},data:r}):i))+"_"+s((i=null!=(i=t.nickname||(null!=e?e.nickname:e))?i:o,typeof i===a?i.call(e,{name:"nickname",hash:{},data:r}):i))+'">\n                        Parameters\n                    </h4>\n\n                    <div data-content class="operation-params collapse in" id="parm-'+s((i=null!
 =(i=t.parentId||(null!=e?e.parentId:e))?i:o,typeof i===a?i.call(e,{name:"parentId",hash:{},data:r}):i))+"_"+s((i=null!=(i=t.nickname||(null!=e?e.nickname:e))?i:o,typeof i===a?i.call(e,{name:"nickname",hash:{},data:r}):i))+'">\n                    </div>\n\n'},9:function(e,t,n,r){return'                        <div class="auth">\n'},11:function(e,t,n,r){var i,a='                            <div id="api_information_panel" style="top: 526px; left: 776px; display: none;">\n';return i=t.each.call(e,e,{name:"each",hash:{},fn:this.program(12,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a+"                            </div>\n"},12:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression,s="                                    <div title='";return i=a(null!=e?e.description:e,e),null!=i&&(s+=i),s+"'>"+o(a(null!=e?e.scope:e,e))+"</div>\n"},14:function(e,t,n,r){return'                            <button type="button" class="api-ic ic-off btn btn-default pull-right">Oauth</button>\n        
                 </div>\n'},16:function(e,t,n,r){return'                        <div class="response-content-type"/>\n'},18:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return'                    <div style="margin:0;padding:0;display:inline"></div>\n                    <h4 data-control data-toggle="collapse" data-target="#response-'+s((i=null!=(i=t.parentId||(null!=e?e.parentId:e))?i:o,typeof i===a?i.call(e,{name:"parentId",hash:{},data:r}):i))+"_"+s((i=null!=(i=t.nickname||(null!=e?e.nickname:e))?i:o,typeof i===a?i.call(e,{name:"nickname",hash:{},data:r}):i))+'">\n                        Response Messages\n                    </h4>\n\n                    <div data-content class="responses-wrapper collapse in" id="response-'+s((i=null!=(i=t.parentId||(null!=e?e.parentId:e))?i:o,typeof i===a?i.call(e,{name:"parentId",hash:{},data:r}):i))+"_"+s((i=null!=(i=t.nickname||(null!=e?e.nickname:e))?i:o,typeof i===a?i.call(e,{name:"nickname",hash:{},data:r}):
 i))+'">\n                        <table class="fullwidth">\n                            <tbody class="operation-status">\n                            </tbody>\n                        </table>\n                    </div>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o,s="function",l=t.helperMissing,u=this.escapeExpression,c=t.blockHelperMissing,p="<ul class='operations'>\n    <li class='"+u((a=null!=(a=t.method||(null!=e?e.method:e))?a:l,typeof a===s?a.call(e,{name:"method",hash:{},data:r}):a))+" operation' id='"+u((a=null!=(a=t.parentId||(null!=e?e.parentId:e))?a:l,typeof a===s?a.call(e,{name:"parentId",hash:{},data:r}):a))+"_"+u((a=null!=(a=t.nickname||(null!=e?e.nickname:e))?a:l,typeof a===s?a.call(e,{name:"nickname",hash:{},data:r}):a))+"'>\n        <div class='content'>\n            <div class='heading'>\n                <h2 class='operation-title'>"+u((a=null!=(a=t.summary||(null!=e?e.summary:e))?a:l,typeof a===s?a.call(e,{name:"summary",hash:{},data:r}):a)
 )+"</h2>\n\n                <h3>\n                    <span class='http_method'>\n                        <a href='#!/"+u((a=null!=(a=t.encodedParentId||(null!=e?e.encodedParentId:e))?a:l,typeof a===s?a.call(e,{name:"encodedParentId",hash:{},data:r}):a))+"/"+u((a=null!=(a=t.nickname||(null!=e?e.nickname:e))?a:l,typeof a===s?a.call(e,{name:"nickname",hash:{},data:r}):a))+"'>"+u((a=null!=(a=t.method||(null!=e?e.method:e))?a:l,typeof a===s?a.call(e,{name:"method",hash:{},data:r}):a))+"</a>\n                    </span>\n                    <span class='path'>\n                        <a href='#!/"+u((a=null!=(a=t.encodedParentId||(null!=e?e.encodedParentId:e))?a:l,typeof a===s?a.call(e,{name:"encodedParentId",hash:{},data:r}):a))+"/"+u((a=null!=(a=t.nickname||(null!=e?e.nickname:e))?a:l,typeof a===s?a.call(e,{name:"nickname",hash:{},data:r}):a))+"'\n                           class=\"";return i=t["if"].call(e,null!=e?e.deprecated:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.no
 op,data:r}),null!=i&&(p+=i),p+='">'+u((a=null!=(a=t.path||(null!=e?e.path:e))?a:l,typeof a===s?a.call(e,{name:"path",hash:{},data:r}):a))+'</a>\n                    </span>\n                </h3>\n            </div>\n\n            <a href="javascript:;" class="toggle-samples" data-toggle="tooltip" data-placement="left"\n               data-original-title title>\n                <span class="text">Show samples</span><span class="circle-icon"></span>\n            </a>\n\n',i=t["if"].call(e,null!=e?e.deprecated:e,{name:"if",hash:{},fn:this.program(3,r),inverse:this.noop,data:r}),null!=i&&(p+=i),i=t["if"].call(e,null!=e?e.description:e,{name:"if",hash:{},fn:this.program(5,r),inverse:this.noop,data:r}),null!=i&&(p+=i),p+='\n\n            <form accept-charset="UTF-8" class="sandbox">\n\n',i=t["if"].call(e,null!=e?e.parameters:e,{name:"if",hash:{},fn:this.program(7,r),inverse:this.noop,data:r}),null!=i&&(p+=i),p+='\n                <h4 data-control data-toggle="collapse" data-target="#test
 -'+u((a=null!=(a=t.parentId||(null!=e?e.parentId:e))?a:l,typeof a===s?a.call(e,{name:"parentId",hash:{},data:r}):a))+"_"+u((a=null!=(a=t.nickname||(null!=e?e.nickname:e))?a:l,typeof a===s?a.call(e,{name:"nickname",hash:{},data:r}):a))+'">\n                    Test this endpoint\n                </h4>\n\n                <div id="test-'+u((a=null!=(a=t.parentId||(null!=e?e.parentId:e))?a:l,typeof a===s?a.call(e,{name:"parentId",hash:{},data:r}):a))+"_"+u((a=null!=(a=t.nickname||(null!=e?e.nickname:e))?a:l,typeof a===s?a.call(e,{name:"nickname",hash:{},data:r}):a))+'">\n                    <div class="sandbox_header collapse in" data-content>\n                        <input class="submit btn btn-primary" name="commit" type="submit" value="Try"\n                               data-target="#get_clients-modal-request">\n                        <a href="#" class="response_hider hide" style="display: inline;">Hide Response</a>\n                        <!--small class="curl-copy-message hide
 " style="display:none;">Copied to clipboard</small-->\n                        <!--span class="response_throbber hide" style="display: none;"></span-->\n\n',a=null!=(a=t.oauth||(null!=e?e.oauth:e))?a:l,o={name:"oauth",hash:{},fn:this.program(9,r),inverse:this.noop,data:r},i=typeof a===s?a.call(e,o):a,t.oauth||(i=c.call(e,i,o)),null!=i&&(p+=i),p+="\n",i=t.each.call(e,null!=e?e.oauth:e,{name:"each",hash:{},fn:this.program(11,r),inverse:this.noop,data:r}),null!=i&&(p+=i),p+="\n",a=null!=(a=t.oauth||(null!=e?e.oauth:e))?a:l,o={name:"oauth",hash:{},fn:this.program(14,r),inverse:this.noop,data:r},i=typeof a===s?a.call(e,o):a,t.oauth||(i=c.call(e,i,o)),null!=i&&(p+=i),p+="\n                    </div>\n\n",i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(16,r),inverse:this.noop,data:r}),null!=i&&(p+=i),p+="\n                </div>\n\n",i=t["if"].call(e,null!=e?e.responseMessages:e,{name:"if",hash:{},fn:this.program(18,r),inverse:this.noop,data:r}),null!=i&&(p+=i),p+'    
         </form>\n\n        </div>\n\n        <div class="samples">\n                <span class="model-signature">\n                </span>\n        </div>\n\n        <div class="modal" id="modal-'+u((a=null!=(a=t.parentId||(null!=e?e.parentId:e))?a:l,typeof a===s?a.call(e,{name:"parentId",hash:{},data:r}):a))+"_"+u((a=null!=(a=t.nickname||(null!=e?e.nickname:e))?a:l,typeof a===s?a.call(e,{name:"nickname",hash:{},data:r}):a))+'">\n            <div class="modal-dialog">\n                <div class="modal-content">\n                    <div class="modal-header">\n                        <button type="button" class="close" data-dismiss="modal" aria-label="Close">\n                            <span aria-hidden="true">×</span>\n                        </button>\n                        <h3 class="modal-title">\n                            '+u((a=null!=(a=t.summary||(null!=e?e.summary:e))?a:l,typeof a===s?a.call(e,{name:"summary",hash:{},data:r}):a))+'\n                            <span 
 class="http_method">\n                                <span class="text">\n                                    '+u((a=null!=(a=t.method||(null!=e?e.method:e))?a:l,typeof a===s?a.call(e,{name:"method",hash:{},data:r}):a))+"\n                                </span>\n                            </span>\n                        </h3>\n                    </div>\n                    <div class=\"modal-body\">\n                        <div class='response'>\n                            <h5>Request URL</h5>\n\n                            <div class='block request_url'></div>\n                            <h5>Response Body</h5>\n\n                            <div class='block response_body'></div>\n                            <h5>Response Code</h5>\n\n                            <div class='block response_code'></div>\n                            <h5>Response Headers</h5>\n\n                            <div class='block response_headers'></div>\n                        </div>\n              
       </div>\n                </div>\n            </div>\n        </div>\n    </li>\n</ul>"},useData:!0}),this.Handlebars.templates.param_list=Handlebars.template({1:function(e,t,n,r){return" multiple='multiple'"},3:function(e,t,n,r){return""},5:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(3,r),inverse:this.program(6,r),data:r}),null!=i&&(a+=i),a},6:function(e,t,n,r){return"                        <option selected=\"\" value=''></option>\n"},8:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e.isDefault:e,{name:"if",hash:{},fn:this.program(9,r),inverse:this.program(11,r),data:r}),null!=i&&(a+=i),a},9:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return'                    <option selected="" value=\''+s((i=null!=(i=t.value||(null!=e?e.value:e))?i:o,typeof i===a?i.call(e,{name:"value",hash:{},data:r}):i))+"'>"+s((i=null!=(i=t.value||(null!=e?e.value:e))?i:o,typeof i===a?i.ca
 ll(e,{name:"value",hash:{},data:r}):i))+" (default)</option>\n"},11:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"                    <option value='"+s((i=null!=(i=t.value||(null!=e?e.value:e))?i:o,typeof i===a?i.call(e,{name:"value",hash:{},data:r}):i))+"'>"+s((i=null!=(i=t.value||(null!=e?e.value:e))?i:o,typeof i===a?i.call(e,{name:"value",hash:{},data:r}):i))+"</option>\n"},13:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return'                <code class="code-signature">'+s((i=null!=(i=t.type||(null!=e?e.type:e))?i:o,typeof i===a?i.call(e,{name:"type",hash:{},data:r}):i))+"</code>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='<div class="param-property hide" data-label="name">'+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+'</div>\n<div class="param-property" data-label=\'
 '+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+"'>\n    <div>\n        <select ";return i=(t.isArray||e&&e.isArray||s).call(e,e,{name:"isArray",hash:{},fn:this.program(1,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+=" class='parameter ui-form-control' name='"+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+'\'  data-toggle="tooltip" data-placement="right" title="" data-original-title=\''+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+"'>\n",i=t["if"].call(e,null!=e?e.required:e,{name:"if",hash:{},fn:this.program(3,r),inverse:this.program(5,r),data:r}),null!=i&&(u+=i),i=t.each.call(e,null!=(i=null!=e?e.allowableValues:e)?i.descriptiveValues:i,{name:"each",hash:{},fn:this.program(8,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+='        </select>\n        <div class="small-description">\n',i=t["if"].call(e,null!=e?e.
 type:e,{name:"if",hash:{},fn:this.program(13,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+'            <div class="markdown">'+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a))+"</div>\n        </div>\n    </div>\n</div>\n\n"},useData:!0}),this.Handlebars.templates.param_readonly_required=Handlebars.template({1:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"            <textarea class='body-textarea ui-form-control' readonly='readonly' placeholder='(required)' name='"+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+'\'  data-toggle="tooltip" data-placement="top" title="" data-original-title=\''+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+"'>"+s((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:o,typeof i===a?i.call(e,{name:"default",hash:{},data:r}):i))+'<
 /textarea>\n            <div class="parameter-content-type"/>\n'},3:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,r),inverse:this.program(6,r),data:r}),null!=i&&(a+=i),a},4:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"                "+s((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:o,typeof i===a?i.call(e,{name:"default",hash:{},data:r}):i))+"\n"},6:function(e,t,n,r){return"                (empty)\n"},8:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return'                <code class="code-signature">'+s((i=null!=(i=t.type||(null!=e?e.type:e))?i:o,typeof i===a?i.call(e,{name:"type",hash:{},data:r}):i))+"</code>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='<div class="param-property hide" data-label="name">'+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof
  a===o?a.call(e,{name:"name",hash:{},data:r}):a))+'</div>\n<div class="param-property" data-label=\''+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+"'>\n    <div>\n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(3,r),data:r}),null!=i&&(u+=i),u+='        <div class="small-description">\n',i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(8,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+'            <div class="markdown">'+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a))+"</div>\n        </div>\n    </div>\n</div>\n"},useData:!0}),this.Handlebars.templates.param_readonly=Handlebars.template({1:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"            <textarea class='body-textarea ui-form-control' readonly='readonly' name='"+s((i=null!=(i=t.
 name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+'\'  data-toggle="tooltip" data-placement="top" title="" data-original-title=\''+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+"'>"+s((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:o,typeof i===a?i.call(e,{name:"default",hash:{},data:r}):i))+'</textarea>\n            <div class="parameter-content-type"/>\n'},3:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,r),inverse:this.program(6,r),data:r}),null!=i&&(a+=i),a},4:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"                "+s((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:o,typeof i===a?i.call(e,{name:"default",hash:{},data:r}):i))+"\n"},6:function(e,t,n,r){return"                (empty)\n"},8:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;r
 eturn'                <code class="code-signature">'+s((i=null!=(i=t.type||(null!=e?e.type:e))?i:o,typeof i===a?i.call(e,{name:"type",hash:{},data:r}):i))+"</code>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='<div class="param-property hide" data-label="name">'+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+'</div>\n<div class="param-property" data-label=\''+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+"'>\n    <div>\n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(3,r),data:r}),null!=i&&(u+=i),u+='        <div class="small-description">\n',i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(8,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+'            <div class="markdown">'+l((a=null!=(a=t.description||(null!=e?e.descr
 iption:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a))+"</div>\n        </div>\n    </div>\n</div>\n"},useData:!0}),this.Handlebars.templates.param_required=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,r),inverse:this.program(4,r),data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return'            <input type="file" name=\''+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+"'/>\n"},4:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,r),inverse:this.program(7,r),data:r}),null!=i&&(a+=i),a},5:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"                <div class=\"editor_holder\"></div>\n                <textarea class='body-textarea ui-form-control required' pla
 ceholder='(required)' name='"+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+'\'  data-toggle="tooltip" data-placement="top" title="" data-original-title=\''+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+"'>"+s((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:o,typeof i===a?i.call(e,{name:"default",hash:{},data:r}):i))+'</textarea>\n                <div class="parameter-content-type"/>\n'},7:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"                <textarea class='body-textarea ui-form-control required' placeholder='(required)' name='"+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+'\' data-toggle="tooltip" data-placement="top" title="" data-original-title=\''+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+'\'></text
 area>\n                <div class="editor_holder"></div>\n                <br/>\n                <div class="parameter-content-type"/>\n'},9:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(10,r),inverse:this.program(12,r),data:r}),null!=i&&(a+=i),a},10:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"            <input class='parameter ui-form-control required' type='file' name='"+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+"'/>\n"},12:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(13,r),inverse:this.program(15,r),data:r}),null!=i&&(a+=i),a},13:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"                <input class='parameter ui-form-control required' minlength='1' name='"+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i
 ===a?i.call(e,{name:"name",hash:{},data:r}):i))+"' placeholder='(required)' type='"+s((i=null!=(i=t.inputType||(null!=e?e.inputType:e))?i:o,typeof i===a?i.call(e,{name:"inputType",hash:{},data:r}):i))+"' value='"+s((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:o,typeof i===a?i.call(e,{name:"default",hash:{},data:r}):i))+'\' data-toggle="tooltip" data-placement="right" title="" data-original-title=\''+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+"'/>\n"},15:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"                <input class='parameter ui-form-control required' minlength='1' name='"+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+"' placeholder='(required)' type='"+s((i=null!=(i=t.inputType||(null!=e?e.inputType:e))?i:o,typeof i===a?i.call(e,{name:"inputType",hash:{},data:r}):i))+'\' value=\'\' data-toggle="tooltip" data-
 placement="right" title="" data-original-title=\''+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+"'/>\n"},17:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return'            <code class="code-signature">'+s((i=null!=(i=t.type||(null!=e?e.type:e))?i:o,typeof i===a?i.call(e,{name:"type",hash:{},data:r}):i))+"</code>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='<div class="param-property hide">'+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+'</div>\n<div class="param-property" data-label=\''+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+"'>\n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(9,r),data:r}),null!=i&&(u+=i),u+='    <div class="small-descriptio
 n">\n',i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(17,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+'        <div class="markdown">'+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a))+"</div>\n    </div>\n</div>\n\n"},useData:!0}),this.Handlebars.templates.param=Handlebars.template({1:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,r),inverse:this.program(4,r),data:r}),null!=i&&(u+=i),u+='        <div class="small-description">\n',i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(9,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+'            <div class="markdown">'+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a))+"</div>\n        </div>\n"},2:function(e,t,n,r){var i,a="function"
 ,o=t.helperMissing,s=this.escapeExpression;return'            <input type="file" name=\''+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,
+typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+'\'/>\n\n            <div class="parameter-content-type"/>\n'},4:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,r),inverse:this.program(7,r),data:r}),null!=i&&(a+=i),a},5:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"                <div class=\"editor_holder\"></div>\n\n                <textarea class='body-textarea ui-form-control' name='"+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+'\' data-toggle="tooltip" data-placement="top" title="" data-original-title=\''+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+"'>"+s((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:o,typeof i===a?i.call(e,{name:"default",hash:{},data:r}):i))+'</textarea>\n                <div class="parameter-content-type"/>\n'},7:function(e,
 t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"                <textarea class='body-textarea ui-form-control' name='"+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+'\' data-toggle="tooltip" data-placement="top" title="" data-original-title=\''+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+'\'></textarea>\n                <div class="editor_holder"></div>\n                <div class="parameter-content-type"/>\n'},9:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return'                <code class="code-signature">'+s((i=null!=(i=t.type||(null!=e?e.type:e))?i:o,typeof i===a?i.call(e,{name:"type",hash:{},data:r}):i))+"</code>\n"},11:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(12,r),inverse:this.prog
 ram(14,r),data:r}),null!=i&&(u+=i),u+='        <div class="small-description">\n',i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(9,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+'            <div class="markdown">'+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a))+"</div>\n        </div>\n"},12:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return'\n            <label class="btn btn-primary" for="my-file-selector">\n                <input id="my-file-selector" type="file" style="display:none;" name=\''+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+'\'>\n                Choose file\n            </label>\n            <div class="parameter-content-type"/>\n'},14:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(15,r),inverse:this.program(17,r),d
 ata:r}),null!=i&&(a+=i),a},15:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"                <input class='parameter ui-form-control' minlength='0' name='"+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+"' placeholder='' type='"+s((i=null!=(i=t.inputType||(null!=e?e.inputType:e))?i:o,typeof i===a?i.call(e,{name:"inputType",hash:{},data:r}):i))+"' value='"+s((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:o,typeof i===a?i.call(e,{name:"default",hash:{},data:r}):i))+'\'  data-toggle="tooltip" data-placement="right" title="" data-original-title=\''+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+"'/>\n"},17:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"                <input class='parameter ui-form-control' minlength='0' name='"+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(
 e,{name:"name",hash:{},data:r}):i))+"' placeholder='' type='"+s((i=null!=(i=t.inputType||(null!=e?e.inputType:e))?i:o,typeof i===a?i.call(e,{name:"inputType",hash:{},data:r}):i))+'\' value=\'\'  data-toggle="tooltip" data-placement="right" title="" data-original-title=\''+s((i=null!=(i=t.name||(null!=e?e.name:e))?i:o,typeof i===a?i.call(e,{name:"name",hash:{},data:r}):i))+"'/>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='<div class="param-property hide">'+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+'</div>\n<div class="param-property" data-label=\''+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+"'>\n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(11,r),data:r}),null!=i&&(u+=i),u+"</div>"},useData:!0}),this.Handlebars.templates.parameter
 _content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.consumes:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a=this.lambda,o='                <option value="';return i=a(e,e),null!=i&&(o+=i),o+='">',i=a(e,e),null!=i&&(o+=i),o+"</option>\n"},4:function(e,t,n,r){return'            <option value="application/json">application/json</option>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a='<div>\n    <label for="parameterContentType">Content type:</label>\n    <select class="parameter ui-form-control" name="parameterContentType">\n';return i=t["if"].call(e,null!=e?e.consumes:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(4,r),data:r}),null!=i&&(a+=i),a+"    </select>\n</div>\n"},useData:!0}),this.Handlebars.templates.resource=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=thi
 s.escapeExpression;return"<ul class='endpoints' id='"+s((i=null!=(i=t.id||(null!=e?e.id:e))?i:o,typeof i===a?i.call(e,{name:"id",hash:{},data:r}):i))+"_endpoint_list'>\n</ul>"},useData:!0}),this.Handlebars.templates.response_content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a=this.lambda,o='                        <option value="';return i=a(e,e),null!=i&&(o+=i),o+='">',i=a(e,e),null!=i&&(o+=i),o+"</option>\n"},4:function(e,t,n,r){return'                    <option value="application/json">application/json</option>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a='<div class="parameter-item">\n    <div class="param-property hide" data-label="name">Response Type</div>\n    <div class="param-property" data-label="Response Type">\n        <div>\n            <select class="parameter ui-form-control" 
 name="responseContentType">\n';return i=t["if"].call(e,null!=e?e.produces:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(4,r),data:r}),null!=i&&(a+=i),a+"            </select>\n        </div>\n    </div>\n</div>\n\n"},useData:!0}),this.Handlebars.templates.sidebar_header=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){return""},useData:!0}),this.Handlebars.templates.sidebar_item=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return s((i=null!=(i=t.summary||(null!=e?e.summary:e))?i:o,typeof i===a?i.call(e,{name:"summary",hash:{},data:r}):i))+"\n"},useData:!0}),this.Handlebars.templates.signature=Handlebars.template({1:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='    <h4 class="schema-title collapsed" data-control data-toggle="collapse"\n        data-target="#schema-'+l((a=null!=(a=t.id||(null!=e?e.id:e))?a:s,typeof 
 a===o?a.call(e,{name:"id",hash:{},data:r}):a))+'">'+l((a=null!=(a=t.type||(null!=e?e.type:e))?a:s,typeof a===o?a.call(e,{name:"type",hash:{},data:r}):a))+' Schema</h4>\n    <div data-content class="collapse" id="schema-'+l((a=null!=(a=t.id||(null!=e?e.id:e))?a:s,typeof a===o?a.call(e,{name:"id",hash:{},data:r}):a))+'">\n        <div class="description">\n            ';return a=null!=(a=t.signature||(null!=e?e.signature:e))?a:s,i=typeof a===o?a.call(e,{name:"signature",hash:{},data:r}):a,null!=i&&(u+=i),u+"\n        </div>\n    </div>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='<h4 class="sample-title" data-control data-toggle="collapse"\n    data-target="#sample-'+l((a=null!=(a=t.id||(null!=e?e.id:e))?a:s,typeof a===o?a.call(e,{name:"id",hash:{},data:r}):a))+'">'+l((a=null!=(a=t.type||(null!=e?e.type:e))?a:s,typeof a===o?a.call(e,{name:"type",hash:{},data:r}):a))+' Sample</h4>\n<div data-content class="c
 ollapse in" id="sample-'+l((a=null!=(a=t.id||(null!=e?e.id:e))?a:s,typeof a===o?a.call(e,{name:"id",hash:{},data:r}):a))+'">\n    <div class="snippet">\n        <pre><code>'+l((a=null!=(a=t.sampleJSON||(null!=e?e.sampleJSON:e))?a:s,typeof a===o?a.call(e,{name:"sampleJSON",hash:{},data:r}):a))+"</code></pre>\n    </div>\n</div>\n\n";return i=t["if"].call(e,null!=e?e.signature:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u},useData:!0}),this.Handlebars.templates.status_code=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='<td style="width: 20px;"><strong>'+l((a=null!=(a=t.code||(null!=e?e.code:e))?a:s,typeof a===o?a.call(e,{name:"code",hash:{},data:r}):a))+"</strong></td>\n<td>";return a=null!=(a=t.message||(null!=e?e.message:e))?a:s,i=typeof a===o?a.call(e,{name:"message",hash:{},data:r}):a,null!=i&&(u+=i),u+"</td>\n"},useData:!0}),function(e){if("object
 "==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.SwaggerClient=e()}}(function(){var e;return function t(e,n,r){function i(o,s){if(!n[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[o]={exports:{}};e[o][0].call(c.exports,function(t){var n=e[o][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}({1:[function(e,t,n){"use strict";var r=e("./lib/auth"),i=e("./lib/helpers"),a=e("./lib/client"),o=function(e,t){return i.log('This is deprecated, use "new SwaggerClient" instead.'),new a(e,t)};Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){for(var n=t||0,r=
 this.length;r>n;n++)if(this[n]===e)return n;return-1}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),String.prototype.endsWith||(String.prototype.endsWith=function(e){return-1!==this.indexOf(e,this.length-e.length)}),t.exports=a,a.ApiKeyAuthorization=r.ApiKeyAuthorization,a.PasswordAuthorization=r.PasswordAuthorization,a.CookieAuthorization=r.CookieAuthorization,a.SwaggerApi=o,a.SwaggerClient=o},{"./lib/auth":2,"./lib/client":3,"./lib/helpers":4}],2:[function(e,t,n){"use strict";var r=e("btoa"),i=e("cookiejar"),a=t.exports.SwaggerAuthorizations=function(){this.authz={}};a.prototype.add=function(e,t){return this.authz[e]=t,t},a.prototype.remove=function(e){return delete this.authz[e]},a.prototype.apply=function(e,t){var n,r,i,a,o=null;if("undefined"==typeof t)for(n in this.authz)i=this.authz[n],a=i.apply(e,t),a===!0&&(o=!0);else if(Array.isArray(t))for(var s=0;s<t.length;s++){var l=t[s];for(r in l)for(n in this.authz)n===r&&(i=this.au
 thz[n],a=i.apply(e,t),a===!0&&(o=!0))}else for(r in t)for(n in this.authz)n===r&&(i=this.authz[n],a=i.apply(e,t),a===!0&&(o=!0));return o};var o=t.exports.ApiKeyAuthorization=function(e,t,n){this.name=e,this.value=t,this.type=n};o.prototype.apply=function(e){return"query"===this.type?(e.url=e.url.indexOf("?")>0?e.url+"&"+this.name+"="+this.value:e.url+"?"+this.name+"="+this.value,!0):"header"===this.type?(e.headers[this.name]=this.value,!0):void 0};var s=t.exports.CookieAuthorization=function(e){this.cookie=e};s.prototype.apply=function(e){return e.cookieJar=e.cookieJar||new i,e.cookieJar.setCookie(this.cookie),!0};var l=t.exports.PasswordAuthorization=function(e,t,n){this.name=e,this.username=t,this.password=n};l.prototype.apply=function(e){return e.headers.Authorization="Basic "+r(this.username+":"+this.password),!0}},{btoa:16,cookiejar:17}],3:[function(e,t,n){"use strict";var r={bind:e("lodash-compat/function/bind"),cloneDeep:e("lodash-compat/lang/cloneDeep"),find:e("lodash-compa
 t/collection/find"),forEach:e("lodash-compat/collection/forEach"),indexOf:e("lodash-compat/array/indexOf"),isArray:e("lodash-compat/lang/isArray"),isFunction:e("lodash-compat/lang/isFunction"),isPlainObject:e("lodash-compat/lang/isPlainObject"),isUndefined:e("lodash-compat/lang/isUndefined")},i=e("./auth"),a=e("./helpers"),o=e("./types/model"),s=e("./types/operation"),l=e("./types/operationGroup"),u=e("./resolver"),c=e("./http"),p=e("./spec-converter"),h=["apis","authorizationScheme","authorizations","basePath","build","buildFrom1_1Spec","buildFrom1_2Spec","buildFromSpec","clientAuthorizations","convertInfo","debug","defaultErrorCallback","defaultSuccessCallback","fail","failure","finish","help","idFromOp","info","initialize","isBuilt","isValid","modelPropertyMacro","models","modelsArray","options","parameterMacro","parseUri","progress","resourceCount","sampleModels","selfReflect","setConsolidatedModels","spec","supportedSubmitMethods","swaggerRequestHeaders","tagFromLabel","url","u
 seJQuery"],d=["apis","asCurl","description","externalDocs","help","label","name","operation","operations","operationsArray","path","tag"],f=["delete","get","head","options","patch","post","put"],m=t.exports=function(e,t){return this.authorizationScheme=null,this.authorizations=null,this.basePath=null,this.debug=!1,this.info=null,this.isBuilt=!1,this.isValid=!1,this.modelsArray=[],this.resourceCount=0,this.url=null,this.useJQuery=!1,"undefined"!=typeof e?this.initialize(e,t):this};m.prototype.initialize=function(e,t){this.models={},this.sampleModels={},t=t||{},"string"==typeof e?this.url=e:"object"==typeof e&&(t=e,this.url=t.url),this.swaggerRequestHeaders=t.swaggerRequestHeaders||"application/json;charset=utf-8,*/*",this.defaultSuccessCallback=t.defaultSuccessCallback||null,this.defaultErrorCallback=t.defaultErrorCallback||null,this.modelPropertyMacro=t.modelPropertyMacro||null,this.parameterMacro=t.modelPropertyMacro||null,"function"==typeof t.success&&(this.success=t.success),t.us
 eJQuery&&(this.useJQuery=t.useJQuery),this.clientAuthorizations=t.authorizations?t.authorizations:new i.SwaggerAuthorizations,this.options=t||{},this.supportedSubmitMethods=t.supportedSubmitMethods||[],this.failure=t.failure||function(){},this.progress=t.progress||function(){},this.spec=r.cloneDeep(t.spec),"function"==typeof t.success&&(this.ready=!0,this.build())},m.prototype.build=function(e){if(this.isBuilt)return this;var t=this;this.progress("fetching resource list: "+this.url);var n={useJQuery:this.useJQuery,url:this.url,method:"get",headers:{accept:this.swaggerRequestHeaders},on:{error:function(e){return t.fail("http"!==t.url.substring(0,4)?"Please specify the protocol for "+t.url:0===e.status?"Can't read from server.  It may not have the appropriate access-control-origin settings.":404===e.status?"Can't read swagger JSON from "+t.url:e.status+" : "+e.statusText+" "+t.url)},response:function(e){var n=e.obj||JSON.parse(e.data);if(t.swaggerVersion=n.swaggerVersion,n.swagger&&2=
 ==parseInt(n.swagger))t.swaggerVersion=n.swagger,(new u).resolve(n,t.buildFromSpec,t),t.isValid=!0;else{var r=new p;r.setDocumentationLocation(t.url),r.convert(n,t.clientAuthorizations,function(e){(new u).resolve(e,t.buildFromSpec,t),t.isValid=!0})}}}};if(this.spec)setTimeout(function(){(new u).resolve(t.spec,t.buildFromSpec,t)},10);else{if(this.clientAuthorizations.apply(n),e)return n;(new c).execute(n,this.options)}return this},m.prototype.buildFromSpec=function(e){if(this.isBuilt)return this;this.apis={},this.apisArray=[],this.basePath=e.basePath||"",this.consumes=e.consumes,this.host=e.host||"",this.info=e.info||{},this.produces=e.produces,this.schemes=e.schemes||[],this.securityDefinitions=e.securityDefinitions,this.title=e.title||"",e.externalDocs&&(this.externalDocs=e.externalDocs),this.authSchemes=e.securityDefinitions;var t,n={};if(Array.isArray(e.tags))for(n={},t=0;t<e.tags.length;t++){var i=e.tags[t];n[i.name]=i}var u;"string"==typeof this.url?(u=this.parseUri(this.url),t
 his.scheme="undefined"==typeof this.schemes||0===this.schemes.length?u.scheme||"http":this.schemes[0],("undefined"==typeof this.host||""===this.host)&&(this.host=u.host,u.port&&(this.host=this.host+":"+u.port))):this.scheme="undefined"==typeof this.schemes||0===this.schemes.length?"http":this.schemes[0],this.definitions=e.definitions;var c;for(c in this.definitions){var p=new o(c,this.definitions[c],this.models,this.modelPropertyMacro);p&&(this.models[c]=p)}var m=this;return m.apis.help=r.bind(m.help,m),r.forEach(e.paths,function(e,t){r.isPlainObject(e)&&r.forEach(f,function(i){var o=e[i];if(!r.isUndefined(o)){if(!r.isPlainObject(o))return void a.log("The '"+i+"' operation for '"+t+"' path is not an Operation Object");var u=o.tags;(r.isUndefined(u)||!r.isArray(u)||0===u.length)&&(u=o.tags=["default"]);var c=m.idFromOp(t,i,o),p=new s(m,o.scheme,c,i,t,o,m.definitions,m.models,m.clientAuthorizations);r.forEach(u,function(e){var t=r.indexOf(h,e)>-1?"_"+e:e,i=r.indexOf(d,e)>-1?"_"+e:e,o=
 m[t];if(t!==e&&a.log("The '"+e+"' tag conflicts with a SwaggerClient function/property name.  Use 'client."+t+"' or 'client.apis."+e+"' instead of 'client."+e+"'."),i!==e&&a.log("The '"+e+"' tag conflicts with a SwaggerClient operation function/property name.  Use 'client.apis."+i+"' instead of 'client.apis."+e+"'."),r.indexOf(d,c)>-1&&(a.log("The '"+c+"' operationId conflicts with a SwaggerClient operation function/property name.  Use 'client.apis."+i+"._"+c+"' instead of 'client.apis."+i+"."+c+"'."),c="_"+c,p.nickname=c),r.isUndefined(o)){o=m[t]=m.apis[i]={},o.operations={},o.label=i,o.apis={};var s=n[e];r.isUndefined(s)||(o.description=s.description,o.externalDocs=s.externalDocs),m[t].help=r.bind(m.help,o),m.apisArray.push(new l(e,o.description,o.externalDocs,p))}r.isFunction(o.help)||(o.help=r.bind(m.help,o)),m.apis[i][c]=o[c]=r.bind(p.execute,p),m.apis[i][c].help=o[c].help=r.bind(p.help,p),m.apis[i][c].asCurl=o[c].asCurl=r.bind(p.asCurl,p),o.apis[c]=o.operations[c]=p;var u=r.fi
 nd(m.apisArray,function(t){return t.tag===e});u&&u.operationsArray.push(p)})}})}),this.isBuilt=!0,this.success&&(this.isValid=!0,this.isBuilt=!0,this.success()),this},m.prototype.parseUri=function(e){var t=/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,n=t.exec(e);return{scheme:n[4].replace(":",""),host:n[11],port:n[12],path:n[15]}},m.prototype.help=function(e){var t="";return this instanceof m?r.forEach(this.apis,function(e,n){r.isPlainObject(e)&&(t+="operations for the '"+n+"' tag\n",r.forEach(e.operations,function(e,n){t+="  * "+n+": "+e.summary+"\n"}))}):(this instanceof l||r.isPlainObject(this))&&(t+="operations for the '"+this.label+"' tag\n",r.forEach(this.apis,function(e,n){t+="  * "+n+": "+e.summary+"\n"})),e?t:(a.log(t),t)},m.prototype.tagFromLabel=function(e){return e},m.prototype.idFromOp=function(e,t,n){n&&n.operationId||(n=n||{},n.operatio
 nId=t+"_"+e);var r=n.operationId.replace(/[\s!@#$%^&*()_+=\[{\]};:<>|.\/?,\\'""-]/g,"_")||e.substring(1)+"_"+t;return r=r.replace(/((_){2,})/g,"_"),r=r.replace(/^(_)*/g,""),r=r.replace(/([_])*$/g,"")},m.prototype.fail=function(e){throw this.failure(e),e}},{"./auth":2,"./helpers":4,"./http":5,"./resolver":6,"./spec-converter":7,"./types/model":8,"./types/operation":9,"./types/operationGroup":10,"lodash-compat/array/indexOf":19,"lodash-compat/collection/find":22,"lodash-compat/collection/forEach":23,"lodash-compat/function/bind":26,"lodash-compat/lang/cloneDeep":106,"lodash-compat/lang/isArray":108,"lodash-compat/lang/isFunction":109,"lodash-compat/lang/isPlainObject":112,"lodash-compat/lang/isUndefined":115}],4:[function(e,t,n){(function(n){"use strict";var r={isPlainObject:e("lodash-compat/lang/isPlainObject")};t.exports.__bind=function(e,t){return function(){return e.apply(t,arguments)}};var i=t.exports.log=function(){console&&"test"!==n.env.NODE_ENV&&console.log(Array.prototype.sl
 ice.call(arguments)[0])};t.exports.fail=function(e){i(e)},t.exports.optionHtml=function(e,t){return'<tr><td class="optionName">'+e+":</td><td>"+t+"</td></tr>"};var a=t.exports.resolveSchema=function(e){return r.isPlainObject(e.schema)&&(e=a(e.schema)),e};t.exports.typeFromJsonSchema=function(e,t){var n;return"integer"===e&&"int32"===t?n="integer":"integer"===e&&"int64"===t?n="long":"integer"===e&&"undefined"==typeof t?n="long":"string"===e&&"date-time"===t?n="date-time":"string"===e&&"date"===t?n="date":"number"===e&&"float"===t?n="float":"number"===e&&"double"===t?n="double":"number"===e&&"undefined"==typeof t?n="double":"boolean"===e?n="boolean":"string"===e&&(n="string"),n};var o=t.exports.simpleRef=function(e){return"undefined"==typeof e?null:0===e.indexOf("#/definitions/")?e.substring("#/definitions/".length):e},s=t.exports.getStringSignature=function(e,t){var n="";return"undefined"!=typeof e.$ref?n+=o(e.$ref):"undefined"==typeof e.type?n+="object":"array"===e.type?t?n+=s(e.ite
 ms||e.$ref||{}):(n+="Array[",n+=s(e.items||e.$ref||{}),n+="]"):n+="integer"===e.type&&"int32"===e.format?"integer":"integer"===e.type&&"int64"===e.format?"long":"integer"===e.type&&"undefined"==typeof e.format?"long":"string"===e.type&&"date-time"===e.format?"date-time":"string"===e.type&&"date"===e.format?"date":"string"===e.type&&"undefined"==typeof e.format?"string":"number"===e.type&&"float"===e.format?"float":"number"===e.type&&"double"===e.format?"double":"number"===e.type&&"undefined"==typeof e.format?"double":"boolean"===e.type?"boolean":e.$ref?o(e.$ref):e.type,n}}).call(this,e("_process"))},{_process:15,"lodash-compat/lang/isPlainObject":112}],5:[function(e,t,n){"use strict";var r=e("./helpers"),i=e("jquery"),a=e("superagent"),o=function(){},s=function(){},l=t.exports=function(){};l.prototype.execute=function(e,t){var n;n=t&&t.client?t.client:new s(t),(e&&e.useJQuery===!0||this.isInternetExplorer())&&(n=new o(t));var r=e.on.response,i=function(e){t&&t.responseInterceptor&&(
 e=t.responseInterceptor.apply(e)),r(e)};e.on.response=function(e){i(e)},e&&"object"==typeof e.body&&(e.body.type&&"formData"===e.body.type?(e.contentType=!1,e.processData=!1,delete e.headers["Content-Type"]):e.body=JSON.stringify(e.body)),n.execute(e)},l.prototype.isInternetExplorer=function(){var e=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var t=navigator.userAgent.toLowerCase();if(-1!==t.indexOf("msie")){var n=parseInt(t.split("msie")[1]);8>=n&&(e=!0)}}return e},o.prototype.execute=function(e){var t=e.on,n=e;return e.type=e.method,e.cache=!1,delete e.useJQuery,e.data=e.body,delete e.body,e.complete=function(e){for(var i={},a=e.getAllResponseHeaders().split("\n"),o=0;o<a.length;o++){var s=a[o].trim();if(0!==s.length){var l=s.indexOf(":");if(-1!==l){var u=s.substring(0,l).trim(),c=s.substring(l+1).trim();i[u]=c}else i[s]=null}}var p={url:n.url,method:n.method,status:e.status,statusText:e.statusText,data:e.responseText,headers:i},h=i["content-type"]||i["Content-Type"]
 ||null;if(h&&(0===h.indexOf("application/json")||h.indexOf("+json")>0))try{p.obj=e.responseJSON||JSON.parse(p.data)||{}}catch(d){r.log("unable to parse JSON content")}if(e.status>=200&&e.status<300)t.response(p);else{if(!(0===e.status||e.status>=400&&e.status<599))return t.response(p);t.error(p)}},i.support.cors=!0,i.ajax(e)},s.prototype.execute=function(e){var t=e.method.toLowerCase();"delete"===t&&(t="del");var n,r=e.headers||{},i=a[t](e.url);for(n in r)i.set(n,r[n]);e.body&&i.send(e.body),i.end(function(t,n){n=n||{status:0,headers:{error:"no response from server"}};var r,i={url:e.url,method:e.method,headers:n.headers};!t&&n.error&&(t=n.error),t&&e.on&&e.on.error?(i.obj=t,i.status=n?n.status:500,i.statusText=n?n.text:t.message,r=e.on.error):n&&e.on&&e.on.response&&(i.obj="undefined"!=typeof n.body?n.body:n.text,i.status=n.status,i.statusText=n.text,r=e.on.response),i.data=i.statusText,r&&r(i)})}},{"./helpers":4,jquery:18,superagent:125}],6:[function(e,t,n){"use strict";var r=e("./
 http"),i=t.exports=function(){};i.prototype.resolve=function(e,t,n){this.scope=n||this,this.iteration=this.iteration||0;var i,a,o,s,l,u=0,c={},p={},h={};for(a in e.definitions){var d=e.definitions[a];for(l in d.properties)s=d.properties[l],this.resolveTo(s,h)}for(a in e.paths){var f,m,g;o=e.paths[a];for(f in o)if("$ref"===f)this.resolveInline(e,o,h,p);else{m=o[f];var y,v=m.parameters;for(y in v){var b=v[y];"body"===b["in"]&&b.schema&&this.resolveTo(b.schema,h),b.$ref&&this.resolveInline(e,b,h,p)}for(g in m.responses){var w=m.responses[g];"object"==typeof w&&w.$ref&&this.resolveInline(e,w,h,p),w.schema&&w.schema.$ref&&this.resolveTo(w.schema,h)}}}var x={},A=0;for(a in h){var j=a.split("#");2===j.length?(i=j[0],o=j[1],Array.isArray(x[i])||(x[i]=[],A+=1),x[i].push(o)):(Array.isArray(x[a])||(x[a]=[],A+=1),x[a].push(null))}for(a in x){var S=this,E=x[a];i=a;var C={useJQuery:!1,url:i,method:"get",headers:{accept:this.scope.swaggerRequestHeaders||"application/json"},on:{error:function(){u+=
 1;var n;for(n=0;n<E.length;n++){var r=i+"#"+E[n];p[r]=null}u===A&&S.finish(e,h,c,p,t)},response:function(n){var r,o,s=n.obj;if(null===s||0===Object.keys(s).length)try{s=JSON.parse(n.data)}catch(l){s={}}for(u+=1,r=0;r<E.length;r++){var d=E[r];if(null===d)c[a]={name:a,obj:s};else{var f=s,m=d.split("/");for(o=0;o<m.length;o++){var g=m[o];if(-1!==g.indexOf("~1")&&(g=m[o].replace(/~0/g,"~").replace(/~1/g,"/"),"/"!==g.charAt(0)&&(g="/"+g)),"undefined"==typeof f)break;g.length>0&&(f=f[g])}var y=i+"#"+d,v=m[o-1];"undefined"!=typeof f?c[y]={name:v,obj:f}:p[y]=null}}u===A&&S.finish(e,h,c,p,t)}}};n&&n.clientAuthorizations&&n.clientAuthorizations.apply(C),(new r).execute(C)}0===Object.keys(x).length&&t.call(this.scope,e,p)},i.prototype.finish=function(e,t,n,r,i){var a;for(a in t){var o,s=t[a];for(o=0;o<s.length;o++){var l=n[s[o].obj.$ref];if(l)if(e.definitions||(e.definitions={}),"$ref"===s[o].resolveAs)e.definitions[l.name]=l.obj,s[o].obj.$ref="#/definitions/"+l.name;else if("inline"===s[o].re
 solveAs){var u,c=s[o].obj;delete c.$ref;for(u in l.obj)c[u]=l.obj[u]}}}2===this.iteration?i.call(this.scope,e,r):(this.iteration+=1,this.resolve(e,i,this.scope))},i.prototype.resolveInline=function(e,t,n,r){var i=t.$ref;if(i){if(0===i.indexOf("http"))Array.isArray(n[i])?n[i].push({obj:t,resolveAs:"inline"}):n[i]=[{obj:t,resolveAs:"inline"}];else if(0===i.indexOf("#")){var a,o=i.substring(1),s=o.split("/"),l=e;for(a=0;a<s.length;a++){var u=s[a];u.length>0&&(l=l[u])}if(l){delete t.$ref;var c;for(c in l)t[c]=l[c]}else r[i]=null}}else"array"===t.type&&this.resolveTo(t.items,n)},i.prototype.resolveTo=function(e,t){var n=e.$ref;if(n)0===n.indexOf("http")&&(Array.isArray(t[n])?t[n].push({obj:e,resolveAs:"$ref"}):t[n]=[{obj:e,resolveAs:"$ref"}]);else if("array"===e.type){var r=e.items;this.resolveTo(r,t)}}},{"./http":5}],7:[function(e,t,n){"use strict";var r=e("./http"),i=t.exports=function(){this.errors=[],this.warnings=[],this.modelMap={}};i.prototype.setDocumentationLocation=function(e){
 this.docLocation=e},i.prototype.convert=function(e,t,n){if(!e||!Array.isArray(e.apis))return this.finish(n,null);this.clientAuthorizations=t;var r={swagger:"2.0"};r.originalVersion=e.swaggerVersion,this.apiInfo(e,r),this.securityDefinitions(e,r),e.basePath&&this.setDocumentationLocation(e.basePath),e.basePath&&this.setDocumentationLocation(e.basePath);var i,a=!1;for(i=0;i<e.apis.length;i++){var o=e.apis[i];Array.isArray(o.operations)&&(a=!0)}a?(this.declaration(e,r),this.finish(n,r)):this.resourceListing(e,r,n)},i.prototype.declaration=function(e,t){var n,r,i,a;if(e.apis){0===e.basePath.indexOf("http://")?(i=e.basePath.substring("http://".length),a=i.indexOf("/"),a>0?(t.host=i.substring(0,a),t.basePath=i.substring(a)):(t.host=i,t.basePath="/")):0===e.basePath.indexOf("https://")?(i=e.basePath.substring("https://".length),a=i.indexOf("/"),a>0?(t.host=i.substring(0,a),t.basePath=i.substring(a)):(t.host=i,t.basePath="/")):t.basePath=e.basePath;var o;if(e.authorizations&&(o=e.authorizat
 ions),e.consumes&&(t.consumes=e.consumes),e.produces&&(t.produces=e.produces),"object"==typeof e)for(n in e.models){var s=e.models[n],l=s.id||n;this.modelMap[l]=n}for(r=0;r<e.apis.length;r++){var u=e.apis[r],c=u.path,p=u.operations;this.operations(c,e.resourcePath,p,o,t)}var h=e.models;this.models(h,t)}},i.prototype.models=function(e,t){if("object"==typeof e){var n;t.definitions=t.definitions||{};for(n in e){var r,i=e[n],a=[],o={properties:{}};for(r in i.properties){var s=i.properties[r],l={};this.dataType(s,l),s.description&&(l.description=s.description),s["enum"]&&(l["enum"]=s["enum"]),"boolean"==typeof s.required&&s.required===!0&&a.push(r),"string"==typeof s.required&&"true"===s.required&&a.push(r),o.properties[r]=l}if(a.length>0&&(o["enum"]=a),i.required instanceof Array)for(var u=0,c=i.required.length;c>u;u++){var p=i.required[u];o.properties[p]&&(o.properties[p].required=!0)}t.definitions[n]=o}}},i.prototype.extractTag=function(e){var t=e||"default";return(0===t.indexOf("http
 :")||0===t.indexOf("https:"))&&(t=t.split(["/"]),t=t[t.length-1].substring()),t.endsWith(".json")&&(t=t.substring(0,t.length-".json".length)),t.replace("/","")},i.prototype.operations=function(e,t,n,r,i){if(Array.isArray(n)){var a;i.paths||(i.paths={});var o=i.paths[e]||{},s=this.extractTag(t);i.tags=i.tags||[];var l=!1;for(a=0;a<i.tags.length;a++){var u=i.tags[a];u.name===s&&(l=!0)}for(l||i.tags.push({name:s}),a=0;a<n.length;a++){var c=n[a],p=(c.method||c.httpMethod).toLowerCase(),h={tags:[s]},d=c.authorizations;if(d&&0===Object.keys(d).length&&(d=r),"undefined"!=typeof d){var f;for(var m in d){h.security=h.security||[];var g=d[m];if(g){var y=[];for(var v in g)y.push(g[v].scope);f={},f[m]=y,h.security.push(f)}else f={},f[m]=[],h.security.push(f)}}c.consumes?h.consumes=c.consumes:i.consumes&&(h.consumes=i.consumes),c.produces?h.produces=c.produces:i.produces&&(h.produces=i.produces),c.summary&&(h.summary=c.summary),c.notes&&(h.description=c.notes),c.nickname&&(h.operationId=c.nickna
 me),c.deprecated&&(h.deprecated=c.deprecated),this.authorizations(d,i),this.parameters(h,c.parameters,i),this.responseMessages(h,c,i),o[p]=h}i.paths[e]=o}},i.prototype.responseMessages=function(e,t){if("object"==typeof t){var n={};this.dataType(t,n),!n.schema&&n.type&&(n={schema:n}),e.responses=e.responses||{};var r=!1;if(Array.isArray(t.responseMessages)){var i,a=t.responseMessages;for(i=0;i<a.length;i++){var o=a[i],s={description:o.message};200===o.code&&(r=!0),e.responses[""+o.code]=s}}r?e.responses["default"]=n:e.responses[200]=n}},i.prototype.authorizations=function(e){},i.prototype.parameters=function(e,t){if(Array.isArray(t)){var n;for(n=0;n<t.length;n++){var r=t[n],i={};if(i.name=r.name,i.description=r.description,i.required=r.required,i["in"]=r.paramType,"body"===i["in"]&&(i.name="body"),"form"===i["in"]&&(i["in"]="formData"),r["enum"]&&(i["enum"]=r["enum"]),r.allowMultiple===!0||"true"===r.allowMultiple){var a={};if(this.dataType(r,a),i.type="array",i.items=a,r.allowableVa
 lues){var o=r.allowableValues;"LIST"===o.valueType&&(i["enum"]=o.values)}}else this.dataType(r,i);
+
+e.parameters=e.parameters||[],e.parameters.push(i)}}},i.prototype.dataType=function(e,t){if("object"==typeof e){e.minimum&&(t.minimum=e.minimum),e.maximum&&(t.maximum=e.maximum),"undefined"!=typeof e.defaultValue&&(t["default"]=e.defaultValue);var n=this.toJsonSchema(e);n&&(t=t||{},n.type&&(t.type=n.type),n.format&&(t.format=n.format),n.$ref&&(t.schema={$ref:n.$ref}),n.items&&(t.items=n.items))}},i.prototype.toJsonSchema=function(e){if(!e)return"object";var t=e.type||e.dataType||e.responseClass||"",n=t.toLowerCase(),r=(e.format||"").toLowerCase();if(0===n.indexOf("list[")){var i=t.substring(5,t.length-1),a=this.toJsonSchema({type:i});return{type:"array",items:a}}if("int"===n||"integer"===n&&"int32"===r)return{type:"integer",format:"int32"};if("long"===n||"integer"===n&&"int64"===r)return{type:"integer",format:"int64"};if("integer"===n)return{type:"integer",format:"int64"};if("float"===n||"number"===n&&"float"===r)return{type:"number",format:"float"};if("double"===n||"number"===n&&"d
 ouble"===r)return{type:"number",format:"double"};if("string"===n&&"date-time"===r||"date"===n)return{type:"string",format:"date-time"};if("string"===n)return{type:"string"};if("file"===n)return{type:"file"};if("boolean"===n)return{type:"boolean"};if("array"===n||"list"===n){if(e.items){var o=this.toJsonSchema(e.items);return{type:"array",items:o}}return{type:"array",items:{type:"object"}}}return e.$ref?{$ref:"#/definitions/"+this.modelMap[e.$ref]||e.$ref}:"void"===n||""===n?{}:{$ref:"#/definitions/"+this.modelMap[e.type]||e.type}},i.prototype.resourceListing=function(e,t,n){var i,a=0,o=this,s=e.apis.length,l=t;for(0===s&&this.finish(n,t),i=0;s>i;i++){var u=e.apis[i],c=u.path,p=this.getAbsolutePath(e.swaggerVersion,this.docLocation,c);u.description&&(t.tags=t.tags||[],t.tags.push({name:this.extractTag(u.path),description:u.description||""}));var h={url:p,headers:{accept:"application/json"},on:{},method:"get"};h.on.response=function(e){a+=1;var t=e.obj;if("undefined"==typeof t||null==
 =t)try{t=JSON.parse(e.statusText)}catch(r){}t&&o.declaration(t,l),a===s&&o.finish(n,l)},h.on.error=function(e){console.error(e),a+=1,a===s&&o.finish(n,l)},this.clientAuthorizations&&"function"==typeof this.clientAuthorizations.apply&&this.clientAuthorizations.apply(h),(new r).execute(h)}},i.prototype.getAbsolutePath=function(e,t,n){if("1.0"===e&&t.endsWith(".json")){var r=t.lastIndexOf("/");r>0&&(t=t.substring(0,r))}var i=t;return 0===n.indexOf("http://")||0===n.indexOf("https://")?i=n:(t.endsWith("/")&&(i=t.substring(0,t.length-1)),i+=n),i=i.replace("{format}","json")},i.prototype.securityDefinitions=function(e,t){if(e.authorizations){var n;for(n in e.authorizations){var r=!1,i={},a=e.authorizations[n];if("apiKey"===a.type)i.type="apiKey",i["in"]=a.passAs,i.name=a.keyname||n,r=!0;else if("oauth2"===a.type){var o,s=a.scopes||[],l={};for(o in s){var u=s[o];l[u.scope]=u.description}if(i.type="oauth2",o>0&&(i.scopes=l),a.grantTypes){if(a.grantTypes.implicit){var c=a.grantTypes.implicit
 ;i.flow="implicit",i.authorizationUrl=c.loginEndpoint,r=!0}if(a.grantTypes.authorization_code&&!i.flow){var p=a.grantTypes.authorization_code;i.flow="accessCode",i.authorizationUrl=p.tokenRequestEndpoint.url,i.tokenUrl=p.tokenEndpoint.url,r=!0}}}r&&(t.securityDefinitions=t.securityDefinitions||{},t.securityDefinitions[n]=i)}}},i.prototype.apiInfo=function(e,t){if(e.info){var n=e.info;t.info={},n.contact&&(t.info.contact={},t.info.contact.email=n.contact),n.description&&(t.info.description=n.description),n.title&&(t.info.title=n.title),n.termsOfServiceUrl&&(t.info.termsOfService=n.termsOfServiceUrl),(n.license||n.licenseUrl)&&(t.license={},n.license&&(t.license.name=n.license),n.licenseUrl&&(t.license.url=n.licenseUrl))}else this.warnings.push("missing info section")},i.prototype.finish=function(e,t){e(t)}},{"./http":5}],8:[function(e,t,n){"use strict";var r={cloneDeep:e("lodash-compat/lang/cloneDeep"),forEach:e("lodash-compat/collection/forEach"),indexOf:e("lodash-compat/array/index
 Of"),isArray:e("lodash-compat/lang/isArray"),isPlainObject:e("lodash-compat/lang/isPlainObject"),isString:e("lodash-compat/lang/isString"),isUndefined:e("lodash-compat/lang/isUndefined"),keys:e("lodash-compat/object/keys"),map:e("lodash-compat/collection/map")},i=e("../helpers"),a=t.exports=function(e,t,n,r){return this.definition=t||{},this.isArray="array"===t.type,this.models=n||{},this.name=t.title||e||"Inline Model",this.modelPropertyMacro=r||function(e){return e["default"]},this},o=function(e,t,n,o){var s={},l=[],u=0,c=function(e,t,l){var c,p=t;return e.$ref?(p=e.title||i.simpleRef(e.$ref),c=n[p],null!==c&&null!==c.definition.title&&"undefined"!=typeof c.definition.title&&(p=c.definition.title)):r.isUndefined(t)&&(p=e.title||"Inline Model "+ ++u,c=new a(p,e,n,o)),l!==!0&&(s[p]=r.isUndefined(c)?{}:c.definition),p},p=function(e){var t,n='<span class="propType"',a=e.type||"object";return e.$ref?(t=c(e,i.simpleRef(e.$ref)),n+=" title="+t+">"+t):"object"===a?r.isUndefined(e.properti
 es)?n+=' title="object">object':(t=c(e),n+=" title="+t+">"+t):"array"===a?(r.isArray(e.items)?t=r.map(e.items,c).join(","):r.isPlainObject(e.items)?t=r.isUndefined(e.items.$ref)?r.isUndefined(e.items.type)||-1!==r.indexOf(["array","object"],e.items.type)?c(e.items):e.items.type:c(e.items,i.simpleRef(e.items.$ref)):(i.log("Array type's 'items' schema is not an array or an object, cannot process"),t="object"),n+=" title=array["+t+"]>array["+t+"]"):n+=" title="+e.type+">"+e.type,n+="</span>"},h=function(e,t){var n="",a=e.type||"object",o="array"===a;switch(o&&(a=r.isPlainObject(e.items)&&!r.isUndefined(e.items.type)?e.items.type:"object"),r.isUndefined(e["default"])||(n+=i.optionHtml("Default",e["default"])),a){case"string":e.minLength&&(n+=i.optionHtml("Min. Length",e.minLength)),e.maxLength&&(n+=i.optionHtml("Max. Length",e.maxLength)),e.pattern&&(n+=i.optionHtml("Reg. Exp.",e.pattern));break;case"integer":case"number":e.minimum&&(n+=i.optionHtml("Min. Value",e.minimum)),e.exclusiveM
 inimum&&(n+=i.optionHtml("Exclusive Min.","true")),e.maximum&&(n+=i.optionHtml("Max. Value",e.maximum)),e.exclusiveMaximum&&(n+=i.optionHtml("Exclusive Max.","true")),e.multipleOf&&(n+=i.optionHtml("Multiple Of",e.multipleOf))}if(o&&(e.minItems&&(n+=i.optionHtml("Min. Items",e.minItems)),e.maxItems&&(n+=i.optionHtml("Max. Items",e.maxItems)),e.uniqueItems&&(n+=i.optionHtml("Unique Items","true")),e.collectionFormat&&(n+=i.optionHtml("Coll. Format",e.collectionFormat))),r.isUndefined(e.items)&&r.isArray(e["enum"])){var s;s="number"===a||"integer"===a?e["enum"].join(", "):'"'+e["enum"].join('", "')+'"',n+=i.optionHtml("Enum",s)}return t},d=function(e,t){var a=e.type||"object",s="array"===e.type,u='<span class="strong objectName"><span class="bracketsIcon">'+(s?"[]":"{}")+'</span> <span class="objectNameText">',d="</span></span>",f="";if("Inline Model"!==t&&(f=r.isUndefined(e.title)?u+t+d:u+e.title+d),t&&l.push(t),s)if(r.isArray(e.items))f+="<div>"+r.map(e.items,function(e){var t=e.typ
 e||"object";return r.isUndefined(e.$ref)?r.indexOf(["array","object"],t)>-1?"object"===t&&r.isUndefined(e.properties)?"object":c(e):h(e,t):c(e,i.simpleRef(e.$ref))}).join("</div><div>");else if(r.isPlainObject(e.items)){var m="";m=r.isUndefined(e.items.$ref)?r.indexOf(["array","object"],e.items.type||"object")>-1?(r.isUndefined(e.items.type)||"object"===e.items.type)&&r.isUndefined(e.items.properties)?"object":c(e.items):h(e.items,e.items.type):c(e.items,i.simpleRef(e.items.$ref)),"Inline Model"!==t&&(f+="<div>"+m+"</div>")}else i.log("Array type's 'items' property is not an array or an object, cannot process"),f+="<div>object</div>";else e.$ref?f+="<div>"+c(e,t)+"</div>":"object"===a?(f+="<div>",r.isPlainObject(e.properties)&&(f+=r.map(e.properties,function(t,a){var s,l=r.indexOf(e.required,a)>=0,u=r.cloneDeep(t),c='<span class="propLabels">';return c+='<span class="propName propOpt">'+a+"</span>",u["default"]=o(u),u=i.resolveSchema(u),r.isUndefined(u.$ref)||(s=n[i.simpleRef(u.$ref
 )],r.isUndefined(s)||-1!==r.indexOf([void 0,"array","object"],s.definition.type)||(u=i.resolveSchema(s.definition))),c+=p(u),l||(c+='<span class="propOptKey">(optional)</span>'),c+="</span>",c+='<span class="propDesc">',r.isUndefined(t.description)||(c+=t.description),u["enum"]&&(c+='<div class="propVals">Can be ',r.forEach(u["enum"],function(e,t){c+="<code>"+e+"</code>",t===u["enum"].length-2?c+=" or ":t<u["enum"].length-1&&(c+=", ")}),c+="</div>"),c+="</span>",h(u,c)}).join("</div><div>")),f+="</div>"):f="<div>"+h(e,a)+"</div>";return f};t=i.resolveSchema(t);for(var f=d(t,e);r.keys(s).length>0;)r.forEach(s,function(e,t){var n=r.indexOf(l,t)>-1;delete s[t],n||(l.push(t),f+=d(e,t))});return f},s=function(e,t,n,a){e=i.resolveSchema(e);var o,l,u=e.type||"object",c=e.format;return e.example?l=e.example:r.isUndefined(e.items)&&r.isArray(e["enum"])&&(l=e["enum"][0]),r.isUndefined(l)&&(e.$ref?(o=t[i.simpleRef(e.$ref)],r.isUndefined(o)||(r.isUndefined(n[o.name])?(n[o.name]=o,l=s(o.definiti
 on,t,n,a),delete n[o.name]):l="array"===o.type?[]:{})):r.isUndefined(e["default"])?"string"===u?l="date-time"===c?(new Date).toISOString():"date"===c?(new Date).toISOString().split("T")[0]:"string":"integer"===u?l=0:"number"===u?l=0:"boolean"===u?l=!0:"object"===u?(l={},r.forEach(e.properties,function(e,i){var o=r.cloneDeep(e);o["default"]=a(e),l[i]=s(o,t,n,a)})):"array"===u&&(l=[],r.isArray(e.items)?r.forEach(e.items,function(e){l.push(s(e,t,n,a))}):r.isPlainObject(e.items)?l.push(s(e.items,t,n,a)):r.isUndefined(e.items)?l.push({}):i.log("Array type's 'items' property is not an array or an object, cannot process")):l=e["default"]),l};a.prototype.createJSONSample=a.prototype.getSampleValue=function(e){return e=e||{},e[this.name]=this,this.examples&&r.isPlainObject(this.examples)&&this.examples["application/json"]?(this.definition.example=this.examples["application/json"],r.isString(this.definition.example)&&(this.definition.example=JSON.parse(this.definition.example))):this.definiti
 on.example||(this.definition.example=this.examples),s(this.definition,this.models,e,this.modelPropertyMacro)},a.prototype.getMockSignature=function(){return o(this.name,this.definition,this.models,this.modelPropertyMacro)}},{"../helpers":4,"lodash-compat/array/indexOf":19,"lodash-compat/collection/forEach":23,"lodash-compat/collection/map":24,"lodash-compat/lang/cloneDeep":106,"lodash-compat/lang/isArray":108,"lodash-compat/lang/isPlainObject":112,"lodash-compat/lang/isString":113,"lodash-compat/lang/isUndefined":115,"lodash-compat/object/keys":116}],9:[function(e,t,n){"use strict";var r={cloneDeep:e("lodash-compat/lang/cloneDeep"),isUndefined:e("lodash-compat/lang/isUndefined")},i=e("../helpers"),a=e("./model"),o=e("../http"),s=t.exports=function(e,t,n,r,o,s,l,u,c){var p=[];if(e=e||{},s=s||{},e&&e.options&&(this.client=e.options.client||null,this.responseInterceptor=e.options.responseInterceptor||null),this.authorizations=s.security,this.basePath=e.basePath||"/",this.clientAuthoriz
 ations=c,this.consumes=s.consumes||e.consumes||["application/json"],this.produces=s.produces||e.produces||["application/json"],this.deprecated=s.deprecated,this.description=s.description,this.host=e.host||"localhost",this.method=r||p.push("Operation "+n+" is missing method."),this.models=u||{},this.nickname=n||p.push("Operations must have a nickname."),this.operation=s,this.operations={},this.parameters=null!==s?s.parameters||[]:{},this.parent=e,this.path=o||p.push("Operation "+this.nickname+" is missing path."),this.responses=s.responses||{},this.scheme=t||e.scheme||"http",this.schemes=e.schemes,this.security=s.security,this.summary=s.summary||"",this.type=null,this.useJQuery=e.useJQuery,this.parameterMacro=e.parameterMacro||function(e){return e["default"]},this.inlineModels=[],"string"==typeof this.deprecated)switch(this.deprecated.toLowerCase()){case"true":case"yes":case"1":this.deprecated=!0;break;case"false":case"no":case"0":case null:this.deprecated=!1;break;default:this.depre
 cated=Boolean(this.deprecated)}var h,d;if(l){var f;for(f in l)d=new a(f,l[f],this.models,e.modelPropertyMacro),d&&(this.models[f]=d)}for(h=0;h<this.parameters.length;h++){var m=this.parameters[h];m["default"]=this.parameterMacro(m),"array"===m.type&&(m.isList=!0,m.allowMultiple=!0,m.items&&m.items["enum"]&&(m["enum"]=m.items["enum"]));var g=this.getType(m);if(g&&"boolean"===g.toString().toLowerCase()&&(m.allowableValues={},m.isList=!0,m["enum"]=[!0,!1]),"undefined"!=typeof m["enum"]){var y;for(m.allowableValues={},m.allowableValues.values=[],m.allowableValues.descriptiveValues=[],y=0;y<m["enum"].length;y++){var v=m["enum"][y],b=v===m["default"]||v+""===m["default"];m.allowableValues.values.push(v),m.allowableValues.descriptiveValues.push({value:v+"",isDefault:b})}}if("array"===m.type&&(g=[g],"undefined"==typeof m.allowableValues&&(delete m.isList,delete m.allowMultiple)),"undefined"==typeof m.type){var w=m.schema;w&&w.$ref&&(d=this.models[i.simpleRef(w.$ref)],d&&d.definition.title&&
 (m.type=d.definition.title))}m.signature=this.getModelSignature(g,this.models).toString(),m.sampleJSON=this.getModelSampleJSON(g,this.models),m.responseClassSignature=m.signature}var x,A,j=this.responses;if(j[200]?(A=j[200],x="200"):j[201]?(A=j[201],x="201"):j[202]?(A=j[202],x="202"):j[203]?(A=j[203],x="203"):j[204]?(A=j[204],x="204"):j[205]?(A=j[205],x="205"):j[206]?(A=j[206],x="206"):j["default"]&&(A=j["default"],x="default"),A&&A.schema){var S,E=this.resolveModel(A.schema,l);delete j[x],E?(this.successResponse={},S=this.successResponse[x]=E):A.schema.type&&"object"!==A.schema.type&&"array"!==A.schema.type?(this.successResponse={},S=this.successResponse[x]=A.schema):(this.successResponse={},S=this.successResponse[x]=new a(void 0,A.schema||{},this.models,e.modelPropertyMacro)),S&&(A.description&&(S.description=A.description),A.examples&&(S.examples=A.examples),A.headers&&(S.headers=A.headers)),this.type=A}return p.length>0&&this.resource&&this.resource.api&&this.resource.api.fail&&
 this.resource.api.fail(p),this};s.prototype.isDefaultArrayItemValue=function(e,t){return t["default"]&&Array.isArray(t["default"])?-1!==t["default"].indexOf(e):e===t["default"]},s.prototype.getType=function(e){var t,n=e.type,r=e.format,a=!1;"integer"===n&&"int32"===r?t="integer":"integer"===n&&"int64"===r?t="long":"integer"===n?t="integer":"string"===n?t="date-time"===r?"date-time":"date"===r?"date":"string":"number"===n&&"float"===r?t="float":"number"===n&&"double"===r?t="double":"number"===n?t="double":"boolean"===n?t="boolean":"array"===n&&(a=!0,e.items&&(t=this.getType(e.items))),e.$ref&&(t=i.simpleRef(e.$ref));var o=e.schema;if(o){var s=o.$ref;return s?(s=i.simpleRef(s),a?[s]:s):"object"===o.type?this.addInlineModel(o):this.getType(o)}return a?[t]:t},s.prototype.addInlineModel=function(e){var t=this.inlineModels.length,n=this.resolveModel(e,{});return n?(this.inlineModels.push(n),"Inline Model "+t):null},s.prototype.getInlineModel=function(e){if(/^Inline Model \d+$/.test(e)){va
 r t=parseInt(e.substr("Inline Model".length).trim(),10),n=this.inlineModels[t];return n}return null},s.prototype.resolveModel=function(e,t){if("undefined"!=typeof e.$ref){var n=e.$ref;if(0===n.indexOf("#/definitions/")&&(n=n.substring("#/definitions/".length)),t[n])return new a(n,t[n],this.models,this.parent.modelPropertyMacro)}else if(e&&"object"==typeof e&&("object"===e.type||r.isUndefined(e.type)))return new a(void 0,e,this.models,this.parent.modelPropertyMacro);return null},s.prototype.help=function(e){for(var t=this.nickname+": "+this.summary+"\n",n=0;n<this.parameters.length;n++){var r=this.parameters[n],a=r.signature;t+="\n  * "+r.name+" ("+a+"): "+r.description}return"undefined"==typeof e&&i.log(t),t},s.prototype.getModelSignature=function(e,t){var n,r;return e instanceof Array&&(r=!0,e=e[0]),"undefined"==typeof e?(e="undefined",n=!0):t[e]?(e=t[e],n=!1):this.getInlineModel(e)?(e=this.getInlineModel(e),n=!1):n=!0,n?r?"Array["+e+"]":e.toString():e.getMockSignature()},s.prototy
 pe.supportHeaderParams=function(){return!0},s.prototype.supportedSubmitMethods=function(){return this.parent.supportedSubmitMethods},s.prototype.getHeaderParams=function(e){for(var t=this.setContentTypes(e,{}),n=0;n<this.parameters.length;n++){var r=this.parameters[n];if("undefined"!=typeof e[r.name]&&"header"===r["in"]){var i=e[r.name];Array.isArray(i)&&(i=i.toString()),t[r.name]=i}}return t},s.prototype.urlify=function(e){for(var t={},n=this.path,r="",i=0;i<this.parameters.length;i++){var a=this.parameters[i];if("undefined"!=typeof e[a.name])if("path"===a["in"]){var o=new RegExp("{"+a.name+"}","gi"),s=e[a.name];s=Array.isArray(s)?this.encodePathCollection(a.collectionFormat,a.name,s):this.encodePathParam(s),n=n.replace(o,s)}else if("query"===a["in"]&&"undefined"!=typeof e[a.name])if(r+=""===r?"?":"&","undefined"!=typeof a.collectionFormat){var l=e[a.name];r+=Array.isArray(l)?this.encodeQueryCollection(a.collectionFormat,a.name,l):this.encodeQueryParam(a.name)+"="+this.encodeQueryP
 aram(e[a.name])}else r+=this.encodeQueryParam(a.name)+"="+this.encodeQueryParam(e[a.name]);else"formData"===a["in"]&&(t[a.name]=e[a.name])}var u=this.scheme+"://"+this.host;return"/"!==this.basePath&&(u+=this.basePath),u+n+r},s.prototype.getMissingParams=function(e){var t,n=[];for(t=0;t<this.parameters.length;t++){var r=this.parameters[t];r.required===!0&&"undefined"==typeof e[r.name]&&(n=r.name)}return n},s.prototype.getBody=function(e,t,n){for(var r,i,a,o={},s=!1,l=0;l<this.parameters.length;l++){var u=this.parameters[l];"undefined"!=typeof t[u.name]?"body"===u["in"]?r=t[u.name]:"formData"===u["in"]&&(o[u.name]=t[u.name]):"body"===u["in"]&&(s=!0)}if(s&&"undefined"==typeof r){var c=e["Content-Type"];c&&0===c.indexOf("application/json")&&(r="{}")}if("application/x-www-form-urlencoded"===e["Content-Type"]){var p="";for(i in o)a=o[i],"undefined"!=typeof a&&(""!==p&&(p+="&"),p+=encodeURIComponent(i)+"="+encodeURIComponent(a));r=p}else if(e["Content-Type"]&&e["Content-Type"].indexOf("mu
 ltipart/form-data")>=0&&n.useJQuery){var h=new FormData;h.type="formData";for(i in o)a=t[i],"undefined"!=typeof a&&("file"===a.type&&a.value?(delete e["Content-Type"],h.append(i,a.value)):h.append(i,a));r=h}return r},s.prototype.getModelSampleJSON=function(e,t){var n,r,i;if(t=t||{},n=e instanceof Array,i=n?e[0]:e,t[i]?r=t[i].createJSONSample():this.getInlineModel(i)&&(r=this.getInlineModel(i).createJSONSample()),r){if(r=n?[r]:r,"string"==typeof r)return r;if("object"==typeof r){var a=r;if(r instanceof Array&&r.length>0&&(a=r[0]),a.nodeName){var o=(new XMLSerializer).serializeToString(a);return this.formatXml(o)}return JSON.stringify(r,null,2)}return r}},s.prototype["do"]=function(e,t,n,r,i){return this.execute(e,t,n,r,i)},s.prototype.execute=function(e,t,n,r,a){var s,l,u=e||{},c={};"object"==typeof t&&(c=t,s=n,l=r),this.client&&(c.client=this.client),this.responseInterceptor&&(c.responseInterceptor=this.responseInterceptor),"function"==typeof t&&(s=t,l=n),s=s||this.parent.defaultSuc
 cessCallback||i.log,l=l||this.parent.defaultErrorCallback||i.log,"undefined"==typeof c.useJQuery&&(c.useJQuery=this.useJQuery);var p=this.getMissingParams(u);if(p.length>0){var h="missing required params: "+p;return i.fail(h),void l(h)}var d,f=this.getHeaderParams(u),m=this.setContentTypes(u,c),g={};for(d in f)g[d]=f[d];for(d in m)g[d]=m[d];var y=this.getBody(m,u,c),v=this.urlify(u);if(v.indexOf(".{format}")>0&&g){var b=g.Accept||g.accept;b&&b.indexOf("json")>0?v=v.replace(".{format}",".json"):b&&b.indexOf("xml")>0&&(v=v.replace(".{format}",".xml"))}var w={url:v,method:this.method.toUpperCase(),body:y,useJQuery:c.useJQuery,headers:g,on:{response:function(e){return s(e,a)},error:function(e){return l(e,a)}}};return this.clientAuthorizations.apply(w,this.operation.security),c.mock===!0?w:void(new o).execute(w,c)},s.prototype.setContentTypes=function(e,t){var n,r,a=this.parameters,o=e.parameterContentType||this.consumes[0],s=t.responseContentType||this.produces[0],l=[],u=[],c={};for(r=0
 ;r<a.length;r++){var p=a[r];if("formData"===p["in"])"file"===p.type?l.push(p):u.push(p);else if("header"===p["in"]&&t){var h=p.name,d=t[p.name];"undefined"!=typeof t[p.name]&&(c[h]=d)}else"body"===p["in"]&&"undefined"!=typeof e[p.name]&&(n=e[p.name])}return"post"===this.method||"put"===this.method||"patch"===this.method?(t.requestContentType&&(o=t.requestContentType),u.length>0&&(o=t.requestContentType?t.requestContentType:l.length>0?"multipart/form-data":"application/x-www-form-urlencoded")):o=null,o&&this.consumes&&-1===this.consumes.indexOf(o)&&i.log("server doesn't consume "+o+", try "+JSON.stringify(this.consumes)),s&&this.produces&&-1===this.produces.indexOf(s)&&i.log("server can't produce "+s),(o&&""!==n||"application/x-www-form-urlencoded"===o)&&(c["Content-Type"]=o),s&&(c.Accept=s),c},s.prototype.asCurl=function(e){var t=this.execute(e,{mock:!0});this.clientAuthorizations.apply(t);var n=[];if(n.push("-X "+this.method.toUpperCase()),t.headers){var r;for(r in t.headers)n.push
 ('--header "'+r+": "+t.headers[r]+'"')}if(t.body){var i;i="object"==typeof t.body?JSON.stringify(t.body):t.body,n.push('-d "'+i.replace(/"/g,'\\"')+'"')}return"curl "+n.join(" ")+' "'+t.url+'"'},s.prototype.encodePathCollection=function(e,t,n){var r,i="",a="";for(a="ssv"===e?"%20":"tsv"===e?"\\t":"pipes"===e?"|":",",r=0;r<n.length;r++)0===r?i=this.encodeQueryParam(n[r]):i+=a+this.encodeQueryParam(n[r]);return i},s.prototype.encodeQueryCollection=function(e,t,n){var r,i="";if("default"===e||"multi"===e)for(r=0;r<n.length;r++)r>0&&(i+="&"),i+=this.encodeQueryParam(t)+"="+this.encodeQueryParam(n[r]);else{var a="";if("csv"===e)a=",";else if("ssv"===e)a="%20";else if("tsv"===e)a="\\t";else if("pipes"===e)a="|";else if("brackets"===e)for(r=0;r<n.length;r++)0!==r&&(i+="&"),i+=this.encodeQueryParam(t)+"[]="+this.encodeQueryParam(n[r]);if(""!==a)for(r=0;r<n.length;r++)0===r?i=this.encodeQueryParam(t)+"="+this.encodeQueryParam(n[r]):i+=a+this.encodeQueryParam(n[r])}return i},s.prototype.encod
 eQueryParam=function(e){return encodeURIComponent(e)},s.prototype.encodePathParam=function(e){var t,n,r,i;if(e=e.toString(),-1===e.indexOf("/"))return encodeURIComponent(e);for(n=e.split("/"),t=[],r=0,i=n.length;i>r;r++)t.push(encodeURIComponent(n[r]));return t.join("/")}},{"../helpers":4,"../http":5,"./model":8,"lodash-compat/lang/cloneDeep":106,"lodash-compat/lang/isUndefined":115}],10:[function(e,t,n){"use strict";var r=t.exports=function(e,t,n,r){this.description=t,this.externalDocs=n,this.name=e,this.operation=r,this.operationsArray=[],this.path=e,this.tag=e};r.prototype.sort=function(){}},{}],11:[function(e,t,n){function r(e){return this instanceof r?(this.length=0,this.parent=void 0,"number"==typeof e?i(this,e):"string"==typeof e?a(this,e,arguments.length>1?arguments[1]:"utf8"):o(this,e)):arguments.length>1?new r(e,arguments[1]):new r(e)}function i(e,t){if(e=h(e,0>t?0:0|d(t)),!r.TYPED_ARRAY_SUPPORT)for(var n=0;t>n;n++)e[n]=0;return e}function a(e,t,n){("string"!=typeof n||""=
 ==n)&&(n="utf8");var r=0|m(t,n);return e=h(e,r),e.write(t,n),e}function o(e,t){if(r.isBuffer(t))return s(e,t);if(W(t))return l(e,t);if(null==t)throw new TypeError("must start with number, buffer, array or string");return"undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer?u(e,t):t.length?c(e,t):p(e,t)}function s(e,t){var n=0|d(t.length);return e=h(e,n),t.copy(e,0,0,n),e}function l(e,t){var n=0|d(t.length);e=h(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function u(e,t){var n=0|d(t.length);e=h(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function c(e,t){var n=0|d(t.length);e=h(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function p(e,t){var n,r=0;"Buffer"===t.type&&W(t.data)&&(n=t.data,r=0|d(n.length)),e=h(e,r);for(var i=0;r>i;i+=1)e[i]=255&n[i];return e}function h(e,t){r.TYPED_ARRAY_SUPPORT?e=r._augment(new Uint8Array(t)):(e.length=t,e._isBuffer=!0);var n=0!==t&&t<=r.poolSize>>>1;return n&&(e.parent=Y),e}function d(e){if(e>=J)throw new RangeError("Attempt to 
 allocate Buffer larger than maximum size: 0x"+J.toString(16)+" bytes");return 0|e}function f(e,t){if(!(this instanceof f))return new f(e,t);var n=new r(e,t);return delete n.parent,n}function m(e,t){if("string"!=typeof e&&(e=String(e)),0===e.length)return 0;switch(t||"utf8"){case"ascii":case"binary":case"raw":return e.length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e.length;case"hex":return e.length>>>1;case"utf8":case"utf-8":return U(e).length;case"base64":return B(e).length;default:return e.length}}function g(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var a=t.length;if(a%2!==0)throw new Error("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;r>o;o++){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[n+o]=s}return o}function y(e,t,n,r){return q(U(t,e.length-n),e,n,r)}function v(e,t,n,r){return q(R(t),e,n,r)}function b(e,t,n,r){return v(e,t,n,r)}function w(e,t,n,r){return q(B(t),e,n,r)}function x(e,t
 ,n,r){return q(H(t,e.length-n),e,n,r)}function A(e,t,n){return z.fromByteArray(0===t&&n===e.length?e:e.slice(t,n))}function j(e,t,n){var

<TRUNCATED>

[09/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/lib/backbone-min.js
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/lib/backbone-min.js b/ambari-web/api-docs/lib/backbone-min.js
new file mode 100644
index 0000000..a3f544b
--- /dev/null
+++ b/ambari-web/api-docs/lib/backbone-min.js
@@ -0,0 +1,15 @@
+// Backbone.js 1.1.2
+
+(function(t,e){if(typeof define==="function"&&define.amd){define(["underscore","jquery","exports"],function(i,r,s){t.Backbone=e(t,s,i,r)})}else if(typeof exports!=="undefined"){var i=require("underscore");e(t,exports,i)}else{t.Backbone=e(t,{},t._,t.jQuery||t.Zepto||t.ender||t.$)}})(this,function(t,e,i,r){var s=t.Backbone;var n=[];var a=n.push;var o=n.slice;var h=n.splice;e.VERSION="1.1.2";e.$=r;e.noConflict=function(){t.Backbone=s;return this};e.emulateHTTP=false;e.emulateJSON=false;var u=e.Events={on:function(t,e,i){if(!c(this,"on",t,[e,i])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);r.push({callback:e,context:i,ctx:i||this});return this},once:function(t,e,r){if(!c(this,"once",t,[e,r])||!e)return this;var s=this;var n=i.once(function(){s.off(t,n);e.apply(this,arguments)});n._callback=e;return this.on(t,n,r)},off:function(t,e,r){var s,n,a,o,h,u,l,f;if(!this._events||!c(this,"off",t,[e,r]))return this;if(!t&&!e&&!r){this._events=void 0;
 return this}o=t?[t]:i.keys(this._events);for(h=0,u=o.length;h<u;h++){t=o[h];if(a=this._events[t]){this._events[t]=s=[];if(e||r){for(l=0,f=a.length;l<f;l++){n=a[l];if(e&&e!==n.callback&&e!==n.callback._callback||r&&r!==n.context){s.push(n)}}}if(!s.length)delete this._events[t]}}return this},trigger:function(t){if(!this._events)return this;var e=o.call(arguments,1);if(!c(this,"trigger",t,e))return this;var i=this._events[t];var r=this._events.all;if(i)f(i,e);if(r)f(r,arguments);return this},stopListening:function(t,e,r){var s=this._listeningTo;if(!s)return this;var n=!e&&!r;if(!r&&typeof e==="object")r=this;if(t)(s={})[t._listenId]=t;for(var a in s){t=s[a];t.off(e,r,this);if(n||i.isEmpty(t._events))delete this._listeningTo[a]}return this}};var l=/\s+/;var c=function(t,e,i,r){if(!i)return true;if(typeof i==="object"){for(var s in i){t[e].apply(t,[s,i[s]].concat(r))}return false}if(l.test(i)){var n=i.split(l);for(var a=0,o=n.length;a<o;a++){t[e].apply(t,[n[a]].concat(r))}return false}re
 turn true};var f=function(t,e){var i,r=-1,s=t.length,n=e[0],a=e[1],o=e[2];switch(e.length){case 0:while(++r<s)(i=t[r]).callback.call(i.ctx);return;case 1:while(++r<s)(i=t[r]).callback.call(i.ctx,n);return;case 2:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a);return;case 3:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a,o);return;default:while(++r<s)(i=t[r]).callback.apply(i.ctx,e);return}};var d={listenTo:"on",listenToOnce:"once"};i.each(d,function(t,e){u[e]=function(e,r,s){var n=this._listeningTo||(this._listeningTo={});var a=e._listenId||(e._listenId=i.uniqueId("l"));n[a]=e;if(!s&&typeof r==="object")s=this;e[t](r,s,this);return this}});u.bind=u.on;u.unbind=u.off;i.extend(e,u);var p=e.Model=function(t,e){var r=t||{};e||(e={});this.cid=i.uniqueId("c");this.attributes={};if(e.collection)this.collection=e.collection;if(e.parse)r=this.parse(r,e)||{};r=i.defaults({},r,i.result(this,"defaults"));this.set(r,e);this.changed={};this.initialize.apply(this,arguments)};i.extend(p.prototype,u,{cha
 nged:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return this.get(t)!=null},set:function(t,e,r){var s,n,a,o,h,u,l,c;if(t==null)return this;if(typeof t==="object"){n=t;r=e}else{(n={})[t]=e}r||(r={});if(!this._validate(n,r))return false;a=r.unset;h=r.silent;o=[];u=this._changing;this._changing=true;if(!u){this._previousAttributes=i.clone(this.attributes);this.changed={}}c=this.attributes,l=this._previousAttributes;if(this.idAttribute in n)this.id=n[this.idAttribute];for(s in n){e=n[s];if(!i.isEqual(c[s],e))o.push(s);if(!i.isEqual(l[s],e)){this.changed[s]=e}else{delete this.changed[s]}a?delete c[s]:c[s]=e}if(!h){if(o.length)this._pending=r;for(var f=0,d=o.length;f<d;f++){this.trigger("change:"+o[f],this,c[o[f]],r)}}if(u)return this;if(!h){while(this._pend
 ing){r=this._pending;this._pending=false;this.trigger("change",this,r)}}this._pending=false;this._changing=false;return this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:true}))},clear:function(t){var e={};for(var r in this.attributes)e[r]=void 0;return this.set(e,i.extend({},t,{unset:true}))},hasChanged:function(t){if(t==null)return!i.isEmpty(this.changed);return i.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?i.clone(this.changed):false;var e,r=false;var s=this._changing?this._previousAttributes:this.attributes;for(var n in t){if(i.isEqual(s[n],e=t[n]))continue;(r||(r={}))[n]=e}return r},previous:function(t){if(t==null||!this._previousAttributes)return null;return this._previousAttributes[t]},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=t?i.clone(t):{};if(t.parse===void 0)t.parse=true;var e=this;var r=t.success;t.success=function(i){if(!e.set(e.parse(i,t),t))return false;if(r)r
 (e,i,t);e.trigger("sync",e,i,t)};q(this,t);return this.sync("read",this,t)},save:function(t,e,r){var s,n,a,o=this.attributes;if(t==null||typeof t==="object"){s=t;r=e}else{(s={})[t]=e}r=i.extend({validate:true},r);if(s&&!r.wait){if(!this.set(s,r))return false}else{if(!this._validate(s,r))return false}if(s&&r.wait){this.attributes=i.extend({},o,s)}if(r.parse===void 0)r.parse=true;var h=this;var u=r.success;r.success=function(t){h.attributes=o;var e=h.parse(t,r);if(r.wait)e=i.extend(s||{},e);if(i.isObject(e)&&!h.set(e,r)){return false}if(u)u(h,t,r);h.trigger("sync",h,t,r)};q(this,r);n=this.isNew()?"create":r.patch?"patch":"update";if(n==="patch")r.attrs=s;a=this.sync(n,this,r);if(s&&r.wait)this.attributes=o;return a},destroy:function(t){t=t?i.clone(t):{};var e=this;var r=t.success;var s=function(){e.trigger("destroy",e,e.collection,t)};t.success=function(i){if(t.wait||e.isNew())s();if(r)r(e,i,t);if(!e.isNew())e.trigger("sync",e,i,t)};if(this.isNew()){t.success();return false}q(this,t);
 var n=this.sync("delete",this,t);if(!t.wait)s();return n},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||M();if(this.isNew())return t;return t.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.extend(t||{},{validate:true}))},_validate:function(t,e){if(!e.validate||!this.validate)return true;t=i.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;if(!r)return true;this.trigger("invalid",this,r,i.extend(e,{validationError:r}));return false}});var v=["keys","values","pairs","invert","pick","omit"];i.each(v,function(t){p.prototype[t]=function(){var e=o.call(arguments);e.unshift(this.attributes);return i[t].apply(i,e)}});var g=e.Collection=function(t,e){e||(e={});if(e.model)this.model=e.model;if(e.comparator!==void 0)this.comparator=
 e.comparator;this._reset();this.initialize.apply(this,arguments);if(t)this.reset(t,i.extend({silent:true},e))};var m={add:true,remove:true,merge:true};var y={add:true,remove:false};i.extend(g.prototype,u,{model:p,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:false},e,y))},remove:function(t,e){var r=!i.isArray(t);t=r?[t]:i.clone(t);e||(e={});var s,n,a,o;for(s=0,n=t.length;s<n;s++){o=t[s]=this.get(t[s]);if(!o)continue;delete this._byId[o.id];delete this._byId[o.cid];a=this.indexOf(o);this.models.splice(a,1);this.length--;if(!e.silent){e.index=a;o.trigger("remove",o,this,e)}this._removeReference(o,e)}return r?t[0]:t},set:function(t,e){e=i.defaults({},e,m);if(e.parse)t=this.parse(t,e);var r=!i.isArray(t);t=r?t?[t]:[]:i.clone(t);var s,n,a,o,h,u,l;var c=e.at;var f=this.model;var d=this.comparator&&c==null&&e.sort!==false;var v=i.isString(t
 his.comparator)?this.comparator:null;var g=[],y=[],_={};var b=e.add,w=e.merge,x=e.remove;var E=!d&&b&&x?[]:false;for(s=0,n=t.length;s<n;s++){h=t[s]||{};if(h instanceof p){a=o=h}else{a=h[f.prototype.idAttribute||"id"]}if(u=this.get(a)){if(x)_[u.cid]=true;if(w){h=h===o?o.attributes:h;if(e.parse)h=u.parse(h,e);u.set(h,e);if(d&&!l&&u.hasChanged(v))l=true}t[s]=u}else if(b){o=t[s]=this._prepareModel(h,e);if(!o)continue;g.push(o);this._addReference(o,e)}o=u||o;if(E&&(o.isNew()||!_[o.id]))E.push(o);_[o.id]=true}if(x){for(s=0,n=this.length;s<n;++s){if(!_[(o=this.models[s]).cid])y.push(o)}if(y.length)this.remove(y,e)}if(g.length||E&&E.length){if(d)l=true;this.length+=g.length;if(c!=null){for(s=0,n=g.length;s<n;s++){this.models.splice(c+s,0,g[s])}}else{if(E)this.models.length=0;var k=E||g;for(s=0,n=k.length;s<n;s++){this.models.push(k[s])}}}if(l)this.sort({silent:true});if(!e.silent){for(s=0,n=g.length;s<n;s++){(o=g[s]).trigger("add",o,this,e)}if(l||E&&E.length)this.trigger("sort",this,e)}retu
 rn r?t[0]:t},reset:function(t,e){e||(e={});for(var r=0,s=this.models.length;r<s;r++){this._removeReference(this.models[r],e)}e.previousModels=this.models;this._reset();t=this.add(t,i.extend({silent:true},e));if(!e.silent)this.trigger("reset",this,e);return t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);this.remove(e,t);return e},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);this.remove(e,t);return e},slice:function(){return o.apply(this.models,arguments)},get:function(t){if(t==null)return void 0;return this._byId[t]||this._byId[t.id]||this._byId[t.cid]},at:function(t){return this.models[t]},where:function(t,e){if(i.isEmpty(t))return e?void 0:[];return this[e?"find":"filter"](function(e){for(var i in t){if(t[i]!==e.get(i))return false}return true})},findWhere:function(t){return this.where(t,true)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a se
 t without a comparator");t||(t={});if(i.isString(this.comparator)||this.comparator.length===1){this.models=this.sortBy(this.comparator,this)}else{this.models.sort(i.bind(this.comparator,this))}if(!t.silent)this.trigger("sort",this,t);return this},pluck:function(t){return i.invoke(this.models,"get",t)},fetch:function(t){t=t?i.clone(t):{};if(t.parse===void 0)t.parse=true;var e=t.success;var r=this;t.success=function(i){var s=t.reset?"reset":"set";r[s](i,t);if(e)e(r,i,t);r.trigger("sync",r,i,t)};q(this,t);return this.sync("read",this,t)},create:function(t,e){e=e?i.clone(e):{};if(!(t=this._prepareModel(t,e)))return false;if(!e.wait)this.add(t,e);var r=this;var s=e.success;e.success=function(t,i){if(e.wait)r.add(t,e);if(s)s(t,i,e)};t.save(null,e);return t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0;this.models=[];this._byId={}},_prepareModel:function(t,e){if(t instanceof p)return t;e=e?i.clone(e):{};e.collectio
 n=this;var r=new this.model(t,e);if(!r.validationError)return r;this.trigger("invalid",this,r.validationError,e);return false},_addReference:function(t,e){this._byId[t.cid]=t;if(t.id!=null)this._byId[t.id]=t;if(!t.collection)t.collection=this;t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){if(this===t.collection)delete t.collection;t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,r){if((t==="add"||t==="remove")&&i!==this)return;if(t==="destroy")this.remove(e,r);if(e&&t==="change:"+e.idAttribute){delete this._byId[e.previous(e.idAttribute)];if(e.id!=null)this._byId[e.id]=e}this.trigger.apply(this,arguments)}});var _=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty
 ","chain","sample"];i.each(_,function(t){g.prototype[t]=function(){var e=o.call(arguments);e.unshift(this.models);return i[t].apply(i,e)}});var b=["groupBy","countBy","sortBy","indexBy"];i.each(b,function(t){g.prototype[t]=function(e,r){var s=i.isFunction(e)?e:function(t){return t.get(e)};return i[t](this.models,s,r)}});var w=e.View=function(t){this.cid=i.uniqueId("view");t||(t={});i.extend(this,i.pick(t,E));this._ensureElement();this.initialize.apply(this,arguments);this.delegateEvents()};var x=/^(\S+)\s*(.*)$/;var E=["model","collection","el","id","attributes","className","tagName","events"];i.extend(w.prototype,u,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){this.$el.remove();this.stopListening();return this},setElement:function(t,i){if(this.$el)this.undelegateEvents();this.$el=t instanceof e.$?t:e.$(t);this.el=this.$el[0];if(i!==false)this.delegateEvents();return this},delegateEvents:function(t){if(
 !(t||(t=i.result(this,"events"))))return this;this.undelegateEvents();for(var e in t){var r=t[e];if(!i.isFunction(r))r=this[t[e]];if(!r)continue;var s=e.match(x);var n=s[1],a=s[2];r=i.bind(r,this);n+=".delegateEvents"+this.cid;if(a===""){this.$el.on(n,r)}else{this.$el.on(n,a,r)}}return this},undelegateEvents:function(){this.$el.off(".delegateEvents"+this.cid);return this},_ensureElement:function(){if(!this.el){var t=i.extend({},i.result(this,"attributes"));if(this.id)t.id=i.result(this,"id");if(this.className)t["class"]=i.result(this,"className");var r=e.$("<"+i.result(this,"tagName")+">").attr(t);this.setElement(r,false)}else{this.setElement(i.result(this,"el"),false)}}});e.sync=function(t,r,s){var n=T[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:n,dataType:"json"};if(!s.url){a.url=i.result(r,"url")||M()}if(s.data==null&&r&&(t==="create"||t==="update"||t==="patch")){a.contentType="application/json";a.data=JSON.stringify(s.attrs||r.toJSO
 N(s))}if(s.emulateJSON){a.contentType="application/x-www-form-urlencoded";a.data=a.data?{model:a.data}:{}}if(s.emulateHTTP&&(n==="PUT"||n==="DELETE"||n==="PATCH")){a.type="POST";if(s.emulateJSON)a.data._method=n;var o=s.beforeSend;s.beforeSend=function(t){t.setRequestHeader("X-HTTP-Method-Override",n);if(o)return o.apply(this,arguments)}}if(a.type!=="GET"&&!s.emulateJSON){a.processData=false}if(a.type==="PATCH"&&k){a.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}var h=s.xhr=e.ajax(i.extend(a,s));r.trigger("request",r,h,s);return h};var k=typeof window!=="undefined"&&!!window.ActiveXObject&&!(window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent);var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var $=e.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var S=/\((.*?)\)/g;var H=/(\(\?)?:\w+/g;var A=/\*\w+/g;var I=
 /[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend($.prototype,u,{initialize:function(){},route:function(t,r,s){if(!i.isRegExp(t))t=this._routeToRegExp(t);if(i.isFunction(r)){s=r;r=""}if(!s)s=this[r];var n=this;e.history.route(t,function(i){var a=n._extractParameters(t,i);n.execute(s,a);n.trigger.apply(n,["route:"+r].concat(a));n.trigger("route",r,a);e.history.trigger("route",n,r,a)});return this},execute:function(t,e){if(t)t.apply(this,e)},navigate:function(t,i){e.history.navigate(t,i);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=i.result(this,"routes");var t,e=i.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(I,"\\$&").replace(S,"(?:$1)?").replace(H,function(t,e){return e?t:"([^/?]+)"}).replace(A,"([^?]*?)");return new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return i.map(r,function(t,e){if(e===r.length-1)return t||null;return t?decodeURIComponent(t):n
 ull})}});var N=e.History=function(){this.handlers=[];i.bindAll(this,"checkUrl");if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var R=/^[#\/]|\s+$/g;var O=/^\/+|\/+$/g;var P=/msie [\w.]+/;var C=/\/$/;var j=/#.*$/;N.started=false;i.extend(N.prototype,u,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(t==null){if(this._hasPushState||!this._wantsHashChange||e){t=decodeURI(this.location.pathname+this.location.search);var i=this.root.replace(C,"");if(!t.indexOf(i))t=t.slice(i.length)}else{t=this.getHash()}}return t.replace(R,"")},start:function(t){if(N.started)throw new Error("Backbone.history has already been started");N.started=true;this.options=i.extend({root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._wantsPushState=!
 !this.options.pushState;this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var r=this.getFragment();var s=document.documentMode;var n=P.exec(navigator.userAgent.toLowerCase())&&(!s||s<=7);this.root=("/"+this.root+"/").replace(O,"/");if(n&&this._wantsHashChange){var a=e.$('<iframe src="javascript:0" tabindex="-1">');this.iframe=a.hide().appendTo("body")[0].contentWindow;this.navigate(r)}if(this._hasPushState){e.$(window).on("popstate",this.checkUrl)}else if(this._wantsHashChange&&"onhashchange"in window&&!n){e.$(window).on("hashchange",this.checkUrl)}else if(this._wantsHashChange){this._checkUrlInterval=setInterval(this.checkUrl,this.interval)}this.fragment=r;var o=this.location;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){this.fragment=this.getFragment(null,true);this.location.replace(this.root+"#"+this.fragment);return true}else if(this._hasPushState&&this.atRoot()&&o.hash){this.fragment=this.getHash().repl
 ace(R,"");this.history.replaceState({},document.title,this.root+this.fragment)}}if(!this.options.silent)return this.loadUrl()},stop:function(){e.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl);if(this._checkUrlInterval)clearInterval(this._checkUrlInterval);N.started=false},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe){e=this.getFragment(this.getHash(this.iframe))}if(e===this.fragment)return false;if(this.iframe)this.navigate(e);this.loadUrl()},loadUrl:function(t){t=this.fragment=this.getFragment(t);return i.any(this.handlers,function(e){if(e.route.test(t)){e.callback(t);return true}})},navigate:function(t,e){if(!N.started)return false;if(!e||e===true)e={trigger:!!e};var i=this.root+(t=this.getFragment(t||""));t=t.replace(j,"");if(this.fragment===t)return;this.fragment=t;if(t===""&&i!=="/")i=i.slice(0,-1);if(this._hasPushState){this.history[e.replace?"replaceSta
 te":"pushState"]({},document.title,i)}else if(this._wantsHashChange){this._updateHash(this.location,t,e.replace);if(this.iframe&&t!==this.getFragment(this.getHash(this.iframe))){if(!e.replace)this.iframe.document.open().close();this._updateHash(this.iframe.location,t,e.replace)}}else{return this.location.assign(i)}if(e.trigger)return this.loadUrl(t)},_updateHash:function(t,e,i){if(i){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else{t.hash="#"+e}}});e.history=new N;var U=function(t,e){var r=this;var s;if(t&&i.has(t,"constructor")){s=t.constructor}else{s=function(){return r.apply(this,arguments)}}i.extend(s,r,e);var n=function(){this.constructor=s};n.prototype=r.prototype;s.prototype=new n;if(t)i.extend(s.prototype,t);s.__super__=r.prototype;return s};p.extend=g.extend=$.extend=w.extend=N.extend=U;var M=function(){throw new Error('A "url" property or function must be specified')};var q=function(t,e){var i=e.error;e.error=function(r){if(i)i(t,r,e);t.trigger("error"
 ,t,r,e)}};return e});
+
+// From http://stackoverflow.com/a/19431552
+// Compatibility override - Backbone 1.1 got rid of the 'options' binding
+// automatically to views in the constructor - we need to keep that.
+Backbone.View = (function(View) {
+   return View.extend({
+        constructor: function(options) {
+            this.options = options || {};
+            View.apply(this, arguments);
+        }
+    });
+})(Backbone.View);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/lib/bootstrap.min.js
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/lib/bootstrap.min.js b/ambari-web/api-docs/lib/bootstrap.min.js
new file mode 100755
index 0000000..7c1561a
--- /dev/null
+++ b/ambari-web/api-docs/lib/bootstrap.min.js
@@ -0,0 +1,6 @@
+/*!
+ * Bootstrap v3.2.0 (http://getbootstrap.com)
+ * Copyright 2011-2014 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==type
 of b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.2.0",d.prototype.close=function(b){function c(){f.detach().trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",c).emulateTransitionEnd(150):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b)
 ,this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.2.0",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),d[e](null==f[b]?this.options[b]:f[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("clic
 k.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),c.preventDefault()})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b).on("keydown.bs.carousel",a.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.2.0",c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},c.prototype.keydown=function(a){switch(a.which){case 37:this.prev();brea
 k;case 39:this.next();break;default:return}a.preventDefault()},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.to=function(b){var c=this,d=this.getItemIndex(this.$active=this.$element.find(".item.active"));return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.sli
 de("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=e[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:g});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,f&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(e)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:g});return a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one("bsTransitionEnd",function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].joi
 n(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger(m)),f&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},c.DEFAULTS,d.data(),
 "object"==typeof b&&b);!e&&f.toggle&&"show"==b&&(b=!b),e||d.data("bs.collapse",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};c.VERSION="3.2.0",c.DEFAULTS={toggle:!0},c.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},c.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var c=a.Event("show.bs.collapse");if(this.$element.trigger(c),!c.isDefaultPrevented()){var d=this.$parent&&this.$parent.find("> .panel > .in");if(d&&d.length){var e=d.data("bs.collapse");if(e&&e.transitioning)return;b.call(d,"hide"),e||d.data("bs.collapse",null)}var f=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[f](0),this.transitioning=1;var g=function(){this.$element.removeClass("collapsing").addClass("collapse in"
 )[f](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return g.call(this);var h=a.camelCase(["scroll",f].join("-"));this.$element.one("bsTransitionEnd",a.proxy(g,this)).emulateTransitionEnd(350)[f](this.$element[0][h])}}},c.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},c.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var d=a.fn.collapse;a.fn.collapse=b,a.f
 n.collapse.Constructor=c,a.fn.collapse.noConflict=function(){return a.fn.collapse=d,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(c){var d,e=a(this),f=e.attr("data-target")||c.preventDefault()||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),g=a(f),h=g.data("bs.collapse"),i=h?"toggle":e.data(),j=e.attr("data-parent"),k=j&&a(j);h&&h.transitioning||(k&&k.find('[data-toggle="collapse"][data-parent="'+j+'"]').not(e).addClass("collapsed"),e[g.hasClass("in")?"addClass":"removeClass"]("collapsed")),b.call(g,i)})}(jQuery),+function(a){"use strict";function b(b){b&&3===b.which||(a(e).remove(),a(f).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))}))}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:
 b.parent()}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.2.0",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a('<div class="dropdown-backdrop"/>').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var e=c(d),g=e.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&e.find(f).trigge
 r("focus"),d.trigger("click");var h=" li:not(.divider):visible a",i=e.find('[role="menu"]'+h+', [role="listbox"]'+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",b).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f+', [role="menu"], [role="listbox"]',g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$elemen
 t=a(b),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.2.0",c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var c=this,d=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(d),this.isShown||d.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.backdrop(function(){var d=a.support.transition&&c.$element.hasClass("fade");c.$element.parent().length||c.$element.appendTo(c.$body),c.$element.show().scrollTop(0),d&&c.$element[0].offsetWidth,c.$element.addClass("in").attr("aria-hidden",!1),c.enforceFocus();var e=a.Event("shown.bs.modal",{
 relatedTarget:b});d?c.$element.find(".modal-dialog").one("bsTransitionEnd",function(){c.$element.trigger("focus").trigger(e)}).emulateTransitionEnd(300):c.$element.trigger("focus").trigger(e)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard
 ?this.$element.on("keyup.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;if(this.$backdrop=a('<div class="modal-backdrop '+d+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;e?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(150):b()}else if(!this.isShown&&this.$b
 ackdrop){this.$backdrop.removeClass("in");var f=function(){c.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",f).emulateTransitionEnd(150):f()}else b&&b()},c.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal
 "]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||"destroy"!=b)&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};c.VERSION="3.2.0",c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{sel
 ector:"body",padding:0}},c.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay})
 ,b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=fu
 nction(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var c=a.contains(document.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!c)return;var d=this,e=this.tip(),f=this.getUID(this.type);this.setContent(),e.attr("id",f),this.$element.attr("aria-describedby",f),this.options.animation&&e.addClass("fade");var g="function"==typeof this.options.placement?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,h=/\s?auto?\s?/i,i=h.test(g);i&&(g=g.replace(h,"")||"top"),e.detach().css({top:0,left:0,display:"block"}).addClass(g).data("bs."+this.type,this),this.options.container?e.appendTo(this.options.container):e.insertAfter(this.$element);var j=this.getPosition(),k=e[0].offsetWidth,l=e[0].offsetHeight;if(i){var m=g,n=this.$element.parent(),o=this.getPosition(n);g="bottom"==g&&j.top+j.height+l-o.scroll>o.height?"top":"top"==g&&j.top-o.scroll-l<0?"bottom":"right"==g&&j.right+k>o.width?"left":"left"==g&&j.
 left-k<o.left?"right":g,e.removeClass(m).addClass(g)}var p=this.getCalculatedOffset(g,j,k,l);this.applyPlacement(p,g);var q=function(){d.$element.trigger("shown.bs."+d.type),d.hoverState=null};a.support.transition&&this.$tip.hasClass("fade")?e.one("bsTransitionEnd",q).emulateTransitionEnd(150):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top=b.top+g,b.left=b.left+h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=k.left?2*k.left-e+i:2*k.top-f+j,m=k.left?"left":"top",n=k.left?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(l,d[0][n],m)},c.prototype.replaceArrow=function(a
 ,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(){function b(){"in"!=c.hoverState&&d.detach(),c.$element.trigger("hidden.bs."+c.type)}var c=this,d=this.tip(),e=a.Event("hide.bs."+this.type);return this.$element.removeAttr("aria-describedby"),this.$element.trigger(e),e.isDefaultPrevented()?void 0:(d.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d.one("bsTransitionEnd",b).emulateTransitionEnd(150):b(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName;return a.ex
 tend({},"function"==typeof c.getBoundingClientRect?c.getBoundingClientRect():null,{scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop(),width:d?a(window).width():b.outerWidth(),height:d?a(window).height():b.outerHeight()},d?{top:0,left:0}:b.offset())},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.width&&(e.left=g.left+g.width-k)}return e},c.prototype.
 getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){clearTime
 out(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||"destroy"!=b)&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.2.0",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=
 this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").empty()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},c.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){var e=a.proxy(this.process,this);this.$body=a("body"),this.$scrollElement=a(a(c
 ).is("body")?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",e),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.2.0",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b="offset",c=0;a.isWindow(this.$scrollElement[0])||(b="position",c=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var d=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.len
 gth&&f.is(":visible")&&[[f[b]().top+c,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){d.offsets.push(this[0]),d.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var d=a.fn.scrollspy;a.fn.scr
 ollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.2.0",c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.closest("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},c.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find
 ("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one("bsTransitionEnd",e).emulateTransitionEnd(150):e(),f.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(c){c.preventDefault(),b.call(a(this),"show")})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api
 ",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.2.0",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=a(document).height(),d=this.$target.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=b-h?"bottom":null!=g&&g>=d?"top":!1;if(t
 his.affixed!==i){null!=this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:b-this.$element.height()-h}))}}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},d.offsetBottom&&(d.offset.bottom=d.offsetBottom),d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
\ No newline at end of file


[08/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/lib/handlebars-2.0.0.js
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/lib/handlebars-2.0.0.js b/ambari-web/api-docs/lib/handlebars-2.0.0.js
new file mode 100644
index 0000000..53cf921
--- /dev/null
+++ b/ambari-web/api-docs/lib/handlebars-2.0.0.js
@@ -0,0 +1,28 @@
+/*!
+
+ handlebars v2.0.0
+
+Copyright (C) 2011-2014 by Yehuda Katz
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+@license
+*/
+!function(a,b){"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():a.Handlebars=a.Handlebars||b()}(this,function(){var a=function(){"use strict";function a(a){this.string=a}var b;return a.prototype.toString=function(){return""+this.string},b=a}(),b=function(a){"use strict";function b(a){return i[a]}function c(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function d(a){return a instanceof h?a.toString():null==a?"":a?(a=""+a,k.test(a)?a.replace(j,b):a):a+""}function e(a){return a||0===a?n(a)&&0===a.length?!0:!1:!0}function f(a,b){return(a?a+".":"")+b}var g={},h=a,i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},j=/[&<>"'`]/g,k=/[&<>"'`]/;g.extend=c;var l=Object.prototype.toString;g.toString=l;var m=function(a){return"function"==typeof a};m(/x/)&&(m=function(a){return"function"==typeof a&&"[object Function]"===l.c
 all(a)});var m;g.isFunction=m;var n=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===l.call(a):!1};return g.isArray=n,g.escapeExpression=d,g.isEmpty=e,g.appendContextPath=f,g}(a),c=function(){"use strict";function a(a,b){var d;b&&b.firstLine&&(d=b.firstLine,a+=" - "+d+":"+b.firstColumn);for(var e=Error.prototype.constructor.call(this,a),f=0;f<c.length;f++)this[c[f]]=e[c[f]];d&&(this.lineNumber=d,this.column=b.firstColumn)}var b,c=["description","fileName","lineNumber","message","name","number","stack"];return a.prototype=new Error,b=a}(),d=function(a,b){"use strict";function c(a,b){this.helpers=a||{},this.partials=b||{},d(this)}function d(a){a.registerHelper("helperMissing",function(){if(1===arguments.length)return void 0;throw new g("Missing helper: '"+arguments[arguments.length-1].name+"'")}),a.registerHelper("blockHelperMissing",function(b,c){var d=c.inverse,e=c.fn;if(b===!0)return e(this);if(b===!1||null==b)return d(this);if(k(b))return b.length>0?(c.id
 s&&(c.ids=[c.name]),a.helpers.each(b,c)):d(this);if(c.data&&c.ids){var g=q(c.data);g.contextPath=f.appendContextPath(c.data.contextPath,c.name),c={data:g}}return e(b,c)}),a.registerHelper("each",function(a,b){if(!b)throw new g("Must pass iterator to #each");var c,d,e=b.fn,h=b.inverse,i=0,j="";if(b.data&&b.ids&&(d=f.appendContextPath(b.data.contextPath,b.ids[0])+"."),l(a)&&(a=a.call(this)),b.data&&(c=q(b.data)),a&&"object"==typeof a)if(k(a))for(var m=a.length;m>i;i++)c&&(c.index=i,c.first=0===i,c.last=i===a.length-1,d&&(c.contextPath=d+i)),j+=e(a[i],{data:c});else for(var n in a)a.hasOwnProperty(n)&&(c&&(c.key=n,c.index=i,c.first=0===i,d&&(c.contextPath=d+n)),j+=e(a[n],{data:c}),i++);return 0===i&&(j=h(this)),j}),a.registerHelper("if",function(a,b){return l(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||f.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})}),a.registerHelper("with",
 function(a,b){l(a)&&(a=a.call(this));var c=b.fn;if(f.isEmpty(a))return b.inverse(this);if(b.data&&b.ids){var d=q(b.data);d.contextPath=f.appendContextPath(b.data.contextPath,b.ids[0]),b={data:d}}return c(a,b)}),a.registerHelper("log",function(b,c){var d=c.data&&null!=c.data.level?parseInt(c.data.level,10):1;a.log(d,b)}),a.registerHelper("lookup",function(a,b){return a&&a[b]})}var e={},f=a,g=b,h="2.0.0";e.VERSION=h;var i=6;e.COMPILER_REVISION=i;var j={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1"};e.REVISION_CHANGES=j;var k=f.isArray,l=f.isFunction,m=f.toString,n="[object Object]";e.HandlebarsEnvironment=c,c.prototype={constructor:c,logger:o,log:p,registerHelper:function(a,b){if(m.call(a)===n){if(b)throw new g("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){m.call(a)===n?f.extend(this.partials,a):thi
 s.partials[a]=b},unregisterPartial:function(a){delete this.partials[a]}};var o={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(a,b){if(o.level<=a){var c=o.methodMap[a];"undefined"!=typeof console&&console[c]&&console[c].call(console,b)}}};e.logger=o;var p=o.log;e.log=p;var q=function(a){var b=f.extend({},a);return b._parent=a,b};return e.createFrame=q,e}(b,c),e=function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=m;if(b!==c){if(c>b){var d=n[c],e=n[b];throw new l("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new l("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){if(!b)throw new l("No environment passed to template");if(!a||!a.main)throw new l("Unkno
 wn template object: "+typeof a);b.VM.checkRevision(a.compiler);var c=function(c,d,e,f,g,h,i,j,m){g&&(f=k.extend({},f,g));var n=b.VM.invokePartial.call(this,c,e,f,h,i,j,m);if(null==n&&b.compile){var o={helpers:h,partials:i,data:j,depths:m};i[e]=b.compile(c,{data:void 0!==j,compat:a.compat},b),n=i[e](f,o)}if(null!=n){if(d){for(var p=n.split("\n"),q=0,r=p.length;r>q&&(p[q]||q+1!==r);q++)p[q]=d+p[q];n=p.join("\n")}return n}throw new l("The partial "+e+" could not be compiled when running in runtime-only mode")},d={lookup:function(a,b){for(var c=a.length,d=0;c>d;d++)if(a[d]&&null!=a[d][b])return a[d][b]},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:k.escapeExpression,invokePartial:c,fn:function(b){return a[b]},programs:[],program:function(a,b,c){var d=this.programs[a],e=this.fn(a);return b||c?d=f(this,a,e,b,c):d||(d=this.programs[a]=f(this,a,e)),d},data:function(a,b){for(;a&&b--;)a=a._parent;return a},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=
 k.extend({},b,a)),c},noop:b.VM.noop,compilerInfo:a.compiler},e=function(b,c){c=c||{};var f=c.data;e._setup(c),!c.partial&&a.useData&&(f=i(b,f));var g;return a.useDepths&&(g=c.depths?[b].concat(c.depths):[b]),a.main.call(d,b,d.helpers,d.partials,f,g)};return e.isTop=!0,e._setup=function(c){c.partial?(d.helpers=c.helpers,d.partials=c.partials):(d.helpers=d.merge(c.helpers,b.helpers),a.usePartial&&(d.partials=d.merge(c.partials,b.partials)))},e._child=function(b,c,e){if(a.useDepths&&!e)throw new l("must pass parent depths");return f(d,b,a[b],c,e)},e}function f(a,b,c,d,e){var f=function(b,f){return f=f||{},c.call(a,b,a.helpers,a.partials,f.data||d,e&&[b].concat(e))};return f.program=b,f.depth=e?e.length:0,f}function g(a,b,c,d,e,f,g){var h={partial:!0,helpers:d,partials:e,data:f,depths:g};if(void 0===a)throw new l("The partial "+b+" could not be found");return a instanceof Function?a(c,h):void 0}function h(){return""}function i(a,b){return b&&"root"in b||(b=b?o(b):{},b.root=a),b}var j={}
 ,k=a,l=b,m=c.COMPILER_REVISION,n=c.REVISION_CHANGES,o=c.createFrame;return j.checkRevision=d,j.template=e,j.program=f,j.invokePartial=g,j.noop=h,j}(b,c,d),f=function(a,b,c,d,e){"use strict";var f,g=a,h=b,i=c,j=d,k=e,l=function(){var a=new g.HandlebarsEnvironment;return j.extend(a,g),a.SafeString=h,a.Exception=i,a.Utils=j,a.escapeExpression=j.escapeExpression,a.VM=k,a.template=function(b){return k.template(b,a)},a},m=l();return m.create=l,m["default"]=m,f=m}(d,a,c,b,e),g=function(a){"use strict";function b(a){a=a||{},this.firstLine=a.first_line,this.firstColumn=a.first_column,this.lastColumn=a.last_column,this.lastLine=a.last_line}var c,d=a,e={ProgramNode:function(a,c,d){b.call(this,d),this.type="program",this.statements=a,this.strip=c},MustacheNode:function(a,c,d,f,g){if(b.call(this,g),this.type="mustache",this.strip=f,null!=d&&d.charAt){var h=d.charAt(3)||d.charAt(2);this.escaped="{"!==h&&"&"!==h}else this.escaped=!!d;this.sexpr=a instanceof e.SexprNode?a:new e.SexprNode(a,c),this.
 id=this.sexpr.id,this.params=this.sexpr.params,this.hash=this.sexpr.hash,this.eligibleHelper=this.sexpr.eligibleHelper,this.isHelper=this.sexpr.isHelper},SexprNode:function(a,c,d){b.call(this,d),this.type="sexpr",this.hash=c;var e=this.id=a[0],f=this.params=a.slice(1);this.isHelper=!(!f.length&&!c),this.eligibleHelper=this.isHelper||e.isSimple},PartialNode:function(a,c,d,e,f){b.call(this,f),this.type="partial",this.partialName=a,this.context=c,this.hash=d,this.strip=e,this.strip.inlineStandalone=!0},BlockNode:function(a,c,d,e,f){b.call(this,f),this.type="block",this.mustache=a,this.program=c,this.inverse=d,this.strip=e,d&&!c&&(this.isInverse=!0)},RawBlockNode:function(a,c,f,g){if(b.call(this,g),a.sexpr.id.original!==f)throw new d(a.sexpr.id.original+" doesn't match "+f,this);c=new e.ContentNode(c,g),this.type="block",this.mustache=a,this.program=new e.ProgramNode([c],{},g)},ContentNode:function(a,c){b.call(this,c),this.type="content",this.original=this.string=a},HashNode:function(a,
 c){b.call(this,c),this.type="hash",this.pairs=a},IdNode:function(a,c){b.call(this,c),this.type="ID";for(var e="",f=[],g=0,h="",i=0,j=a.length;j>i;i++){var k=a[i].part;if(e+=(a[i].separator||"")+k,".."===k||"."===k||"this"===k){if(f.length>0)throw new d("Invalid path: "+e,this);".."===k?(g++,h+="../"):this.isScoped=!0}else f.push(k)}this.original=e,this.parts=f,this.string=f.join("."),this.depth=g,this.idName=h+this.string,this.isSimple=1===a.length&&!this.isScoped&&0===g,this.stringModeValue=this.string},PartialNameNode:function(a,c){b.call(this,c),this.type="PARTIAL_NAME",this.name=a.original},DataNode:function(a,c){b.call(this,c),this.type="DATA",this.id=a,this.stringModeValue=a.stringModeValue,this.idName="@"+a.stringModeValue},StringNode:function(a,c){b.call(this,c),this.type="STRING",this.original=this.string=this.stringModeValue=a},NumberNode:function(a,c){b.call(this,c),this.type="NUMBER",this.original=this.number=a,this.stringModeValue=Number(a)},BooleanNode:function(a,c){b.
 call(this,c),this.type="BOOLEAN",this.bool=a,this.stringModeValue="true"===a},CommentNode:function(a,c){b.call(this,c),this.type="comment",this.comment=a,this.strip={inlineStandalone:!0}}};return c=e}(c),h=function(){"use strict";var a,b=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,CONTENT:12,COMMENT:13,openRawBlock:14,END_RAW_BLOCK:15,OPEN_RAW_BLOCK:16,sexpr:17,CLOSE_RAW_BLOCK:18,openBlock:19,block_option0:20,closeBlock:21,openInverse:22,block_option1:23,OPEN_BLOCK:24,CLOSE:25,OPEN_INVERSE:26,inverseAndProgram:27,INVERSE:28,OPEN_ENDBLOCK:29,path:30,OPEN:31,OPEN_UNESCAPED:32,CLOSE_UNESCAPED:33,OPEN_PARTIAL:34,partialName:35,param:36,partial_option0:37,partial_option1:38,sexpr_repetition0:39,sexpr_option0:40,dataName:41,STRING:42,NUMBER:43,BOOLEAN:44,OPEN_SEXPR:45,CLOSE_SEXPR:46,hash:47,hash_repetition_plus0:48,hashSegment:49,ID:50,EQUALS:51,DATA:
 52,pathSegments:53,SEP:54,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",12:"CONTENT",13:"COMMENT",15:"END_RAW_BLOCK",16:"OPEN_RAW_BLOCK",18:"CLOSE_RAW_BLOCK",24:"OPEN_BLOCK",25:"CLOSE",26:"OPEN_INVERSE",28:"INVERSE",29:"OPEN_ENDBLOCK",31:"OPEN",32:"OPEN_UNESCAPED",33:"CLOSE_UNESCAPED",34:"OPEN_PARTIAL",42:"STRING",43:"NUMBER",44:"BOOLEAN",45:"OPEN_SEXPR",46:"CLOSE_SEXPR",50:"ID",51:"EQUALS",52:"DATA",54:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[10,3],[14,3],[9,4],[9,4],[19,3],[22,3],[27,2],[21,3],[8,3],[8,3],[11,5],[11,4],[17,3],[17,1],[36,1],[36,1],[36,1],[36,1],[36,1],[36,3],[47,1],[49,3],[35,1],[35,1],[35,1],[41,2],[30,1],[53,3],[53,1],[6,0],[6,2],[20,0],[20,1],[23,0],[23,1],[37,0],[37,1],[38,0],[38,1],[39,0],[39,2],[40,0],[40,1],[48,1],[48,2]],performAction:function(a,b,c,d,e,f){var g=f.length-1;switch(e){case 1:return d.prepareProgram(f[g-1].statements,!0),f[g-1];case 2:this.$=new d.ProgramNode(d.prepareProgram(f[g]),{},this._$);break;case 3:this
 .$=f[g];break;case 4:this.$=f[g];break;case 5:this.$=f[g];break;case 6:this.$=f[g];break;case 7:this.$=new d.ContentNode(f[g],this._$);break;case 8:this.$=new d.CommentNode(f[g],this._$);break;case 9:this.$=new d.RawBlockNode(f[g-2],f[g-1],f[g],this._$);break;case 10:this.$=new d.MustacheNode(f[g-1],null,"","",this._$);break;case 11:this.$=d.prepareBlock(f[g-3],f[g-2],f[g-1],f[g],!1,this._$);break;case 12:this.$=d.prepareBlock(f[g-3],f[g-2],f[g-1],f[g],!0,this._$);break;case 13:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 14:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 15:this.$={strip:d.stripFlags(f[g-1],f[g-1]),program:f[g]};break;case 16:this.$={path:f[g-1],strip:d.stripFlags(f[g-2],f[g])};break;case 17:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 18:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 19:t
 his.$=new d.PartialNode(f[g-3],f[g-2],f[g-1],d.stripFlags(f[g-4],f[g]),this._$);break;case 20:this.$=new d.PartialNode(f[g-2],void 0,f[g-1],d.stripFlags(f[g-3],f[g]),this._$);break;case 21:this.$=new d.SexprNode([f[g-2]].concat(f[g-1]),f[g],this._$);break;case 22:this.$=new d.SexprNode([f[g]],null,this._$);break;case 23:this.$=f[g];break;case 24:this.$=new d.StringNode(f[g],this._$);break;case 25:this.$=new d.NumberNode(f[g],this._$);break;case 26:this.$=new d.BooleanNode(f[g],this._$);break;case 27:this.$=f[g];break;case 28:f[g-1].isHelper=!0,this.$=f[g-1];break;case 29:this.$=new d.HashNode(f[g],this._$);break;case 30:this.$=[f[g-2],f[g]];break;case 31:this.$=new d.PartialNameNode(f[g],this._$);break;case 32:this.$=new d.PartialNameNode(new d.StringNode(f[g],this._$),this._$);break;case 33:this.$=new d.PartialNameNode(new d.NumberNode(f[g],this._$));break;case 34:this.$=new d.DataNode(f[g],this._$);break;case 35:this.$=new d.IdNode(f[g],this._$);break;case 36:f[g-2].push({part:f[g
 ],separator:f[g-1]}),this.$=f[g-2];break;case 37:this.$=[{part:f[g]}];break;case 38:this.$=[];break;case 39:f[g-1].push(f[g]);break;case 48:this.$=[];break;case 49:f[g-1].push(f[g]);break;case 52:this.$=[f[g]];break;case 53:f[g-1].push(f[g])}},table:[{3:1,4:2,5:[2,38],6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],31:[2,38],32:[2,38],34:[2,38]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:[1,10],13:[1,11],14:16,16:[1,20],19:14,22:15,24:[1,18],26:[1,19],28:[2,2],29:[2,2],31:[1,12],32:[1,13],34:[1,17]},{1:[2,1]},{5:[2,39],12:[2,39],13:[2,39],16:[2,39],24:[2,39],26:[2,39],28:[2,39],29:[2,39],31:[2,39],32:[2,39],34:[2,39]},{5:[2,3],12:[2,3],13:[2,3],16:[2,3],24:[2,3],26:[2,3],28:[2,3],29:[2,3],31:[2,3],32:[2,3],34:[2,3]},{5:[2,4],12:[2,4],13:[2,4],16:[2,4],24:[2,4],26:[2,4],28:[2,4],29:[2,4],31:[2,4],32:[2,4],34:[2,4]},{5:[2,5],12:[2,5],13:[2,5],16:[2,5],24:[2,5],26:[2,5],28:[2,5],29:[2,5],31:[2,5],32:[2,5],34:[2,5]},{5:[2,6],12:[2,6],13:[2,6],16:[2,6],24:[2,6],26:[2,6],28
 :[2,6],29:[2,6],31:[2,6],32:[2,6],34:[2,6]},{5:[2,7],12:[2,7],13:[2,7],16:[2,7],24:[2,7],26:[2,7],28:[2,7],29:[2,7],31:[2,7],32:[2,7],34:[2,7]},{5:[2,8],12:[2,8],13:[2,8],16:[2,8],24:[2,8],26:[2,8],28:[2,8],29:[2,8],31:[2,8],32:[2,8],34:[2,8]},{17:21,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:27,30:22,41:23,50:[1,26],52:[1,25],53:24},{4:28,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{4:29,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{12:[1,30]},{30:32,35:31,42:[1,33],43:[1,34],50:[1,26],53:24},{17:35,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:36,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:37,30:22,41:23,50:[1,26],52:[1,25],53:24},{25:[1,38]},{18:[2,48],25:[2,48],33:[2,48],39:39,42:[2,48],43:[2,48],44:[2,48],45:[2,48],46:[2,48],50:[2,48],52:[2,48]},{18:[2,22],25:[2,22],33:[2,22],46:[2,22]},{18:[2,35],25:[2,35],33:[2,35],42:[2,35],43:[2,35],44:[2,35],45:[2,35],46:[2,
 35],50:[2,35],52:[2,35],54:[1,40]},{30:41,50:[1,26],53:24},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],52:[2,37],54:[2,37]},{33:[1,42]},{20:43,27:44,28:[1,45],29:[2,40]},{23:46,27:47,28:[1,45],29:[2,42]},{15:[1,48]},{25:[2,46],30:51,36:49,38:50,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],47:57,48:58,49:60,50:[1,59],52:[1,25],53:24},{25:[2,31],42:[2,31],43:[2,31],44:[2,31],45:[2,31],50:[2,31],52:[2,31]},{25:[2,32],42:[2,32],43:[2,32],44:[2,32],45:[2,32],50:[2,32],52:[2,32]},{25:[2,33],42:[2,33],43:[2,33],44:[2,33],45:[2,33],50:[2,33],52:[2,33]},{25:[1,61]},{25:[1,62]},{18:[1,63]},{5:[2,17],12:[2,17],13:[2,17],16:[2,17],24:[2,17],26:[2,17],28:[2,17],29:[2,17],31:[2,17],32:[2,17],34:[2,17]},{18:[2,50],25:[2,50],30:51,33:[2,50],36:65,40:64,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],46:[2,50],47:66,48:58,49:60,50:[1,59],52:[1,25],53:24},{50:[1,67]},{18:[2,34],25:[2,34],33:[2,34],42:[2,34],43:[2,34],44:[2,34],45:[2,34],46:[2,34],50:[2,34
 ],52:[2,34]},{5:[2,18],12:[2,18],13:[2,18],16:[2,18],24:[2,18],26:[2,18],28:[2,18],29:[2,18],31:[2,18],32:[2,18],34:[2,18]},{21:68,29:[1,69]},{29:[2,41]},{4:70,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{21:71,29:[1,69]},{29:[2,43]},{5:[2,9],12:[2,9],13:[2,9],16:[2,9],24:[2,9],26:[2,9],28:[2,9],29:[2,9],31:[2,9],32:[2,9],34:[2,9]},{25:[2,44],37:72,47:73,48:58,49:60,50:[1,74]},{25:[1,75]},{18:[2,23],25:[2,23],33:[2,23],42:[2,23],43:[2,23],44:[2,23],45:[2,23],46:[2,23],50:[2,23],52:[2,23]},{18:[2,24],25:[2,24],33:[2,24],42:[2,24],43:[2,24],44:[2,24],45:[2,24],46:[2,24],50:[2,24],52:[2,24]},{18:[2,25],25:[2,25],33:[2,25],42:[2,25],43:[2,25],44:[2,25],45:[2,25],46:[2,25],50:[2,25],52:[2,25]},{18:[2,26],25:[2,26],33:[2,26],42:[2,26],43:[2,26],44:[2,26],45:[2,26],46:[2,26],50:[2,26],52:[2,26]},{18:[2,27],25:[2,27],33:[2,27],42:[2,27],43:[2,27],44:[2,27],45:[2,27],46:[2,27],50:[2,27],52:[2,27]},{17:76,30:22,41:23,50:[1,26],52:[1,25],53:24
 },{25:[2,47]},{18:[2,29],25:[2,29],33:[2,29],46:[2,29],49:77,50:[1,74]},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],51:[1,78],52:[2,37],54:[2,37]},{18:[2,52],25:[2,52],33:[2,52],46:[2,52],50:[2,52]},{12:[2,13],13:[2,13],16:[2,13],24:[2,13],26:[2,13],28:[2,13],29:[2,13],31:[2,13],32:[2,13],34:[2,13]},{12:[2,14],13:[2,14],16:[2,14],24:[2,14],26:[2,14],28:[2,14],29:[2,14],31:[2,14],32:[2,14],34:[2,14]},{12:[2,10]},{18:[2,21],25:[2,21],33:[2,21],46:[2,21]},{18:[2,49],25:[2,49],33:[2,49],42:[2,49],43:[2,49],44:[2,49],45:[2,49],46:[2,49],50:[2,49],52:[2,49]},{18:[2,51],25:[2,51],33:[2,51],46:[2,51]},{18:[2,36],25:[2,36],33:[2,36],42:[2,36],43:[2,36],44:[2,36],45:[2,36],46:[2,36],50:[2,36],52:[2,36],54:[2,36]},{5:[2,11],12:[2,11],13:[2,11],16:[2,11],24:[2,11],26:[2,11],28:[2,11],29:[2,11],31:[2,11],32:[2,11],34:[2,11]},{30:79,50:[1,26],53:24},{29:[2,15]},{5:[2,12],12:[2,12],13:[2,12],16:[2,12],24:[2,12],26:[2,12],28:[2,12],29:[2,12],31:[2,12],
 32:[2,12],34:[2,12]},{25:[1,80]},{25:[2,45]},{51:[1,78]},{5:[2,20],12:[2,20],13:[2,20],16:[2,20],24:[2,20],26:[2,20],28:[2,20],29:[2,20],31:[2,20],32:[2,20],34:[2,20]},{46:[1,81]},{18:[2,53],25:[2,53],33:[2,53],46:[2,53],50:[2,53]},{30:51,36:82,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],50:[1,26],52:[1,25],53:24},{25:[1,83]},{5:[2,19],12:[2,19],13:[2,19],16:[2,19],24:[2,19],26:[2,19],28:[2,19],29:[2,19],31:[2,19],32:[2,19],34:[2,19]},{18:[2,28],25:[2,28],33:[2,28],42:[2,28],43:[2,28],44:[2,28],45:[2,28],46:[2,28],50:[2,28],52:[2,28]},{18:[2,30],25:[2,30],33:[2,30],46:[2,30],50:[2,30]},{5:[2,16],12:[2,16],13:[2,16],16:[2,16],24:[2,16],26:[2,16],28:[2,16],29:[2,16],31:[2,16],32:[2,16],34:[2,16]}],defaultActions:{4:[2,1],44:[2,41],47:[2,43],57:[2,47],63:[2,10],70:[2,15],73:[2,45]},parseError:function(a){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0
 ,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:((null===n||"undefined"==typeof n)&&(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanc
 eof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.pars
 er.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc
 .range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=th
 is._currentRules(),g=0;g<f.length&&(c=this._input.match(this.rules[f[g]]),!c||b&&!(c[0].length>b[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},le
 x:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 12;break;case 1:return 12;case 2:return this.popState(),12;case 3:return b.yytext=b.yytext.substr(5,b.yyleng-9),this.popState(),15;case 4:return 12;case 5:return e(0,4),this.popState(),13;case 6:return 45;case 7:return 46;case 8:return 16;case 9:return this.popState(),this.begin("raw"),18;case 10:return 34;case 11:return 24
 ;case 12:return 29;case 13:return this.popState(),28;case 14:return this.popState(),28;case 15:return 26;case 16:return 26;case 17:return 32;case 18:return 31;case 19:this.popState(),this.begin("com");break;case 20:return e(3,5),this.popState(),13;case 21:return 31;case 22:return 51;case 23:return 50;case 24:return 50;case 25:return 54;case 26:break;case 27:return this.popState(),33;case 28:return this.popState(),25;case 29:return b.yytext=e(1,2).replace(/\\"/g,'"'),42;case 30:return b.yytext=e(1,2).replace(/\\'/g,"'"),42;case 31:return 52;case 32:return 44;case 33:return 44;case 34:return 43;case 35:return 50;case 36:return b.yytext=e(1,2),50;case 37:return"INVALID";case 38:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{\/)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{
 (~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[5],inclusive:!1},raw:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,1,38],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();return a=b}(),i=function(a){"use strict";function b(a,b){return{left:"~"===a.charAt(2),right:"~"===b.charAt
 (b.length-3)}}function c(a,b,c,d,i,k){if(a.sexpr.id.original!==d.path.original)throw new j(a.sexpr.id.original+" doesn't match "+d.path.original,a);var l=c&&c.program,m={left:a.strip.left,right:d.strip.right,openStandalone:f(b.statements),closeStandalone:e((l||b).statements)};if(a.strip.right&&g(b.statements,null,!0),l){var n=c.strip;n.left&&h(b.statements,null,!0),n.right&&g(l.statements,null,!0),d.strip.left&&h(l.statements,null,!0),e(b.statements)&&f(l.statements)&&(h(b.statements),g(l.statements))}else d.strip.left&&h(b.statements,null,!0);return i?new this.BlockNode(a,l,b,m,k):new this.BlockNode(a,b,l,m,k)}function d(a,b){for(var c=0,d=a.length;d>c;c++){var i=a[c],j=i.strip;if(j){var k=e(a,c,b,"partial"===i.type),l=f(a,c,b),m=j.openStandalone&&k,n=j.closeStandalone&&l,o=j.inlineStandalone&&k&&l;j.right&&g(a,c,!0),j.left&&h(a,c,!0),o&&(g(a,c),h(a,c)&&"partial"===i.type&&(i.indent=/([ \t]+$)/.exec(a[c-1].original)?RegExp.$1:"")),m&&(g((i.program||i.inverse).statements),h(a,c)),n&
 &(g(a,c),h((i.inverse||i.program).statements))}}return a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"content"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"content"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"content"===d.type&&(c||!d.rightStripped)){var e=d.string;d.string=d.string.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.string!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"content"===d.type&&(c||!d.leftStripped)){var e=d.string;return d.string=d.string.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.string!==e,d.leftStripped}}var i={},j=a;return i.stripFlags=b,i.prepareBlock=c,i.prepareProgram=d,i}(c),j=function(a,b,c,d){"use strict";function e(a){return a.constructor===h.ProgramNode?a:(g.yy=k,g.parse(a))}var f={},g=a,h=b,i=c,j=d.extend;f.parser=g;var
  k={};return j(k,i,h),f.parse=e,f}(h,g,i,b),k=function(a,b){"use strict";function c(){}function d(a,b,c){if(null==a||"string"!=typeof a&&a.constructor!==c.AST.ProgramNode)throw new h("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function e(a,b,c){function d(){var d=c.parse(a),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}if(null==a||"string"!=typeof a&&a.constructor!==c.AST.ProgramNode)throw new h("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var e,f=function(a,b){return e||(e=d()),e.call(this,a,b)};return f._setup=function(a){return e||(e=d()),e._setup(a)},f._child=function(a,b,c){return e||(e=d()),e._child(a,b,c)},f}function f(a,b){if(a===b)r
 eturn!0;if(i(a)&&i(b)&&a.length===b.length){for(var c=0;c<a.length;c++)if(!f(a[c],b[c]))return!1;return!0}}var g={},h=a,i=b.isArray,j=[].slice;return g.Compiler=c,c.prototype={compiler:c,equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b)return!1;for(var c=0;b>c;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!f(d.args,e.args))return!1}for(b=this.children.length,c=0;b>c;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){this.opcodes=[],this.children=[],this.depths={list:[]},this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds;var c=this.options.knownHelpers;if(this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},c)for(var d in c)this.options.knownHelpers[d]=c[d];return this.accept(a)},accept:function(a){return this[a.type](a)},program:function(a){for(var b=a.statements,c=0,d=b.length;d>c;c++)this.accept(b[c]);return th
 is.isSimple=1===d,this.depths.list=this.depths.list.sort(function(a,b){return a-b}),this},compileProgram:function(a){var b,c=(new this.compiler).compile(a,this.options),d=this.guid++;
+this.usePartial=this.usePartial||c.usePartial,this.children[d]=c;for(var e=0,f=c.depths.list.length;f>e;e++)b=c.depths.list[e],2>b||this.addDepth(b-1);return d},block:function(a){var b=a.mustache,c=a.program,d=a.inverse;c&&(c=this.compileProgram(c)),d&&(d=this.compileProgram(d));var e=b.sexpr,f=this.classifySexpr(e);"helper"===f?this.helperSexpr(e,c,d):"simple"===f?(this.simpleSexpr(e),this.opcode("pushProgram",c),this.opcode("pushProgram",d),this.opcode("emptyHash"),this.opcode("blockValue",e.id.original)):(this.ambiguousSexpr(e,c,d),this.opcode("pushProgram",c),this.opcode("pushProgram",d),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},hash:function(a){var b,c,d=a.pairs;for(this.opcode("pushHash"),b=0,c=d.length;c>b;b++)this.pushParam(d[b][1]);for(;b--;)this.opcode("assignToHash",d[b][0]);this.opcode("popHash")},partial:function(a){var b=a.partialName;this.usePartial=!0,a.hash?this.accept(a.hash):this.opcode("push","undefined"),a.context?this.a
 ccept(a.context):(this.opcode("getContext",0),this.opcode("pushContext")),this.opcode("invokePartial",b.name,a.indent||""),this.opcode("append")},content:function(a){a.string&&this.opcode("appendContent",a.string)},mustache:function(a){this.sexpr(a.sexpr),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ambiguousSexpr:function(a,b,c){var d=a.id,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.ID(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.id;"DATA"===b.type?this.DATA(b):b.parts.length?this.ID(b):(this.addDepth(b.depth),this.opcode("getContext",b.depth),this.opcode("pushContext")),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.id,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new h("You specifi
 ed knownHelpersOnly, but used the unknown helper "+f,a);e.falsy=!0,this.ID(e),this.opcode("invokeHelper",d.length,e.original,e.isSimple)}},sexpr:function(a){var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ID:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0];b?this.opcode("lookupOnContext",a.parts,a.falsy,a.isScoped):this.opcode("pushContext")},DATA:function(a){this.options.data=!0,this.opcode("lookupData",a.id.depth,a.id.parts)},STRING:function(a){this.opcode("pushString",a.string)},NUMBER:function(a){this.opcode("pushLiteral",a.number)},BOOLEAN:function(a){this.opcode("pushLiteral",a.bool)},comment:function(){},opcode:function(a){this.opcodes.push({opcode:a,args:j.call(arguments,1)})},addDepth:function(a){0!==a&&(this.depths[a]||(this.depths[a]=!0,this.depths.list.push(a)))},classifySexpr:function(a){var b=a.isHelper,c=a.eligibleHelper,d=this.options;if(c&&!b){var e=a.id.parts[
 0];d.knownHelpers[e]?b=!0:d.knownHelpersOnly&&(c=!1)}return b?"helper":c?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;c>b;b++)this.pushParam(a[b])},pushParam:function(a){this.stringParams?(a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",a.stringModeValue,a.type),"sexpr"===a.type&&this.sexpr(a)):(this.trackIds&&this.opcode("pushId",a.type,a.idName||a.stringModeValue),this.accept(a))},setupFullMustacheParams:function(a,b,c){var d=a.params;return this.pushParams(d),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.hash(a.hash):this.opcode("emptyHash"),d}},g.precompile=d,g.compile=e,g}(c,b),l=function(a,b){"use strict";function c(a){this.value=a}function d(){}var e,f=a.COMPILER_REVISION,g=a.REVISION_CHANGES,h=b;d.prototype={nameLookup:function(a,b){return d.isValidJavaScriptVariableName(b)?a+"."+b:a+"['"+b+"']"},depthedLookup:function(a){return this.aliases.lookup="this.lookup",'lookup(depths, 
 "'+a+'")'},compilerInfo:function(){var a=f,b=g[a];return[a,b]},appendToBuffer:function(a){return this.environment.isSimple?"return "+a+";":{appendToBuffer:!0,content:a,toString:function(){return"buffer += "+a+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.depths.list.length||this.options.compat;var e,f,g,i=a.opcodes;for(f=0,g=i.length;g>f;f++)e=i[f],this[e.opcode].apply(this,e.args);if(this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new h("Compile
  completed with content left on stack");var j=this.createFunctionContext(d);if(this.isChild)return j;var k={compiler:this.compilerInfo(),main:j},l=this.context.programs;for(f=0,g=l.length;g>f;f++)l[f]&&(k[f]=l[f]);return this.environment.usePartial&&(k.usePartial=!0),this.options.data&&(k.useData=!0),this.useDepths&&(k.useDepths=!0),this.options.compat&&(k.compat=!0),d||(k.compiler=JSON.stringify(k.compiler),k=this.objectLiteral(k)),k},preamble:function(){this.lastContext=0,this.source=[]},createFunctionContext:function(a){var b="",c=this.stackVars.concat(this.registers.list);c.length>0&&(b+=", "+c.join(", "));for(var d in this.aliases)this.aliases.hasOwnProperty(d)&&(b+=", "+d+"="+this.aliases[d]);var e=["depth0","helpers","partials","data"];this.useDepths&&e.push("depths");var f=this.mergeSource(b);return a?(e.push(f),Function.apply(this,e)):"function("+e.join(",")+") {\n  "+f+"}"},mergeSource:function(a){for(var b,c,d="",e=!this.forceBuffer,f=0,g=this.source.length;g>f;f++){var h
 =this.source[f];h.appendToBuffer?b=b?b+"\n    + "+h.content:h.content:(b&&(d?d+="buffer += "+b+";\n  ":(c=!0,d=b+";\n  "),b=void 0),d+=h+"\n  ",this.environment.isSimple||(e=!1))}return e?(b||!d)&&(d+="return "+(b||'""')+";\n"):(a+=", buffer = "+(c?"":this.initializeBuffer()),d+=b?"return buffer + "+b+";\n":"return buffer;\n"),a&&(d="var "+a.substring(2)+(c?"":";\n  ")+d),d},blockValue:function(a){this.aliases.blockHelperMissing="helpers.blockHelperMissing";var b=[this.contextName(0)];this.setupParams(a,0,b);var c=this.popStack();b.splice(1,0,c),this.push("blockHelperMissing.call("+b.join(", ")+")")},ambiguousBlockValue:function(){this.aliases.blockHelperMissing="helpers.blockHelperMissing";var a=[this.contextName(0)];this.setupParams("",0,a,!0),this.flushInline();var b=this.topStack();a.splice(1,0,b),this.pushSource("if (!"+this.lastHelper+") { "+b+" = blockHelperMissing.call("+a.join(", ")+"); }")},appendContent:function(a){this.pendingContent&&(a=this.pendingContent+a),this.pendi
 ngContent=a},append:function(){this.flushInline();var a=this.popStack();this.pushSource("if ("+a+" != null) { "+this.appendToBuffer(a)+" }"),this.environment.isSimple&&this.pushSource("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.aliases.escapeExpression="this.escapeExpression",this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c){var d=0,e=a.length;for(c||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[d++]));e>d;d++)this.replaceStack(function(c){var e=this.nameLookup(c,a[d],"context");return b?" && "+e:" != null ? "+e+" : "+c})},lookupData:function(a,b){a?this.pushStackLiteral("this.data(data, "+a+")"):this.pushStackLiteral("data");for(var c=b.length,d=0;c>d;d++)this.replaceStack(function(a){return" && "+this.nameLookup(a,b[d],"data")}
 )},resolvePossibleLambda:function(){this.aliases.lambda="this.lambda",this.push("lambda("+this.popStack()+", "+this.contextName(0)+")")},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"sexpr"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(){this.pushStackLiteral("{}"),this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}"))},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push("{"+a.ids.join(",")+"}"),this.stringParams&&(this.push("{"+a.contexts.join(",")+"}"),this.push("{"+a.types.join(",")+"}")),this.push("{\n    "+a.values.join(",\n    ")+"\n  }")},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},push:function(a){return this.inlineStack.push(a),a},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?t
 his.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},invokeHelper:function(a,b,c){this.aliases.helperMissing="helpers.helperMissing";var d=this.popStack(),e=this.setupHelper(a,b),f=(c?e.name+" || ":"")+d+" || helperMissing";this.push("(("+f+").call("+e.callParams+"))")},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(c.name+".call("+c.callParams+")")},invokeAmbiguous:function(a,b){this.aliases.functionType='"function"',this.aliases.helperMissing="helpers.helperMissing",this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper");this.push("((helper = (helper = "+e+" || "+c+") != null ? helper : helperMissing"+(d.paramsInit?"),("+d.paramsInit:"")+"),(typeof helper === functionType ? helper.call("+d.callParams+") : helper))")},invokePartial:function(a,b){var c=[this.nameLookup("partials",a,"partial"),"'"+b+"'","'"+a+"'",this.popStack(),this.popStack(
 ),"helpers","partials"];this.options.data?c.push("data"):this.options.compat&&c.push("undefined"),this.options.compat&&c.push("depths"),this.push("this.invokePartial("+c.join(", ")+")")},assignToHash:function(a){var b,c,d,e=this.popStack();this.trackIds&&(d=this.popStack()),this.stringParams&&(c=this.popStack(),b=this.popStack());var f=this.hash;b&&f.contexts.push("'"+a+"': "+b),c&&f.types.push("'"+a+"': "+c),d&&f.ids.push("'"+a+"': "+d),f.values.push("'"+a+"': ("+e+")")},pushId:function(a,b){"ID"===a||"DATA"===a?this.pushString(b):"sexpr"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:d,compileChildren:function(a,b){for(var c,d,e=a.children,f=0,g=e.length;g>f;f++){c=e[f],d=new this.compiler;var h=this.matchExistingProgram(c);null==h?(this.context.programs.push(""),h=this.context.programs.length,c.index=h,c.name="program"+h,this.context.programs[h]=d.compile(c,b,this.context,!this.precompile),this.context.environments[h]=c,this.useDepths=this.useDepths||d.
 useDepths):(c.index=h,c.name="program"+h)}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;c>b;b++){var d=this.context.environments[b];if(d&&d.equals(a))return b}},programExpression:function(a){var b=this.environment.children[a],c=(b.depths.list,this.useDepths),d=[b.index,"data"];return c&&d.push("depths"),"this.program("+d.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},pushStackLiteral:function(a){return this.push(new c(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent))),this.pendingContent=void 0),a&&this.source.push(a)},pushStack:function(a){this.flushInline();var b=this.incrStack();return this.pushSource(b+" = "+a+";"),this.compileStack.push(b),b},replaceStack:function(a){{var b,d,e,f="";this.isInline()}if(!this.isInline())throw new h("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof c)f=b
 =g.value,e=!0;else{d=!this.stackSlot;var i=d?this.incrStack():this.topStackName();f="("+this.push(i)+" = "+g+")",b=this.topStack()}var j=a.call(this,b);e||this.popStack(),d&&this.stackSlot--,this.push("("+f+j+")")},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;if(a.length){this.inlineStack=[];for(var b=0,d=a.length;d>b;b++){var e=a[b];e instanceof c?this.compileStack.push(e):this.pushStack(e)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),d=(b?this.inlineStack:this.compileStack).pop();if(!a&&d instanceof c)return d.value;if(!b){if(!this.stackSlot)throw new h("Invalid stack pop");this.stackSlot--}return d},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof c?b.value:b},conte
 xtName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(this.quotedString(c)+":"+a[c]);return"{"+b.join(",")+"}"},setupHelper:function(a,b,c){var d=[],e=this.setupParams(b,a,d,c),f=this.nameLookup("helpers",b,"helper");return{params:d,paramsInit:e,name:f,callParams:[this.contextName(0)].concat(d).join(", ")}},setupOptions:function(a,b,c){var d,e,f,g={},h=[],i=[],j=[];g.name=this.quotedString(a),g.hash=this.popStack(),this.trackIds&&(g.hashIds=this.popStack()),this.stringParams&&(g.hashTypes=this.popStack(),g.hashContexts=this.popStack()),e=this.popStack(),f=this.popStack(),(f||e)&&(f||(f="this.noop"),e||(e="this.noop"),g.fn=f,g.inverse=e);for(var k=b;k--;)d=this.popStack(),c[k]=d,this.trackIds&&(j[k]=this.popSt
 ack()),this.stringParams&&(i[k]=this.popStack(),h[k]=this.popStack());return this.trackIds&&(g.ids="["+j.join(",")+"]"),this.stringParams&&(g.types="["+i.join(",")+"]",g.contexts="["+h.join(",")+"]"),this.options.data&&(g.data="data"),g},setupParams:function(a,b,c,d){var e=this.objectLiteral(this.setupOptions(a,b,c));return d?(this.useRegister("options"),c.push("options"),"options="+e):(c.push(e),"")}};for(var i="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),j=d.RESERVED_WORDS={},k=0,l=i.length;l>k;k++)j[i[k]]=!0;return d.isValidJavaScriptVariableName=function(a){return!d.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},e=d}(d,c),m
 =function(a,b,c,d,e){"use strict";var f,g=a,h=b,i=c.parser,j=c.parse,k=d.Compiler,l=d.compile,m=d.precompile,n=e,o=g.create,p=function(){var a=o();return a.compile=function(b,c){return l(b,c,a)},a.precompile=function(b,c){return m(b,c,a)},a.AST=h,a.Compiler=k,a.JavaScriptCompiler=n,a.Parser=i,a.parse=j,a};return g=p(),g.create=p,g["default"]=g,f=g}(f,g,j,k,l);return m});
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/lib/highlight.7.3.pack.js
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/lib/highlight.7.3.pack.js b/ambari-web/api-docs/lib/highlight.7.3.pack.js
new file mode 100644
index 0000000..9a95a75
--- /dev/null
+++ b/ambari-web/api-docs/lib/highlight.7.3.pack.js
@@ -0,0 +1 @@
+var hljs=new function(){function l(o){return o.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+q.parentNode.className).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]=="no-highlight"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName=="BR"){s+=1}else{if(t.nodeType==1){o.push({event:"start",offset:s,node:t});s=p(t,s);o.push({event:"stop",offset:s,node:t})}}}}return s})(q,0);return o}function j(x,v,w){var p=0;var y="";var r=[]
 ;function t(){if(x.length&&v.length){if(x[0].offset!=v[0].offset){return(x[0].offset<v[0].offset)?x:v}else{return v[0].event=="start"?x:v}}else{return x.length?x:v}}function s(A){function z(B){return" "+B.nodeName+'="'+l(B.value)+'"'}return"<"+A.nodeName+Array.prototype.map.call(A.attributes,z).join("")+">"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("</"+o.nodeName.toLowerCase()+">")}while(o!=u.node);r.splice(q,1);while(q<r.length){y+=s(r[q]);q++}}}}return y+l(w.substr(p))}function f(q){function o(s,r){return RegExp(s,"m"+(q.cI?"i":"")+(r?"g":""))}function p(y,w){if(y.compiled){return}y.compiled=true;var s=[];if(y.k){var r={};function z(A,t){t.split(" ").forEach(function(B){var C=B.split("|");r[C[0]]=[A,C[1]?Number(C[1]):1];s.push(C[0])})}y.lR=o(y.l||hljs.IR,true);if(typeof y.k=="string"){z("keyword",y.k)}else{for(var x in y.k){
 if(!y.k.hasOwnProperty(x)){continue}z(x,y.k[x])}}y.k=r}if(w){if(y.bWK){y.b="\\b("+s.join("|")+")\\s"}y.bR=o(y.b?y.b:"\\B|\\b");if(!y.e&&!y.eW){y.e="\\B|\\b"}if(y.e){y.eR=o(y.e)}y.tE=y.e||"";if(y.eW&&w.tE){y.tE+=(y.e?"|":"")+w.tE}}if(y.i){y.iR=o(y.i)}if(y.r===undefined){y.r=1}if(!y.c){y.c=[]}for(var v=0;v<y.c.length;v++){if(y.c[v]=="self"){y.c[v]=y}p(y.c[v],y)}if(y.starts){p(y.starts,w)}var u=[];for(var v=0;v<y.c.length;v++){u.push(y.c[v].b)}if(y.tE){u.push(y.tE)}if(y.i){u.push(y.i)}y.t=u.length?o(u.join("|"),true):{exec:function(t){return null}}}p(q)}function d(D,E){function o(r,M){for(var L=0;L<M.c.length;L++){var K=M.c[L].bR.exec(r);if(K&&K.index==0){return M.c[L]}}}function s(K,r){if(K.e&&K.eR.test(r)){return K}if(K.eW){return s(K.parent,r)}}function t(r,K){return K.i&&K.iR.test(r)}function y(L,r){var K=F.cI?r[0].toLowerCase():r[0];return L.k.hasOwnProperty(K)&&L.k[K]}function G(){var K=l(w);if(!A.k){return K}var r="";var N=0;A.lR.lastIndex=0;var L=A.lR.exec(K);while(L){r+=K.subs
 tr(N,L.index-N);var M=y(A,L);if(M){v+=M[1];r+='<span class="'+M[0]+'">'+L[0]+"</span>"}else{r+=L[0]}N=A.lR.lastIndex;L=A.lR.exec(K)}return r+K.substr(N)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return'<span class="'+r.language+'">'+r.value+"</span>"}function J(){return A.sL!==undefined?z():G()}function I(L,r){var K=L.cN?'<span class="'+L.cN+'">':"";if(L.rB){x+=K;w=""}else{if(L.eB){x+=l(r)+K;w=""}else{x+=K;w=r}}A=Object.create(L,{parent:{value:A}});B+=L.r}function C(K,r){w+=K;if(r===undefined){x+=J();return 0}var L=o(r,A);if(L){x+=J();I(L,r);return L.rB?0:r.length}var M=s(A,r);if(M){if(!(M.rE||M.eE)){w+=r}x+=J();do{if(A.cN){x+="</span>"}A=A.parent}while(A!=M.parent);if(M.eE){x+=l(r)}w="";if(M.starts){I(M.starts,"")}return M.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var F=e[D];f(F);var A=F;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(E);if(!u){break}q=C(E.
 substr(p,u.index-p),u[0]);p=u.index+q}C(E.substr(p));return{r:B,keyword_count:v,value:x,language:D}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:l(E)}}else{throw H}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"<br>")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w
 .second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM=
 {cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"
 },c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}(hljs);
\ No newline at end of file


[23/49] ambari git commit: Merge branch 'trunk' into ambari-rest-api-explorer

Posted by ad...@apache.org.
Merge branch 'trunk' into ambari-rest-api-explorer


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

Branch: refs/heads/trunk
Commit: e250b9012d712209cca28be6ca75e5040499fabe
Parents: 76eabf2 ea3aa22
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Tue Mar 28 15:13:56 2017 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Tue Mar 28 15:13:56 2017 -0700

----------------------------------------------------------------------
 KEYS                                            |    71 +
 ambari-admin/pom.xml                            |     3 +-
 .../authentication/AuthenticationMainCtrl.js    |     4 +-
 .../clusters/ClustersManageAccessCtrl.js        |     2 +-
 .../controllers/clusters/ExportBlueprintCtrl.js |     7 +-
 .../controllers/clusters/UserAccessListCtrl.js  |     2 +-
 .../controllers/groups/GroupsEditCtrl.js        |     3 +-
 .../loginActivities/LoginMessageMainCtrl.js     |     2 +-
 .../remoteClusters/RemoteClustersListCtrl.js    |     2 +-
 .../stackVersions/StackVersionsListCtrl.js      |     2 +-
 .../scripts/controllers/users/UsersShowCtrl.js  |     3 +-
 .../app/scripts/directives/editableList.js      |     2 +-
 .../ui/admin-web/app/scripts/i18n.config.js     |   982 +-
 .../app/scripts/services/AddVersionModal.js     |     2 +-
 .../app/scripts/services/PermissionsSaver.js    |     2 +-
 .../resources/ui/admin-web/app/styles/main.css  |     5 +
 .../admin-web/app/views/ambariViews/edit.html   |     2 +-
 .../app/views/ambariViews/modals/create.html    |     2 +-
 .../app/views/authentication/main.html          |     4 +-
 .../app/views/clusters/manageAccess.html        |     4 +-
 .../ui/admin-web/app/views/groups/create.html   |     2 +-
 .../app/views/loginActivities/loginMessage.html |     2 +-
 .../app/views/modals/AddRepositoryModal.html    |    16 +-
 .../app/views/modals/AddVersionModal.html       |     4 +-
 .../remoteClusters/editRemoteClusterPage.html   |     6 +-
 .../app/views/remoteClusters/list.html          |     2 +-
 .../views/remoteClusters/remoteClusterPage.html |     8 +-
 .../admin-web/app/views/stackVersions/list.html |     6 +-
 .../views/stackVersions/stackVersionPage.html   |    12 +-
 .../ui/admin-web/app/views/users/list.html      |     4 +-
 ambari-agent/conf/unix/ambari-agent.ini         |     4 +
 ambari-agent/pom.xml                            |    84 +-
 .../ambari_agent/AlertSchedulerHandler.py       |    21 +-
 .../main/python/ambari_agent/AmbariConfig.py    |    12 +
 .../src/main/python/ambari_agent/Controller.py  |     4 +
 .../ambari_agent/CustomServiceOrchestrator.py   |     7 +-
 .../src/main/python/ambari_agent/HostInfo.py    |    14 +-
 .../ambari_agent/StatusCommandsExecutor.py      |    13 +-
 .../ambari_agent/apscheduler/threadpool.py      |    11 +-
 .../src/main/python/ambari_agent/main.py        |    18 +-
 ambari-agent/src/packages/tarball/all.xml       |    10 +
 .../ambari_agent/TestAlertSchedulerHandler.py   |    18 +-
 .../test/python/ambari_agent/TestHostInfo.py    |     4 +-
 .../resource_management/TestLibraryFunctions.py |     3 +
 .../resource_management/TestSecurityCommons.py  |     5 +-
 .../src/main/python/ambari_commons/network.py   |    14 +
 .../core/resources/jcepolicyinfo.py             |    25 +-
 .../python/resource_management/core/source.py   |     2 +-
 .../libraries/functions/get_port_from_url.py    |     8 +-
 .../libraries/functions/security_commons.py     |    11 +-
 .../libraries/providers/properties_file.py      |     2 +-
 .../libraries/providers/xml_config.py           |     2 +-
 .../libraries/script/script.py                  |     7 +
 ambari-infra/ambari-infra-assembly/pom.xml      |   336 +
 .../src/main/package/deb/solr-client/control    |    22 +
 .../src/main/package/deb/solr-client/postinst   |    15 +
 .../src/main/package/deb/solr-client/postrm     |    15 +
 .../src/main/package/deb/solr-client/preinst    |    15 +
 .../src/main/package/deb/solr-client/prerm      |    15 +
 .../src/main/package/deb/solr/control           |    22 +
 .../src/main/package/deb/solr/postinst          |    15 +
 .../src/main/package/deb/solr/postrm            |    15 +
 .../src/main/package/deb/solr/preinst           |    15 +
 .../src/main/package/deb/solr/prerm             |    15 +
 .../src/main/resources/solr                     |  1464 +
 ambari-infra/ambari-infra-solr-client/build.xml |    56 +
 ambari-infra/ambari-infra-solr-client/pom.xml   |   125 +
 .../ambari/infra/solr/AmbariSolrCloudCLI.java   |   565 +
 .../infra/solr/AmbariSolrCloudClient.java       |   334 +
 .../solr/AmbariSolrCloudClientBuilder.java      |   215 +
 .../solr/AmbariSolrCloudClientException.java    |    28 +
 .../solr/commands/AbstractRetryCommand.java     |    58 +
 .../solr/commands/AbstractSolrRetryCommand.java |    53 +
 .../commands/AbstractStateFileZkCommand.java    |    42 +
 .../AbstractZookeeperConfigCommand.java         |    44 +
 .../commands/AbstractZookeeperRetryCommand.java |    40 +
 .../solr/commands/CheckConfigZkCommand.java     |    34 +
 .../solr/commands/CheckZnodeZkCommand.java      |    45 +
 .../solr/commands/CreateCollectionCommand.java  |    62 +
 .../infra/solr/commands/CreateShardCommand.java |    51 +
 .../solr/commands/CreateSolrZnodeZkCommand.java |    42 +
 .../solr/commands/DownloadConfigZkCommand.java  |    47 +
 .../EnableKerberosPluginSolrZkCommand.java      |    88 +
 .../infra/solr/commands/GetShardsCommand.java   |    39 +
 .../solr/commands/GetSolrHostsCommand.java      |    53 +
 .../solr/commands/GetStateFileZkCommand.java    |    43 +
 .../solr/commands/ListCollectionCommand.java    |    49 +
 .../solr/commands/SecureSolrZNodeZkCommand.java |    86 +
 .../solr/commands/SecureZNodeZkCommand.java     |    49 +
 .../commands/SetClusterPropertyZkCommand.java   |    40 +
 .../solr/commands/UpdateStateFileZkCommand.java |    84 +
 .../solr/commands/UploadConfigZkCommand.java    |    41 +
 .../infra/solr/domain/AmbariSolrState.java      |    26 +
 .../apache/ambari/infra/solr/util/AclUtils.java |    85 +
 .../ambari/infra/solr/util/ShardUtils.java      |    71 +
 .../src/main/resources/log4j.properties         |    31 +
 .../src/main/resources/solrCloudCli.sh          |    20 +
 .../infra/solr/AmbariSolrCloudClientTest.java   |   134 +
 ambari-infra/ambari-infra-solr-plugin/pom.xml   |    56 +
 .../InfraKerberosHostValidator.java             |    54 +
 .../InfraRuleBasedAuthorizationPlugin.java      |   542 +
 .../InfraUserRolesLookupStrategy.java           |    49 +
 .../InfraKerberosHostValidatorTest.java         |   114 +
 .../InfraRuleBasedAuthorizationPluginTest.java  |   247 +
 .../InfraUserRolesLookupStrategyTest.java       |    83 +
 ambari-infra/pom.xml                            |   187 +
 .../ambari-infra-solr-plugin/pom.xml            |    56 -
 .../InfraKerberosHostValidator.java             |    54 -
 .../InfraRuleBasedAuthorizationPlugin.java      |   542 -
 .../InfraUserRolesLookupStrategy.java           |    49 -
 .../InfraKerberosHostValidatorTest.java         |   114 -
 .../InfraRuleBasedAuthorizationPluginTest.java  |   247 -
 .../InfraUserRolesLookupStrategyTest.java       |    83 -
 .../ambari-logsearch-assembly/pom.xml           |   219 +-
 .../src/main/package/deb/solr-client/control    |    22 -
 .../src/main/package/deb/solr-client/postinst   |    15 -
 .../src/main/package/deb/solr-client/postrm     |    15 -
 .../src/main/package/deb/solr-client/preinst    |    15 -
 .../src/main/package/deb/solr-client/prerm      |    15 -
 .../src/main/package/deb/solr/control           |    22 -
 .../src/main/package/deb/solr/postinst          |    15 -
 .../src/main/package/deb/solr/postrm            |    15 -
 .../src/main/package/deb/solr/preinst           |    15 -
 .../src/main/package/deb/solr/prerm             |    15 -
 .../src/main/resources/solr                     |  1464 -
 ambari-logsearch/ambari-logsearch-it/pom.xml    |    10 +-
 .../org/apache/ambari/logfeeder/LogFeeder.java  |     3 +-
 .../logfeeder/common/LogFeederConstants.java    |     2 +
 .../ambari/logfeeder/filter/FilterJSON.java     |     2 +
 .../apache/ambari/logfeeder/input/Input.java    |    63 +-
 .../ambari/logfeeder/input/cache/LRUCache.java  |    99 +
 .../logfeeder/logconfig/LogConfigHandler.java   |    30 +-
 .../ambari/logfeeder/mapper/MapperDate.java     |     4 +
 .../logfeeder/output/OutputLineFilter.java      |    65 +
 .../ambari/logfeeder/output/OutputManager.java  |     8 +-
 .../ambari/logfeeder/output/OutputSolr.java     |    23 +-
 .../ambari/logfeeder/filter/FilterJSONTest.java |     3 +
 .../logfeeder/input/cache/LRUCacheTest.java     |   123 +
 .../ambari/logfeeder/mapper/MapperDateTest.java |     3 +
 .../logfeeder/output/OutputLineFilterTest.java  |   167 +
 .../logfeeder/output/OutputManagerTest.java     |     3 +-
 .../ambari-logsearch-portal/.gitignore          |     9 -
 .../ambari-logsearch-portal/LICENSE.txt         |   339 -
 .../ambari-logsearch-portal/README.md           |    55 -
 .../ambari-logsearch-portal/build.properties    |    23 -
 .../ambari-logsearch-portal/build.xml           |    65 -
 .../ambari-logsearch-portal/gulpfile.js         |   136 -
 .../ambari-logsearch-portal/package.json        |    21 -
 .../ambari-logsearch-portal/pom.xml             |   795 -
 ambari-logsearch/ambari-logsearch-portal/run.sh |    24 -
 .../configsets/audit_logs/conf/admin-extra.html |    24 -
 .../conf/admin-extra.menu-bottom.html           |    25 -
 .../audit_logs/conf/admin-extra.menu-top.html   |    25 -
 .../main/configsets/audit_logs/conf/elevate.xml |    38 -
 .../configsets/audit_logs/conf/enumsConfig.xml  |    28 -
 .../configsets/audit_logs/conf/managed-schema   |   125 -
 .../configsets/audit_logs/conf/solrconfig.xml   |  1887 --
 .../hadoop_logs/conf/admin-extra.html           |    24 -
 .../conf/admin-extra.menu-bottom.html           |    25 -
 .../hadoop_logs/conf/admin-extra.menu-top.html  |    25 -
 .../configsets/hadoop_logs/conf/elevate.xml     |    38 -
 .../configsets/hadoop_logs/conf/enumsConfig.xml |    28 -
 .../configsets/hadoop_logs/conf/managed-schema  |   120 -
 .../configsets/hadoop_logs/conf/solrconfig.xml  |  1887 --
 .../configsets/history/conf/admin-extra.html    |    24 -
 .../history/conf/admin-extra.menu-bottom.html   |    25 -
 .../history/conf/admin-extra.menu-top.html      |    25 -
 .../main/configsets/history/conf/elevate.xml    |    38 -
 .../main/configsets/history/conf/managed-schema |    98 -
 .../main/configsets/history/conf/solrconfig.xml |  1873 --
 .../src/main/configsets/solr.xml                |    19 -
 .../org/apache/ambari/logsearch/LogSearch.java  |   176 -
 .../logsearch/common/ACLPropertiesSplitter.java |    70 -
 .../logsearch/common/ExternalServerClient.java  |    83 -
 .../common/HadoopServiceConfigHelper.java       |    80 -
 .../logsearch/common/LogSearchConstants.java    |   110 -
 .../logsearch/common/LogSearchContext.java      |    62 -
 .../apache/ambari/logsearch/common/LogType.java |    34 -
 .../logsearch/common/ManageStartEndTime.java    |    55 -
 .../apache/ambari/logsearch/common/Marker.java  |    29 -
 .../ambari/logsearch/common/MessageData.java    |   165 -
 .../ambari/logsearch/common/MessageEnums.java   |    72 -
 .../logsearch/common/PropertiesHelper.java      |   138 -
 .../ambari/logsearch/common/VResponse.java      |   164 -
 .../logsearch/common/XMLPropertiesHelper.java   |    79 -
 .../ambari/logsearch/conf/ApiDocConfig.java     |    57 -
 .../logsearch/conf/ApplicationConfig.java       |    58 -
 .../ambari/logsearch/conf/AuthPropsConfig.java  |   159 -
 .../conf/LogSearchHttpHeaderConfig.java         |    70 -
 .../ambari/logsearch/conf/SecurityConfig.java   |   209 -
 .../logsearch/conf/SolrAuditLogPropsConfig.java |   168 -
 .../ambari/logsearch/conf/SolrConfig.java       |    76 -
 .../conf/SolrConnectionPropsConfig.java         |    78 -
 .../logsearch/conf/SolrKerberosConfig.java      |    48 -
 .../ambari/logsearch/conf/SolrPropsConfig.java  |    61 -
 .../conf/SolrServiceLogPropsConfig.java         |    91 -
 .../logsearch/conf/SolrUserPropsConfig.java     |   116 -
 .../conf/global/SolrAuditLogsState.java         |    68 -
 .../conf/global/SolrCollectionState.java        |    33 -
 .../conf/global/SolrServiceLogsState.java       |    59 -
 .../conf/global/SolrUserConfigState.java        |    60 -
 .../configurer/LogfeederFilterConfigurer.java   |    66 -
 .../configurer/SolrAuditAliasConfigurer.java    |   136 -
 .../configurer/SolrCollectionConfigurer.java    |   230 -
 .../logsearch/configurer/SolrConfigurer.java    |    23 -
 .../AbstractAuditLogRequestQueryConverter.java  |    59 -
 .../converter/AbstractConverterAware.java       |    47 -
 .../AbstractDateRangeFacetQueryConverter.java   |    55 -
 .../AbstractLogRequestFacetQueryConverter.java  |    86 -
 .../AbstractLogRequestQueryConverter.java       |    39 -
 .../AbstractOperationHolderConverter.java       |   175 -
 .../AbstractSearchRequestQueryConverter.java    |    49 -
 ...actServiceLogRequestFacetQueryConverter.java |    44 -
 ...AbstractServiceLogRequestQueryConverter.java |    44 -
 .../AuditBarGraphRequestQueryConverter.java     |    46 -
 .../AuditComponentsRequestQueryConverter.java   |    53 -
 .../AuditLogRequestQueryConverter.java          |    44 -
 .../AuditServiceLoadRequestQueryConverter.java  |    53 -
 .../BaseServiceLogRequestQueryConverter.java    |    85 -
 .../FieldAuditLogRequestQueryConverter.java     |    54 -
 .../HostLogFilesRequestQueryConverter.java      |    61 -
 ...ServiceLogAnyGraphRequestQueryConverter.java |    60 -
 ...eLogComponentLevelRequestQueryConverter.java |    53 -
 ...eLogComponentRequestFacetQueryConverter.java |    55 -
 ...rviceLogLevelCountRequestQueryConverter.java |    68 -
 ...eLogLevelDateRangeRequestQueryConverter.java |    75 -
 ...erviceLogTreeRequestFacetQueryConverter.java |    54 -
 ...erviceLogTruncatedRequestQueryConverter.java |    95 -
 .../StringFieldFacetQueryConverter.java         |    44 -
 .../UserConfigRequestQueryConverter.java        |    64 -
 .../UserExportRequestQueryConverter.java        |    55 -
 .../ambari/logsearch/dao/AuditSolrDao.java      |    94 -
 .../logsearch/dao/ServiceLogsSolrDao.java       |    85 -
 .../ambari/logsearch/dao/SolrDaoBase.java       |   128 -
 .../logsearch/dao/SolrSchemaFieldDao.java       |   213 -
 .../ambari/logsearch/dao/UserConfigSolrDao.java |   196 -
 .../apache/ambari/logsearch/dao/UserDao.java    |   150 -
 .../ambari/logsearch/doc/DocConstants.java      |   122 -
 .../ambari/logsearch/handler/ACLHandler.java    |    97 -
 .../handler/CreateCollectionHandler.java        |   222 -
 .../handler/ListCollectionHandler.java          |    51 -
 .../handler/ReloadCollectionHandler.java        |    45 -
 .../logsearch/handler/SolrZkRequestHandler.java |    26 -
 .../handler/UploadConfigurationHandler.java     |   151 -
 .../logsearch/manager/AuditLogsManager.java     |   199 -
 .../logsearch/manager/JsonManagerBase.java      |    69 -
 .../ambari/logsearch/manager/ManagerBase.java   |    96 -
 .../ambari/logsearch/manager/PublicManager.java |    48 -
 .../logsearch/manager/ServiceLogsManager.java   |   592 -
 .../logsearch/manager/SessionManager.java       |    77 -
 .../logsearch/manager/UserConfigManager.java    |   223 -
 .../model/common/LogFeederDataMap.java          |    50 -
 .../model/common/LogfeederFilterData.java       |    87 -
 .../model/request/AnyGraphParamDefinition.java  |    44 -
 .../model/request/BundleIdParamDefinition.java  |    32 -
 .../request/CommonSearchParamDefinition.java    |    69 -
 .../model/request/DateRangeParamDefinition.java |    38 -
 .../model/request/FieldParamDefinition.java     |    32 -
 .../model/request/FormatParamDefinition.java    |    32 -
 .../request/HostComponentParamDefinition.java   |    38 -
 .../model/request/LastPageParamDefinition.java  |    31 -
 .../model/request/LogParamDefinition.java       |    62 -
 .../request/LogTruncatedParamDefinition.java    |    44 -
 .../logsearch/model/request/SearchRequest.java  |    25 -
 .../request/ServiceLogParamDefinition.java      |    44 -
 .../ServiceLogSearchParamDefinition.java        |    50 -
 .../model/request/TopParamDefinition.java       |    31 -
 .../model/request/UnitParamDefinition.java      |    33 -
 .../request/UserConfigParamDefinition.java      |    38 -
 .../model/request/UtcOffsetParamDefinition.java |    32 -
 .../request/impl/AuditBarGraphRequest.java      |    40 -
 .../request/impl/AuditComponentRequest.java     |    25 -
 .../model/request/impl/AuditLogRequest.java     |    40 -
 .../request/impl/AuditServiceLoadRequest.java   |    25 -
 .../model/request/impl/BaseLogRequest.java      |   132 -
 .../request/impl/BaseServiceLogRequest.java     |   107 -
 .../model/request/impl/CommonSearchRequest.java |   126 -
 .../request/impl/FieldAuditBarGraphRequest.java |    40 -
 .../request/impl/FieldAuditLogRequest.java      |    55 -
 .../model/request/impl/HostLogFilesRequest.java |    56 -
 .../request/impl/ServiceAnyGraphRequest.java    |    81 -
 .../model/request/impl/ServiceGraphRequest.java |    40 -
 .../impl/ServiceLogAggregatedInfoRequest.java   |    25 -
 .../impl/ServiceLogComponentHostRequest.java    |    25 -
 .../impl/ServiceLogComponentLevelRequest.java   |    25 -
 .../request/impl/ServiceLogExportRequest.java   |    54 -
 .../impl/ServiceLogHostComponentRequest.java    |    39 -
 .../impl/ServiceLogLevelCountRequest.java       |    25 -
 .../model/request/impl/ServiceLogRequest.java   |    93 -
 .../impl/ServiceLogTruncatedRequest.java        |    66 -
 .../model/request/impl/UserConfigRequest.java   |    53 -
 .../model/request/impl/UserExportRequest.java   |    40 -
 .../logsearch/model/response/AuditLogData.java  |   149 -
 .../model/response/AuditLogResponse.java        |    48 -
 .../logsearch/model/response/BarGraphData.java  |    53 -
 .../response/BarGraphDataListResponse.java      |    42 -
 .../logsearch/model/response/CommonLogData.java |   118 -
 .../model/response/ComponentTypeLogData.java    |    32 -
 .../logsearch/model/response/CountData.java     |    50 -
 .../model/response/CountDataListResponse.java   |    48 -
 .../logsearch/model/response/GraphData.java     |    64 -
 .../model/response/GraphDataListResponse.java   |    39 -
 .../model/response/GroupListResponse.java       |    48 -
 .../logsearch/model/response/HostLogData.java   |    30 -
 .../model/response/HostLogFilesResponse.java    |    39 -
 .../logsearch/model/response/LogData.java       |    25 -
 .../logsearch/model/response/LogFileData.java   |    48 -
 .../model/response/LogFileDataListResponse.java |    48 -
 .../model/response/LogListResponse.java         |    27 -
 .../model/response/LogSearchResponse.java       |    22 -
 .../logsearch/model/response/NameValueData.java |    62 -
 .../response/NameValueDataListResponse.java     |    49 -
 .../logsearch/model/response/NodeData.java      |   110 -
 .../model/response/NodeListResponse.java        |    50 -
 .../model/response/SearchResponse.java          |   110 -
 .../model/response/ServiceLogData.java          |    63 -
 .../model/response/ServiceLogResponse.java      |    48 -
 .../logsearch/model/response/TemplateData.java  |    36 -
 .../model/response/UserConfigData.java          |    97 -
 .../response/UserConfigDataListResponse.java    |    55 -
 .../logsearch/rest/AuditLogsResource.java       |   111 -
 .../ambari/logsearch/rest/PublicResource.java   |    48 -
 .../logsearch/rest/ServiceLogsResource.java     |   210 -
 .../ambari/logsearch/rest/StatusResource.java   |    91 -
 .../logsearch/rest/UserConfigResource.java      |   100 -
 .../ambari/logsearch/service/UserService.java   |    44 -
 .../logsearch/solr/ResponseDataGenerator.java   |   452 -
 .../ambari/logsearch/solr/SolrConstants.java    |   112 -
 .../logsearch/solr/model/SolrAuditLogData.java  |   341 -
 .../logsearch/solr/model/SolrCommonLogData.java |   292 -
 .../solr/model/SolrComponentTypeLogData.java    |    40 -
 .../logsearch/solr/model/SolrHostLogData.java   |    40 -
 .../solr/model/SolrServiceLogData.java          |   120 -
 .../ambari/logsearch/util/CommonUtil.java       |    41 -
 .../apache/ambari/logsearch/util/DateUtil.java  |   142 -
 .../ambari/logsearch/util/DownloadUtil.java     |   176 -
 .../apache/ambari/logsearch/util/FileUtil.java  |    72 -
 .../apache/ambari/logsearch/util/JSONUtil.java  |   245 -
 .../ambari/logsearch/util/RESTErrorUtil.java    |    68 -
 .../apache/ambari/logsearch/util/SSLUtil.java   |   363 -
 .../apache/ambari/logsearch/util/SolrUtil.java  |   245 -
 .../apache/ambari/logsearch/util/WebUtil.java   |    65 -
 .../LogsearchAuthFailureHandler.java            |    43 -
 .../LogsearchAuthSuccessHandler.java            |    41 -
 .../LogsearchLogoutSuccessHandler.java          |    41 -
 .../AbstractLogsearchGlobalStateFilter.java     |   100 -
 .../filters/LogsearchAuditLogsStateFilter.java  |    51 -
 .../LogsearchAuthenticationEntryPoint.java      |    50 -
 .../web/filters/LogsearchCorsFilter.java        |    59 -
 .../web/filters/LogsearchJWTFilter.java         |   181 -
 .../LogsearchKRBAuthenticationFilter.java       |   338 -
 .../web/filters/LogsearchKrbFilter.java         |   581 -
 ...LogsearchSecurityContextFormationFilter.java |   106 -
 .../LogsearchServiceLogsStateFilter.java        |    51 -
 .../filters/LogsearchUserConfigStateFilter.java |    52 -
 ...rchUsernamePasswordAuthenticationFilter.java |    45 -
 .../logsearch/web/filters/NoServletContext.java |   300 -
 .../web/listener/LogSearchSessionListener.java  |    48 -
 .../web/model/JWTAuthenticationToken.java       |    53 -
 .../ambari/logsearch/web/model/Privilege.java   |    42 -
 .../apache/ambari/logsearch/web/model/Role.java |    64 -
 .../apache/ambari/logsearch/web/model/User.java |   167 -
 .../logsearch/web/security/LdapProperties.java  |   365 -
 .../web/security/LdapPropertyName.java          |    58 -
 .../ambari/logsearch/web/security/LdapUtil.java |   115 -
 ...LogsearchAbstractAuthenticationProvider.java |    48 -
 .../LogsearchAuthenticationProvider.java        |   117 -
 ...rchExternalServerAuthenticationProvider.java |   139 -
 .../LogsearchFileAuthenticationProvider.java    |    88 -
 .../LogsearchLdapAuthenticationProvider.java    |   187 -
 .../LogsearchLdapBindAuthenticator.java         |    46 -
 .../LogsearchSimpleAuthenticationProvider.java  |    61 -
 .../src/main/resources/HadoopServiceConfig.json |   488 -
 .../src/main/resources/default.properties       |    29 -
 .../src/main/resources/log4j.xml                |   119 -
 .../src/main/resources/logsearch-admin-site.xml |   116 -
 .../src/main/resources/logsearch.properties     |    63 -
 .../src/main/resources/swagger/swagger.html     |   115 -
 .../main/resources/templates/audit_log_txt.ftl  |    42 -
 .../resources/templates/service_log_txt.ftl     |    36 -
 .../src/main/resources/user_pass.json           |     8 -
 .../src/main/scripts/run.sh                     |   100 -
 .../src/main/scripts/stop.sh                    |    44 -
 .../src/main/webapp/404.html                    |   170 -
 .../src/main/webapp/ajax_failure.jsp            |    31 -
 .../src/main/webapp/ajax_success.html           |    26 -
 .../src/main/webapp/favicon.ico                 |   Bin 1150 -> 0 bytes
 .../webapp/fonts/fontawesome/FontAwesome.otf    |   Bin 61896 -> 0 bytes
 .../fonts/fontawesome/fontawesome-webfont.eot   |   Bin 37405 -> 0 bytes
 .../fonts/fontawesome/fontawesome-webfont.svg   |   415 -
 .../fonts/fontawesome/fontawesome-webfont.ttf   |   Bin 79076 -> 0 bytes
 .../fonts/fontawesome/fontawesome-webfont.woff  |   Bin 43572 -> 0 bytes
 .../fonts/fontopensans/open-sans-300.woff       |   Bin 22656 -> 0 bytes
 .../fonts/fontopensans/open-sans-300i.woff      |   Bin 21524 -> 0 bytes
 .../fonts/fontopensans/open-sans-400.woff       |   Bin 21956 -> 0 bytes
 .../fonts/fontopensans/open-sans-400i.woff      |   Bin 21092 -> 0 bytes
 .../fonts/fontopensans/open-sans-600.woff       |   Bin 22604 -> 0 bytes
 .../fonts/fontopensans/open-sans-600i.woff      |   Bin 21252 -> 0 bytes
 .../fonts/fontopensans/open-sans-700.woff       |   Bin 22748 -> 0 bytes
 .../fonts/fontopensans/open-sans-700i.woff      |   Bin 21184 -> 0 bytes
 .../main/webapp/images/System-Settings-icon.png |   Bin 17540 -> 0 bytes
 .../src/main/webapp/images/avatar.png           |   Bin 761 -> 0 bytes
 .../src/main/webapp/images/blank.gif            |   Bin 43 -> 0 bytes
 .../src/main/webapp/images/blockLoading.gif     |   Bin 3209 -> 0 bytes
 .../src/main/webapp/images/body-bg.png          |   Bin 3375 -> 0 bytes
 .../src/main/webapp/images/cancel_search.png    |   Bin 541 -> 0 bytes
 .../src/main/webapp/images/clear.png            |   Bin 509 -> 0 bytes
 .../src/main/webapp/images/comp.png             |   Bin 1603 -> 0 bytes
 .../src/main/webapp/images/data-grey.png        |   Bin 1468 -> 0 bytes
 .../main/webapp/images/database_table_32.png    |   Bin 1329 -> 0 bytes
 .../src/main/webapp/images/error-404-icon.png   |   Bin 2529 -> 0 bytes
 .../src/main/webapp/images/error-500-icon.png   |   Bin 2986 -> 0 bytes
 .../src/main/webapp/images/folder-grey.png      |   Bin 1372 -> 0 bytes
 .../src/main/webapp/images/folder.png           |   Bin 920 -> 0 bytes
 .../src/main/webapp/images/folder2.png          |   Bin 946 -> 0 bytes
 .../src/main/webapp/images/form.png             |   Bin 3329 -> 0 bytes
 .../src/main/webapp/images/hbase.jpg            |   Bin 4575 -> 0 bytes
 .../src/main/webapp/images/hdfs.jpg             |   Bin 5232 -> 0 bytes
 .../src/main/webapp/images/hive.png             |   Bin 20483 -> 0 bytes
 .../src/main/webapp/images/hline.png            |   Bin 99 -> 0 bytes
 .../src/main/webapp/images/icon-collapse.png    |   Bin 18815 -> 0 bytes
 .../src/main/webapp/images/icon-expand.png      |   Bin 20092 -> 0 bytes
 .../src/main/webapp/images/knox.gif             |   Bin 2347 -> 0 bytes
 .../src/main/webapp/images/knox1.png            |   Bin 34126 -> 0 bytes
 .../src/main/webapp/images/loading.gif          |   Bin 1849 -> 0 bytes
 .../src/main/webapp/images/loading_game.gif     |   Bin 16098 -> 0 bytes
 .../src/main/webapp/images/logo-white.png       |   Bin 4538 -> 0 bytes
 .../src/main/webapp/images/logo.png             |   Bin 1168 -> 0 bytes
 .../src/main/webapp/images/router-grey.png      |   Bin 1533 -> 0 bytes
 .../src/main/webapp/images/search_glyph.png     |   Bin 420 -> 0 bytes
 .../src/main/webapp/images/sortingCollapse.png  |   Bin 13320 -> 0 bytes
 .../src/main/webapp/images/sortingExpand.png    |   Bin 13283 -> 0 bytes
 .../src/main/webapp/images/storm.png            |   Bin 6174 -> 0 bytes
 .../src/main/webapp/images/storm1.png           |   Bin 19620 -> 0 bytes
 .../src/main/webapp/images/task-grey.png        |   Bin 1187 -> 0 bytes
 .../src/main/webapp/images/timezone.png         |   Bin 353544 -> 0 bytes
 .../src/main/webapp/index.html                  |   129 -
 .../libs/bower/backbone-amd/js/backbone-min.js  |     2 -
 .../libs/bower/backbone-amd/js/backbone.js      |  1608 --
 .../libs/bower/backbone-forms/css/bootstrap.css |    43 -
 .../bower/backbone-forms/js/backbone-forms.js   |  2365 --
 .../backbone-forms/js/backbone-forms.min.js     |     1 -
 .../libs/bower/backbone-forms/js/bootstrap.js   |    66 -
 .../webapp/libs/bower/backbone-forms/js/list.js |   655 -
 .../libs/bower/backbone-forms/js/list.min.js    |     1 -
 .../webapp/libs/bower/backbone-forms/js/old.js  |    91 -
 .../backbone-pageable/js/backbone-pageable.js   |  1327 -
 .../js/backbone-pageable.min.js                 |     8 -
 .../js/backbone.babysitter.js                   |   178 -
 .../js/backbone.babysitter.min.js               |    10 -
 .../js/backbone.bootstrap-modal.js              |   275 -
 .../backbone.localStorage.js                    |   222 -
 .../js/backbone.marionette.js                   |  2473 --
 .../js/backbone.marionette.min.js               |    20 -
 .../bower/backbone.wreqr/js/backbone.wreqr.js   |   277 -
 .../backbone.wreqr/js/backbone.wreqr.min.js     |    11 -
 .../libs/bower/backbone/js/backbone-min.js      |     4 -
 .../webapp/libs/bower/backbone/js/backbone.js   |  1608 --
 .../Backgrid.ColumnManager.css                  |   115 -
 .../Backgrid.ColumnManager.js                   |  1045 -
 .../Backgrid.ColumnManager.min.js               |     1 -
 .../backgrid-filter/css/backgrid-filter.css     |   193 -
 .../bower/backgrid-filter/js/backgrid-filter.js |   487 -
 .../backgrid-filter/js/backgrid-filter.min.js   |     8 -
 .../css/backgrid-paginator.css                  |    58 -
 .../backgrid-paginator/js/backgrid-paginator.js |   427 -
 .../js/backgrid-paginator.min.js                |     8 -
 .../js/backgrid-select-all.js                   |   274 -
 .../js/backgrid-select-all.min.js               |     8 -
 .../backgrid-orderable-columns.css              |    34 -
 .../backgrid-orderable-columns.js               |   680 -
 .../css/backgrid-sizeable-columns.css           |    35 -
 .../js/backgrid-sizeable-columns.js             |   480 -
 .../webapp/libs/bower/backgrid/css/backgrid.css |   240 -
 .../libs/bower/backgrid/css/backgrid.min.css    |     1 -
 .../webapp/libs/bower/backgrid/js/backgrid.js   |  2883 --
 .../libs/bower/backgrid/js/backgrid.min.js      |     8 -
 .../webapp/libs/bower/bootbox/js/bootbox.js     |   660 -
 .../webapp/libs/bower/bootbox/js/bootbox.min.js |     6 -
 .../bootstrap-notify/css/bootstrap-notify.css   |    31 -
 .../bootstrap-notify/js/bootstrap-notify.js     |    97 -
 .../libs/bower/bootstrap/bootstrap-theme.css    |   442 -
 .../bower/bootstrap/bootstrap-theme.css.map     |     1 -
 .../bower/bootstrap/bootstrap-theme.min.css     |     5 -
 .../webapp/libs/bower/bootstrap/bootstrap.css   |  6203 -----
 .../libs/bower/bootstrap/bootstrap.css.map      |     1 -
 .../webapp/libs/bower/bootstrap/bootstrap.js    |  2114 --
 .../libs/bower/bootstrap/bootstrap.min.css      |     5 -
 .../libs/bower/bootstrap/bootstrap.min.js       |     6 -
 .../webapp/libs/bower/globalize/.bower.json     |    15 -
 .../main/webapp/libs/bower/globalize/.gitignore |     9 -
 .../main/webapp/libs/bower/globalize/.npmignore |     1 -
 .../main/webapp/libs/bower/globalize/LICENSE    |    21 -
 .../main/webapp/libs/bower/globalize/README.md  |   865 -
 .../globalize/examples/browser/browser.css      |    80 -
 .../bower/globalize/examples/browser/browser.js |   115 -
 .../bower/globalize/examples/browser/index.html |   265 -
 .../globalize/examples/browser/jquery-1.4.4.js  |  7179 -----
 .../globalize/examples/browser/jquery.tmpl.js   |   131 -
 .../bower/globalize/generator/HijriCalendar.js  |    70 -
 .../libs/bower/globalize/generator/Program.cs   |   672 -
 .../generator/Properties/AssemblyInfo.cs        |    36 -
 .../libs/bower/globalize/generator/StringExt.cs |    43 -
 .../globalize/generator/UmAlQuraCalendar.js     |   190 -
 .../bower/globalize/generator/generator.csproj  |    61 -
 .../main/webapp/libs/bower/globalize/grunt.js   |    36 -
 .../webapp/libs/bower/globalize/js/globalize.js |  1586 --
 .../lib/cultures/globalize.culture.af-ZA.js     |    67 -
 .../lib/cultures/globalize.culture.af.js        |    67 -
 .../lib/cultures/globalize.culture.am-ET.js     |    74 -
 .../lib/cultures/globalize.culture.am.js        |    74 -
 .../lib/cultures/globalize.culture.ar-AE.js     |   457 -
 .../lib/cultures/globalize.culture.ar-BH.js     |   462 -
 .../lib/cultures/globalize.culture.ar-DZ.js     |   458 -
 .../lib/cultures/globalize.culture.ar-EG.js     |   484 -
 .../lib/cultures/globalize.culture.ar-IQ.js     |   457 -
 .../lib/cultures/globalize.culture.ar-JO.js     |   462 -
 .../lib/cultures/globalize.culture.ar-KW.js     |   462 -
 .../lib/cultures/globalize.culture.ar-LB.js     |   457 -
 .../lib/cultures/globalize.culture.ar-LY.js     |   462 -
 .../lib/cultures/globalize.culture.ar-MA.js     |   458 -
 .../lib/cultures/globalize.culture.ar-OM.js     |   458 -
 .../lib/cultures/globalize.culture.ar-QA.js     |   457 -
 .../lib/cultures/globalize.culture.ar-SA.js     |   457 -
 .../lib/cultures/globalize.culture.ar-SY.js     |   457 -
 .../lib/cultures/globalize.culture.ar-TN.js     |   463 -
 .../lib/cultures/globalize.culture.ar-YE.js     |   457 -
 .../lib/cultures/globalize.culture.ar.js        |   457 -
 .../lib/cultures/globalize.culture.arn-CL.js    |    78 -
 .../lib/cultures/globalize.culture.arn.js       |    78 -
 .../lib/cultures/globalize.culture.as-IN.js     |    78 -
 .../lib/cultures/globalize.culture.as.js        |    78 -
 .../cultures/globalize.culture.az-Cyrl-AZ.js    |    81 -
 .../lib/cultures/globalize.culture.az-Cyrl.js   |    81 -
 .../cultures/globalize.culture.az-Latn-AZ.js    |    81 -
 .../lib/cultures/globalize.culture.az-Latn.js   |    81 -
 .../lib/cultures/globalize.culture.az.js        |    81 -
 .../lib/cultures/globalize.culture.ba-RU.js     |    81 -
 .../lib/cultures/globalize.culture.ba.js        |    81 -
 .../lib/cultures/globalize.culture.be-BY.js     |    80 -
 .../lib/cultures/globalize.culture.be.js        |    80 -
 .../lib/cultures/globalize.culture.bg-BG.js     |    79 -
 .../lib/cultures/globalize.culture.bg.js        |    79 -
 .../lib/cultures/globalize.culture.bn-BD.js     |    74 -
 .../lib/cultures/globalize.culture.bn-IN.js     |    74 -
 .../lib/cultures/globalize.culture.bn.js        |    74 -
 .../lib/cultures/globalize.culture.bo-CN.js     |    77 -
 .../lib/cultures/globalize.culture.bo.js        |    77 -
 .../lib/cultures/globalize.culture.br-FR.js     |    79 -
 .../lib/cultures/globalize.culture.br.js        |    79 -
 .../cultures/globalize.culture.bs-Cyrl-BA.js    |    78 -
 .../lib/cultures/globalize.culture.bs-Cyrl.js   |    78 -
 .../cultures/globalize.culture.bs-Latn-BA.js    |    76 -
 .../lib/cultures/globalize.culture.bs-Latn.js   |    76 -
 .../lib/cultures/globalize.culture.bs.js        |    76 -
 .../lib/cultures/globalize.culture.ca-ES.js     |    79 -
 .../lib/cultures/globalize.culture.ca.js        |    79 -
 .../lib/cultures/globalize.culture.co-FR.js     |    79 -
 .../lib/cultures/globalize.culture.co.js        |    79 -
 .../lib/cultures/globalize.culture.cs-CZ.js     |    85 -
 .../lib/cultures/globalize.culture.cs.js        |    85 -
 .../lib/cultures/globalize.culture.cy-GB.js     |    70 -
 .../lib/cultures/globalize.culture.cy.js        |    70 -
 .../lib/cultures/globalize.culture.da-DK.js     |    78 -
 .../lib/cultures/globalize.culture.da.js        |    78 -
 .../lib/cultures/globalize.culture.de-AT.js     |    81 -
 .../lib/cultures/globalize.culture.de-CH.js     |    78 -
 .../lib/cultures/globalize.culture.de-DE.js     |    81 -
 .../lib/cultures/globalize.culture.de-LI.js     |    78 -
 .../lib/cultures/globalize.culture.de-LU.js     |    81 -
 .../lib/cultures/globalize.culture.de.js        |    81 -
 .../lib/cultures/globalize.culture.dsb-DE.js    |    84 -
 .../lib/cultures/globalize.culture.dsb.js       |    84 -
 .../lib/cultures/globalize.culture.dv-MV.js     |   164 -
 .../lib/cultures/globalize.culture.dv.js        |   164 -
 .../lib/cultures/globalize.culture.el-GR.js     |    82 -
 .../lib/cultures/globalize.culture.el.js        |    82 -
 .../lib/cultures/globalize.culture.en-029.js    |    47 -
 .../lib/cultures/globalize.culture.en-AU.js     |    52 -
 .../lib/cultures/globalize.culture.en-BZ.js     |    54 -
 .../lib/cultures/globalize.culture.en-CA.js     |    49 -
 .../lib/cultures/globalize.culture.en-GB.js     |    55 -
 .../lib/cultures/globalize.culture.en-IE.js     |    57 -
 .../lib/cultures/globalize.culture.en-IN.js     |    60 -
 .../lib/cultures/globalize.culture.en-JM.js     |    51 -
 .../lib/cultures/globalize.culture.en-MY.js     |    56 -
 .../lib/cultures/globalize.culture.en-NZ.js     |    54 -
 .../lib/cultures/globalize.culture.en-PH.js     |    39 -
 .../lib/cultures/globalize.culture.en-SG.js     |    53 -
 .../lib/cultures/globalize.culture.en-TT.js     |    54 -
 .../lib/cultures/globalize.culture.en-US.js     |    33 -
 .../lib/cultures/globalize.culture.en-ZA.js     |    61 -
 .../lib/cultures/globalize.culture.en-ZW.js     |    39 -
 .../lib/cultures/globalize.culture.es-AR.js     |    77 -
 .../lib/cultures/globalize.culture.es-BO.js     |    78 -
 .../lib/cultures/globalize.culture.es-CL.js     |    78 -
 .../lib/cultures/globalize.culture.es-CO.js     |    77 -
 .../lib/cultures/globalize.culture.es-CR.js     |    77 -
 .../lib/cultures/globalize.culture.es-DO.js     |    69 -
 .../lib/cultures/globalize.culture.es-EC.js     |    77 -
 .../lib/cultures/globalize.culture.es-ES.js     |    79 -
 .../lib/cultures/globalize.culture.es-GT.js     |    69 -
 .../lib/cultures/globalize.culture.es-HN.js     |    71 -
 .../lib/cultures/globalize.culture.es-MX.js     |    69 -
 .../lib/cultures/globalize.culture.es-NI.js     |    71 -
 .../lib/cultures/globalize.culture.es-PA.js     |    70 -
 .../lib/cultures/globalize.culture.es-PE.js     |    70 -
 .../lib/cultures/globalize.culture.es-PR.js     |    70 -
 .../lib/cultures/globalize.culture.es-PY.js     |    79 -
 .../lib/cultures/globalize.culture.es-SV.js     |    69 -
 .../lib/cultures/globalize.culture.es-US.js     |    62 -
 .../lib/cultures/globalize.culture.es-UY.js     |    79 -
 .../lib/cultures/globalize.culture.es-VE.js     |    78 -
 .../lib/cultures/globalize.culture.es.js        |    79 -
 .../lib/cultures/globalize.culture.et-EE.js     |    79 -
 .../lib/cultures/globalize.culture.et.js        |    79 -
 .../lib/cultures/globalize.culture.eu-ES.js     |    78 -
 .../lib/cultures/globalize.culture.eu.js        |    78 -
 .../lib/cultures/globalize.culture.fa-IR.js     |   213 -
 .../lib/cultures/globalize.culture.fa.js        |   213 -
 .../lib/cultures/globalize.culture.fi-FI.js     |    78 -
 .../lib/cultures/globalize.culture.fi.js        |    78 -
 .../lib/cultures/globalize.culture.fil-PH.js    |    54 -
 .../lib/cultures/globalize.culture.fil.js       |    54 -
 .../lib/cultures/globalize.culture.fo-FO.js     |    79 -
 .../lib/cultures/globalize.culture.fo.js        |    79 -
 .../lib/cultures/globalize.culture.fr-BE.js     |    79 -
 .../lib/cultures/globalize.culture.fr-CA.js     |    77 -
 .../lib/cultures/globalize.culture.fr-CH.js     |    77 -
 .../lib/cultures/globalize.culture.fr-FR.js     |    79 -
 .../lib/cultures/globalize.culture.fr-LU.js     |    79 -
 .../lib/cultures/globalize.culture.fr-MC.js     |    79 -
 .../lib/cultures/globalize.culture.fr.js        |    79 -
 .../lib/cultures/globalize.culture.fy-NL.js     |    76 -
 .../lib/cultures/globalize.culture.fy.js        |    76 -
 .../lib/cultures/globalize.culture.ga-IE.js     |    67 -
 .../lib/cultures/globalize.culture.ga.js        |    67 -
 .../lib/cultures/globalize.culture.gd-GB.js     |    69 -
 .../lib/cultures/globalize.culture.gd.js        |    69 -
 .../lib/cultures/globalize.culture.gl-ES.js     |    79 -
 .../lib/cultures/globalize.culture.gl.js        |    79 -
 .../lib/cultures/globalize.culture.gsw-FR.js    |    79 -
 .../lib/cultures/globalize.culture.gsw.js       |    79 -
 .../lib/cultures/globalize.culture.gu-IN.js     |    72 -
 .../lib/cultures/globalize.culture.gu.js        |    72 -
 .../cultures/globalize.culture.ha-Latn-NG.js    |    60 -
 .../lib/cultures/globalize.culture.ha-Latn.js   |    60 -
 .../lib/cultures/globalize.culture.ha.js        |    60 -
 .../lib/cultures/globalize.culture.he-IL.js     |    97 -
 .../lib/cultures/globalize.culture.he.js        |    97 -
 .../lib/cultures/globalize.culture.hi-IN.js     |    72 -
 .../lib/cultures/globalize.culture.hi.js        |    72 -
 .../lib/cultures/globalize.culture.hr-BA.js     |    80 -
 .../lib/cultures/globalize.culture.hr-HR.js     |    81 -
 .../lib/cultures/globalize.culture.hr.js        |    81 -
 .../lib/cultures/globalize.culture.hsb-DE.js    |    84 -
 .../lib/cultures/globalize.culture.hsb.js       |    84 -
 .../lib/cultures/globalize.culture.hu-HU.js     |    80 -
 .../lib/cultures/globalize.culture.hu.js        |    80 -
 .../lib/cultures/globalize.culture.hy-AM.js     |    67 -
 .../lib/cultures/globalize.culture.hy.js        |    67 -
 .../lib/cultures/globalize.culture.id-ID.js     |    75 -
 .../lib/cultures/globalize.culture.id.js        |    75 -
 .../lib/cultures/globalize.culture.ig-NG.js     |    60 -
 .../lib/cultures/globalize.culture.ig.js        |    60 -
 .../lib/cultures/globalize.culture.ii-CN.js     |    76 -
 .../lib/cultures/globalize.culture.ii.js        |    76 -
 .../lib/cultures/globalize.culture.is-IS.js     |    80 -
 .../lib/cultures/globalize.culture.is.js        |    80 -
 .../lib/cultures/globalize.culture.it-CH.js     |    78 -
 .../lib/cultures/globalize.culture.it-IT.js     |    80 -
 .../lib/cultures/globalize.culture.it.js        |    80 -
 .../cultures/globalize.culture.iu-Cans-CA.js    |    65 -
 .../lib/cultures/globalize.culture.iu-Cans.js   |    65 -
 .../cultures/globalize.culture.iu-Latn-CA.js    |    60 -
 .../lib/cultures/globalize.culture.iu-Latn.js   |    60 -
 .../lib/cultures/globalize.culture.iu.js        |    60 -
 .../lib/cultures/globalize.culture.ja-JP.js     |   100 -
 .../lib/cultures/globalize.culture.ja.js        |   100 -
 .../lib/cultures/globalize.culture.ka-GE.js     |    76 -
 .../lib/cultures/globalize.culture.ka.js        |    76 -
 .../lib/cultures/globalize.culture.kk-KZ.js     |    77 -
 .../lib/cultures/globalize.culture.kk.js        |    77 -
 .../lib/cultures/globalize.culture.kl-GL.js     |    81 -
 .../lib/cultures/globalize.culture.kl.js        |    81 -
 .../lib/cultures/globalize.culture.km-KH.js     |    99 -
 .../lib/cultures/globalize.culture.km.js        |    99 -
 .../lib/cultures/globalize.culture.kn-IN.js     |    72 -
 .../lib/cultures/globalize.culture.kn.js        |    72 -
 .../lib/cultures/globalize.culture.ko-KR.js     |    96 -
 .../lib/cultures/globalize.culture.ko.js        |    96 -
 .../lib/cultures/globalize.culture.kok-IN.js    |    72 -
 .../lib/cultures/globalize.culture.kok.js       |    72 -
 .../lib/cultures/globalize.culture.ky-KG.js     |    77 -
 .../lib/cultures/globalize.culture.ky.js        |    77 -
 .../lib/cultures/globalize.culture.lb-LU.js     |    79 -
 .../lib/cultures/globalize.culture.lb.js        |    79 -
 .../lib/cultures/globalize.culture.lo-LA.js     |    72 -
 .../lib/cultures/globalize.culture.lo.js        |    72 -
 .../lib/cultures/globalize.culture.lt-LT.js     |    83 -
 .../lib/cultures/globalize.culture.lt.js        |    83 -
 .../lib/cultures/globalize.culture.lv-LV.js     |    83 -
 .../lib/cultures/globalize.culture.lv.js        |    83 -
 .../lib/cultures/globalize.culture.mi-NZ.js     |    67 -
 .../lib/cultures/globalize.culture.mi.js        |    67 -
 .../lib/cultures/globalize.culture.mk-MK.js     |    76 -
 .../lib/cultures/globalize.culture.mk.js        |    76 -
 .../lib/cultures/globalize.culture.ml-IN.js     |    72 -
 .../lib/cultures/globalize.culture.ml.js        |    72 -
 .../lib/cultures/globalize.culture.mn-Cyrl.js   |    80 -
 .../lib/cultures/globalize.culture.mn-MN.js     |    80 -
 .../cultures/globalize.culture.mn-Mong-CN.js    |    77 -
 .../lib/cultures/globalize.culture.mn-Mong.js   |    77 -
 .../lib/cultures/globalize.culture.mn.js        |    80 -
 .../lib/cultures/globalize.culture.moh-CA.js    |    52 -
 .../lib/cultures/globalize.culture.moh.js       |    52 -
 .../lib/cultures/globalize.culture.mr-IN.js     |    72 -
 .../lib/cultures/globalize.culture.mr.js        |    72 -
 .../lib/cultures/globalize.culture.ms-BN.js     |    74 -
 .../lib/cultures/globalize.culture.ms-MY.js     |    67 -
 .../lib/cultures/globalize.culture.ms.js        |    67 -
 .../lib/cultures/globalize.culture.mt-MT.js     |    68 -
 .../lib/cultures/globalize.culture.mt.js        |    68 -
 .../lib/cultures/globalize.culture.nb-NO.js     |    78 -
 .../lib/cultures/globalize.culture.nb.js        |    78 -
 .../lib/cultures/globalize.culture.ne-NP.js     |    68 -
 .../lib/cultures/globalize.culture.ne.js        |    68 -
 .../lib/cultures/globalize.culture.nl-BE.js     |    79 -
 .../lib/cultures/globalize.culture.nl-NL.js     |    76 -
 .../lib/cultures/globalize.culture.nl.js        |    76 -
 .../lib/cultures/globalize.culture.nn-NO.js     |    78 -
 .../lib/cultures/globalize.culture.nn.js        |    78 -
 .../lib/cultures/globalize.culture.no.js        |    78 -
 .../lib/cultures/globalize.culture.nso-ZA.js    |    67 -
 .../lib/cultures/globalize.culture.nso.js       |    67 -
 .../lib/cultures/globalize.culture.oc-FR.js     |    83 -
 .../lib/cultures/globalize.culture.oc.js        |    83 -
 .../lib/cultures/globalize.culture.or-IN.js     |    70 -
 .../lib/cultures/globalize.culture.or.js        |    70 -
 .../lib/cultures/globalize.culture.pa-IN.js     |    72 -
 .../lib/cultures/globalize.culture.pa.js        |    72 -
 .../lib/cultures/globalize.culture.pl-PL.js     |    84 -
 .../lib/cultures/globalize.culture.pl.js        |    84 -
 .../lib/cultures/globalize.culture.prs-AF.js    |   174 -
 .../lib/cultures/globalize.culture.prs.js       |   174 -
 .../lib/cultures/globalize.culture.ps-AF.js     |   176 -
 .../lib/cultures/globalize.culture.ps.js        |   176 -
 .../lib/cultures/globalize.culture.pt-BR.js     |    79 -
 .../lib/cultures/globalize.culture.pt-PT.js     |    81 -
 .../lib/cultures/globalize.culture.pt.js        |    79 -
 .../lib/cultures/globalize.culture.qut-GT.js    |    69 -
 .../lib/cultures/globalize.culture.qut.js       |    69 -
 .../lib/cultures/globalize.culture.quz-BO.js    |    74 -
 .../lib/cultures/globalize.culture.quz-EC.js    |    73 -
 .../lib/cultures/globalize.culture.quz-PE.js    |    68 -
 .../lib/cultures/globalize.culture.quz.js       |    74 -
 .../lib/cultures/globalize.culture.rm-CH.js     |    77 -
 .../lib/cultures/globalize.culture.rm.js        |    77 -
 .../lib/cultures/globalize.culture.ro-RO.js     |    77 -
 .../lib/cultures/globalize.culture.ro.js        |    77 -
 .../lib/cultures/globalize.culture.ru-RU.js     |    82 -
 .../lib/cultures/globalize.culture.ru.js        |    82 -
 .../lib/cultures/globalize.culture.rw-RW.js     |    65 -
 .../lib/cultures/globalize.culture.rw.js        |    65 -
 .../lib/cultures/globalize.culture.sa-IN.js     |    71 -
 .../lib/cultures/globalize.culture.sa.js        |    71 -
 .../lib/cultures/globalize.culture.sah-RU.js    |    83 -
 .../lib/cultures/globalize.culture.sah.js       |    83 -
 .../lib/cultures/globalize.culture.se-FI.js     |    80 -
 .../lib/cultures/globalize.culture.se-NO.js     |    81 -
 .../lib/cultures/globalize.culture.se-SE.js     |    80 -
 .../lib/cultures/globalize.culture.se.js        |    81 -
 .../lib/cultures/globalize.culture.si-LK.js     |    72 -
 .../lib/cultures/globalize.culture.si.js        |    72 -
 .../lib/cultures/globalize.culture.sk-SK.js     |    85 -
 .../lib/cultures/globalize.culture.sk.js        |    85 -
 .../lib/cultures/globalize.culture.sl-SI.js     |    79 -
 .../lib/cultures/globalize.culture.sl.js        |    79 -
 .../lib/cultures/globalize.culture.sma-NO.js    |    81 -
 .../lib/cultures/globalize.culture.sma-SE.js    |    80 -
 .../lib/cultures/globalize.culture.sma.js       |    80 -
 .../lib/cultures/globalize.culture.smj-NO.js    |    81 -
 .../lib/cultures/globalize.culture.smj-SE.js    |    80 -
 .../lib/cultures/globalize.culture.smj.js       |    80 -
 .../lib/cultures/globalize.culture.smn-FI.js    |    76 -
 .../lib/cultures/globalize.culture.smn.js       |    76 -
 .../lib/cultures/globalize.culture.sms-FI.js    |    80 -
 .../lib/cultures/globalize.culture.sms.js       |    80 -
 .../lib/cultures/globalize.culture.sq-AL.js     |    77 -
 .../lib/cultures/globalize.culture.sq.js        |    77 -
 .../cultures/globalize.culture.sr-Cyrl-BA.js    |    78 -
 .../cultures/globalize.culture.sr-Cyrl-CS.js    |    80 -
 .../cultures/globalize.culture.sr-Cyrl-ME.js    |    80 -
 .../cultures/globalize.culture.sr-Cyrl-RS.js    |    80 -
 .../lib/cultures/globalize.culture.sr-Cyrl.js   |    80 -
 .../cultures/globalize.culture.sr-Latn-BA.js    |    79 -
 .../cultures/globalize.culture.sr-Latn-CS.js    |    80 -
 .../cultures/globalize.culture.sr-Latn-ME.js    |    80 -
 .../cultures/globalize.culture.sr-Latn-RS.js    |    80 -
 .../lib/cultures/globalize.culture.sr-Latn.js   |    80 -
 .../lib/cultures/globalize.culture.sr.js        |    80 -
 .../lib/cultures/globalize.culture.sv-FI.js     |    78 -
 .../lib/cultures/globalize.culture.sv-SE.js     |    78 -
 .../lib/cultures/globalize.culture.sv.js        |    78 -
 .../lib/cultures/globalize.culture.sw-KE.js     |    53 -
 .../lib/cultures/globalize.culture.sw.js        |    53 -
 .../lib/cultures/globalize.culture.syr-SY.js    |    67 -
 .../lib/cultures/globalize.culture.syr.js       |    67 -
 .../lib/cultures/globalize.culture.ta-IN.js     |    73 -
 .../lib/cultures/globalize.culture.ta.js        |    73 -
 .../lib/cultures/globalize.culture.te-IN.js     |    72 -
 .../lib/cultures/globalize.culture.te.js        |    72 -
 .../cultures/globalize.culture.tg-Cyrl-TJ.js    |    84 -
 .../lib/cultures/globalize.culture.tg-Cyrl.js   |    84 -
 .../lib/cultures/globalize.culture.tg.js        |    84 -
 .../lib/cultures/globalize.culture.th-TH.js     |    90 -
 .../lib/cultures/globalize.culture.th.js        |    90 -
 .../lib/cultures/globalize.culture.tk-TM.js     |    78 -
 .../lib/cultures/globalize.culture.tk.js        |    78 -
 .../lib/cultures/globalize.culture.tn-ZA.js     |    67 -
 .../lib/cultures/globalize.culture.tn.js        |    67 -
 .../lib/cultures/globalize.culture.tr-TR.js     |    77 -
 .../lib/cultures/globalize.culture.tr.js        |    77 -
 .../lib/cultures/globalize.culture.tt-RU.js     |    81 -
 .../lib/cultures/globalize.culture.tt.js        |    81 -
 .../cultures/globalize.culture.tzm-Latn-DZ.js   |    77 -
 .../lib/cultures/globalize.culture.tzm-Latn.js  |    77 -
 .../lib/cultures/globalize.culture.tzm.js       |    77 -
 .../lib/cultures/globalize.culture.ug-CN.js     |    75 -
 .../lib/cultures/globalize.culture.ug.js        |    75 -
 .../lib/cultures/globalize.culture.uk-UA.js     |    83 -
 .../lib/cultures/globalize.culture.uk.js        |    83 -
 .../lib/cultures/globalize.culture.ur-PK.js     |   157 -
 .../lib/cultures/globalize.culture.ur.js        |   157 -
 .../cultures/globalize.culture.uz-Cyrl-UZ.js    |    81 -
 .../lib/cultures/globalize.culture.uz-Cyrl.js   |    81 -
 .../cultures/globalize.culture.uz-Latn-UZ.js    |    77 -
 .../lib/cultures/globalize.culture.uz-Latn.js   |    77 -
 .../lib/cultures/globalize.culture.uz.js        |    77 -
 .../lib/cultures/globalize.culture.vi-VN.js     |    73 -
 .../lib/cultures/globalize.culture.vi.js        |    73 -
 .../lib/cultures/globalize.culture.wo-SN.js     |    79 -
 .../lib/cultures/globalize.culture.wo.js        |    79 -
 .../lib/cultures/globalize.culture.xh-ZA.js     |    65 -
 .../lib/cultures/globalize.culture.xh.js        |    65 -
 .../lib/cultures/globalize.culture.yo-NG.js     |    60 -
 .../lib/cultures/globalize.culture.yo.js        |    60 -
 .../lib/cultures/globalize.culture.zh-CHS.js    |    73 -
 .../lib/cultures/globalize.culture.zh-CHT.js    |    72 -
 .../lib/cultures/globalize.culture.zh-CN.js     |    73 -
 .../lib/cultures/globalize.culture.zh-HK.js     |    72 -
 .../lib/cultures/globalize.culture.zh-Hans.js   |    73 -
 .../lib/cultures/globalize.culture.zh-Hant.js   |    72 -
 .../lib/cultures/globalize.culture.zh-MO.js     |    72 -
 .../lib/cultures/globalize.culture.zh-SG.js     |    63 -
 .../lib/cultures/globalize.culture.zh-TW.js     |    99 -
 .../lib/cultures/globalize.culture.zh.js        |    73 -
 .../lib/cultures/globalize.culture.zu-ZA.js     |    66 -
 .../lib/cultures/globalize.culture.zu.js        |    66 -
 .../lib/cultures/globalize.cultures.js          | 24063 -----------------
 .../libs/bower/globalize/lib/globalize.js       |  1586 --
 .../webapp/libs/bower/globalize/package.json    |    56 -
 .../webapp/libs/bower/globalize/test/culture.js |    18 -
 .../libs/bower/globalize/test/cultures.js       |    15 -
 .../bower/globalize/test/findClosestCulture.js  |    62 -
 .../webapp/libs/bower/globalize/test/format.js  |    74 -
 .../webapp/libs/bower/globalize/test/index.html |    26 -
 .../libs/bower/globalize/test/instance.js       |    13 -
 .../webapp/libs/bower/globalize/test/parse.js   |    57 -
 .../libs/bower/globalize/test/qunit/qunit.css   |   226 -
 .../libs/bower/globalize/test/qunit/qunit.js    |  1506 --
 .../libs/bower/globalize/test/testsuite.js      |    19 -
 .../libs/bower/jquery-toggles/css/toggles.css   |    22 -
 .../libs/bower/jquery-toggles/js/toggles.min.js |    11 -
 .../libs/bower/jquery-ui/1.11.4/jquery-ui.css   |   403 -
 .../libs/bower/jquery-ui/1.11.4/jquery-ui.js    |  1356 -
 .../bower/jquery-ui/1.11.4/jquery-ui.min.css    |     7 -
 .../bower/jquery-ui/1.11.4/jquery-ui.min.js     |     6 -
 .../bower/jquery-ui/i18n/jquery-ui-i18n.min.js  |     6 -
 .../i18n/jquery.ui.datepicker-af.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-ar-DZ.min.js      |     4 -
 .../i18n/jquery.ui.datepicker-ar.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-az.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-be.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-bg.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-bs.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-ca.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-cs.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-cy-GB.min.js      |     4 -
 .../i18n/jquery.ui.datepicker-da.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-de.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-el.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-en-AU.min.js      |     4 -
 .../i18n/jquery.ui.datepicker-en-GB.min.js      |     4 -
 .../i18n/jquery.ui.datepicker-en-NZ.min.js      |     4 -
 .../i18n/jquery.ui.datepicker-eo.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-es.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-et.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-eu.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-fa.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-fi.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-fo.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-fr-CA.min.js      |     4 -
 .../i18n/jquery.ui.datepicker-fr-CH.min.js      |     4 -
 .../i18n/jquery.ui.datepicker-fr.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-gl.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-he.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-hi.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-hr.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-hu.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-hy.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-id.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-is.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-it.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-ja.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-ka.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-kk.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-km.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-ko.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-ky.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-lb.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-lt.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-lv.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-mk.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-ml.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-ms.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-nb.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-nl-BE.min.js      |     4 -
 .../i18n/jquery.ui.datepicker-nl.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-nn.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-no.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-pl.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-pt-BR.min.js      |     4 -
 .../i18n/jquery.ui.datepicker-pt.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-rm.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-ro.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-ru.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-sk.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-sl.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-sq.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-sr-SR.min.js      |     4 -
 .../i18n/jquery.ui.datepicker-sr.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-sv.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-ta.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-th.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-tj.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-tr.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-uk.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-vi.min.js         |     4 -
 .../i18n/jquery.ui.datepicker-zh-CN.min.js      |     4 -
 .../i18n/jquery.ui.datepicker-zh-HK.min.js      |     4 -
 .../i18n/jquery.ui.datepicker-zh-TW.min.js      |     4 -
 .../ui-bg_diagonals-thick_18_b81900_40x40.png   |   Bin 457 -> 0 bytes
 .../ui-bg_diagonals-thick_20_666666_40x40.png   |   Bin 351 -> 0 bytes
 .../images/ui-bg_flat_10_000000_40x100.png      |   Bin 244 -> 0 bytes
 .../images/ui-bg_glass_100_f6f6f6_1x400.png     |   Bin 301 -> 0 bytes
 .../images/ui-bg_glass_100_fdf5ce_1x400.png     |   Bin 387 -> 0 bytes
 .../images/ui-bg_glass_65_ffffff_1x400.png      |   Bin 246 -> 0 bytes
 .../ui-bg_gloss-wave_35_f6a828_500x100.png      |   Bin 5854 -> 0 bytes
 .../ui-bg_highlight-soft_100_eeeeee_1x100.png   |   Bin 317 -> 0 bytes
 .../ui-bg_highlight-soft_75_ffe45c_1x100.png    |   Bin 367 -> 0 bytes
 .../images/ui-icons_222222_256x240.png          |   Bin 7006 -> 0 bytes
 .../images/ui-icons_228ef1_256x240.png          |   Bin 4599 -> 0 bytes
 .../images/ui-icons_ef8c08_256x240.png          |   Bin 4599 -> 0 bytes
 .../images/ui-icons_ffd27a_256x240.png          |   Bin 4599 -> 0 bytes
 .../images/ui-icons_ffffff_256x240.png          |   Bin 6468 -> 0 bytes
 .../webapp/libs/bower/jquery-ui/jquery-ui.css   |  1225 -
 .../webapp/libs/bower/jquery-ui/jquery-ui.js    | 16375 -----------
 .../libs/bower/jquery-ui/jquery-ui.min.css      |     7 -
 .../libs/bower/jquery-ui/jquery-ui.min.js       |    13 -
 .../libs/bower/jquery/js/jquery-1.10.2.js       |  9789 -------
 .../libs/bower/jquery/js/jquery-migrate.js      |   511 -
 .../libs/bower/jquery/js/jquery-migrate.min.js  |     3 -
 .../main/webapp/libs/bower/jquery/js/jquery.js  |  9789 -------
 .../webapp/libs/bower/jquery/js/jquery.min.js   |     6 -
 .../webapp/libs/bower/jquery/js/jquery.min.map  |     1 -
 .../moment/js/moment-timezone-with-data.min.js  |     7 -
 .../bower/moment/js/moment-with-langs.min.js    |     9 -
 .../bower/moment/js/moment-with-locales.min.js  |    81 -
 .../webapp/libs/bower/moment/js/moment.min.js   |     7 -
 .../require-handlebars-plugin/js/Handlebars.js  |  2752 --
 .../bower/require-handlebars-plugin/js/hbs.js   |   458 -
 .../js/i18nprecompile.js                        |    45 -
 .../bower/require-handlebars-plugin/js/json2.js |   365 -
 .../webapp/libs/bower/requirejs/js/require.js   |  2053 --
 .../libs/bower/select2/select2-spinner.gif      |   Bin 1849 -> 0 bytes
 .../main/webapp/libs/bower/select2/select2.css  |   615 -
 .../main/webapp/libs/bower/select2/select2.js   |  3512 ---
 .../main/webapp/libs/bower/select2/select2.png  |   Bin 613 -> 0 bytes
 .../webapp/libs/bower/select2/select2x2.png     |   Bin 845 -> 0 bytes
 .../libs/bower/tag-it/css/jquery.tagit.css      |    69 -
 .../main/webapp/libs/bower/tag-it/js/tag-it.js  |   591 -
 .../webapp/libs/bower/tag-it/js/tag-it.min.js   |    17 -
 .../bower/underscore-amd/js/underscore-min.js   |     6 -
 .../libs/bower/underscore-amd/js/underscore.js  |  1284 -
 .../libs/bower/underscore/js/underscore-min.js  |     6 -
 .../libs/bower/underscore/js/underscore.js      |  1276 -
 .../bower/x-editable/css/bootstrap-editable.css |   655 -
 .../webapp/libs/bower/x-editable/img/clear.png  |   Bin 509 -> 0 bytes
 .../bower/x-editable/js/bootstrap-editable.js   |  6901 -----
 .../x-editable/js/bootstrap-editable.min.js     |     7 -
 .../daterangepicker/css/daterangepicker.css     |   415 -
 .../daterangepicker/js/daterangepicker.js       |  1560 --
 .../libs/custom/timezone/WorldMapGenerator.js   |  3474 ---
 .../libs/custom/timezone/jstz-1.0.4.min.js      |     2 -
 .../webapp/libs/fsOverrides/BBFOverrides.js     |   367 -
 .../webapp/libs/other/backbone.fetch-cache.js   |   326 -
 .../webapp/libs/other/backgrid/backgrid.css     |   240 -
 .../main/webapp/libs/other/backgrid/backgrid.js |  2884 --
 .../css/bootstrap-tour.css                      |    72 -
 .../css/bootstrap-tour.min.css                  |    22 -
 .../bootstrap-tour-0.10.3/js/bootstrap-tour.js  |   927 -
 .../js/bootstrap-tour.min.js                    |    22 -
 .../libs/other/custom/visualsearch/.bower.json  |    45 -
 .../custom/visualsearch/models/search_facets.js |    67 -
 .../custom/visualsearch/models/search_query.js  |    70 -
 .../visualsearch/templates/search_box.jst       |     8 -
 .../visualsearch/templates/search_facet.jst     |     9 -
 .../visualsearch/templates/search_input.jst     |     1 -
 .../custom/visualsearch/templates/templates.js  |     7 -
 .../visualsearch/utils/backbone_extensions.js   |    17 -
 .../other/custom/visualsearch/utils/hotkeys.js  |    99 -
 .../custom/visualsearch/utils/inflector.js      |    21 -
 .../visualsearch/utils/jquery_extensions.js     |   197 -
 .../custom/visualsearch/utils/search_parser.js  |    87 -
 .../custom/visualsearch/views/search_box.js     |   458 -
 .../custom/visualsearch/views/search_facet.js   |   442 -
 .../custom/visualsearch/views/search_input.js   |   418 -
 .../other/custom/visualsearch/visualsearch.js   |  1984 --
 .../src/main/webapp/libs/other/d3/d3.js         |  9504 -------
 .../src/main/webapp/libs/other/d3/d3.min.js     |     5 -
 .../src/main/webapp/libs/other/d3/d3.tip.js     |   293 -
 .../webapp/libs/other/dashboard/dashboard.js    |   393 -
 .../libs/other/datepicker/css/datepicker.css    |   224 -
 .../other/datepicker/js/bootstrap-datepicker.js |   834 -
 .../libs/other/datepicker/less/datepicker.less  |   122 -
 .../other/font-awesome/css/font-awesome.css     |  1801 --
 .../other/font-awesome/css/font-awesome.min.css |     4 -
 .../other/font-awesome/fonts/FontAwesome.otf    |   Bin 93888 -> 0 bytes
 .../font-awesome/fonts/fontawesome-webfont.eot  |   Bin 60767 -> 0 bytes
 .../font-awesome/fonts/fontawesome-webfont.svg  |   565 -
 .../font-awesome/fonts/fontawesome-webfont.ttf  |   Bin 122092 -> 0 bytes
 .../font-awesome/fonts/fontawesome-webfont.woff |   Bin 71508 -> 0 bytes
 .../fonts/fontawesome-webfont.woff2             |   Bin 56780 -> 0 bytes
 .../libs/other/font-awesome/less/animated.less  |    34 -
 .../font-awesome/less/bordered-pulled.less      |    16 -
 .../libs/other/font-awesome/less/core.less      |    13 -
 .../other/font-awesome/less/fixed-width.less    |     6 -
 .../other/font-awesome/less/font-awesome.less   |    17 -
 .../libs/other/font-awesome/less/icons.less     |   596 -
 .../libs/other/font-awesome/less/larger.less    |    13 -
 .../libs/other/font-awesome/less/list.less      |    19 -
 .../libs/other/font-awesome/less/mixins.less    |    27 -
 .../libs/other/font-awesome/less/path.less      |    15 -
 .../font-awesome/less/rotated-flipped.less      |    20 -
 .../libs/other/font-awesome/less/stacked.less   |    20 -
 .../libs/other/font-awesome/less/variables.less |   606 -
 .../libs/other/font-awesome/scss/_animated.scss |    34 -
 .../font-awesome/scss/_bordered-pulled.scss     |    16 -
 .../libs/other/font-awesome/scss/_core.scss     |    13 -
 .../other/font-awesome/scss/_fixed-width.scss   |     6 -
 .../libs/other/font-awesome/scss/_icons.scss    |   596 -
 .../libs/other/font-awesome/scss/_larger.scss   |    13 -
 .../libs/other/font-awesome/scss/_list.scss     |    19 -
 .../libs/other/font-awesome/scss/_mixins.scss   |    27 -
 .../libs/other/font-awesome/scss/_path.scss     |    15 -
 .../font-awesome/scss/_rotated-flipped.scss     |    20 -
 .../libs/other/font-awesome/scss/_stacked.scss  |    20 -
 .../other/font-awesome/scss/_variables.scss     |   606 -
 .../other/font-awesome/scss/font-awesome.scss   |    17 -
 .../libs/other/gridster/css/jquery.gridster.css |   121 -
 .../libs/other/gridster/js/jquery.gridster.js   |  3987 ---
 .../libs/other/jquery-cookie/js/bower.json      |    18 -
 .../other/jquery-cookie/js/cookie.jquery.json   |    32 -
 .../other/jquery-cookie/js/jquery.cookie.js     |   117 -
 .../libs/other/jquery-cookie/js/package.json    |    31 -
 .../jquery-ui/css/images/animated-overlay.gif   |   Bin 1738 -> 0 bytes
 .../ui-bg_diagonals-thick_18_b81900_40x40.png   |   Bin 418 -> 0 bytes
 .../ui-bg_diagonals-thick_20_666666_40x40.png   |   Bin 312 -> 0 bytes
 .../css/images/ui-bg_flat_0_aaaaaa_40x100.png   |   Bin 180 -> 0 bytes
 .../css/images/ui-bg_flat_10_000000_40x100.png  |   Bin 205 -> 0 bytes
 .../css/images/ui-bg_glass_100_f6f6f6_1x400.png |   Bin 262 -> 0 bytes
 .../css/images/ui-bg_glass_100_fdf5ce_1x400.png |   Bin 348 -> 0 bytes
 .../css/images/ui-bg_glass_65_ffffff_1x400.png  |   Bin 207 -> 0 bytes
 .../ui-bg_gloss-wave_35_f6a828_500x100.png      |   Bin 5815 -> 0 bytes
 .../ui-bg_highlight-soft_100_eeeeee_1x100.png   |   Bin 278 -> 0 bytes
 .../ui-bg_highlight-soft_75_ffe45c_1x100.png    |   Bin 328 -> 0 bytes
 .../css/images/ui-icons_222222_256x240.png      |   Bin 6922 -> 0 bytes
 .../css/images/ui-icons_228ef1_256x240.png      |   Bin 4549 -> 0 bytes
 .../css/images/ui-icons_454545_256x240.png      |   Bin 4369 -> 0 bytes
 .../css/images/ui-icons_888888_256x240.png      |   Bin 4369 -> 0 bytes
 .../css/images/ui-icons_ef8c08_256x240.png      |   Bin 4549 -> 0 bytes
 .../css/images/ui-icons_ffd27a_256x240.png      |   Bin 4549 -> 0 bytes
 .../css/images/ui-icons_ffffff_256x240.png      |   Bin 6299 -> 0 bytes
 .../other/jquery-ui/css/jquery-ui-1.11.4.css    |   850 -
 .../jquery-ui/css/jquery-ui-1.11.4.min.css      |     7 -
 .../other/jquery-ui/css/jquery-ui-bootstrap.css |  2549 --
 .../libs/other/jquery-ui/js/jquery-ui-1.11.4.js |  8772 ------
 .../other/jquery-ui/js/jquery-ui-1.11.4.min.js  |    10 -
 .../src/main/webapp/libs/other/loadCSS.js       |    73 -
 .../main/webapp/libs/other/noty/css/animate.css |  3158 ---
 .../libs/other/noty/jquery.noty.packaged.js     |  1436 -
 .../libs/other/noty/jquery.noty.packaged.min.js |     1 -
 .../webapp/libs/other/nvd3/css/nv.d3.min.css    |     1 -
 .../src/main/webapp/libs/other/nvd3/js/nv.d3.js | 13304 ---------
 .../main/webapp/libs/other/nvd3/js/nv.d3.min.js |     8 -
 .../libs/other/sparkline/jquery.sparkline.js    |  3054 ---
 .../src/main/webapp/login.html                  |   155 -
 .../src/main/webapp/robots.txt                  |     3 -
 .../src/main/webapp/scripts/App.js              |    87 -
 .../src/main/webapp/scripts/Init.js             |   238 -
 .../src/main/webapp/scripts/Main.js             |    42 -
 .../src/main/webapp/scripts/RegionManager.js    |    83 -
 .../collection_bases/VAuditLogListBase.js       |    73 -
 .../collection_bases/VEventHistoryListBase.js   |    87 -
 .../scripts/collection_bases/VGroupListBase.js  |    82 -
 .../collection_bases/VLogLevelListBase.js       |    96 -
 .../scripts/collection_bases/VLogListBase.js    |   127 -
 .../collection_bases/VNameValueListBase.js      |    57 -
 .../scripts/collection_bases/VNodeListBase.js   |    74 -
 .../scripts/collections/BaseCollection.js       |   172 -
 .../scripts/collections/SchemaFieldList.js      |    29 -
 .../webapp/scripts/collections/VAuditLogList.js |    36 -
 .../scripts/collections/VEventHistoryList.js    |    33 -
 .../webapp/scripts/collections/VGroupList.js    |    36 -
 .../webapp/scripts/collections/VLogLevelList.js |    36 -
 .../main/webapp/scripts/collections/VLogList.js |    36 -
 .../scripts/collections/VNameValueList.js       |    36 -
 .../webapp/scripts/collections/VNodeList.js     |    36 -
 .../src/main/webapp/scripts/communicator.js     |    61 -
 .../webapp/scripts/controllers/Controller.js    |   240 -
 .../webapp/scripts/model_bases/VAuditLogBase.js |    61 -
 .../scripts/model_bases/VCommonModelBase.js     |    51 -
 .../scripts/model_bases/VEventHistoryBase.js    |    51 -
 .../scripts/model_bases/VGraphInfoBase.js       |    62 -
 .../webapp/scripts/model_bases/VGroupBase.js    |    51 -
 .../main/webapp/scripts/model_bases/VLogBase.js |    51 -
 .../webapp/scripts/model_bases/VLogLevelBase.js |    51 -
 .../scripts/model_bases/VNameValueBase.js       |    51 -
 .../webapp/scripts/model_bases/VNodeBase.js     |    51 -
 .../scripts/model_bases/VUserFilterBase.js      |    51 -
 .../src/main/webapp/scripts/models/BaseModel.js |   110 -
 .../src/main/webapp/scripts/models/VAppState.js |    44 -
 .../src/main/webapp/scripts/models/VAuditLog.js |    47 -
 .../main/webapp/scripts/models/VCommonModel.js  |    48 -
 .../main/webapp/scripts/models/VEventHistory.js |    48 -
 .../main/webapp/scripts/models/VGraphInfo.js    |    53 -
 .../src/main/webapp/scripts/models/VGroup.js    |    53 -
 .../src/main/webapp/scripts/models/VLog.js      |    66 -
 .../src/main/webapp/scripts/models/VLogLevel.js |    47 -
 .../main/webapp/scripts/models/VNameValue.js    |    47 -
 .../src/main/webapp/scripts/models/VNode.js     |    48 -
 .../main/webapp/scripts/models/VUserFilter.js   |    51 -
 .../main/webapp/scripts/modules/Overrides.js    |   234 -
 .../src/main/webapp/scripts/modules/Vent.js     |    26 -
 .../scripts/modules/globalize/message/en.js     |    79 -
 .../main/webapp/scripts/prelogin/Prelogin.js    |   130 -
 .../src/main/webapp/scripts/utils/Enums.js      |    32 -
 .../src/main/webapp/scripts/utils/Globals.js    |    91 -
 .../main/webapp/scripts/utils/LangSupport.js    |   151 -
 .../src/main/webapp/scripts/utils/Tour.js       |   461 -
 .../src/main/webapp/scripts/utils/Utils.js      |  1241 -
 .../src/main/webapp/scripts/utils/ViewUtils.js  |   266 -
 .../webapp/scripts/utils/XATemplateHelpers.js   |   170 -
 .../scripts/views/audit/AuditAggregatedView.js  |   416 -
 .../scripts/views/audit/AuditTabLayoutView.js   |   429 -
 .../scripts/views/common/AdvanceSearchLayout.js |   146 -
 .../webapp/scripts/views/common/BreadCrumbs.js  |    83 -
 .../scripts/views/common/CustomBackgrid.js      |   284 -
 .../scripts/views/common/DatePickerLayout.js    |   228 -
 .../webapp/scripts/views/common/ErrorView.js    |   100 -
 .../scripts/views/common/EventHistoryLayout.js  |   486 -
 .../main/webapp/scripts/views/common/Footer.js  |    80 -
 .../main/webapp/scripts/views/common/Header.js  |   481 -
 .../webapp/scripts/views/common/JBDialog.js     |   211 -
 .../scripts/views/common/LogSnapShotLayout.js   |   141 -
 .../webapp/scripts/views/common/ProfileBar.js   |   105 -
 .../main/webapp/scripts/views/common/Spinner.js |    85 -
 .../webapp/scripts/views/common/TableLayout.js  |   405 -
 .../webapp/scripts/views/common/TimerView.js    |   126 -
 .../main/webapp/scripts/views/common/TopNav.js  |    93 -
 .../dashboard/BubbleGraphTableLayoutView.js     |   716 -
 .../views/dashboard/ComponentListView.js        |   319 -
 .../scripts/views/dashboard/ComponentsView.js   |    98 -
 .../scripts/views/dashboard/DashboardView.js    |   184 -
 .../views/dashboard/GridTableLayoutView.js      |   219 -
 .../scripts/views/dashboard/HostListView.js     |   356 -
 .../webapp/scripts/views/dashboard/HostsView.js |    98 -
 .../scripts/views/dashboard/LogDetailView.js    |   249 -
 .../scripts/views/dashboard/LogLevelBoxView.js  |   155 -
 .../scripts/views/dashboard/LogLevelView.js     |   118 -
 .../scripts/views/dashboard/MainLayoutView.js   |   670 -
 .../views/dialog/ApplySearchFilterView.js       |   214 -
 .../scripts/views/dialog/DetailLogFileView.js   |   167 -
 .../dialog/GlobalExclusionCompositeView.js      |   141 -
 .../views/dialog/GlobalExclusionItemView.js     |    84 -
 .../views/dialog/GridGraphSettingView.js        |   476 -
 .../views/dialog/SaveSearchFilterView.js        |   120 -
 .../scripts/views/dialog/TimeZoneChangeView.js  |   101 -
 .../views/filter/CreateLogfeederFilterView.js   |   383 -
 .../scripts/views/graphs/GraphLayoutView.js     |   559 -
 .../scripts/views/graphs/GridGraphLayoutView.js |   594 -
 .../scripts/views/tabs/ComparisonLayoutView.js  |    93 -
 .../webapp/scripts/views/tabs/ComparisonView.js |   242 -
 .../views/tabs/EventHistoryLayoutView.js        |   506 -
 .../scripts/views/tabs/ExportLogFileView.js     |    50 -
 .../views/tabs/HierarchyTabLayoutView.js        |   429 -
 .../scripts/views/tabs/HostInfoTabLayoutView.js |   178 -
 .../webapp/scripts/views/tabs/LogFileView.js    |   864 -
 .../main/webapp/scripts/views/tabs/TreeView.js  |   365 -
 .../scripts/views/tabs/VisualSearchView.js      |   202 -
 .../troubleshoot/TroubleShootLayoutView.js      |   553 -
 .../src/main/webapp/static/schema_fields.json   |    90 -
 .../src/main/webapp/styles/animate.css          |  3272 ---
 .../src/main/webapp/styles/app-font.css         |    64 -
 .../src/main/webapp/styles/bootstrap.css        |  6422 -----
 .../src/main/webapp/styles/bootstrap.min.css    |  6422 -----
 .../main/webapp/styles/custom/visualsearch.css  |   369 -
 .../src/main/webapp/styles/style.css            |  2964 --
 .../src/main/webapp/styles/style_v2.css         |  2596 --
 .../audit/AuditAggregatedView_tmpl.html         |    54 -
 .../audit/AuditTabLayoutView_tmpl.html          |   100 -
 .../common/AdvanceSearchLayout_tmpl.html        |    30 -
 .../templates/common/DatePickerLayout_tmpl.html |    29 -
 .../webapp/templates/common/ErrorView_tmpl.html |    28 -
 .../common/EventHistoryItemView_tmpl.html       |    32 -
 .../common/EventHistoryLayout_tmpl.html         |    44 -
 .../webapp/templates/common/Footer_tmpl.html    |    42 -
 .../webapp/templates/common/Header_tmpl.html    |    97 -
 .../common/LogSnapShotLayout_tmpl.html          |    23 -
 .../templates/common/TableLayout_tmpl.html      |    37 -
 .../webapp/templates/common/TimerView_tmpl.html |    25 -
 .../webapp/templates/common/TopNav_tmpl.html    |    52 -
 .../webapp/templates/common/breadcrumbs.html    |    46 -
 .../webapp/templates/common/formInputItem.html  |    54 -
 .../templates/common/formInputItemList.html     |    42 -
 .../webapp/templates/common/loading_tmpl.html   |    45 -
 .../BubbleGraphTableLayoutView_tmpl.html        |    79 -
 .../dashboard/ComponentListView_tmpl.html       |    35 -
 .../dashboard/ComponentsView_tmpl.html          |    57 -
 .../templates/dashboard/DashboardView_tmpl.html |   122 -
 .../dashboard/GridTableLayoutView_tmpl.html     |    28 -
 .../templates/dashboard/HostListView_tmpl.html  |    48 -
 .../templates/dashboard/HostsView_tmpl.html     |    56 -
 .../templates/dashboard/LogDetailView_tmpl.html |    75 -
 .../dashboard/LogLevelBoxView_tmpl.html         |    49 -
 .../templates/dashboard/LogLevelView_tmpl.html  |   110 -
 .../dashboard/MainLayoutView_tmpl.html          |   111 -
 .../dialog/ApplySearchFilterView_tmpl.html      |    30 -
 .../dialog/DetailLogFileView_tmpl.html          |    22 -
 .../GlobalExclusionCompositeView_tmpl.html      |    32 -
 .../dialog/GlobalExclusionItemView_tmpl.html    |    26 -
 .../dialog/GridGraphSettingView_tmpl.html       |   284 -
 .../dialog/SaveSearchFilterView_tmpl.html       |    70 -
 .../dialog/TimeZoneChangeView_tmpl.html         |   475 -
 .../filter/CreateLogfeederFilter_tmpl.html      |    53 -
 .../templates/graphs/GraphLayoutView_tmpl.html  |    50 -
 .../graphs/GridGraphLayoutView_tmpl.html        |    28 -
 .../src/main/webapp/templates/graphs/backup.js  |   586 -
 .../main/webapp/templates/helpers/Helpers.js    |   520 -
 .../tabs/ComparisonLayoutView_tmpl.html         |    20 -
 .../templates/tabs/ComparisonView_tmpl.html     |    56 -
 .../tabs/EventHistoryLayoutView_tmpl.html       |    45 -
 .../templates/tabs/ExportLogFileView_tmpl.html  |    46 -
 .../tabs/HierarchyTabLayoutView_tmpl.html       |   124 -
 .../tabs/HostInfoTabLayoutView_tmpl.html        |    46 -
 .../webapp/templates/tabs/LogFileView_tmpl.html |   122 -
 .../webapp/templates/tabs/TreeView_tmpl.html    |    54 -
 .../templates/tabs/VisualSearchView_tmpl.html   |    20 -
 .../TroubleShootLayoutView_tmpl.html            |   150 -
 .../main/webapp/themejs/1.3.0/bootstrap.min.js  |    19 -
 .../common/LogSearchContextUtilTest.java        |    51 -
 .../common/ManageStartEndTimeTest.java          |    35 -
 .../converter/AbstractRequestConverterTest.java |    42 -
 .../AuditBarGraphRequestQueryConverterTest.java |    62 -
 ...AuditComponentRequestQueryConverterTest.java |    66 -
 .../converter/AuditLogRequestConverterTest.java |    64 -
 ...ditServiceLoadRequestQueryConverterTest.java |    61 -
 ...BaseServiceLogRequestQueryConverterTest.java |    72 -
 .../FieldAuditLogRequestQueryConverterTest.java |    61 -
 .../HostLogFilesRequestQueryConverterTest.java  |    62 -
 .../ServiceLogAnyGraphRequestConverterTest.java |    62 -
 ...ComponentLevelRequestQueryConverterTest.java |    66 -
 ...ComponentRequestFacetQueryConverterTest.java |    67 -
 ...eLogLevelCountRequestQueryConverterTest.java |    62 -
 ...LevelDateRangeRequestQueryConverterTest.java |    68 -
 ...ceLogTreeRequestFacetQueryConverterTest.java |    64 -
 ...ceLogTruncatedRequestQueryConverterTest.java |    64 -
 .../StringFieldFacetQueryConverterTest.java     |    48 -
 .../UserConfigRequestQueryConverterTest.java    |    49 -
 .../UserExportRequestQueryConverterTest.java    |    63 -
 .../LogsearchAuthenticationProviderTest.java    |   205 -
 ...xternalServerAuthenticationProviderTest.java |   185 -
 ...LogsearchFileAuthenticationProviderTest.java |   231 -
 ...LogsearchLdapAuthenticationProviderTest.java |    61 -
 ...gsearchSimpleAuthenticationProviderTest.java |   118 -
 .../src/test/resources/HadoopServiceConfig.json |    17 -
 .../src/test/resources/logsearch.properties     |    33 -
 .../src/test/resources/user_pass.json           |     8 -
 .../ambari-logsearch-server/.gitignore          |     9 +
 .../ambari-logsearch-server/README.md           |    55 +
 .../ambari-logsearch-server/build.properties    |    23 +
 .../ambari-logsearch-server/build.xml           |    59 +
 .../ambari-logsearch-server/pom.xml             |   745 +
 ambari-logsearch/ambari-logsearch-server/run.sh |    24 +
 .../configsets/audit_logs/conf/admin-extra.html |    24 +
 .../conf/admin-extra.menu-bottom.html           |    25 +
 .../audit_logs/conf/admin-extra.menu-top.html   |    25 +
 .../main/configsets/audit_logs/conf/elevate.xml |    38 +
 .../configsets/audit_logs/conf/enumsConfig.xml  |    28 +
 .../configsets/audit_logs/conf/managed-schema   |   125 +
 .../configsets/audit_logs/conf/solrconfig.xml   |  1887 ++
 .../hadoop_logs/conf/admin-extra.html           |    24 +
 .../conf/admin-extra.menu-bottom.html           |    25 +
 .../hadoop_logs/conf/admin-extra.menu-top.html  |    25 +
 .../configsets/hadoop_logs/conf/elevate.xml     |    38 +
 .../configsets/hadoop_logs/conf/enumsConfig.xml |    28 +
 .../configsets/hadoop_logs/conf/managed-schema  |   120 +
 .../configsets/hadoop_logs/conf/solrconfig.xml  |  1887 ++
 .../configsets/history/conf/admin-extra.html    |    24 +
 .../history/conf/admin-extra.menu-bottom.html   |    25 +
 .../history/conf/admin-extra.menu-top.html      |    25 +
 .../main/configsets/history/conf/elevate.xml    |    38 +
 .../main/configsets/history/conf/managed-schema |    98 +
 .../main/configsets/history/conf/solrconfig.xml |  1873 ++
 .../src/main/configsets/solr.xml                |    19 +
 .../org/apache/ambari/logsearch/LogSearch.java  |   176 +
 .../logsearch/common/ACLPropertiesSplitter.java |    70 +
 .../logsearch/common/ExternalServerClient.java  |    83 +
 .../common/HadoopServiceConfigHelper.java       |    80 +
 .../logsearch/common/LogSearchConstants.java    |   111 +
 .../logsearch/common/LogSearchContext.java      |    62 +
 .../apache/ambari/logsearch/common/LogType.java |    34 +
 .../logsearch/common/ManageStartEndTime.java    |    55 +
 .../apache/ambari/logsearch/common/Marker.java  |    29 +
 .../ambari/logsearch/common/MessageData.java    |   165 +
 .../ambari/logsearch/common/MessageEnums.java   |    72 +
 .../logsearch/common/PropertiesHelper.java      |   138 +
 .../ambari/logsearch/common/StatusMessage.java  |    40 +
 .../ambari/logsearch/common/VResponse.java      |   164 +
 .../logsearch/common/XMLPropertiesHelper.java   |    79 +
 .../ambari/logsearch/conf/ApiDocConfig.java     |    55 +
 .../logsearch/conf/ApplicationConfig.java       |    58 +
 .../ambari/logsearch/conf/AuthPropsConfig.java  |   159 +
 .../conf/LogSearchHttpHeaderConfig.java         |    70 +
 .../ambari/logsearch/conf/SecurityConfig.java   |   209 +
 .../logsearch/conf/SolrAuditLogPropsConfig.java |   168 +
 .../ambari/logsearch/conf/SolrConfig.java       |    76 +
 .../conf/SolrConnectionPropsConfig.java         |    78 +
 .../logsearch/conf/SolrKerberosConfig.java      |    48 +
 .../ambari/logsearch/conf/SolrPropsConfig.java  |    61 +
 .../conf/SolrServiceLogPropsConfig.java         |    91 +
 .../logsearch/conf/SolrUserPropsConfig.java     |   116 +
 .../conf/global/SolrAuditLogsState.java         |    68 +
 .../conf/global/SolrCollectionState.java        |    33 +
 .../conf/global/SolrServiceLogsState.java       |    59 +
 .../conf/global/SolrUserConfigState.java        |    60 +
 .../configurer/LogfeederFilterConfigurer.java   |    66 +
 .../configurer/SolrAuditAliasConfigurer.java    |   136 +
 .../configurer/SolrCollectionConfigurer.java    |   230 +
 .../logsearch/configurer/SolrConfigurer.java    |    23 +
 .../AbstractAuditLogRequestQueryConverter.java  |    59 +
 .../converter/AbstractConverterAware.java       |    47 +
 .../AbstractDateRangeFacetQueryConverter.java   |    55 +
 .../AbstractLogRequestFacetQueryConverter.java  |    88 +
 .../AbstractLogRequestQueryConverter.java       |    42 +
 .../AbstractOperationHolderConverter.java       |   180 +
 .../AbstractSearchRequestQueryConverter.java    |    72 +
 ...actServiceLogRequestFacetQueryConverter.java |    44 +
 ...AbstractServiceLogRequestQueryConverter.java |    44 +
 .../AuditBarGraphRequestQueryConverter.java     |    55 +
 .../AuditComponentsRequestQueryConverter.java   |    53 +
 .../AuditLogRequestQueryConverter.java          |    44 +
 .../AuditServiceLoadRequestQueryConverter.java  |    53 +
 .../BaseServiceLogRequestQueryConverter.java    |    85 +
 .../FieldAuditLogRequestQueryConverter.java     |    54 +
 .../HostLogFilesRequestQueryConverter.java      |    61 +
 ...ServiceLogAnyGraphRequestQueryConverter.java |    60 +
 ...eLogComponentLevelRequestQueryConverter.java |    53 +
 ...eLogComponentRequestFacetQueryConverter.java |    55 +
 ...rviceLogLevelCountRequestQueryConverter.java |    68 +
 ...eLogLevelDateRangeRequestQueryConverter.java |    69 +
 ...erviceLogTreeRequestFacetQueryConverter.java |    54 +
 ...erviceLogTruncatedRequestQueryConverter.java |    95 +
 .../StringFieldFacetQueryConverter.java         |    44 +
 .../UserConfigRequestQueryConverter.java        |    67 +
 .../UserExportRequestQueryConverter.java        |    55 +
 .../ambari/logsearch/dao/AuditSolrDao.java      |    94 +
 .../logsearch/dao/ServiceLogsSolrDao.java       |    85 +
 .../ambari/logsearch/dao/SolrDaoBase.java       |   156 +
 .../logsearch/dao/SolrSchemaFieldDao.java       |   213 +
 .../ambari/logsearch/dao/UserConfigSolrDao.java |   196 +
 .../apache/ambari/logsearch/dao/UserDao.java    |   150 +
 .../ambari/logsearch/doc/DocConstants.java      |   125 +
 .../ambari/logsearch/handler/ACLHandler.java    |    97 +
 .../handler/CreateCollectionHandler.java        |   222 +
 .../handler/ListCollectionHandler.java          |    51 +
 .../handler/ReloadCollectionHandler.java        |    45 +
 .../logsearch/handler/SolrZkRequestHandler.java |    26 +
 .../handler/UploadConfigurationHandler.java     |   151 +
 .../logsearch/manager/AuditLogsManager.java     |   223 +
 .../logsearch/manager/JsonManagerBase.java      |    69 +
 .../ambari/logsearch/manager/ManagerBase.java   |    95 +
 .../ambari/logsearch/manager/PublicManager.java |    48 +
 .../logsearch/manager/ServiceLogsManager.java   |   617 +
 .../logsearch/manager/SessionManager.java       |    77 +
 .../logsearch/manager/UserConfigManager.java    |   223 +
 .../model/common/LogFeederDataMap.java          |    50 +
 .../model/common/LogfeederFilterData.java       |    87 +
 .../model/request/AnyGraphParamDefinition.java  |    44 +
 .../model/request/BundleIdParamDefinition.java  |    32 +
 .../model/request/ClustersParamDefinition.java  |    32 +
 .../request/CommonSearchParamDefinition.java    |    69 +
 .../model/request/DateRangeParamDefinition.java |    38 +
 .../model/request/FieldParamDefinition.java     |    32 +
 .../model/request/FormatParamDefinition.java    |    32 +
 .../request/HostComponentParamDefinition.java   |    38 +
 .../model/request/LastPageParamDefinition.java  |    31 +
 .../model/request/LogParamDefinition.java       |    62 +
 .../request/LogTruncatedParamDefinition.java    |    44 +
 .../logsearch/model/request/SearchRequest.java  |    22 +
 .../request/ServiceLogParamDefinition.java      |    44 +
 .../ServiceLogSearchParamDefinition.java        |    50 +
 .../model/request/TopParamDefinition.java       |    31 +
 .../model/request/UnitParamDefinition.java      |    33 +
 .../request/UserConfigParamDefinition.java      |    38 +
 .../model/request/UtcOffsetParamDefinition.java |    32 +
 .../request/impl/AuditBarGraphRequest.java      |    40 +
 .../request/impl/AuditComponentRequest.java     |    25 +
 .../model/request/impl/AuditLogRequest.java     |    40 +
 .../request/impl/AuditServiceLoadRequest.java   |    25 +
 .../model/request/impl/BaseLogRequest.java      |   132 +
 .../request/impl/BaseServiceLogRequest.java     |   107 +
 .../model/request/impl/CommonSearchRequest.java |   141 +
 .../request/impl/FieldAuditBarGraphRequest.java |    40 +
 .../request/impl/FieldAuditLogRequest.java      |    55 +
 .../model/request/impl/HostLogFilesRequest.java |    71 +
 .../request/impl/ServiceAnyGraphRequest.java    |    81 +
 .../model/request/impl/ServiceGraphRequest.java |    40 +
 .../impl/ServiceLogAggregatedInfoRequest.java   |    25 +
 .../impl/ServiceLogComponentHostRequest.java    |    25 +
 .../impl/ServiceLogComponentLevelRequest.java   |    25 +
 .../request/impl/ServiceLogExportRequest.java   |    54 +
 .../impl/ServiceLogHostComponentRequest.java    |    39 +
 .../impl/ServiceLogLevelCountRequest.java       |    25 +
 .../model/request/impl/ServiceLogRequest.java   |    93 +
 .../impl/ServiceLogTruncatedRequest.java        |    66 +
 .../model/request/impl/UserConfigRequest.java   |    53 +
 .../model/request/impl/UserExportRequest.java   |    40 +
 .../logsearch/model/response/AuditLogData.java  |   149 +
 .../model/response/AuditLogResponse.java        |    48 +
 .../logsearch/model/response/BarGraphData.java  |    53 +
 .../response/BarGraphDataListResponse.java      |    42 +
 .../logsearch/model/response/CommonLogData.java |   118 +
 .../model/response/ComponentTypeLogData.java    |    32 +
 .../logsearch/model/response/CountData.java     |    50 +
 .../model/response/CountDataListResponse.java   |    48 +
 .../logsearch/model/response/GraphData.java     |    64 +
 .../model/response/GraphDataListResponse.java   |    39 +
 .../model/response/GroupListResponse.java       |    48 +
 .../logsearch/model/response/HostLogData.java   |    30 +
 .../model/response/HostLogFilesResponse.java    |    39 +
 .../logsearch/model/response/LogData.java       |    25 +
 .../logsearch/model/response/LogFileData.java   |    48 +
 .../model/response/LogFileDataListResponse.java |    48 +
 .../model/response/LogListResponse.java         |    27 +
 .../model/response/LogSearchResponse.java       |    22 +
 .../logsearch/model/response/NameValueData.java |    62 +
 .../response/NameValueDataListResponse.java     |    49 +
 .../logsearch/model/response/NodeData.java      |   110 +
 .../model/response/NodeListResponse.java        |    50 +
 .../model/response/SearchResponse.java          |   110 +
 .../model/response/ServiceLogData.java          |    63 +
 .../model/response/ServiceLogResponse.java      |    48 +
 .../logsearch/model/response/TemplateData.java  |    36 +
 .../model/response/UserConfigData.java          |    97 +
 .../response/UserConfigDataListResponse.java    |    55 +
 .../logsearch/rest/AuditLogsResource.java       |   120 +
 .../ambari/logsearch/rest/PublicResource.java   |    48 +
 .../logsearch/rest/ServiceLogsResource.java     |   222 +
 .../ambari/logsearch/rest/StatusResource.java   |    91 +
 .../logsearch/rest/UserConfigResource.java      |   100 +
 .../ambari/logsearch/service/UserService.java   |    44 +
 .../logsearch/solr/ResponseDataGenerator.java   |   452 +
 .../ambari/logsearch/solr/SolrConstants.java    |   112 +
 .../logsearch/solr/model/SolrAuditLogData.java  |   341 +
 .../logsearch/solr/model/SolrCommonLogData.java |   292 +
 .../solr/model/SolrComponentTypeLogData.java    |    40 +
 .../logsearch/solr/model/SolrHostLogData.java   |    40 +
 .../solr/model/SolrServiceLogData.java          |   120 +
 .../ambari/logsearch/util/CommonUtil.java       |    41 +
 .../apache/ambari/logsearch/util/DateUtil.java  |   142 +
 .../ambari/logsearch/util/DownloadUtil.java     |   176 +
 .../apache/ambari/logsearch/util/FileUtil.java  |    72 +
 .../apache/ambari/logsearch/util/JSONUtil.java  |   245 +
 .../ambari/logsearch/util/RESTErrorUtil.java    |    68 +
 .../apache/ambari/logsearch/util/SSLUtil.java   |   363 +
 .../apache/ambari/logsearch/util/SolrUtil.java  |   258 +
 .../apache/ambari/logsearch/util/WebUtil.java   |    65 +
 .../LogsearchAuthFailureHandler.java            |    43 +
 .../LogsearchAuthSuccessHandler.java            |    41 +
 .../LogsearchLogoutSuccessHandler.java          |    41 +
 .../AbstractLogsearchGlobalStateFilter.java     |   100 +
 .../filters/LogsearchAuditLogsStateFilter.java  |    51 +
 .../LogsearchAuthenticationEntryPoint.java      |    50 +
 .../web/filters/LogsearchCorsFilter.java        |    59 +
 .../web/filters/LogsearchJWTFilter.java         |   181 +
 .../LogsearchKRBAuthenticationFilter.java       |   338 +
 .../web/filters/LogsearchKrbFilter.java         |   581 +
 ...LogsearchSecurityContextFormationFilter.java |   106 +
 .../LogsearchServiceLogsStateFilter.java        |    51 +
 .../filters/LogsearchUserConfigStateFilter.java |    52 +
 ...rchUsernamePasswordAuthenticationFilter.java |    45 +
 .../logsearch/web/filters/NoServletContext.java |   300 +
 .../web/listener/LogSearchSessionListener.java  |    48 +
 .../web/model/JWTAuthenticationToken.java       |    53 +
 .../ambari/logsearch/web/model/Privilege.java   |    42 +
 .../apache/ambari/logsearch/web/model/Role.java |    64 +
 .../apache/ambari/logsearch/web/model/User.java |   167 +
 .../logsearch/web/security/LdapProperties.java  |   365 +
 .../web/security/LdapPropertyName.java          |    58 +
 .../ambari/logsearch/web/security/LdapUtil.java |   115 +
 ...LogsearchAbstractAuthenticationProvider.java |    48 +
 .../LogsearchAuthenticationProvider.java        |   117 +
 ...rchExternalServerAuthenticationProvider.java |   139 +
 .../LogsearchFileAuthenticationProvider.java    |    88 +
 .../LogsearchLdapAuthenticationProvider.java    |   187 +
 .../LogsearchLdapBindAuthenticator.java         |    46 +
 .../LogsearchSimpleAuthenticationProvider.java  |    61 +
 .../src/main/resources/HadoopServiceConfig.json |   488 +
 .../src/main/resources/default.properties       |    29 +
 .../src/main/resources/log4j.xml                |   119 +
 .../src/main/resources/logsearch-admin-site.xml |   116 +
 .../src/main/resources/logsearch.properties     |    63 +
 .../src/main/resources/swagger/swagger.html     |   115 +
 .../main/resources/templates/audit_log_txt.ftl  |    42 +
 .../resources/templates/service_log_txt.ftl     |    36 +
 .../src/main/resources/user_pass.json           |     8 +
 .../src/main/scripts/run.sh                     |   100 +
 .../src/main/scripts/stop.sh                    |    44 +
 .../common/LogSearchContextUtilTest.java        |    51 +
 .../common/ManageStartEndTimeTest.java          |    35 +
 .../converter/AbstractRequestConverterTest.java |    43 +
 .../AuditBarGraphRequestQueryConverterTest.java |    63 +
 ...AuditComponentRequestQueryConverterTest.java |    66 +
 .../converter/AuditLogRequestConverterTest.java |    64 +
 ...ditServiceLoadRequestQueryConverterTest.java |    61 +
 ...BaseServiceLogRequestQueryConverterTest.java |    72 +
 .../FieldAuditLogRequestQueryConverterTest.java |    61 +
 .../HostLogFilesRequestQueryConverterTest.java  |    62 +
 .../ServiceLogAnyGraphRequestConverterTest.java |    63 +
 ...ComponentLevelRequestQueryConverterTest.java |    66 +
 ...ComponentRequestFacetQueryConverterTest.java |    67 +
 ...eLogLevelCountRequestQueryConverterTest.java |    62 +
 ...LevelDateRangeRequestQueryConverterTest.java |    68 +
 ...ceLogTreeRequestFacetQueryConverterTest.java |    64 +
 ...ceLogTruncatedRequestQueryConverterTest.java |    64 +
 .../StringFieldFacetQueryConverterTest.java     |    48 +
 .../UserConfigRequestQueryConverterTest.java    |    50 +
 .../UserExportRequestQueryConverterTest.java    |    64 +
 .../LogsearchAuthenticationProviderTest.java    |   205 +
 ...xternalServerAuthenticationProviderTest.java |   185 +
 ...LogsearchFileAuthenticationProviderTest.java |   231 +
 ...LogsearchLdapAuthenticationProviderTest.java |    61 +
 ...gsearchSimpleAuthenticationProviderTest.java |   118 +
 .../src/test/resources/HadoopServiceConfig.json |    17 +
 .../src/test/resources/logsearch.properties     |    33 +
 .../src/test/resources/user_pass.json           |     8 +
 .../ambari-logsearch-solr-client/build.xml      |    56 -
 .../ambari-logsearch-solr-client/pom.xml        |   125 -
 .../logsearch/solr/AmbariSolrCloudCLI.java      |   565 -
 .../logsearch/solr/AmbariSolrCloudClient.java   |   334 -
 .../solr/AmbariSolrCloudClientBuilder.java      |   215 -
 .../solr/AmbariSolrCloudClientException.java    |    28 -
 .../solr/commands/AbstractRetryCommand.java     |    58 -
 .../solr/commands/AbstractSolrRetryCommand.java |    53 -
 .../commands/AbstractStateFileZkCommand.java    |    42 -
 .../AbstractZookeeperConfigCommand.java         |    44 -
 .../commands/AbstractZookeeperRetryCommand.java |    40 -
 .../solr/commands/CheckConfigZkCommand.java     |    34 -
 .../solr/commands/CheckZnodeZkCommand.java      |    45 -
 .../solr/commands/CreateCollectionCommand.java  |    62 -
 .../solr/commands/CreateShardCommand.java       |    51 -
 .../solr/commands/CreateSolrZnodeZkCommand.java |    42 -
 .../solr/commands/DownloadConfigZkCommand.java  |    47 -
 .../EnableKerberosPluginSolrZkCommand.java      |    88 -
 .../solr/commands/GetShardsCommand.java         |    39 -
 .../solr/commands/GetSolrHostsCommand.java      |    53 -
 .../solr/commands/GetStateFileZkCommand.java    |    43 -
 .../solr/commands/ListCollectionCommand.java    |    49 -
 .../solr/commands/SecureSolrZNodeZkCommand.java |    87 -
 .../solr/commands/SecureZNodeZkCommand.java     |    49 -
 .../commands/SetClusterPropertyZkCommand.java   |    40 -
 .../solr/commands/UpdateStateFileZkCommand.java |    84 -
 .../solr/commands/UploadConfigZkCommand.java    |    42 -
 .../logsearch/solr/domain/AmbariSolrState.java  |    26 -
 .../ambari/logsearch/solr/util/AclUtils.java    |    87 -
 .../ambari/logsearch/solr/util/ShardUtils.java  |    71 -
 .../src/main/resources/log4j.properties         |    31 -
 .../src/main/resources/solrCloudCli.sh          |    20 -
 .../solr/AmbariSolrCloudClientTest.java         |   134 -
 ambari-logsearch/ambari-logsearch-web/.bowerrc  |     3 +
 .../ambari-logsearch-web/Gruntfile.js           |   139 +
 .../ambari-logsearch-web/LICENSE.txt            |   339 +
 .../ambari-logsearch-web/bower.json             |    39 +
 .../ambari-logsearch-web/build.properties       |    12 +
 ambari-logsearch/ambari-logsearch-web/build.xml |    37 +
 .../ambari-logsearch-web/package.json           |    24 +
 ambari-logsearch/ambari-logsearch-web/pom.xml   |   186 +
 .../src/main/webapp/404.html                    |   170 +
 .../src/main/webapp/ajax_failure.jsp            |    31 +
 .../src/main/webapp/ajax_success.html           |    26 +
 .../src/main/webapp/favicon.ico                 |   Bin 0 -> 1150 bytes
 .../webapp/fonts/fontawesome/FontAwesome.otf    |   Bin 0 -> 61896 bytes
 .../fonts/fontawesome/fontawesome-webfont.eot   |   Bin 0 -> 37405 bytes
 .../fonts/fontawesome/fontawesome-webfont.svg   |   415 +
 .../fonts/fontawesome/fontawesome-webfont.ttf   |   Bin 0 -> 79076 bytes
 .../fonts/fontawesome/fontawesome-webfont.woff  |   Bin 0 -> 43572 bytes
 .../fonts/fontopensans/open-sans-300.woff       |   Bin 0 -> 22656 bytes
 .../fonts/fontopensans/open-sans-300i.woff      |   Bin 0 -> 21524 bytes
 .../fonts/fontopensans/open-sans-400.woff       |   Bin 0 -> 21956 bytes
 .../fonts/fontopensans/open-sans-400i.woff      |   Bin 0 -> 21092 bytes
 .../fonts/fontopensans/open-sans-600.woff       |   Bin 0 -> 22604 bytes
 .../fonts/fontopensans/open-sans-600i.woff      |   Bin 0 -> 21252 bytes
 .../fonts/fontopensans/open-sans-700.woff       |   Bin 0 -> 22748 bytes
 .../fonts/fontopensans/open-sans-700i.woff      |   Bin 0 -> 21184 bytes
 .../main/webapp/images/System-Settings-icon.png |   Bin 0 -> 17540 bytes
 .../src/main/webapp/images/avatar.png           |   Bin 0 -> 761 bytes
 .../src/main/webapp/images/blank.gif            |   Bin 0 -> 43 bytes
 .../src/main/webapp/images/blockLoading.gif     |   Bin 0 -> 3209 bytes
 .../src/main/webapp/images/body-bg.png          |   Bin 0 -> 3375 bytes
 .../src/main/webapp/images/cancel_search.png    |   Bin 0 -> 541 bytes
 .../src/main/webapp/images/clear.png            |   Bin 0 -> 509 bytes
 .../src/main/webapp/images/comp.png             |   Bin 0 -> 1603 bytes
 .../src/main/webapp/images/data-grey.png        |   Bin 0 -> 1468 bytes
 .../main/webapp/images/database_table_32.png    |   Bin 0 -> 1329 bytes
 .../src/main/webapp/images/error-404-icon.png   |   Bin 0 -> 2529 bytes
 .../src/main/webapp/images/error-500-icon.png   |   Bin 0 -> 2986 bytes
 .../src/main/webapp/images/folder-grey.png      |   Bin 0 -> 1372 bytes
 .../src/main/webapp/images/folder.png           |   Bin 0 -> 920 bytes
 .../src/main/webapp/images/folder2.png          |   Bin 0 -> 946 bytes
 .../src/main/webapp/images/form.png             |   Bin 0 -> 3329 bytes
 .../src/main/webapp/images/hbase.jpg            |   Bin 0 -> 4575 bytes
 .../src/main/webapp/images/hdfs.jpg             |   Bin 0 -> 5232 bytes
 .../src/main/webapp/images/hive.png             |   Bin 0 -> 20483 bytes
 .../src/main/webapp/images/hline.png            |   Bin 0 -> 99 bytes
 .../src/main/webapp/images/icon-collapse.png    |   Bin 0 -> 18815 bytes
 .../src/main/webapp/images/icon-expand.png      |   Bin 0 -> 20092 bytes
 .../src/main/webapp/images/knox.gif             |   Bin 0 -> 2347 bytes
 .../src/main/webapp/images/knox1.png            |   Bin 0 -> 34126 bytes
 .../src/main/webapp/images/loading.gif          |   Bin 0 -> 1849 bytes
 .../src/main/webapp/images/loading_game.gif     |   Bin 0 -> 16098 bytes
 .../src/main/webapp/images/logo-white.png       |   Bin 0 -> 4538 bytes
 .../src/main/webapp/images/logo.png             |   Bin 0 -> 1168 bytes
 .../src/main/webapp/images/router-grey.png      |   Bin 0 -> 1533 bytes
 .../src/main/webapp/images/search_glyph.png     |   Bin 0 -> 420 bytes
 .../src/main/webapp/images/sortingCollapse.png  |   Bin 0 -> 13320 bytes
 .../src/main/webapp/images/sortingExpand.png    |   Bin 0 -> 13283 bytes
 .../src/main/webapp/images/storm.png            |   Bin 0 -> 6174 bytes
 .../src/main/webapp/images/storm1.png           |   Bin 0 -> 19620 bytes
 .../src/main/webapp/images/task-grey.png        |   Bin 0 -> 1187 bytes
 .../src/main/webapp/images/timezone.png         |   Bin 0 -> 353544 bytes
 .../src/main/webapp/index.html                  |   108 +
 .../backbone-pageable/backbone-pageable.min.js  |     8 +
 .../webapp/libs/bower/backbone.fetch-cache.js   |   326 +
 .../src/main/webapp/libs/bower/d3/d3.tip.js     |   293 +
 .../webapp/libs/bower/dashboard/dashboard.js    |   393 +
 .../bower/font-awesome/css/font-awesome.css     |  1801 ++
 .../bower/font-awesome/css/font-awesome.min.css |     4 +
 .../bower/font-awesome/fonts/FontAwesome.otf    |   Bin 0 -> 61896 bytes
 .../font-awesome/fonts/fontawesome-webfont.eot  |   Bin 0 -> 37405 bytes
 .../font-awesome/fonts/fontawesome-webfont.svg  |   415 +
 .../font-awesome/fonts/fontawesome-webfont.ttf  |   Bin 0 -> 79076 bytes
 .../font-awesome/fonts/fontawesome-webfont.woff |   Bin 0 -> 43572 bytes
 .../fonts/fontawesome-webfont.woff2             |   Bin 0 -> 56780 bytes
 .../libs/bower/font-awesome/less/animated.less  |    34 +
 .../font-awesome/less/bordered-pulled.less      |    16 +
 .../libs/bower/font-awesome/less/core.less      |    13 +
 .../bower/font-awesome/less/fixed-width.less    |     6 +
 .../bower/font-awesome/less/font-awesome.less   |    17 +
 .../libs/bower/font-awesome/less/icons.less     |   596 +
 .../libs/bower/font-awesome/less/larger.less    |    13 +
 .../libs/bower/font-awesome/less/list.less      |    19 +
 .../libs/bower/font-awesome/less/mixins.less    |    27 +
 .../libs/bower/font-awesome/less/path.less      |    15 +
 .../font-awesome/less/rotated-flipped.less      |    20 +
 .../libs/bower/font-awesome/less/stacked.less   |    20 +
 .../libs/bower/font-awesome/less/variables.less |   606 +
 .../libs/bower/font-awesome/scss/_animated.scss |    34 +
 .../font-awesome/scss/_bordered-pulled.scss     |    16 +
 .../libs/bower/font-awesome/scss/_core.scss     |    13 +
 .../bower/font-awesome/scss/_fixed-width.scss   |     6 +
 .../libs/bower/font-awesome/scss/_icons.scss    |   596 +
 .../libs/bower/font-awesome/scss/_larger.scss   |    13 +
 .../libs/bower/font-awesome/scss/_list.scss     |    19 +
 .../libs/bower/font-awesome/scss/_mixins.scss   |    27 +
 .../libs/bower/font-awesome/scss/_path.scss     |    15 +
 .../font-awesome/scss/_rotated-flipped.scss     |    20 +
 .../libs/bower/font-awesome/scss/_stacked.scss  |    20 +
 .../bower/font-awesome/scss/_variables.scss     |   606 +
 .../bower/font-awesome/scss/font-awesome.scss   |    17 +
 .../jquery-ui/css/images/animated-overlay.gif   |   Bin 0 -> 1738 bytes
 .../ui-bg_diagonals-thick_18_b81900_40x40.png   |   Bin 0 -> 418 bytes
 .../ui-bg_diagonals-thick_20_666666_40x40.png   |   Bin 0 -> 312 bytes
 .../css/images/ui-bg_flat_0_aaaaaa_40x100.png   |   Bin 0 -> 180 bytes
 .../css/images/ui-bg_flat_10_000000_40x100.png  |   Bin 0 -> 205 bytes
 .../css/images/ui-bg_glass_100_f6f6f6_1x400.png |   Bin 0 -> 262 bytes
 .../css/images/ui-bg_glass_100_fdf5ce_1x400.png |   Bin 0 -> 348 bytes
 .../css/images/ui-bg_glass_65_ffffff_1x400.png  |   Bin 0 -> 207 bytes
 .../ui-bg_gloss-wave_35_f6a828_500x100.png      |   Bin 0 -> 5815 bytes
 .../ui-bg_highlight-soft_100_eeeeee_1x100.png   |   Bin 0 -> 278 bytes
 .../ui-bg_highlight-soft_75_ffe45c_1x100.png    |   Bin 0 -> 328 bytes
 .../css/images/ui-icons_222222_256x240.png      |   Bin 0 -> 6922 bytes
 .../css/images/ui-icons_228ef1_256x240.png      |   Bin 0 -> 4549 bytes
 .../css/images/ui-icons_454545_256x240.png      |   Bin 0 -> 4369 bytes
 .../css/images/ui-icons_888888_256x240.png      |   Bin 0 -> 4369 bytes
 .../css/images/ui-icons_ef8c08_256x240.png      |   Bin 0 -> 4549 bytes
 .../css/images/ui-icons_ffd27a_256x240.png      |   Bin 0 -> 4549 bytes
 .../css/images/ui-icons_ffffff_256x240.png      |   Bin 0 -> 6299 bytes
 .../bower/jquery-ui/css/jquery-ui-1.11.4.css    |   850 +
 .../jquery-ui/css/jquery-ui-1.11.4.min.css      |     7 +
 .../bower/jquery-ui/css/jquery-ui-bootstrap.css |  2549 ++
 .../libs/bower/jquery-ui/js/jquery-ui-1.11.4.js |  8772 ++++++
 .../bower/jquery-ui/js/jquery-ui-1.11.4.min.js  |    10 +
 .../src/main/webapp/libs/bower/loadCSS.js       |    73 +
 .../require-handlebars-plugin/Handlebars.js     |  2752 ++
 .../webapp/libs/bower/select2/select2x2.png     |   Bin 0 -> 845 bytes
 .../libs/bower/sparkline/jquery.sparkline.js    |  3054 +++
 .../Backgrid.ColumnManager.css                  |   114 +
 .../Backgrid.ColumnManager.js                   |  1045 +
 .../daterangepicker/css/daterangepicker.css     |   415 +
 .../daterangepicker/js/daterangepicker.js       |  1560 ++
 .../libs/custom/timezone/WorldMapGenerator.js   |  3474 +++
 .../libs/custom/timezone/jstz-1.0.4.min.js      |     2 +
 .../webapp/libs/custom/visualsearch/.bower.json |    45 +
 .../custom/visualsearch/models/search_facets.js |    67 +
 .../custom/visualsearch/models/search_query.js  |    70 +
 .../visualsearch/templates/search_box.jst       |     8 +
 .../visualsearch/templates/search_facet.jst     |     9 +
 .../visualsearch/templates/search_input.jst     |     1 +
 .../custom/visualsearch/templates/templates.js  |     7 +
 .../visualsearch/utils/backbone_extensions.js   |    17 +
 .../libs/custom/visualsearch/utils/hotkeys.js   |    99 +
 .../libs/custom/visualsearch/utils/inflector.js |    21 +
 .../visualsearch/utils/jquery_extensions.js     |   197 +
 .../custom/visualsearch/utils/search_parser.js  |    87 +
 .../custom/visualsearch/views/search_box.js     |   458 +
 .../custom/visualsearch/views/search_facet.js   |   442 +
 .../custom/visualsearch/views/search_input.js   |   418 +
 .../libs/custom/visualsearch/visualsearch.js    |  1984 ++
 .../src/main/webapp/login.html                  |   155 +
 .../src/main/webapp/robots.txt                  |     3 +
 .../src/main/webapp/scripts/App.js              |    86 +
 .../src/main/webapp/scripts/Init.js             |   196 +
 .../src/main/webapp/scripts/Main.js             |    35 +
 .../src/main/webapp/scripts/RegionManager.js    |    83 +
 .../collection_bases/VAuditLogListBase.js       |    73 +
 .../collection_bases/VEventHistoryListBase.js   |    87 +
 .../scripts/collection_bases/VGroupListBase.js  |    82 +
 .../collection_bases/VLogLevelListBase.js       |    96 +
 .../scripts/collection_bases/VLogListBase.js    |   127 +
 .../collection_bases/VNameValueListBase.js      |    57 +
 .../scripts/collection_bases/VNodeListBase.js   |    74 +
 .../scripts/collections/BaseCollection.js       |   172 +
 .../scripts/collections/SchemaFieldList.js      |    29 +
 .../webapp/scripts/collections/VAuditLogList.js |    36 +
 .../scripts/collections/VEventHistoryList.js    |    33 +
 .../webapp/scripts/collections/VGroupList.js    |    36 +
 .../webapp/scripts/collections/VLogLevelList.js |    36 +
 .../main/webapp/scripts/collections/VLogList.js |    36 +
 .../scripts/collections/VNameValueList.js       |    36 +
 .../webapp/scripts/collections/VNodeList.js     |    36 +
 .../src/main/webapp/scripts/communicator.js     |    61 +
 .../webapp/scripts/controllers/Controller.js    |   240 +
 .../webapp/scripts/model_bases/VAuditLogBase.js |    61 +
 .../scripts/model_bases/VCommonModelBase.js     |    51 +
 .../scripts/model_bases/VEventHistoryBase.js    |    51 +
 .../scripts/model_bases/VGraphInfoBase.js       |    62 +
 .../webapp/scripts/model_bases/VGroupBase.js    |    51 +
 .../main/webapp/scripts/model_bases/VLogBase.js |    51 +
 .../webapp/scripts/model_bases/VLogLevelBase.js |    51 +
 .../scripts/model_bases/VNameValueBase.js       |    51 +
 .../webapp/scripts/model_bases/VNodeBase.js     |    51 +
 .../scripts/model_bases/VUserFilterBase.js      |    51 +
 .../src/main/webapp/scripts/models/BaseModel.js |   110 +
 .../src/main/webapp/scripts/models/VAppState.js |    44 +
 .../src/main/webapp/scripts/models/VAuditLog.js |    47 +
 .../main/webapp/scripts/models/VCommonModel.js  |    48 +
 .../main/webapp/scripts/models/VEventHistory.js |    48 +
 .../main/webapp/scripts/models/VGraphInfo.js    |    53 +
 .../src/main/webapp/scripts/models/VGroup.js    |    53 +
 .../src/main/webapp/scripts/models/VLog.js      |    66 +
 .../src/main/webapp/scripts/models/VLogLevel.js |    47 +
 .../main/webapp/scripts/models/VNameValue.js    |    47 +
 .../src/main/webapp/scripts/models/VNode.js     |    48 +
 .../main/webapp/scripts/models/VUserFilter.js   |    51 +
 .../main/webapp/scripts/modules/Overrides.js    |   234 +
 .../src/main/webapp/scripts/modules/Vent.js     |    26 +
 .../scripts/modules/globalize/message/en.js     |    79 +
 .../main/webapp/scripts/prelogin/Prelogin.js    |   130 +
 .../src/main/webapp/scripts/utils/Enums.js      |    32 +
 .../src/main/webapp/scripts/utils/Globals.js    |    91 +
 .../main/webapp/scripts/utils/LangSupport.js    |   151 +
 .../src/main/webapp/scripts/utils/Tour.js       |   461 +
 .../src/main/webapp/scripts/utils/Utils.js      |  1241 +
 .../src/main/webapp/scripts/utils/ViewUtils.js  |   266 +
 .../webapp/scripts/utils/XATemplateHelpers.js   |   170 +
 .../scripts/views/audit/AuditAggregatedView.js  |   416 +
 .../scripts/views/audit/AuditTabLayoutView.js   |   429 +
 .../scripts/views/common/AdvanceSearchLayout.js |   146 +
 .../webapp/scripts/views/common/BreadCrumbs.js  |    83 +
 .../scripts/views/common/CustomBackgrid.js      |   284 +
 .../scripts/views/common/DatePickerLayout.js    |   228 +
 .../webapp/scripts/views/common/ErrorView.js    |   100 +
 .../scripts/views/common/EventHistoryLayout.js  |   486 +
 .../main/webapp/scripts/views/common/Footer.js  |    80 +
 .../main/webapp/scripts/views/common/Header.js  |   481 +
 .../webapp/scripts/views/common/JBDialog.js     |   211 +
 .../scripts/views/common/LogSnapShotLayout.js   |   141 +
 .../webapp/scripts/views/common/ProfileBar.js   |   105 +
 .../main/webapp/scripts/views/common/Spinner.js |    85 +
 .../webapp/scripts/views/common/TableLayout.js  |   405 +
 .../webapp/scripts/views/common/TimerView.js    |   126 +
 .../main/webapp/scripts/views/common/TopNav.js  |    93 +
 .../dashboard/BubbleGraphTableLayoutView.js     |   716 +
 .../views/dashboard/ComponentListView.js        |   319 +
 .../scripts/views/dashboard/ComponentsView.js   |    98 +
 .../scripts/views/dashboard/DashboardView.js    |   184 +
 .../views/dashboard/GridTableLayoutView.js      |   219 +
 .../scripts/views/dashboard/HostListView.js     |   356 +
 .../webapp/scripts/views/dashboard/HostsView.js |    98 +
 .../scripts/views/dashboard/LogDetailView.js    |   249 +
 .../scripts/views/dashboard/LogLevelBoxView.js  |   155 +
 .../scripts/views/dashboard/LogLevelView.js     |   118 +
 .../scripts/views/dashboard/MainLayoutView.js   |   670 +
 .../views/dialog/ApplySearchFilterView.js       |   214 +
 .../scripts/views/dialog/DetailLogFileView.js   |   167 +
 .../dialog/GlobalExclusionCompositeView.js      |   141 +
 .../views/dialog/GlobalExclusionItemView.js     |    84 +
 .../views/dialog/GridGraphSettingView.js        |   476 +
 .../views/dialog/SaveSearchFilterView.js        |   120 +
 .../scripts/views/dialog/TimeZoneChangeView.js  |   101 +
 .../views/filter/CreateLogfeederFilterView.js   |   383 +
 .../scripts/views/graphs/GraphLayoutView.js     |   559 +
 .../scripts/views/graphs/GridGraphLayoutView.js |   594 +
 .../scripts/views/tabs/ComparisonLayoutView.js  |    93 +
 .../webapp/scripts/views/tabs/ComparisonView.js |   242 +
 .../views/tabs/EventHistoryLayoutView.js        |   506 +
 .../scripts/views/tabs/ExportLogFileView.js     |    50 +
 .../views/tabs/HierarchyTabLayoutView.js        |   429 +
 .../scripts/views/tabs/HostInfoTabLayoutView.js |   178 +
 .../webapp/scripts/views/tabs/LogFileView.js    |   864 +
 .../main/webapp/scripts/views/tabs/TreeView.js  |   365 +
 .../scripts/views/tabs/VisualSearchView.js      |   202 +
 .../troubleshoot/TroubleShootLayoutView.js      |   553 +
 .../src/main/webapp/static/schema_fields.json   |    90 +
 .../src/main/webapp/styles/animate.css          |  3272 +++
 .../src/main/webapp/styles/app-font.css         |    64 +
 .../src/main/webapp/styles/bootstrap.css        |  6422 +++++
 .../src/main/webapp/styles/bootstrap.min.css    |  6422 +++++
 .../main/webapp/styles/custom/visualsearch.css  |   369 +
 .../src/main/webapp/styles/style.css            |  2964 ++
 .../src/main/webapp/styles/style_v2.css         |  2596 ++
 .../audit/AuditAggregatedView_tmpl.html         |    54 +
 .../audit/AuditTabLayoutView_tmpl.html          |   100 +
 .../common/AdvanceSearchLayout_tmpl.html        |    30 +
 .../templates/common/DatePickerLayout_tmpl.html |    29 +
 .../webapp/templates/common/ErrorView_tmpl.html |    28 +
 .../common/EventHistoryItemView_tmpl.html       |    32 +
 .../common/EventHistoryLayout_tmpl.html         |    44 +
 .../webapp/templates/common/Footer_tmpl.html    |    42 +
 .../webapp/templates/common/Header_tmpl.html    |    97 +
 .../common/LogSnapShotLayout_tmpl.html          |    23 +
 .../templates/common/TableLayout_tmpl.html      |    37 +
 .../webapp/templates/common/TimerView_tmpl.html |    25 +
 .../webapp/templates/common/TopNav_tmpl.html    |    52 +
 .../webapp/templates/common/breadcrumbs.html    |    46 +
 .../webapp/templates/common/formInputItem.html  |    54 +
 .../templates/common/formInputItemList.html     |    42 +
 .../webapp/templates/common/loading_tmpl.html   |    45 +
 .../BubbleGraphTableLayoutView_tmpl.html        |    79 +
 .../dashboard/ComponentListView_tmpl.html       |    35 +
 .../dashboard/ComponentsView_tmpl.html          |    57 +
 .../templates/dashboard/DashboardView_tmpl.html |   122 +
 .../dashboard/GridTableLayoutView_tmpl.html     |    28 +
 .../templates/dashboard/HostListView_tmpl.html  |    48 +
 .../templates/dashboard/HostsView_tmpl.html     |    56 +
 .../templates/dashboard/LogDetailView_tmpl.html |    75 +
 .../dashboard/LogLevelBoxView_tmpl.html         |    49 +
 .../templates/dashboard/LogLevelView_tmpl.html  |   110 +
 .../dashboard/MainLayoutView_tmpl.html          |   111 +
 .../dialog/ApplySearchFilterView_tmpl.html      |    30 +
 .../dialog/DetailLogFileView_tmpl.html          |    22 +
 .../GlobalExclusionCompositeView_tmpl.html      |    32 +
 .../dialog/GlobalExclusionItemView_tmpl.html    |    26 +
 .../dialog/GridGraphSettingView_tmpl.html       |   284 +
 .../dialog/SaveSearchFilterView_tmpl.html       |    70 +
 .../dialog/TimeZoneChangeView_tmpl.html         |   475 +
 .../filter/CreateLogfeederFilter_tmpl.html      |    53 +
 .../templates/graphs/GraphLayoutView_tmpl.html  |    50 +
 .../graphs/GridGraphLayoutView_tmpl.html        |    28 +
 .../src/main/webapp/templates/graphs/backup.js  |   586 +
 .../main/webapp/templates/helpers/Helpers.js    |   520 +
 .../tabs/ComparisonLayoutView_tmpl.html         |    20 +
 .../templates/tabs/ComparisonView_tmpl.html     |    56 +
 .../tabs/EventHistoryLayoutView_tmpl.html       |    45 +
 .../templates/tabs/ExportLogFileView_tmpl.html  |    46 +
 .../tabs/HierarchyTabLayoutView_tmpl.html       |   124 +
 .../tabs/HostInfoTabLayoutView_tmpl.html        |    46 +
 .../webapp/templates/tabs/LogFileView_tmpl.html |   122 +
 .../webapp/templates/tabs/TreeView_tmpl.html    |    54 +
 .../templates/tabs/VisualSearchView_tmpl.html   |    20 +
 .../TroubleShootLayoutView_tmpl.html            |   150 +
 .../main/webapp/themejs/1.3.0/bootstrap.min.js  |    19 +
 ambari-logsearch/docker/Dockerfile              |     4 +-
 ambari-logsearch/docker/bin/start.sh            |     2 +-
 ambari-logsearch/docker/logsearch-docker.sh     |     6 +-
 .../test-config/logfeeder/logfeeder.properties  |     5 +
 .../shipper-conf/input.config-zookeeper.json    |     5 +-
 .../test-config/logsearch/logsearch-env.sh      |     2 +-
 .../logsearch/logsearch-https.properties        |     4 +-
 .../test-config/logsearch/logsearch.properties  |     4 +-
 ambari-logsearch/pom.xml                        |     5 +-
 ambari-project/pom.xml                          |     1 +
 ambari-server/conf/unix/ambari.properties       |     3 +-
 ambari-server/conf/windows/ambari.properties    |     3 +
 ambari-server/docs/configuration/index.md       |     7 +-
 ambari-server/pom.xml                           |    20 +-
 ambari-server/set-hdp-repo-url.sh               |    29 +-
 ambari-server/src/main/assemblies/server.xml    |     3 +-
 .../server/actionmanager/HostRoleCommand.java   |     6 +-
 .../apache/ambari/server/agent/AgentEnv.java    |     6 +
 .../server/configuration/Configuration.java     |    27 +-
 .../ambari/server/controller/AmbariServer.java  |     9 +
 .../server/controller/KerberosHelper.java       |     3 -
 .../server/controller/KerberosHelperImpl.java   |   104 +-
 .../ActiveWidgetLayoutResourceProvider.java     |     2 +-
 .../BlueprintConfigurationProcessor.java        |     1 +
 .../internal/ProvisionClusterRequest.java       |    49 +-
 .../apache/ambari/server/orm/dao/UserDAO.java   |    38 +
 .../server/orm/entities/PrivilegeEntity.java    |    21 +-
 .../server/security/CertificateManager.java     |    10 +
 .../server/security/authorization/Users.java    |    23 +-
 .../AbstractPrepareKerberosServerAction.java    |   237 +-
 .../PrepareDisableKerberosServerAction.java     |   108 +-
 .../PrepareEnableKerberosServerAction.java      |    19 +-
 .../PrepareKerberosIdentitiesServerAction.java  |   127 +-
 .../ambari/server/stack/ExtensionModule.java    |     2 +-
 .../services/RetryUpgradeActionService.java     |    60 +-
 .../svccomphost/ServiceComponentHostImpl.java   |     1 +
 .../topology/RequiredPasswordValidator.java     |   156 -
 .../validators/ClusterConfigTypeValidator.java  |    65 +
 .../validators/HiveServiceValidator.java        |    70 +
 .../validators/RequiredPasswordValidator.java   |   157 +
 .../server/upgrade/AbstractUpgradeCatalog.java  |    96 -
 .../server/upgrade/UpgradeCatalog212.java       |    16 +-
 .../server/upgrade/UpgradeCatalog250.java       |    69 +-
 .../ambari/server/utils/ShellCommandUtil.java   |     7 +
 .../apache/ambari/server/view/ViewRegistry.java |     2 +-
 .../src/main/package/rpm/postinstall.sh         |    18 +
 .../python/ambari_server/resourceFilesKeeper.py |     6 +-
 .../python/ambari_server/serverConfiguration.py |     1 +
 .../src/main/python/ambari_server_main.py       |     2 +-
 .../HDP/grafana-solr-cores-dashboard.json       |  1581 --
 .../HDP/grafana-solr-hosts-dashboard.json       |   269 -
 .../ATLAS/0.1.0.2.3/package/scripts/params.py   |    10 +-
 .../ATLAS/0.7.0.2.5/metainfo.xml                |     7 +
 .../common-services/DRUID/0.9.2/metainfo.xml    |     7 +
 .../DRUID/0.9.2/package/scripts/druid_node.py   |    16 +-
 .../DRUID/0.9.2/package/scripts/params.py       |     2 +
 .../DRUID/0.9.2/package/scripts/superset.py     |    42 +-
 .../0.96.0.2.0/package/scripts/service_check.py |     3 +-
 .../HDFS/3.0.0.3.0/configuration/hadoop-env.xml |     2 +-
 .../HDFS/3.0.0.3.0/configuration/hdfs-site.xml  |     5 +
 .../HIVE/0.12.0.2.0/configuration/hive-site.xml |     4 +
 .../alert_hive_interactive_thrift_port.py       |     7 +-
 .../common-services/HIVE/2.1.0.3.0/alerts.json  |   232 +
 .../2.1.0.3.0/configuration/beeline-log4j2.xml  |    80 +
 .../HIVE/2.1.0.3.0/configuration/hcat-env.xml   |    60 +
 .../hive-atlas-application.properties.xml       |    61 +
 .../HIVE/2.1.0.3.0/configuration/hive-env.xml   |   495 +
 .../2.1.0.3.0/configuration/hive-exec-log4j.xml |   114 +
 .../configuration/hive-exec-log4j2.xml          |   101 +
 .../configuration/hive-interactive-env.xml      |   332 +
 .../configuration/hive-interactive-site.xml     |   762 +
 .../HIVE/2.1.0.3.0/configuration/hive-log4j.xml |   147 +
 .../2.1.0.3.0/configuration/hive-log4j2.xml     |   131 +
 .../configuration/hive-logsearch-conf.xml       |   117 +
 .../HIVE/2.1.0.3.0/configuration/hive-site.xml  |  2004 ++
 .../configuration/hivemetastore-site.xml        |    46 +
 .../hiveserver2-interactive-site.xml            |    55 +
 .../configuration/hiveserver2-site.xml          |   110 +
 .../2.1.0.3.0/configuration/llap-cli-log4j2.xml |   148 +
 .../configuration/llap-daemon-log4j.xml         |   210 +
 .../configuration/ranger-hive-audit.xml         |   121 +
 .../ranger-hive-plugin-properties.xml           |   127 +
 .../configuration/ranger-hive-policymgr-ssl.xml |    66 +
 .../configuration/ranger-hive-security.xml      |    74 +
 .../configuration/tez-interactive-site.xml      |   257 +
 .../2.1.0.3.0/configuration/webhcat-env.xml     |    57 +
 .../2.1.0.3.0/configuration/webhcat-log4j.xml   |   104 +
 .../2.1.0.3.0/configuration/webhcat-site.xml    |   193 +
 .../HIVE/2.1.0.3.0/kerberos.json                |   151 +
 .../common-services/HIVE/2.1.0.3.0/metainfo.xml |   517 +
 .../alert_hive_interactive_thrift_port.py       |   230 +
 .../package/alerts/alert_hive_metastore.py      |   273 +
 .../package/alerts/alert_hive_thrift_port.py    |   285 +
 .../package/alerts/alert_llap_app_status.py     |   299 +
 .../package/alerts/alert_webhcat_server.py      |   228 +
 .../package/etc/hive-schema-0.12.0.mysql.sql    |   777 +
 .../package/etc/hive-schema-0.12.0.oracle.sql   |   718 +
 .../package/etc/hive-schema-0.12.0.postgres.sql |  1406 +
 .../package/etc/hive-schema-0.13.0.mysql.sql    |   889 +
 .../package/etc/hive-schema-0.13.0.oracle.sql   |   835 +
 .../package/etc/hive-schema-0.13.0.postgres.sql |  1538 ++
 .../etc/upgrade-0.12.0-to-0.13.0.oracle.sql     |   165 +
 .../package/etc/upgrade-0.13.0.oracle.sql       |    38 +
 .../2.1.0.3.0/package/files/addMysqlUser.sh     |    39 +
 .../HIVE/2.1.0.3.0/package/files/hcatSmoke.sh   |    41 +
 .../HIVE/2.1.0.3.0/package/files/hiveSmoke.sh   |    24 +
 .../2.1.0.3.0/package/files/hiveTezSetup.cmd    |    58 +
 .../2.1.0.3.0/package/files/hiveserver2.sql     |    23 +
 .../2.1.0.3.0/package/files/hiveserver2Smoke.sh |    32 +
 .../HIVE/2.1.0.3.0/package/files/pigSmoke.sh    |    18 +
 .../2.1.0.3.0/package/files/removeMysqlUser.sh  |    33 +
 .../2.1.0.3.0/package/files/startMetastore.sh   |    25 +
 .../2.1.0.3.0/package/files/templetonSmoke.sh   |   101 +
 .../HIVE/2.1.0.3.0/package/scripts/__init__.py  |    19 +
 .../HIVE/2.1.0.3.0/package/scripts/hcat.py      |    87 +
 .../2.1.0.3.0/package/scripts/hcat_client.py    |    85 +
 .../package/scripts/hcat_service_check.py       |    89 +
 .../HIVE/2.1.0.3.0/package/scripts/hive.py      |   520 +
 .../2.1.0.3.0/package/scripts/hive_client.py    |    68 +
 .../package/scripts/hive_interactive.py         |   346 +
 .../2.1.0.3.0/package/scripts/hive_metastore.py |   263 +
 .../2.1.0.3.0/package/scripts/hive_server.py    |   230 +
 .../package/scripts/hive_server_interactive.py  |   679 +
 .../package/scripts/hive_server_upgrade.py      |   145 +
 .../2.1.0.3.0/package/scripts/hive_service.py   |   187 +
 .../package/scripts/hive_service_interactive.py |   110 +
 .../2.1.0.3.0/package/scripts/mysql_server.py   |    63 +
 .../2.1.0.3.0/package/scripts/mysql_service.py  |    51 +
 .../2.1.0.3.0/package/scripts/mysql_users.py    |    72 +
 .../2.1.0.3.0/package/scripts/mysql_utils.py    |    35 +
 .../HIVE/2.1.0.3.0/package/scripts/params.py    |    30 +
 .../2.1.0.3.0/package/scripts/params_linux.py   |   822 +
 .../2.1.0.3.0/package/scripts/params_windows.py |    75 +
 .../2.1.0.3.0/package/scripts/service_check.py  |   194 +
 .../package/scripts/setup_ranger_hive.py        |    98 +
 .../scripts/setup_ranger_hive_interactive.py    |    77 +
 .../2.1.0.3.0/package/scripts/status_params.py  |   118 +
 .../HIVE/2.1.0.3.0/package/scripts/webhcat.py   |   139 +
 .../2.1.0.3.0/package/scripts/webhcat_server.py |   167 +
 .../package/scripts/webhcat_service.py          |   111 +
 .../package/scripts/webhcat_service_check.py    |   133 +
 .../hadoop-metrics2-hivemetastore.properties.j2 |    56 +
 .../hadoop-metrics2-hiveserver2.properties.j2   |    55 +
 .../templates/hadoop-metrics2-llapdaemon.j2     |    54 +
 .../hadoop-metrics2-llaptaskscheduler.j2        |    54 +
 .../2.1.0.3.0/package/templates/hive.conf.j2    |    35 +
 .../package/templates/startHiveserver2.sh.j2    |    24 +
 .../templates/startHiveserver2Interactive.sh.j2 |    24 +
 .../package/templates/templeton_smoke.pig.j2    |    24 +
 .../package/templates/zkmigrator_jaas.conf.j2   |    26 +
 .../HIVE/2.1.0.3.0/quicklinks/quicklinks.json   |    62 +
 .../HIVE/2.1.0.3.0/service_advisor.py           |  1139 +
 .../HIVE/2.1.0.3.0/themes/theme.json            |   753 +
 .../configuration/logfeeder-properties.xml      |    56 +
 .../LOGSEARCH/0.5.0/metainfo.xml                |     2 +-
 .../LOGSEARCH/0.5.0/package/scripts/params.py   |     2 +-
 .../PXF/3.0.0/configuration/pxf-profiles.xml    |     4 +-
 .../RANGER/0.4.0/package/scripts/params.py      |     5 +-
 .../0.7.0/configuration/ranger-tagsync-site.xml |     9 +
 .../SLIDER/0.91.0.3.0/package/scripts/slider.py |     4 +
 .../common-services/SPARK/2.2.0/alerts.json     |    32 +
 .../SPARK/2.2.0/configuration/livy-conf.xml     |   114 +
 .../SPARK/2.2.0/configuration/livy-env.xml      |    97 +
 .../configuration/livy-log4j-properties.xml     |    42 +
 .../configuration/livy-spark-blacklist.xml      |    52 +
 .../2.2.0/configuration/spark-defaults.xml      |   115 +
 .../SPARK/2.2.0/configuration/spark-env.xml     |   147 +
 .../configuration/spark-hive-site-override.xml  |    59 +
 .../configuration/spark-log4j-properties.xml    |    46 +
 .../configuration/spark-logsearch-conf.xml      |    98 +
 .../configuration/spark-metrics-properties.xml  |   165 +
 .../spark-thrift-fairscheduler.xml              |    36 +
 .../configuration/spark-thrift-sparkconf.xml    |   160 +
 .../common-services/SPARK/2.2.0/kerberos.json   |   126 +
 .../common-services/SPARK/2.2.0/metainfo.xml    |   282 +
 .../SPARK/2.2.0/quicklinks/quicklinks.json      |    27 +
 .../SPARK/2.2.0/scripts/job_history_server.py   |   106 +
 .../SPARK/2.2.0/scripts/livy_server.py          |   149 +
 .../SPARK/2.2.0/scripts/livy_service.py         |    48 +
 .../SPARK/2.2.0/scripts/params.py               |   266 +
 .../SPARK/2.2.0/scripts/service_check.py        |    62 +
 .../SPARK/2.2.0/scripts/setup_livy.py           |    88 +
 .../SPARK/2.2.0/scripts/setup_spark.py          |   116 +
 .../SPARK/2.2.0/scripts/spark_client.py         |    60 +
 .../SPARK/2.2.0/scripts/spark_service.py        |   145 +
 .../SPARK/2.2.0/scripts/spark_thrift_server.py  |    89 +
 .../SPARK/2.2.0/scripts/status_params.py        |    45 +
 .../SPARK/2.2.0/service_advisor.py              |   202 +
 .../SPARK2/2.0.0/package/scripts/params.py      |     2 +-
 .../2.0.0/package/scripts/spark_service.py      |     4 +-
 .../1.0.1/configuration/storm-cluster-log4j.xml |     2 +-
 .../1.0.1/configuration/storm-worker-log4j.xml  |     2 +-
 .../TEZ/0.9.0.3.0/configuration/tez-env.xml     |    87 +
 .../TEZ/0.9.0.3.0/configuration/tez-site.xml    |   523 +
 .../common-services/TEZ/0.9.0.3.0/kerberos.json |    24 +
 .../common-services/TEZ/0.9.0.3.0/metainfo.xml  |   111 +
 .../TEZ/0.9.0.3.0/package/scripts/params.py     |    29 +
 .../0.9.0.3.0/package/scripts/params_linux.py   |   116 +
 .../0.9.0.3.0/package/scripts/params_windows.py |    54 +
 .../0.9.0.3.0/package/scripts/pre_upgrade.py    |    59 +
 .../0.9.0.3.0/package/scripts/service_check.py  |   111 +
 .../TEZ/0.9.0.3.0/package/scripts/tez.py        |    76 +
 .../TEZ/0.9.0.3.0/package/scripts/tez_client.py |   137 +
 .../TEZ/0.9.0.3.0/service_advisor.py            |   370 +
 .../YARN/3.0.0.3.0/configuration/yarn-site.xml  |    20 +
 .../3.0.0.3.0/package/scripts/params_linux.py   |     4 +-
 .../YARN/3.0.0.3.0/service_advisor.py           |    71 +-
 .../0.6.0.2.5/configuration/zeppelin-config.xml |     7 +
 .../0.6.0.2.5/package/scripts/master.py         |    42 +-
 .../0.6.0.2.5/package/scripts/params.py         |    10 +-
 .../scripts/check_ambari_permissions.py         |   242 +
 .../2.0.6/hooks/before-ANY/scripts/params.py    |     3 +
 .../before-START/files/fast-hdfs-resource.jar   |   Bin 19285850 -> 28296600 bytes
 .../scripts/shared_initialization.py            |     2 +-
 .../stacks/HDP/2.0.6/services/stack_advisor.py  |    55 -
 .../services/HDFS/configuration/hadoop-env.xml  |     2 +-
 .../services/HIVE/configuration/hive-site.xml   |     4 +
 .../stacks/HDP/2.2/services/stack_advisor.py    |    87 +-
 .../services/HDFS/configuration/hadoop-env.xml  |     2 +-
 .../services/HDFS/configuration/hdfs-site.xml   |     5 +
 .../stacks/HDP/2.3/services/stack_advisor.py    |    13 +-
 .../stacks/HDP/2.3/upgrades/config-upgrade.xml  |    10 +-
 .../stacks/HDP/2.3/upgrades/upgrade-2.6.xml     |     2 +-
 .../services/HDFS/configuration/hadoop-env.xml  |     2 +-
 .../stacks/HDP/2.4/upgrades/config-upgrade.xml  |    14 +-
 .../stacks/HDP/2.4/upgrades/upgrade-2.6.xml     |     2 +-
 .../HIVE/configuration/hive-interactive-env.xml |     2 +-
 .../configuration/hive-interactive-site.xml     |    19 +
 .../services/HIVE/configuration/hive-site.xml   |     5 +
 .../HIVE/configuration/tez-interactive-site.xml |     5 +
 .../stacks/HDP/2.5/services/stack_advisor.py    |    36 +-
 .../stacks/HDP/2.5/upgrades/config-upgrade.xml  |    23 +-
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml |     6 +
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml |    17 +
 .../stacks/HDP/2.5/upgrades/upgrade-2.5.xml     |     1 +
 .../stacks/HDP/2.5/upgrades/upgrade-2.6.xml     |     5 +-
 .../services/HDFS/configuration/hadoop-env.xml  |     2 +-
 .../HIVE/configuration/hive-interactive-env.xml |     2 +-
 .../services/YARN/configuration/yarn-site.xml   |    26 +
 .../ZEPPELIN/configuration/zeppelin-env.xml     |     1 +
 .../stacks/HDP/2.6/services/stack_advisor.py    |    44 +-
 .../HDP/2.6/upgrades/host-upgrade-2.6.xml       |    45 +
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |    64 +
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml     |    54 +
 .../before-START/files/fast-hdfs-resource.jar   |   Bin 19285850 -> 28296600 bytes
 .../scripts/shared_initialization.py            |     2 +-
 .../stacks/HDP/3.0/services/HIVE/metainfo.xml   |    27 +
 .../stacks/HDP/3.0/services/SPARK/metainfo.xml  |    32 +
 .../stacks/HDP/3.0/services/TEZ/metainfo.xml    |    27 +
 .../services/HDFS/configuration/hdfs-site.xml   |     5 +
 .../src/main/resources/stacks/stack_advisor.py  |    97 +
 .../ambari/server/agent/AgentResourceTest.java  |     3 +-
 .../server/configuration/ConfigurationTest.java |    21 +
 .../server/controller/AmbariServerTest.java     |    18 +
 .../ActiveWidgetLayoutResourceProviderTest.java |     2 +-
 .../AmbariPrivilegeResourceProviderTest.java    |     1 +
 .../BlueprintConfigurationProcessorTest.java    |     3 +
 .../internal/ProvisionClusterRequestTest.java   |    12 +-
 .../ViewPrivilegeResourceProviderTest.java      |     2 +-
 .../ambari/server/orm/dao/UserDAOTest.java      |   107 +-
 .../security/TestAuthenticationFactory.java     |    83 +-
 .../security/authorization/TestUsers.java       |     8 +-
 .../security/authorization/UsersTest.java       |    66 +-
 ...AbstractPrepareKerberosServerActionTest.java |    30 +-
 .../services/RetryUpgradeActionServiceTest.java |    28 +-
 .../topology/RequiredPasswordValidatorTest.java |     1 +
 .../ClusterConfigTypeValidatorTest.java         |   159 +
 .../validators/HiveServiceValidatorTest.java    |   158 +
 .../upgrade/AbstractUpgradeCatalogTest.java     |    64 -
 .../server/upgrade/UpgradeCatalog212Test.java   |   148 +
 .../server/upgrade/UpgradeCatalog250Test.java   |    20 +
 .../ambari/server/view/ViewRegistryTest.java    |    98 +-
 .../2.0.6/HBASE/test_hbase_service_check.py     |     3 +-
 .../stacks/2.2/common/test_stack_advisor.py     |    16 +-
 .../stacks/2.3/common/test_stack_advisor.py     |     2 +-
 .../stacks/2.5/common/test_stack_advisor.py     |    26 +-
 .../test/python/stacks/2.6/configs/default.json |     3 +-
 .../dummy_stack/HIVE/package/.hash              |     0
 ambari-web/app/assets/test/tests.js             |     2 +
 ambari-web/app/controllers/experimental.js      |     4 +-
 .../controllers/global/cluster_controller.js    |     3 -
 .../app/controllers/global/update_controller.js |     2 +-
 .../app/controllers/main/admin/kerberos.js      |     1 +
 .../main/admin/kerberos/step4_controller.js     |   126 +-
 .../main/admin/kerberos/wizard_controller.js    |    14 -
 .../main/admin/stack_and_upgrade_controller.js  |    17 +-
 .../manage_alert_notifications_controller.js    |     1 +
 ambari-web/app/controllers/main/host.js         |     8 +-
 .../controllers/main/service/add_controller.js  |    37 +-
 .../controllers/main/service/info/configs.js    |    33 +-
 .../controllers/main/service/info/summary.js    |     2 +-
 ambari-web/app/controllers/main/service/item.js |     1 +
 .../app/controllers/main/views_controller.js    |    32 +-
 ambari-web/app/controllers/wizard.js            |     9 +
 .../wizard/step7/assign_master_controller.js    |   203 +-
 .../app/controllers/wizard/step7_controller.js  |   139 +-
 .../app/controllers/wizard/step8_controller.js  |     2 +-
 .../configs/service_config_version_mapper.js    |    56 +-
 ambari-web/app/mappers/configs/themes_mapper.js |   185 +-
 ambari-web/app/mappers/hosts_mapper.js          |     1 +
 ambari-web/app/messages.js                      |     7 +
 ambari-web/app/mixins.js                        |     1 +
 .../mixins/common/configs/configs_comparator.js |    31 +-
 .../mixins/common/loading_overlay_support.js    |   136 +
 .../app/mixins/wizard/addSecurityConfigs.js     |   444 +-
 .../mixins/wizard/assign_master_components.js   |    15 +-
 ambari-web/app/models.js                        |     1 +
 .../app/models/alerts/alert_definition.js       |     3 +-
 .../app/models/configs/theme/config_action.js   |    35 +-
 ambari-web/app/models/host.js                   |     1 +
 ambari-web/app/models/view_instance.js          |    81 +
 .../app/routes/activate_hawq_standby_routes.js  |     4 +
 .../app/routes/add_hawq_standby_routes.js       |     4 +
 ambari-web/app/routes/add_kerberos_routes.js    |     3 +-
 ambari-web/app/routes/add_service_routes.js     |   100 +-
 .../app/routes/high_availability_routes.js      |     4 +
 ambari-web/app/routes/main.js                   |    46 +-
 .../app/routes/manage_journalnode_routes.js     |     4 +
 .../app/routes/ra_high_availability_routes.js   |     4 +
 ambari-web/app/routes/reassign_master_routes.js |     8 +
 .../app/routes/remove_hawq_standby_routes.js    |     4 +
 .../app/routes/rm_high_availability_routes.js   |     4 +
 ambari-web/app/routes/stack_upgrade_routes.js   |    13 +-
 ambari-web/app/routes/view.js                   |     1 +
 ambari-web/app/routes/views.js                  |    10 +-
 ambari-web/app/styles/application.less          |    41 +-
 ambari-web/app/styles/config_history_flow.less  |     4 +-
 .../app/styles/theme/bootstrap-ambari.css       |    73 +-
 .../common/configs/overriddenProperty.hbs       |     2 +-
 .../common/configs/service_config_category.hbs  |    12 +-
 .../configs/service_config_layout_tab.hbs       |     1 +
 .../modal_popups/cluster_check_dialog.hbs       |     3 +
 .../upgrade_configs_recommend_table.hbs         |    51 +
 ambari-web/app/templates/main/host/summary.hbs  |     4 +
 ambari-web/app/templates/main/service/add.hbs   |     7 +-
 .../templates/main/service/services/hive.hbs    |     2 +-
 .../app/templates/main/side-menu-item.hbs       |     2 +-
 .../app/templates/wizard/component_hosts.hbs    |     2 +-
 ambari-web/app/utils/ajax/ajax.js               |    25 +-
 .../configs/add_component_config_initializer.js |    12 +-
 .../utils/configs/move_hm_config_initializer.js |     4 +-
 .../utils/configs/move_hs_config_initializer.js |     2 +-
 ambari-web/app/utils/ember_reopen.js            |     4 +-
 ambari-web/app/utils/helper.js                  |    20 +
 ambari-web/app/views/common/breadcrumbs_view.js |    37 +-
 .../configs/config_category_container_view.js   |    28 +-
 .../configs/service_config_layout_tab_view.js   |     9 +-
 .../app/views/common/configs/services_config.js |     2 +
 .../configs/widgets/config_widget_view.js       |     3 +
 ambari-web/app/views/common/controls_view.js    |    23 +-
 .../common/modal_popups/cluster_check_popup.js  |    39 +-
 .../stack_upgrade/upgrade_version_box_view.js   |     2 +-
 .../views/main/dashboard/config_history_view.js |    18 +-
 ambari-web/app/views/main/host.js               |   193 +-
 .../app/views/main/service/services/hive.js     |    16 +-
 ambari-web/pom.xml                              |     3 +-
 .../test/controllers/experimental_test.js       |    32 +
 .../global/cluster_controller_test.js           |     7 -
 .../admin/kerberos/step4_controller_test.js     |   166 -
 .../admin/stack_and_upgrade_controller_test.js  |    19 +
 ...anage_alert_notifications_controller_test.js |     4 +
 ambari-web/test/controllers/main/host_test.js   |    18 +-
 .../main/service/add_controller_test.js         |    54 -
 .../test/controllers/main/service/item_test.js  |    17 +
 .../controllers/main/views_controller_test.js   |    38 +-
 .../step7/assign_master_controller_test.js      |    28 +-
 .../test/controllers/wizard/step7_test.js       |    32 +-
 .../test/controllers/wizard/step8_test.js       |     8 +-
 ambari-web/test/init_test.js                    |     8 +-
 .../configs/config_groups_mapper_test.js        |   154 +-
 .../service_config_version_mapper_test.js       |   279 +-
 .../test/mappers/configs/themes_mapper_test.js  |   720 +-
 .../common/configs/configs_comparator_test.js   |     2 +
 .../common/loading_overlay_support_test.js      |    96 +
 .../component_actions_by_configs_test.js        |     2 +-
 .../test/models/alerts/alert_definition_test.js |     7 +
 ambari-web/test/models/view_instance_test.js    |    59 +
 ambari-web/test/utils/ajax/ajax_test.js         |    15 +-
 .../test/views/common/breadcrumbs_view_test.js  |    75 +
 .../test/views/common/controls_view_test.js     |    19 +
 .../modal_popups/cluster_check_popup_test.js    |    33 +-
 .../upgrade_version_box_view_test.js            |   124 +-
 .../main/dashboard/config_history_view_test.js  |    13 +-
 ambari-web/test/views/main/host_test.js         |   256 +-
 ambari-web/test/views/main/menu_test.js         |    52 +-
 .../vendor/scripts/theme/bootstrap-ambari.js    |    58 +-
 .../ambari/fast_hdfs_resource/Runner.java       |     8 +-
 .../management-packs/odpi-ambari-mpack/pom.xml  |   129 +
 .../src/main/assemblies/odpi-ambari-mpack.xml   |    39 +
 .../src/main/resources/mpack.json               |    19 +
 .../ODPi/2.0/blueprints/multinode-default.json  |   108 +
 .../ODPi/2.0/blueprints/singlenode-default.json |    65 +
 .../ODPi/2.0/configuration/cluster-env.xml      |   232 +
 .../2.0/hooks/after-INSTALL/scripts/hook.py     |    37 +
 .../2.0/hooks/after-INSTALL/scripts/params.py   |   101 +
 .../scripts/shared_initialization.py            |   108 +
 .../hooks/before-ANY/files/changeToSecureUid.sh |    53 +
 .../ODPi/2.0/hooks/before-ANY/scripts/hook.py   |    36 +
 .../ODPi/2.0/hooks/before-ANY/scripts/params.py |   230 +
 .../before-ANY/scripts/shared_initialization.py |   224 +
 .../2.0/hooks/before-INSTALL/scripts/hook.py    |    37 +
 .../2.0/hooks/before-INSTALL/scripts/params.py  |   113 +
 .../scripts/repo_initialization.py              |    68 +
 .../scripts/shared_initialization.py            |    37 +
 .../2.0/hooks/before-RESTART/scripts/hook.py    |    29 +
 .../hooks/before-START/files/checkForFormat.sh  |    65 +
 .../before-START/files/fast-hdfs-resource.jar   |   Bin 0 -> 19285850 bytes
 .../before-START/files/task-log4j.properties    |   134 +
 .../hooks/before-START/files/topology_script.py |    66 +
 .../ODPi/2.0/hooks/before-START/scripts/hook.py |    39 +
 .../2.0/hooks/before-START/scripts/params.py    |   318 +
 .../before-START/scripts/rack_awareness.py      |    47 +
 .../scripts/shared_initialization.py            |   175 +
 .../templates/commons-logging.properties.j2     |    43 +
 .../templates/exclude_hosts_list.j2             |    21 +
 .../templates/hadoop-metrics2.properties.j2     |   104 +
 .../before-START/templates/health_check.j2      |    81 +
 .../templates/include_hosts_list.j2             |    21 +
 .../templates/topology_mappings.data.j2         |    24 +
 .../resources/stacks/ODPi/2.0/kerberos.json     |    60 +
 .../main/resources/stacks/ODPi/2.0/metainfo.xml |    22 +
 .../ODPi/2.0/properties/stack_features.json     |    51 +
 .../stacks/ODPi/2.0/properties/stack_tools.json |     4 +
 .../stacks/ODPi/2.0/repos/repoinfo.xml          |    33 +
 .../stacks/ODPi/2.0/role_command_order.json     |    75 +
 .../stacks/ODPi/2.0/services/HDFS/metainfo.xml  |    27 +
 .../stacks/ODPi/2.0/services/HIVE/alerts.json   |   232 +
 .../services/HIVE/configuration/hcat-env.xml    |    41 +
 .../services/HIVE/configuration/hive-env.xml    |   558 +
 .../HIVE/configuration/hive-exec-log4j.xml      |    96 +
 .../services/HIVE/configuration/hive-log4j.xml  |   106 +
 .../services/HIVE/configuration/hive-site.xml   |  2814 ++
 .../HIVE/configuration/hivemetastore-site.xml   |    61 +
 .../HIVE/configuration/hiveserver2-site.xml     |   140 +
 .../services/HIVE/configuration/webhcat-env.xml |    56 +
 .../HIVE/configuration/webhcat-log4j.xml        |    63 +
 .../HIVE/configuration/webhcat-site.xml         |   305 +
 .../HIVE/etc/hive-schema-0.12.0.mysql.sql       |   794 +
 .../HIVE/etc/hive-schema-0.12.0.oracle.sql      |   735 +
 .../HIVE/etc/hive-schema-0.12.0.postgres.sql    |  1423 +
 .../HIVE/etc/hive-schema-0.13.0.mysql.sql       |   906 +
 .../HIVE/etc/hive-schema-0.13.0.oracle.sql      |   852 +
 .../HIVE/etc/hive-schema-0.13.0.postgres.sql    |  1555 ++
 .../etc/upgrade-0.12.0-to-0.13.0.oracle.sql     |   165 +
 .../services/HIVE/etc/upgrade-0.13.0.oracle.sql |    55 +
 .../stacks/ODPi/2.0/services/HIVE/kerberos.json |   132 +
 .../stacks/ODPi/2.0/services/HIVE/metainfo.xml  |   369 +
 .../alert_hive_interactive_thrift_port.py       |   216 +
 .../HIVE/package/alerts/alert_hive_metastore.py |   270 +
 .../package/alerts/alert_hive_thrift_port.py    |   274 +
 .../package/alerts/alert_llap_app_status.py     |   299 +
 .../HIVE/package/alerts/alert_webhcat_server.py |   228 +
 .../package/etc/hive-schema-0.12.0.mysql.sql    |   794 +
 .../package/etc/hive-schema-0.12.0.oracle.sql   |   735 +
 .../package/etc/hive-schema-0.12.0.postgres.sql |  1423 +
 .../services/HIVE/package/files/addMysqlUser.sh |    39 +
 .../services/HIVE/package/files/hcatSmoke.sh    |    41 +
 .../services/HIVE/package/files/hiveSmoke.sh    |    24 +
 .../HIVE/package/files/hiveTezSetup.cmd         |    58 +
 .../services/HIVE/package/files/hiveserver2.sql |    23 +
 .../HIVE/package/files/hiveserver2Smoke.sh      |    32 +
 .../2.0/services/HIVE/package/files/pigSmoke.sh |    18 +
 .../HIVE/package/files/removeMysqlUser.sh       |    33 +
 .../HIVE/package/files/startMetastore.sh        |    25 +
 .../HIVE/package/files/templetonSmoke.sh        |    58 +
 .../services/HIVE/package/scripts/__init__.py   |    19 +
 .../2.0/services/HIVE/package/scripts/hcat.py   |    81 +
 .../HIVE/package/scripts/hcat_client.py         |    85 +
 .../HIVE/package/scripts/hcat_service_check.py  |    86 +
 .../2.0/services/HIVE/package/scripts/hive.py   |   478 +
 .../HIVE/package/scripts/hive_client.py         |    68 +
 .../HIVE/package/scripts/hive_interactive.py    |   302 +
 .../HIVE/package/scripts/hive_metastore.py      |   259 +
 .../HIVE/package/scripts/hive_server.py         |   211 +
 .../package/scripts/hive_server_interactive.py  |   535 +
 .../HIVE/package/scripts/hive_server_upgrade.py |   141 +
 .../HIVE/package/scripts/hive_service.py        |   187 +
 .../package/scripts/hive_service_interactive.py |   109 +
 .../HIVE/package/scripts/mysql_server.py        |    64 +
 .../HIVE/package/scripts/mysql_service.py       |    49 +
 .../HIVE/package/scripts/mysql_users.py         |    70 +
 .../HIVE/package/scripts/mysql_utils.py         |    35 +
 .../2.0/services/HIVE/package/scripts/params.py |    29 +
 .../HIVE/package/scripts/params_linux.py        |   735 +
 .../HIVE/package/scripts/params_windows.py      |    74 +
 .../HIVE/package/scripts/service_check.py       |   190 +
 .../HIVE/package/scripts/setup_ranger_hive.py   |    98 +
 .../scripts/setup_ranger_hive_interactive.py    |    78 +
 .../HIVE/package/scripts/status_params.py       |   123 +
 .../services/HIVE/package/scripts/webhcat.py    |   145 +
 .../HIVE/package/scripts/webhcat_server.py      |   164 +
 .../HIVE/package/scripts/webhcat_service.py     |    96 +
 .../package/scripts/webhcat_service_check.py    |   128 +
 .../hadoop-metrics2-hivemetastore.properties.j2 |    54 +
 .../hadoop-metrics2-hiveserver2.properties.j2   |    54 +
 .../templates/hadoop-metrics2-llapdaemon.j2     |    52 +
 .../hadoop-metrics2-llaptaskscheduler.j2        |    52 +
 .../HIVE/package/templates/hive.conf.j2         |    35 +
 .../package/templates/startHiveserver2.sh.j2    |    24 +
 .../templates/startHiveserver2Interactive.sh.j2 |    24 +
 .../package/templates/templeton_smoke.pig.j2    |    24 +
 .../ODPi/2.0/services/KERBEROS/metainfo.xml     |    26 +
 .../2.0/services/YARN/MAPREDUCE2_metrics.json   |  2596 ++
 .../ODPi/2.0/services/YARN/YARN_metrics.json    |  3486 +++
 .../ODPi/2.0/services/YARN/YARN_widgets.json    |   611 +
 .../stacks/ODPi/2.0/services/YARN/alerts.json   |   418 +
 .../YARN/configuration-mapred/mapred-env.xml    |   105 +
 .../YARN/configuration-mapred/mapred-site.xml   |   481 +
 .../YARN/configuration/capacity-scheduler.xml   |   130 +
 .../services/YARN/configuration/yarn-env.xml    |   260 +
 .../services/YARN/configuration/yarn-log4j.xml  |    94 +
 .../services/YARN/configuration/yarn-site.xml   |   579 +
 .../stacks/ODPi/2.0/services/YARN/kerberos.json |   214 +
 .../stacks/ODPi/2.0/services/YARN/metainfo.xml  |   310 +
 .../package/alerts/alert_nodemanager_health.py  |   209 +
 .../alerts/alert_nodemanagers_summary.py        |   219 +
 .../files/validateYarnComponentStatusWindows.py |   161 +
 .../services/YARN/package/scripts/__init__.py   |    20 +
 .../scripts/application_timeline_server.py      |   155 +
 .../YARN/package/scripts/historyserver.py       |   190 +
 .../YARN/package/scripts/install_jars.py        |    99 +
 .../package/scripts/mapred_service_check.py     |   168 +
 .../YARN/package/scripts/mapreduce2_client.py   |    98 +
 .../YARN/package/scripts/nodemanager.py         |   161 +
 .../YARN/package/scripts/nodemanager_upgrade.py |    73 +
 .../2.0/services/YARN/package/scripts/params.py |    31 +
 .../YARN/package/scripts/params_linux.py        |   469 +
 .../YARN/package/scripts/params_windows.py      |    59 +
 .../YARN/package/scripts/resourcemanager.py     |   289 +
 .../services/YARN/package/scripts/service.py    |   105 +
 .../YARN/package/scripts/service_check.py       |   159 +
 .../YARN/package/scripts/setup_ranger_yarn.py   |    71 +
 .../YARN/package/scripts/status_params.py       |    61 +
 .../2.0/services/YARN/package/scripts/yarn.py   |   499 +
 .../YARN/package/scripts/yarn_client.py         |    67 +
 .../package/templates/container-executor.cfg.j2 |    40 +
 .../package/templates/exclude_hosts_list.j2     |    21 +
 .../YARN/package/templates/mapreduce.conf.j2    |    35 +
 .../package/templates/taskcontroller.cfg.j2     |    38 +
 .../YARN/package/templates/yarn.conf.j2         |    35 +
 .../ODPi/2.0/services/ZOOKEEPER/metainfo.xml    |    27 +
 .../stacks/ODPi/2.0/services/stack_advisor.py   |  1947 ++
 .../main/resources/stacks/ODPi/2.0/widgets.json |    95 +
 contrib/views/capacity-scheduler/pom.xml        |     7 +-
 .../ui/app/components/capacityInput.js          |    62 +
 .../ui/app/components/userGroupInput.js         |     4 +-
 .../main/resources/ui/app/templates/queue.hbs   |     2 +-
 contrib/views/files/pom.xml                     |     3 +-
 .../files/src/main/resources/ui/package.json    |     4 +-
 contrib/views/hawq/pom.xml                      |     2 +
 contrib/views/hive-next/pom.xml                 |     3 +-
 .../apache/ambari/view/hive2/HelpService.java   |    18 +
 .../ambari/view/hive2/utils/Constants.java      |    25 +
 .../ambari/view/hive2/utils/ServiceCheck.java   |   132 +
 .../ui/hive-web/app/adapters/service-check.js   |    47 +
 .../ui/hive-web/app/controllers/splash.js       |    25 +-
 .../resources/ui/hive-web/app/routes/splash.js  |    41 +-
 .../resources/ui/hive-web/app/styles/app.scss   |     6 +
 .../ui/hive-web/app/templates/splash.hbs        |    12 +-
 .../src/main/resources/ui/hive-web/package.json |     4 +-
 .../views/hive-next/src/main/resources/view.xml |     2 +-
 contrib/views/hive20/pom.xml                    |     3 +-
 .../ambari/view/hive20/ConnectionDelegate.java  |     4 +
 .../apache/ambari/view/hive20/Constants.java    |    25 +
 .../view/hive20/HiveJdbcConnectionDelegate.java |     6 +
 .../ambari/view/hive20/actor/JdbcConnector.java |    67 +-
 .../view/hive20/actor/StatementExecutor.java    |    15 +
 .../actor/message/GetDatabaseMetadataJob.java   |    24 +
 .../hive20/actor/message/ResultInformation.java |    19 +
 .../actor/message/job/AuthenticationFailed.java |    27 +
 .../view/hive20/actor/message/job/Failure.java  |     2 +-
 .../view/hive20/actor/message/job/Result.java   |    19 +-
 .../ambari/view/hive20/client/DDLDelegator.java |     3 +
 .../view/hive20/client/DDLDelegatorImpl.java    |    58 +-
 .../hive20/client/DatabaseMetadataWrapper.java  |    37 +
 .../view/hive20/internal/HdfsApiSupplier.java   |     4 +-
 .../view/hive20/internal/dto/ColumnStats.java   |     5 +
 .../view/hive20/internal/dto/TableStats.java    |    12 +
 .../parsers/DatabaseMetadataExtractor.java      |    46 +
 .../internal/parsers/TableMetaParser.java       |     3 +-
 .../internal/parsers/TableMetaParserImpl.java   |     9 +-
 .../resources/browser/ConnectionService.java    |    21 +-
 .../view/hive20/resources/browser/DDLProxy.java |    23 +-
 .../view/hive20/resources/jobs/JobService.java  |     2 +-
 .../hive20/resources/system/ServiceCheck.java   |   133 +
 .../hive20/resources/system/SystemService.java  |    18 +
 .../resources/ui/app/adapters/application.js    |    12 +-
 .../src/main/resources/ui/app/adapters/auth.js  |    27 +
 .../resources/ui/app/adapters/service-check.js  |     5 +
 .../ui/app/components/table-statistics.js       |    73 +-
 .../ui/app/components/top-application-bar.js    |     3 +-
 .../ui/app/components/visual-explain.js         |    10 +-
 .../ui/app/configs/service-check-status.js      |     2 +-
 .../resources/ui/app/controllers/application.js |     5 +-
 .../resources/ui/app/controllers/password.js    |    44 +
 .../ui/app/controllers/service-check.js         |    25 +-
 .../hive20/src/main/resources/ui/app/index.html |     2 +-
 .../hive20/src/main/resources/ui/app/router.js  |     1 +
 .../main/resources/ui/app/routes/application.js |    17 +
 .../main/resources/ui/app/routes/databases.js   |     4 +-
 .../ui/app/routes/databases/database/tables.js  |     4 +-
 .../databases/database/tables/upload-table.js   |     3 +-
 .../main/resources/ui/app/routes/password.js    |    41 +
 .../resources/ui/app/routes/service-check.js    |    34 +
 .../main/resources/ui/app/services/ldap-auth.js |    35 +
 .../resources/ui/app/services/service-check.js  |    72 +-
 .../resources/ui/app/services/stats-service.js  |    15 +-
 .../resources/ui/app/services/tez-view-info.js  |     3 +-
 .../resources/ui/app/templates/application.hbs  |     5 +
 .../ui/app/templates/components/column-item.hbs |     2 +-
 .../app/templates/components/create-table.hbs   |     2 +-
 .../app/templates/components/table-columns.hbs  |     1 +
 .../templates/components/table-statistics.hbs   |    25 +-
 .../components/top-application-bar.hbs          |    10 +-
 .../app/templates/components/upload-table.hbs   |     2 +-
 .../components/visual-explain-detail.hbs        |     3 +
 .../app/templates/components/visual-explain.hbs |     2 +-
 .../databases/database/tables/upload-table.hbs  |     2 +-
 .../resources/ui/app/templates/password.hbs     |    48 +
 .../ui/app/templates/service-check.hbs          |    12 +-
 .../ui/app/utils/hive-explainer/processor.js    |    98 +
 .../ui/app/utils/hive-explainer/renderer.js     |     5 +-
 .../ui/app/utils/hive-explainer/transformer.js  |    72 +-
 .../hive20/src/main/resources/ui/package.json   |     4 +-
 .../views/hive20/src/main/resources/view.xml    |     2 +-
 contrib/views/hueambarimigration/pom.xml        |     3 +-
 .../pig/jobqueryset/QuerySetAmbariDB.java       |     2 +-
 .../savedscriptqueryset/QuerySetAmbariDB.java   |     2 +-
 .../PostgressQuerySetHueDb.java                 |    20 +-
 .../ui/hueambarimigration-view/package.json     |     4 +-
 contrib/views/jobs/pom.xml                      |     3 +-
 contrib/views/pig/pom.xml                       |     5 +-
 .../ambari/view/pig/services/HelpService.java   |    25 +-
 .../apache/ambari/view/pig/utils/Constants.java |    25 +
 .../ambari/view/pig/utils/ServiceCheck.java     |   132 +
 .../ui/pig-web/app/controllers/splash.js        |    40 +-
 .../resources/ui/pig-web/app/routes/splash.js   |    44 +-
 .../ui/pig-web/app/templates/splash.hbs         |    16 +-
 .../src/main/resources/scripts/utils/Utils.js   |     2 +-
 contrib/views/storm/src/main/resources/view.xml |     7 +
 .../resources/ui/ambari-scripts/init-view.js    |     1 +
 contrib/views/wfmanager/pom.xml                 |     3 +-
 .../apache/oozie/ambari/view/HDFSFileUtils.java |    41 +-
 .../ambari/view/OozieProxyImpersonator.java     |    16 +-
 .../resources/ui/app/components/search-table.js |     2 +-
 .../main/resources/ui/app/controllers/index.js  |     5 +-
 .../ui/app/domain/workflow-importer.js          |     2 +-
 .../resources/ui/app/routes/design/jobtab.js    |     2 +-
 .../src/main/resources/ui/app/routes/index.js   |    66 +-
 .../ui/app/services/workflow-clipboard.js       |     4 +-
 .../src/main/resources/ui/app/styles/app.less   |    43 +-
 .../components/workflow-job-action.hbs          |    14 +-
 .../components/workflow-job-details.hbs         |    44 +-
 .../wfmanager/src/main/resources/ui/pom.xml     |     3 +-
 docs/pom.xml                                    |    23 +
 pom.xml                                         |     3 +
 2570 files changed, 192799 insertions(+), 317421 deletions(-)
----------------------------------------------------------------------



[20/49] ambari git commit: AMBARI-20495. Ambari REST API explorer should show ambari logo. (Oleg Nechiporenko)

Posted by ad...@apache.org.
AMBARI-20495. Ambari REST API explorer should show ambari logo. (Oleg Nechiporenko)


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

Branch: refs/heads/trunk
Commit: 0a4e4169c96714207eafb8dce1398096c0188e25
Parents: fb86fb3
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Mon Mar 20 17:47:23 2017 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Mon Mar 20 17:47:23 2017 -0700

----------------------------------------------------------------------
 ambari-web/api-docs/css/index.css | 9 ++++-----
 ambari-web/api-docs/index.html    | 2 +-
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0a4e4169/ambari-web/api-docs/css/index.css
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/css/index.css b/ambari-web/api-docs/css/index.css
index b013939..1de91e3 100644
--- a/ambari-web/api-docs/css/index.css
+++ b/ambari-web/api-docs/css/index.css
@@ -15470,13 +15470,12 @@ header.site-header.site-header nav .navbar-brand {
     width: 120px;
 }
 header.site-header.site-header nav .navbar-brand a {
-    background: url("../images/senodio.png") center left no-repeat;
-    /*background-size: 76%;*/
+    background: url("/img/ambari-logo.png") center left no-repeat;
     width: 130px;
-    height: 40px;
+    height: 32px;
     display: block;
-    margin-top: 5px;
-    background-size: 48%;
+    margin-top: 10px;
+    background-size: 32px;
 }
 header.site-header.site-header nav .navbar-brand img {
     position: relative;

http://git-wip-us.apache.org/repos/asf/ambari/blob/0a4e4169/ambari-web/api-docs/index.html
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/index.html b/ambari-web/api-docs/index.html
index 93ffe33..90728cd 100644
--- a/ambari-web/api-docs/index.html
+++ b/ambari-web/api-docs/index.html
@@ -215,7 +215,7 @@
         <button type="button" data-toggle="collapse" data-target="#navbar-collapse" class="navbar-toggle"><span
                 class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span
                 class="icon-bar"></span><span class="icon-bar"></span></button>
-        <h1 class="navbar-brand"><a href="http://swagger.io"><span>swagger explorer</span></a></h1>
+        <h1 class="navbar-brand"><a href="/#/main/dashboard"><span>Ambari</span></a></h1>
       </div>
       <div id="navbar-collapse" class="collapse navbar-collapse">
         <ul class="nav navbar-nav navbar-left">


[24/49] ambari git commit: AMBARI-20624. Misc fixes for ambari-server swagger integration prototype. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java
index ad9c485..47515c9 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java
@@ -58,7 +58,7 @@ public class UserService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Get all users", notes = "Returns details of all users.", response = UserResponse.class, responseContainer = "List")
+  @ApiOperation(value = "Get all users", nickname = "UserService#getUsers", notes = "Returns details of all users.", response = UserResponse.class, responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter user details", defaultValue = "Users/*", dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "sortBy", value = "Sort users (asc | desc)", defaultValue = "Users/user_name.desc", dataType = "string", paramType = "query"),
@@ -85,7 +85,7 @@ public class UserService extends BaseService {
   @GET
   @Path("{userName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Get single user", notes = "Returns user details.", response = UserResponse.class)
+  @ApiOperation(value = "Get single user", nickname = "UserService#getUser", notes = "Returns user details.", response = UserResponse.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter user details", defaultValue = "Users", dataType = "string", paramType = "query")
   })
@@ -123,7 +123,7 @@ public class UserService extends BaseService {
   @POST
   @Path("{userName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Create new user", notes = "Creates user resource.")
+  @ApiOperation(value = "Create new user", nickname = "UserService#createUser", notes = "Creates user resource.")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.UserRequest", paramType = "body")
   })
@@ -148,7 +148,7 @@ public class UserService extends BaseService {
   @PUT
   @Path("{userName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Update user detail", notes = "Updates user resource.")
+  @ApiOperation(value = "Update user detail", nickname = "UserService#updateUser", notes = "Updates user resource.")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.UserRequest", paramType = "body")
   })
@@ -169,7 +169,7 @@ public class UserService extends BaseService {
   @DELETE
   @Path("{userName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Delete single user", notes = "Delete user resource.")
+  @ApiOperation(value = "Delete single user", nickname = "UserService#deleteUser", notes = "Delete user resource.")
   @ApiResponses(value = {
     @ApiResponse(code = 200, message = "Successful operation"),
     @ApiResponse(code = 500, message = "Server Error")}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewDataMigrationService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewDataMigrationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewDataMigrationService.java
index 388f454..a85dc20 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewDataMigrationService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewDataMigrationService.java
@@ -70,13 +70,13 @@ public class ViewDataMigrationService extends BaseService {
    */
   @PUT
   @Path("{originVersion}/{originInstanceName}")
-  @ApiOperation(value = "Migrate view instance data", notes = "Migrates view instance persistence data from origin view instance specified in the path params.")
+  @ApiOperation(value = "Migrate view instance data", nickname = "ViewDataMigrationService#migrateData", notes = "Migrates view instance persistence data from origin view instance specified in the path params.")
   @ApiResponses(value = {
     @ApiResponse(code = 200, message = "Successful operation"),
     @ApiResponse(code = 500, message = "Server Error")}
   )
   public Response migrateData( @ApiParam(value = "view name") @PathParam("viewName") String viewName,
-                               @ApiParam(value = "view version") @PathParam("viewVersion") String viewVersion,
+                               @ApiParam(value = "view version") @PathParam("version") String viewVersion,
                                @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName,
                                @ApiParam(value = "origin version") @PathParam("originVersion") String originViewVersion,
                                @ApiParam(value = "origin instance name") @PathParam("originInstanceName") String originInstanceName)

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
index 9657c0e..639933a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
@@ -75,7 +75,7 @@ public class ViewInstanceService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Get all view instances", notes = "Returns all instances for a view version.", response = ViewInstanceResponse.class, responseContainer = "List")
+  @ApiOperation(value = "Get all view instances", nickname = "ViewInstanceService#getServices", notes = "Returns all instances for a view version.", response = ViewInstanceResponse.class, responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter view instance details", defaultValue = "ViewInstanceInfo/*", dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "sortBy", value = "Sort users (asc | desc)", defaultValue = "ViewInstanceInfo/instance_name.desc", dataType = "string", paramType = "query"),
@@ -107,7 +107,7 @@ public class ViewInstanceService extends BaseService {
   @GET
   @Path("{instanceName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Get single view instance", notes = "Returns view instance details.", response = ViewInstanceResponse.class)
+  @ApiOperation(value = "Get single view instance", nickname = "ViewInstanceService#getService", notes = "Returns view instance details.", response = ViewInstanceResponse.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter view instance details", defaultValue = "ViewInstanceInfo", dataType = "string", paramType = "query")
   })
@@ -137,7 +137,7 @@ public class ViewInstanceService extends BaseService {
   @POST
   @Path("{instanceName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Create view instance", notes = "Creates view instance resource.")
+  @ApiOperation(value = "Create view instance", nickname = "ViewInstanceService#createService", notes = "Creates view instance resource.")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.ViewInstanceRequest", paramType = "body")
   })
@@ -186,7 +186,7 @@ public class ViewInstanceService extends BaseService {
   @PUT
   @Path("{instanceName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Update view instance detail", notes = "Updates view instance resource.")
+  @ApiOperation(value = "Update view instance detail", nickname = "ViewInstanceService#updateService", notes = "Updates view instance resource.")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.ViewInstanceRequest", paramType = "body")
   })
@@ -234,7 +234,7 @@ public class ViewInstanceService extends BaseService {
   @DELETE
   @Path("{instanceName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Delete view instance", notes = "Delete view resource.")
+  @ApiOperation(value = "Delete view instance", nickname = "ViewInstanceService#deleteService", notes = "Delete view resource.")
   @ApiResponses(value = {
     @ApiResponse(code = 200, message = "Successful operation"),
     @ApiResponse(code = 500, message = "Server Error")}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java
index cbc037b..f8e2a56 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java
@@ -68,7 +68,7 @@ public class ViewPermissionService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Get all permissions for a view", notes = "Returns all permission details for the version of a view.", response = ViewPermissionResponse.class, responseContainer = "List")
+  @ApiOperation(value = "Get all permissions for a view", nickname = "ViewPermissionService#getPermissions", notes = "Returns all permission details for the version of a view.", response = ViewPermissionResponse.class, responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter privileges", defaultValue = "PermissionInfo/*", dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
@@ -100,7 +100,7 @@ public class ViewPermissionService extends BaseService {
   @GET
   @Path("{permissionId}")
   @Produces("text/plain")
-  @ApiOperation(value = "Get single view permission", notes = "Returns permission details for a single version of a view.", response = ViewPermissionResponse.class)
+  @ApiOperation(value = "Get single view permission", nickname = "ViewPermissionService#getPermission", notes = "Returns permission details for a single version of a view.", response = ViewPermissionResponse.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter view permission details", defaultValue = "PermissionInfo", dataType = "string", paramType = "query")
   })

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPrivilegeService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPrivilegeService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPrivilegeService.java
index e6d817f..047d463 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPrivilegeService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPrivilegeService.java
@@ -67,7 +67,7 @@ public class ViewPrivilegeService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Get all view instance privileges", notes = "Returns all privileges for the resource.", response = ViewPrivilegeResponse.class, responseContainer = "List")
+  @ApiOperation(value = "Get all view instance privileges", nickname = "ViewPrivilegeService#getPrivileges", notes = "Returns all privileges for the resource.", response = ViewPrivilegeResponse.class, responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter privileges", defaultValue = "PrivilegeInfo/*", dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "sortBy", value = "Sort privileges (asc | desc)", defaultValue = "PrivilegeInfo/user_name.asc", dataType = "string", paramType = "query"),
@@ -98,7 +98,7 @@ public class ViewPrivilegeService extends BaseService {
   @GET
   @Path("/{privilegeId}")
   @Produces("text/plain")
-  @ApiOperation(value = "Get single view instance privilege", notes = "Returns privilege details.", response = ViewPrivilegeResponse.class)
+  @ApiOperation(value = "Get single view instance privilege", nickname = "ViewPrivilegeService#getPrivilege", notes = "Returns privilege details.", response = ViewPrivilegeResponse.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter privilege details", defaultValue = "PrivilegeInfo", dataType = "string", paramType = "query")
   })
@@ -129,7 +129,7 @@ public class ViewPrivilegeService extends BaseService {
    */
   @POST
   @Produces("text/plain")
-  @ApiOperation(value = "Create view instance privilege", notes = "Create privilege resource for view instance.")
+  @ApiOperation(value = "Create view instance privilege", nickname = "ViewPrivilegeService#createPrivilege", notes = "Create privilege resource for view instance.")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.ViewPrivilegeRequest", paramType = "body")
   })
@@ -240,7 +240,7 @@ public class ViewPrivilegeService extends BaseService {
   @DELETE
   @Path("{privilegeId}")
   @Produces("text/plain")
-  @ApiOperation(value = "Delete view instance privilege", notes = "Delete view instance privilege resource.")
+  @ApiOperation(value = "Delete view instance privilege", nickname = "ViewPrivilegeService#deletePrivilege", notes = "Delete view instance privilege resource.")
   @ApiResponses(value = {
     @ApiResponse(code = 200, message = "Successful operation"),
     @ApiResponse(code = 500, message = "Server Error")}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewService.java
index 1936d5b..7005d8c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewService.java
@@ -65,7 +65,7 @@ public class ViewService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Get all views", notes = "Returns details of all views.", response = ViewResponse.class, responseContainer = "List")
+  @ApiOperation(value = "Get all views", nickname = "ViewService#getViews", notes = "Returns details of all views.", response = ViewResponse.class, responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter view details", defaultValue = "ViewInfo/*", dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "sortBy", value = "Sort users (asc | desc)", defaultValue = "ViewInfo/view_name.asc", dataType = "string", paramType = "query"),
@@ -93,7 +93,7 @@ public class ViewService extends BaseService {
   @GET
   @Path("{viewName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Get single view", notes = "Returns view details.", response = ViewResponse.class)
+  @ApiOperation(value = "Get single view", nickname = "ViewService#getView", notes = "Returns view details.", response = ViewResponse.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter view details", defaultValue = "ViewInfo", dataType = "string", paramType = "query")
   })

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewVersionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewVersionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewVersionService.java
index ed6ddb1..95ebb39 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewVersionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewVersionService.java
@@ -67,7 +67,7 @@ public class ViewVersionService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Get all versions for a view", notes = "Returns details of all versions for a view.", response = ViewVersionResponse.class, responseContainer = "List")
+  @ApiOperation(value = "Get all versions for a view", nickname = "ViewVersionService#getVersions", notes = "Returns details of all versions for a view.", response = ViewVersionResponse.class, responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter view version details", defaultValue = "ViewVersionInfo/*", dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "sortBy", value = "Sort users (asc | desc)", defaultValue = "ViewVersionInfo/version.desc", dataType = "string", paramType = "query"),
@@ -99,14 +99,14 @@ public class ViewVersionService extends BaseService {
   @GET
   @Path("{version}")
   @Produces("text/plain")
-  @ApiOperation(value = "Get single view version", notes = "Returns view details.", response = ViewVersionResponse.class)
+  @ApiOperation(value = "Get single view version", nickname = "ViewVersionService#getVersion", notes = "Returns view details.", response = ViewVersionResponse.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter view details", defaultValue = "ViewVersionInfo", dataType = "string", paramType = "query")
   })
   @ApiResponses(value = {
     @ApiResponse(code = 200, message = "Successful operation", response = ViewVersionResponse.class)}
   )
-  public Response getVersions(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+  public Response getVersion(String body, @Context HttpHeaders headers, @Context UriInfo ui,
                               @ApiParam(value = "view name") @PathParam("viewName") String viewName,
                               @PathParam("version") String version) {
 


[07/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/lib/jquery-1.8.0.min.js
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/lib/jquery-1.8.0.min.js b/ambari-web/api-docs/lib/jquery-1.8.0.min.js
new file mode 100644
index 0000000..066d72c
--- /dev/null
+++ b/ambari-web/api-docs/lib/jquery-1.8.0.min.js
@@ -0,0 +1,2 @@
+/*! jQuery v@1.8.0 jquery.com | jquery.org/license */
+(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(
 a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c==="input"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="scri
 pt"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bX(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bV.length;while(e--){b=bV[e]+c;if(b in a)return b}return d}function bY(a,b){return a=b||a,p.css(a,"display")==="none"||!p.contains(a.ownerDocument,a)}function bZ(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,"olddisplay"),b?(!e[f]&&c.style.display==="none"&&(c.style.display=""),c.style.display===""&&bY(c)&&(e[f]=p._data(c,"olddisplay",cb(c.nodeName)))):(d=bH(c,"display"),!e[f]&&d!=="none"&&p._data(c,"olddisplay",d))}for(f=0;f<g;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display==="none"||c.style.display==="")c.style.display=b?e[f]||"":"none"}return a}function b$(a,b,c){
 var d=bO.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function b_(a,b,c,d){var e=c===(d?"border":"content")?4:b==="width"?1:0,f=0;for(;e<4;e+=2)c==="margin"&&(f+=p.css(a,c+bU[e],!0)),d?(c==="content"&&(f-=parseFloat(bH(a,"padding"+bU[e]))||0),c!=="margin"&&(f-=parseFloat(bH(a,"border"+bU[e]+"Width"))||0)):(f+=parseFloat(bH(a,"padding"+bU[e]))||0,c!=="padding"&&(f+=parseFloat(bH(a,"border"+bU[e]+"Width"))||0));return f}function ca(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&p.css(a,"boxSizing")==="border-box";if(d<=0){d=bH(a,b);if(d<0||d==null)d=a.style[b];if(bP.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+b_(a,b,c||(f?"border":"content"),e)+"px"}function cb(a){if(bR[a])return bR[a];var b=p("<"+a+">").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createEle
 ment)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write("<!doctype html><html><body>"),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bR[a]=c,c}function ch(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||cd.test(a)?d(a,e):ch(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ch(a+"["+e+"]",b[e],c,d);else d(a,b)}function cy(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h<i;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function cz(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h,i=a[f],j=0,k=i?i.length:0,l=a===cu;for(;j<k&&(l||!h);j++)h=i[j](c,d,e),typeof h=="string"&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=cz(a,c,d,e,h,g)));return(l||!h)&&!g["*"]&&(h=cz(a,c,d,e,"*",g)),h}function cA(a,c){var d,e,f=p.ajaxSettings.flatOptions||{};for(d in c
 )c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&p.extend(!0,a,e)}function cB(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);while(j[0]==="*")j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}if(g)return g!==j[0]&&j.unshift(g),d[g]}function cC(a,b){var c,d,e,f,g=a.dataTypes.slice(),h=g[0],i={},j=0;a.dataFilter&&(b=a.dataFilter(b,a.dataType));if(g[1])for(c in a.converters)i[c.toLowerCase()]=a.converters[c];for(;e=g[++j];)if(e!=="*"){if(h!=="*"&&h!==e){c=i[h+" "+e]||i["* "+e];if(!c)for(d in i){f=d.split(" ");if(f[1]===e){c=i[h+" "+f[0]]||i["* "+f[0]];if(c){c===!0?c=i[d]:i[d]!==!0&&(e=f[0],g.splice(j--,0,e));break}}}if(c!==!0)if(c&&a["throws"])b=c(b);else try{b=c(b)}catch(k){return{state:"parsererror",error:c?k:"No conversion from "+h+" to "+e}}}h=e}return{state:"succe
 ss",data:b}}function cK(){try{return new a.XMLHttpRequest}catch(b){}}function cL(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cT(){return setTimeout(function(){cM=b},0),cM=p.now()}function cU(a,b){p.each(b,function(b,c){var d=(cS[b]||[]).concat(cS["*"]),e=0,f=d.length;for(;e<f;e++)if(d[e].call(a,b,c))return})}function cV(a,b,c){var d,e=0,f=0,g=cR.length,h=p.Deferred().always(function(){delete i.elem}),i=function(){var b=cM||cT(),c=Math.max(0,j.startTime+j.duration-b),d=1-(c/j.duration||0),e=0,f=j.tweens.length;for(;e<f;e++)j.tweens[e].run(d);return h.notifyWith(a,[j,d,c]),d<1&&f?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:p.extend({},b),opts:p.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:cM||cT(),duration:c.duration,tweens:[],createTween:function(b,c,d){var e=p.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(e),e},stop:function(b){var c=0,d=b?j.tweens.length:0;for(;c<d;c++)j.t
 weens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;cW(k,j.opts.specialEasing);for(;e<g;e++){d=cR[e].call(j,a,k,j.opts);if(d)return d}return cU(j,k),p.isFunction(j.opts.start)&&j.opts.start.call(a,j),p.fx.timer(p.extend(i,{anim:j,queue:j.opts.queue,elem:a})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function cW(a,b){var c,d,e,f,g;for(c in a){d=p.camelCase(c),e=b[d],f=a[c],p.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=p.cssHooks[d];if(g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}}function cX(a,b,c){var d,e,f,g,h,i,j,k,l=this,m=a.style,n={},o=[],q=a.nodeType&&bY(a);c.queue||(j=p._queueHooks(a,"fx"),j.unqueued==null&&(j.unqueued=0,k=j.empty.fire,j.empty.fire=function(){j.unqueued||k()}),j.unqueued++,l.always(function(){l.always(function(){j.unqueued--,p.queue(a,"fx").length||j.empty.fire()})})),a.nodeType===1&&("height"in b||
 "width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],p.css(a,"display")==="inline"&&p.css(a,"float")==="none"&&(!p.support.inlineBlockNeedsLayout||cb(a.nodeName)==="inline"?m.display="inline-block":m.zoom=1)),c.overflow&&(m.overflow="hidden",p.support.shrinkWrapBlocks||l.done(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b){f=b[d];if(cO.exec(f)){delete b[d];if(f===(q?"hide":"show"))continue;o.push(d)}}g=o.length;if(g){h=p._data(a,"fxshow")||p._data(a,"fxshow",{}),q?p(a).show():l.done(function(){p(a).hide()}),l.done(function(){var b;p.removeData(a,"fxshow",!0);for(b in n)p.style(a,b,n[b])});for(d=0;d<g;d++)e=o[d],i=l.createTween(e,q?h[e]:0),n[e]=h[e]||p.style(a,e),e in h||(h[e]=i.start,q&&(i.end=i.start,i.start=e==="width"||e==="height"?1:0))}}function cY(a,b,c,d,e){return new cY.prototype.init(a,b,c,d,e)}function cZ(a,b){var c,d={height:a},e=0;for(;e<4;e+=2-b)c=bU[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d
 .width=a),d}function c_(a){return p.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c,d,e=a.document,f=a.location,g=a.navigator,h=a.jQuery,i=a.$,j=Array.prototype.push,k=Array.prototype.slice,l=Array.prototype.indexOf,m=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=String.prototype.trim,p=function(a,b){return new p.fn.init(a,b,c)},q=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,r=/\S/,s=/\s+/,t=r.test(" ")?/^[\s\xA0]+|[\s\xA0]+$/g:/^\s+|\s+$/g,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:fu
 nction(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.0",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return
  d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i<j;i++)if((a=arguments[i])!=null)for(c in a){d=h[c],e=a[c];if(h===e)contin
 ue;k&&e&&(p.isPlainObject(e)||(f=p.isArray(e)))?(f?(f=!1,g=d&&p.isArray(d)?d:[]):g=d&&p.isPlainObject(d)?d:{},h[c]=p.extend(k,g,e)):e!==b&&(h[c]=e)}return h},p.extend({noConflict:function(b){return a.$===p&&(a.$=i),b&&a.jQuery===p&&(a.jQuery=h),p},isReady:!1,readyWait:1,holdReady:function(a){a?p.readyWait++:p.ready(!0)},ready:function(a){if(a===!0?--p.readyWait:p.isReady)return;if(!e.body)return setTimeout(p.ready,1);p.isReady=!0;if(a!==!0&&--p.readyWait>0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.p
 rototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("In
 valid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f<g;)if(c.apply(a[f++],d)===!1)break}else if(h){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;f<g;)if(c.call(a[f],f,a[f++])===!1)break;return a},trim:o?function(a){return a==null?"":o.call(a)}:function(a){return a==null?"":a.toString().replace(t,"")},makeArray:function(a,b){var c,d=b||[];return a!=null&&(c=p.type(a),a.length==null||c==="string"||c==="function"||c==="regexp"||p.isWindow(a)?j.call(d,a):p.merge(d,a)),d},inArray:function(a,b,c){var d;if(b){if(l)return l.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:functi
 on(a,c){var d=c.length,e=a.length,f=0;if(typeof d=="number")for(;f<d;f++)a[e++]=c[f];else while(c[f]!==b)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;c=!!c;for(;f<g;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],h=0,i=a.length,j=a instanceof p||i!==b&&typeof i=="number"&&(i>0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h<i;h++)e=c(a[h],h,d),e!=null&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),e!=null&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){var d,e,f;return typeof c=="string"&&(d=a[c],c=a,a=d),p.isFunction(a)?(e=k.call(arguments,2),f=function(){return a.apply(c,e.concat(k.call(arguments)))},f.guid=a.guid=a.guid||f.guid||p.guid++,f):b},access:function(a,c,d,e,f,g,h){var i,j=d==null,k=0,l=a.length;if(d&&typeof d=="object"){for(k in d)p.access(a,c,k,d[k],1,g,e);f=1}else if(e!==b){i=h===b&&p.isFunction(e),j&&(i?(i=c,c=function(a,b,c){return i.call(p(a),c)}):(c.call(a,e),c=null));if
 (c)for(;k<l;k++)c(a[k],d,i?e.call(a[k],k,c(a[k],d)):e,h);f=1}return f?a:j?c.call(a):l?c(a[0],d):g},now:function(){return(new Date).getTime()}}),p.ready.promise=function(b){if(!d){d=p.Deferred();if(e.readyState==="complete"||e.readyState!=="loading"&&e.addEventListener)setTimeout(p.ready,1);else if(e.addEventListener)e.addEventListener("DOMContentLoaded",D,!1),a.addEventListener("load",p.ready,!1);else{e.attachEvent("onreadystatechange",D),a.attachEvent("onload",p.ready);var c=!1;try{c=a.frameElement==null&&e.documentElement}catch(f){}c&&c.doScroll&&function g(){if(!p.isReady){try{c.doScroll("left")}catch(a){return setTimeout(g,50)}p.ready()}}()}}return d.promise(b)},p.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){E["[object "+b+"]"]=b.toLowerCase()}),c=p(e);var F={};p.Callbacks=function(a){a=typeof a=="string"?F[a]||G(a):p.extend({},a);var c,d,e,f,g,h,i=[],j=!a.once&&[],k=function(b){c=a.memory&&b,d=!0,h=f||0,f=0,g=i.length,e=!0;for(;i&&h<g;
 h++)if(i[h].apply(b[0],b[1])===!1&&a.stopOnFalse){c=!1;break}e=!1,i&&(j?j.length&&k(j.shift()):c?i=[]:l.disable())},l={add:function(){if(i){var b=i.length;(function d(b){p.each(b,function(b,c){p.isFunction(c)&&(!a.unique||!l.has(c))?i.push(c):c&&c.length&&d(c)})})(arguments),e?g=i.length:c&&(f=b,k(c))}return this},remove:function(){return i&&p.each(arguments,function(a,b){var c;while((c=p.inArray(b,i,c))>-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callba
 cks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return typeof a=="object"?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.n
 otifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b<d;b++)c[b]&&p.isFunction(c[b].promise)?c[b].promise().done(g(b,j,c)).fail(f.reject).progress(g(b,i,h)):--e}return e||f.resolveWith(j,c),f.promise()}}),p.support=function(){var b,c,d,f,g,h,i,j,k,l,m,n=e.createElement("div");n.setAttribute("className","t"),n.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length||!d)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkO
 n:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).c
 loneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display
 :block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="<div></div>",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/^(?:\{.*\}|\[.*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQu
 ery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||++p.uuid:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e<f;e++)delete d[b[e]];
 if(!(c?K:p.isEmptyObject)(d))return}}if(!c){delete h[i].data;if(!K(h[i]))return}g?p.cleanData([a],!0):p.support.deleteExpando||h!=h.window?delete h[i]:h[i]=null},_data:function(a,b,c){return p.data(a,b,c,!0)},acceptData:function(a){var b=a.nodeName&&p.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),p.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length){k=p.data(i);if(i.nodeType===1&&!p._data(i,"parsedAttrs")){f=i.attributes;for(h=f.length;j<h;j++)g=f[j].name,g.indexOf("data-")===0&&(g=p.camelCase(g.substring(5)),J(i,g,k[g]));p._data(i,"parsedAttrs",!0)}}return k}return typeof a=="object"?this.each(function(){p.data(this,a)}):(d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!",p.access(this,function(c){if(c===b)return k=this.triggerHandler("getData"+e,[d[0]]),k===b&&i&&(k=p.data(i,a),k=J(i,a,k)),k===b&&d[1]?this.data(d[0]):k;d[1]=c,this.each(function(){var b=p(this);b.triggerHandler("setData"+e,d),p.data(this,a,
 c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.shift(),e=p._queueHooks(a,b),f=function(){p.dequeue(a,b)};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),delete e.stop,d.call(a,f,e)),!c.length&&e&&e.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length<d?p.queue(this[0],a):c===b?this:this.each(function(){var b=p.queue(this,a,c);p._queueHooks(this,a),a==="fx"&&b[0]!=="inprogress"&&p.dequeue(this,a)})},dequeue
 :function(a){return this.each(function(){p.dequeue(this,a)})},delay:function(a,b){return a=p.fx?p.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=p.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};typeof a!="string"&&(c=a,a=b),a=a||"fx";while(h--)(d=p._data(g[h],a+"queueHooks"))&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var L,M,N,O=/[\t\r\n]/g,P=/\r/g,Q=/^(?:button|input)$/i,R=/^(?:button|input|object|select|textarea)$/i,S=/^a(?:rea|)$/i,T=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,U=p.support.getSetAttribute;p.fn.extend({attr:function(a,b){return p.access(this,p.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.pro
 p,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{f=" "+e.className+" ";for(g=0,h=b.length;g<h;g++)~f.indexOf(" "+b[g]+" ")||(f+=b[g]+" ");e.className=p.trim(f)}}}return this},removeClass:function(a){var c,d,e,f,g,h,i;if(p.isFunction(a))return this.each(function(b){p(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(s);for(h=0,i=this.length;h<i;h++){e=this[h];if(e.nodeType===1&&e.className){d=(" "+e.className+" ").replace(O," ");for(f=0,g=c.length;f<g;f++)while(d.indexOf(" "+c[f]+" ")>-1)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleCla
 ss:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(O," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.va
 l()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c<d;c++){e=h[c];if(e.selected&&(p.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!p.nodeName(e.parentNode,"optgroup"))){b=p(e).val();if(i)return b;g.push(b)}}return i&&!g.length&&h.length?p(h[f]).val():g},set:function(a,b){var c=p.makeArray(b);return p(a).find("option").each(function(){this.selected=p.inArray(p(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;
 if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,""+d),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g<d.length;g++)e=d[g],e&&(c=p.propFix[e]||e,f=T.test(e),f||p.attr(a,e,""),a.removeAttribute(U?e:c),f&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(Q.test(a.nodeName)&&a.parentNode)p.error("type property can't be changed");else if(!p.support.radioValue&&b==="radio"&&p.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return L&&p.nodeName(a,"button")?L.get(a,b):b in a?a.value:null},set:function(a,b,c){if(L&&p.nodeName(a,"button"))return L.set(a,b
 ,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(!a||h===3||h===8||h===2)return;return g=h!==1||!p.isXMLDoc(a),g&&(c=p.propFix[c]||c,f=p.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&(e=f.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):R.test(a.nodeName)||S.test(a.nodeName)&&a.href?0:b}}}}),M={get:function(a,c){var d,e=p.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?p.removeAttr(a,c):(d=p.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},U||(N={name:!0,id:
 !0,coords:!0},L=p.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(N[c]?d.value!=="":d.specified)?d.value:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=e.createAttribute(c),a.setAttributeNode(d)),d.value=b+""}},p.each(["width","height"],function(a,b){p.attrHooks[b]=p.extend(p.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),p.attrHooks.contenteditable={get:L.get,set:function(a,b,c){b===""&&(b="false"),L.set(a,b,c)}}),p.support.hrefNormalized||p.each(["href","src","width","height"],function(a,c){p.attrHooks[c]=p.extend(p.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),p.support.style||(p.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),p.support.optSelected||(p.propHooks.selected=p.extend(p.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selec
 tedIndex),null}})),p.support.enctype||(p.propFix.enctype="encoding"),p.support.checkOn||p.each(["radio","checkbox"],function(){p.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]=p.extend(p.valHooks[this],{set:function(a,b){if(p.isArray(b))return a.checked=p.inArray(p(a).val(),b)>=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,argu
 ments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j<c.length;j++){k=W.exec(c[j])||[],l=k[1],m=(k[2]||"").split(".").sort(),r=p.event.special[l]||{},l=(f?r.delegateType:r.bindType)||l,r=p.event.special[l]||{},n=p.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,namespace:m.join(".")},o),q=i[l];if(!q){q=i[l]=[],q.delegateCount=0;if(!r.setup||r.setup.call(a,e,m,h)===!1)a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent("on"+l,h)}r.add&&(r.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?q.splice(q.delegateCount++,0,n):q.push(n),p.event.global[l]=!0}a=null},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,q,r=p.hasData(a)&&p._data(a);if(!r||!(m=r.events))return;b=p.trim(_(b||"")).split(" ");for(f=0;f<b.length;f++){g=W.exec(b[f])||[],h=i=g[1],j=g[2];if(!h){for(h in m)p.event.remove(a,h+b[f],c,d,!0);continue}n=p.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?new RegExp("(^|\\.)"+j.split(
 ".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(l=0;l<o.length;l++)q=o[l],(e||i===q.origType)&&(!c||c.guid===q.guid)&&(!j||j.test(q.namespace))&&(!d||d===q.selector||d==="**"&&q.selector)&&(o.splice(l--,1),q.selector&&o.delegateCount--,n.remove&&n.remove.call(a,q));o.length===0&&k!==o.length&&((!n.teardown||n.teardown.call(a,j,r.handle)===!1)&&p.removeEvent(a,h,r.handle),delete m[h])}p.isEmptyObject(m)&&(delete r.handle,p.removeData(a,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,f,g){if(!f||f.nodeType!==3&&f.nodeType!==8){var h,i,j,k,l,m,n,o,q,r,s=c.type||c,t=[];if($.test(s+p.event.triggered))return;s.indexOf("!")>=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join(
 "\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j<q.length&&!c.isPropagationStopped();j++)k=q[j][0],c.type=q[j][1],o=(p._data(k,"events")||{})[c.type]&&p._data(k,"handle"),o&&o.apply(k,d),o=m&&k[m],o&&p.acceptData(k)&&o.apply(k,d)===!1&&c.preventDefault();return c.type=s,!g&&!c.isDefaultPrevented()&&(!n._default||n._default.apply(f.ownerDocument,d)===!1)&&(s!=="click"||!p.nodeName(f,"a"))&&p.acceptData(f)&&m&&f[s]&&(s!=="focus"&&s!=="blur"||c.target.offsetWidth!==0)&&!p.isWindow(f)&&(l=f[m],l&&(f[
 m]=null),p.event.triggered=s,f[s](),p.event.triggered=b,l&&(f[m]=l)),c.result}return},dispatch:function(c){c=p.event.fix(c||a.event);var d,e,f,g,h,i,j,k,l,m,n,o=(p._data(this,"events")||{})[c.type]||[],q=o.delegateCount,r=[].slice.call(arguments),s=!c.exclusive&&!c.namespace,t=p.event.special[c.type]||{},u=[];r[0]=c,c.delegateTarget=this;if(t.preDispatch&&t.preDispatch.call(this,c)===!1)return;if(q&&(!c.button||c.type!=="click")){g=p(this),g.context=this;for(f=c.target;f!=this;f=f.parentNode||this)if(f.disabled!==!0||c.type!=="click"){i={},k=[],g[0]=f;for(d=0;d<q;d++)l=o[d],m=l.selector,i[m]===b&&(i[m]=g.is(m)),i[m]&&k.push(l);k.length&&u.push({elem:f,matches:k})}}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d<u.length&&!c.isPropagationStopped();d++){j=u[d],c.currentTarget=j.elem;for(e=0;e<j.matches.length&&!c.isImmediatePropagationStopped();e++){l=j.matches[e];if(s||!c.namespace&&!l.namespace||c.namespace_re&&c.namespace_re.test(l.namespace))c.data=l.data,c.handleObj=
 l,h=((p.event.special[l.origType]||{}).handle||l.handler).apply(j.elem,r),h!==b&&(c.result=h,h===!1&&(c.preventDefault(),c.stopPropagation()))}}return t.postDispatch&&t.postDispatch.call(this,c),c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,f,g,h=c.button,i=c.fromElement;return a.pageX==null&&c.clientX!=null&&(d=a.target.ownerDocument||e,f=d.documentElement,g=d.body,a.pageX=c.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&
 &g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?c.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[p.expando])return a;var b,c,d=a,f=p.event.fixHooks[a.type]||{},g=f.props?this.props.concat(f.props):this.props;a=p.Event(d);for(b=g.length;b;)c=g[--b],a[c]=d[c];return a.target||(a.target=d.srcElement||e),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,f.filter?f.filter(a,d):a},special:{ready:{setup:p.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){p.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=p.extend(new p.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?p.event.trigger(e,null,b):p.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},p.event.handle=p.event.dispatch,p.removeEvent=e.removeEventList
 ener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]=="undefined"&&(a[d]=null),a.detachEvent(d,c))},p.Event=function(a,b){if(this instanceof p.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?bb:ba):this.type=a,b&&p.extend(this,b),this.timeStamp=a&&a.timeStamp||p.now(),this[p.expando]=!0;else return new p.Event(a,b)},p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=bb;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=bb;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()},isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStop
 ped:ba},p.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){p.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj,g=f.selector;if(!e||e!==d&&!p.contains(d,e))a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b;return c}}}),p.support.submitBubbles||(p.event.special.submit={setup:function(){if(p.nodeName(this,"form"))return!1;p.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=p.nodeName(c,"input")||p.nodeName(c,"button")?c.form:b;d&&!p._data(d,"_submit_attached")&&(p.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),p._data(d,"_submit_attached",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&p.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(p.nodeName(this,"form"))return!1;p.event.remove(this,"._submit")}}),p.support.changeBubbles||(p.event.special.change={setup:function(){if(V.test(t
 his.nodeName)){if(this.type==="checkbox"||this.type==="radio")p.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),p.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),p.event.simulate("change",this,a,!0)});return!1}p.event.add(this,"beforeactivate._change",function(a){var b=a.target;V.test(b.nodeName)&&!p._data(b,"_change_attached")&&(p.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&p.event.simulate("change",this.parentNode,a,!0)}),p._data(b,"_change_attached",!0))})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return p.event.remove(this,"._change"),V.test(this.nodeName)}}),p.support.focusinBubbles||p.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){p.event.simul
 ate(b,a.target,p.event.fix(a),!0)};p.event.special[b]={setup:function(){c++===0&&e.addEventListener(a,d,!0)},teardown:function(){--c===0&&e.removeEventListener(a,d,!0)}}}),p.fn.extend({on:function(a,c,d,e,f){var g,h;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(h in a)this.on(h,c,d,a[h],f);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=ba;else if(!e)return this;return f===1&&(g=e,e=function(a){return p().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=p.guid++)),this.each(function(){p.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,p(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if(typeof a=="object"){for(f in a)this.off(f,c,a[f]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=ba),this.each(function(){p.event.remove(t
 his,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return p(this.context).on(a,this.selector,b,c),this},die:function(a,b){return p(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a||"**",c)},trigger:function(a,b){return this.each(function(){p.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return p.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||p.guid++,d=0,e=function(c){var e=(p._data(this,"lastToggle"+a.guid)||0)%d;return p._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),p.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown m
 ouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){p.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bd(a,b,c,d){var e=0,f=b.length;for(;e<f;e++)Z(a,b[e],c,d)}function be(a,b,c,d,e,f){var g,h=$.setFilters[b.toLowerCase()];return h||Z.error(b),(a||!(g=e))&&bd(a||"*",d,g=[],e),g.length>0?h(g,c,f):[]}function bf(a,c,d,e,f){var g,h,i,j,k,l,m,n,p=0,q=f.length,s=L.POS,t=new RegExp("^"+s.source+"(?!"+r+")","i"),u=function(){var a=1,c=arguments.length-2;for(;a<c;a++)arguments[a]===b&&(g[a]=b)};for(;p<q;p++){s.exec(""),a=f[p],j=[],i=0,k=e;while(g=s.exec(a)){n=s.lastIndex=g.index+g[0].length;if(n>i){m=a.slice(i,g.index),i=n,l=[c],B.test(m)&&(k&&(l=k),k=e);if(h=H.test(m))m=m.slice(0,-5).replace(B,"$&*");g.length>1&&g[0]
 .replace(t,u),k=be(m,g[1],g[2],l,k,h)}}k?(j=j.concat(k),(m=a.slice(i))&&m!==")"?B.test(m)?bd(m,j,d,e):Z(m,c,d,e?e.concat(k):k):o.apply(d,j)):Z(a,c,d,e)}return q===1?d:Z.uniqueSort(d)}function bg(a,b,c){var d,e,f,g=[],i=0,j=D.exec(a),k=!j.pop()&&!j.pop(),l=k&&a.match(C)||[""],m=$.preFilter,n=$.filter,o=!c&&b!==h;for(;(e=l[i])!=null&&k;i++){g.push(d=[]),o&&(e=" "+e);while(e){k=!1;if(j=B.exec(e))e=e.slice(j[0].length),k=d.push({part:j.pop().replace(A," "),captures:j});for(f in n)(j=L[f].exec(e))&&(!m[f]||(j=m[f](j,b,c)))&&(e=e.slice(j.shift().length),k=d.push({part:f,captures:j}));if(!k)break}}return k||Z.error(a),g}function bh(a,b,e){var f=b.dir,g=m++;return a||(a=function(a){return a===e}),b.first?function(b,c){while(b=b[f])if(b.nodeType===1)return a(b,c)&&b}:function(b,e){var h,i=g+"."+d,j=i+"."+c;while(b=b[f])if(b.nodeType===1){if((h=b[q])===j)return b.sizset;if(typeof h=="string"&&h.indexOf(i)===0){if(b.sizset)return b}else{b[q]=j;if(a(b,e))return b.sizset=!0,b;b.sizset=!1}}}}func
 tion bi(a,b){return a?function(c,d){var e=b(c,d);return e&&a(e===!0?c:e,d)}:b}function bj(a,b,c){var d,e,f=0;for(;d=a[f];f++)$.relative[d.part]?e=bh(e,$.relative[d.part],b):(d.captures.push(b,c),e=bi(e,$.filter[d.part].apply(null,d.captures)));return e}function bk(a){return function(b,c){var d,e=0;for(;d=a[e];e++)if(d(b,c))return!0;return!1}}var c,d,e,f,g,h=a.document,i=h.documentElement,j="undefined",k=!1,l=!0,m=0,n=[].slice,o=[].push,q=("sizcache"+Math.random()).replace(".",""),r="[\\x20\\t\\r\\n\\f]",s="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",t=s.replace("w","w#"),u="([*^$|!~]?=)",v="\\["+r+"*("+s+")"+r+"*(?:"+u+r+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+t+")|)|)"+r+"*\\]",w=":("+s+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)",x=":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)",y=r+"*([\\x20\\t\\r\\n\\f>+~])"+r+"*",z="(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|"+v+"|"+w.replace(2,7)+"|[^\\\\(),])+",A=new RegExp("^"+r+"+|
 ((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),B=new RegExp("^"+y),C=new RegExp(z+"?(?="+r+"*,|$)","g"),D=new RegExp("^(?:(?!,)(?:(?:^|,)"+r+"*"+z+")*?|"+r+"*(.*?))(\\)|$)"),E=new RegExp(z.slice(19,-6)+"\\x20\\t\\r\\n\\f>+~])+|"+y,"g"),F=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,G=/[\x20\t\r\n\f]*[+~]/,H=/:not\($/,I=/h\d/i,J=/input|select|textarea|button/i,K=/\\(?!\\)/g,L={ID:new RegExp("^#("+s+")"),CLASS:new RegExp("^\\.("+s+")"),NAME:new RegExp("^\\[name=['\"]?("+s+")['\"]?\\]"),TAG:new RegExp("^("+s.replace("[-","[-\\*")+")"),ATTR:new RegExp("^"+v),PSEUDO:new RegExp("^"+w),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),POS:new RegExp(x,"ig"),needsContext:new RegExp("^"+r+"*[>+~]|"+x,"i")},M={},N=[],O={},P=[],Q=function(a){return a.sizzleFilter=!0,a},R=function(a){return function(b){return b.nodeName.toLowerCase()==="input"&&b.type===a}},S=function(a){return function(b){var c=b.nodeName.toLowerCase();return
 (c==="input"||c==="button")&&b.type===a}},T=function(a){var b=!1,c=h.createElement("div");try{b=a(c)}catch(d){}return c=null,b},U=T(function(a){a.innerHTML="<select></select>";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),V=T(function(a){a.id=q+0,a.innerHTML="<a name='"+q+"'></a><div name='"+q+"'></div>",i.insertBefore(a,i.firstChild);var b=h.getElementsByName&&h.getElementsByName(q).length===2+h.getElementsByName(q+0).length;return g=!h.getElementById(q),i.removeChild(a),b}),W=T(function(a){return a.appendChild(h.createComment("")),a.getElementsByTagName("*").length===0}),X=T(function(a){return a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!==j&&a.firstChild.getAttribute("href")==="#"}),Y=T(function(a){return a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!a.getElementsByClassName||a.getElementsByClassName("e").length===0?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length!=
 =1)}),Z=function(a,b,c,d){c=c||[],b=b||h;var e,f,g,i,j=b.nodeType;if(j!==1&&j!==9)return[];if(!a||typeof a!="string")return c;g=ba(b);if(!g&&!d)if(e=F.exec(a))if(i=e[1]){if(j===9){f=b.getElementById(i);if(!f||!f.parentNode)return c;if(f.id===i)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(i))&&bb(b,f)&&f.id===i)return c.push(f),c}else{if(e[2])return o.apply(c,n.call(b.getElementsByTagName(a),0)),c;if((i=e[3])&&Y&&b.getElementsByClassName)return o.apply(c,n.call(b.getElementsByClassName(i),0)),c}return bm(a,b,c,d,g)},$=Z.selectors={cacheLength:50,match:L,order:["ID","TAG"],attrHandle:{},createPseudo:Q,find:{ID:g?function(a,b,c){if(typeof b.getElementById!==j&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==j&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==j&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:W?function(a,b){if(typeof b.getElementsByTagName!==j)retur
 n b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(K,""),a[3]=(a[4]||a[5]||"").replace(K,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||Z.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&Z.error(a[0]),a},PSEUDO:function(a){var b,c=a[4];return L.CHILD.test(a[0])?null:(c&&(b=D.exec(c))&&b.pop()&&(a[0]=a[0].slice(0,b[0].length-c.length-1),c=b[0].slice(0,-1)),a.splice(2,3,c||a[3]),a)}},filter:{ID:g?function(a){return a=a.replace(K,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(K,""),function(b){var c=typeof b.getAttributeNode!==j
 &&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(K,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=M[a];return b||(b=M[a]=new RegExp("(^|"+r+")"+a+"("+r+"|$)"),N.push(a),N.length>$.cacheLength&&delete M[N.shift()]),function(a){return b.test(a.className||typeof a.getAttribute!==j&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return b?function(d){var e=Z.attr(d,a),f=e+"";if(e==null)return b==="!=";switch(b){case"=":return f===c;case"!=":return f!==c;case"^=":return c&&f.indexOf(c)===0;case"*=":return c&&f.indexOf(c)>-1;case"$=":return c&&f.substr(f.length-c.length)===c;case"~=":return(" "+f+" ").indexOf(c)>-1;case"|=":return f===c||f.substr(0,c.length+1)===c+"-"}}:function(b){return Z.attr(b,a)!=null}},CHILD:function(a,b,c,d){if(a==="nth"){var e=m++;return function(a){var b,f,g=0,h=a;if(c===1&&d===0)return!0;b=a.parentNode;if(b&&(b[q]!==e||!a.sizset)){for(
 h=b.firstChild;h;h=h.nextSibling)if(h.nodeType===1){h.sizset=++g;if(h===a)break}b[q]=e}return f=a.sizset-d,c===0?f===0:f%c===0&&f/c>=0}}return function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b,c,d){var e=$.pseudos[a]||$.pseudos[a.toLowerCase()];return e||Z.error("unsupported pseudo: "+a),e.sizzleFilter?e(b,c,d):e}},pseudos:{not:Q(function(a,b,c){var d=bl(a.replace(A,"$1"),b,c);return function(a){return!d(a)}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!$.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.no
 deType)===3||b===4)return!1;a=a.nextSibling}return!0},contains:Q(function(a){return function(b){return(b.textContent||b.innerText||bc(b)).indexOf(a)>-1}}),has:Q(function(a){return function(b){return Z(a,b).length>0}}),header:function(a){return I.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:R("radio"),checkbox:R("checkbox"),file:R("file"),password:R("password"),image:R("image"),submit:S("submit"),reset:S("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return J.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b,c){return c?a.slice(1):[a[0]]},last:function(a,b,c){var d=a.pop();return c?a:[d]},even:function(
 a,b,c){var d=[],e=c?1:0,f=a.length;for(;e<f;e=e+2)d.push(a[e]);return d},odd:function(a,b,c){var d=[],e=c?0:1,f=a.length;for(;e<f;e=e+2)d.push(a[e]);return d},lt:function(a,b,c){return c?a.slice(+b):a.slice(0,+b)},gt:function(a,b,c){return c?a.slice(0,+b+1):a.slice(+b+1)},eq:function(a,b,c){var d=a.splice(+b,1);return c?a:d}}};$.setFilters.nth=$.setFilters.eq,$.filters=$.pseudos,X||($.attrHandle={href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}}),V&&($.order.push("NAME"),$.find.NAME=function(a,b){if(typeof b.getElementsByName!==j)return b.getElementsByName(a)}),Y&&($.order.splice(1,0,"CLASS"),$.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!==j&&!c)return b.getElementsByClassName(a)});try{n.call(i.childNodes,0)[0].nodeType}catch(_){n=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}var ba=Z.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},bb=Z.contains=i.compa
 reDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16)}:i.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc=Z.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=bc(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=bc(b);return c};Z.attr=function(a,b){var c,d=ba(a);return d||(b=b.toLowerCase()),$.attrHandle[b]?$.attrHandle[b](a):U||d?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},Z.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},[0,0].sort(function(){return l=0}),i.compareDocumentPosition?e=function(a,b){return a===b?(k=!0,0):(!a.compareDocumentPosition||!b.compareDocumentPos
 ition?a.compareDocumentPosition:a.compareDocumentPosition(b)&4)?-1:1}:(e=function(a,b){if(a===b)return k=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],g=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return f(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)g.unshift(j),j=j.parentNode;c=e.length,d=g.length;for(var l=0;l<c&&l<d;l++)if(e[l]!==g[l])return f(e[l],g[l]);return l===c?f(a,g[l],-1):f(e[l],b,1)},f=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),Z.uniqueSort=function(a){var b,c=1;if(e){k=l,a.sort(e);if(k)for(;b=a[c];c++)b===a[c-1]&&a.splice(c--,1)}return a};var bl=Z.compile=function(a,b,c){var d,e,f,g=O[a];if(g&&g.context===b)return g;e=bg(a,b,c);for(f=0;d=e[f];f++)e[f]=bj(d,b,c);return g=O[a]=bk(e),g.context=b,g.runs=g.dirruns=0,P.push(a),P.length>$.cacheLength&&delete O[P.shift()],g};Z.matches=function(a,b){return Z(a,null,null,b)},Z.matchesSel
 ector=function(a,b){return Z(b,null,null,[a]).length>0};var bm=function(a,b,e,f,g){a=a.replace(A,"$1");var h,i,j,k,l,m,p,q,r,s=a.match(C),t=a.match(E),u=b.nodeType;if(L.POS.test(a))return bf(a,b,e,f,s);if(f)h=n.call(f,0);else if(s&&s.length===1){if(t.length>1&&u===9&&!g&&(s=L.ID.exec(t[0]))){b=$.find.ID(s[1],b,g)[0];if(!b)return e;a=a.slice(t.shift().length)}q=(s=G.exec(t[0]))&&!s.index&&b.parentNode||b,r=t.pop(),m=r.split(":not")[0];for(j=0,k=$.order.length;j<k;j++){p=$.order[j];if(s=L[p].exec(m)){h=$.find[p]((s[1]||"").replace(K,""),q,g);if(h==null)continue;m===r&&(a=a.slice(0,a.length-r.length)+m.replace(L[p],""),a||o.apply(e,n.call(h,0)));break}}}if(a){i=bl(a,b,g),d=i.dirruns++,h==null&&(h=$.find.TAG("*",G.test(a)&&b.parentNode||b));for(j=0;l=h[j];j++)c=i.runs++,i(l,b)&&e.push(l)}return e};h.querySelectorAll&&function(){var a,b=bm,c=/'|\\/g,d=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,e=[],f=[":active"],g=i.matchesSelector||i.mozMatchesSelector||i.webkitMatchesSelector||i.o
 MatchesSelector||i.msMatchesSelector;T(function(a){a.innerHTML="<select><option selected></option></select>",a.querySelectorAll("[selected]").length||e.push("\\["+r+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),T(function(a){a.innerHTML="<p test=''></p>",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+r+"*(?:\"\"|'')"),a.innerHTML="<input type='hidden'>",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=e.length&&new RegExp(e.join("|")),bm=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a)))if(d.nodeType===9)try{return o.apply(f,n.call(d.querySelectorAll(a),0)),f}catch(i){}else if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){var j=d.getAttribute("id"),k=j||q,l=G.test(a)&&d.parentNode||d;j?k=k.replace(c,"\\$&"):d.setAttribute("id",k);try{return o.apply(f,n.call(l.querySelectorAll(a.replace(C,"[id='"+k+"'] $&")),0)),f}catch(i){}finally{j||d.removeAttribute("id")}}return b
 (a,d,f,g,h)},g&&(T(function(b){a=g.call(b,"div");try{g.call(b,"[test!='']:sizzle"),f.push($.match.PSEUDO)}catch(c){}}),f=new RegExp(f.join("|")),Z.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!ba(b)&&!f.test(c)&&(!e||!e.test(c)))try{var h=g.call(b,c);if(h||a||b.document&&b.document.nodeType!==11)return h}catch(i){}return Z(c,null,null,[b]).length>0})}(),Z.attr=p.attr,p.find=Z,p.expr=Z.selectors,p.expr[":"]=p.expr.pseudos,p.unique=Z.uniqueSort,p.text=Z.getText,p.isXMLDoc=Z.isXML,p.contains=Z.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b<c;b++)if(p.contains(h[b],this))return!0});g=this.pushStack("","find",a);for(b=0,c=this.length;b<c;b++){d=g.length,p.find(a,this[b],g);if(b>0)for(e=d;e<g.length;e++)for(f=0;f<d;f++)if(g[f]===g[e]){g.splice
 (e--,1);break}}return g},has:function(a){var b,c=p(a,this),d=c.length;return this.filter(function(){for(b=0;b<d;b++)if(p.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(bj(this,a,!1),"not",a)},filter:function(a){return this.pushStack(bj(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?bf.test(a)?p(a,this.context).index(this[0])>=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d<e;d++){c=this[d];while(c&&c.ownerDocument&&c!==b&&c.nodeType!==11){if(g?g.index(c)>-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.
 merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.
 map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/<tbody/i,br=/<|&#?\w+;/,bs=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,bu=new Reg
 Exp("<(?:"+bl+")[\\s/>]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,bz={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X<div>","</div>"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[
 0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(
 a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nod
 eType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return bh(this[0])?this.length?this.pushStack(p(p.isFunction(a)?a():a),"replaceWith",a):this:p.isFunction(a)?this.each(function(b){var c=p(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=p(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;p(this).remove(),b?p(b).before(a):p(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],l=this.length;if(!p.support.checkClone&&l>1&&typeof j=="string"&&bw.test(j))return this.each(function()
 {p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i<l;i++)d.call(c&&p.nodeName(this[i],"table")?bC(this[i],"tbody"):this[i],i===h?g:p.clone(g,!0,!0))}g=f=null,k.length&&p.each(k,function(a,b){b.src?p.ajax?p.ajax({url:b.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):p.error("no ajax"):p.globalEval((b.text||b.textContent||b.innerHTML||"").replace(by,"")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),p.buildFragment=function(a,c,d){var f,g,h,i=a[0];return c=c||e,c=(c[0]||c).ownerDocument||c[0]||c,typeof c.createDocumentFragment=="undefined"&&(c=e),a.length===1&&typeof i=="string"&&i.length<512&&c===e&&i.charAt(0)==="<"&&!bt.test(i)&&(p.support.checkClone||!bw.test(i))&&(p.support.html5Clone||!bu.test(i))&&(g=!0,f=p
 .fragments[i],h=f!==b),f||(f=c.createDocumentFragment(),p.clean(a,c,f,d),g&&(p.fragments[i]=h&&f)),{fragment:f,cacheable:g}},p.fragments={},p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){p.fn[a]=function(c){var d,e=0,f=[],g=p(c),h=g.length,i=this.length===1&&this[0].parentNode;if((i==null||i&&i.nodeType===11&&i.childNodes.length===1)&&h===1)return g[b](this[0]),this;for(;e<h;e++)d=(e>0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return 
 d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=0,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(g=b===e&&bA;(h=a[s])!=null;s++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{g=g||bk(b),l=l||g.appendChild(b.createElement("div")),h=h.replace(bo,"<$1></$2>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]==="<table>"&&!m?l.childNodes:[];for(f=n.length-1;f>=0;--f)p.nodeName(n[f],"tbody")&&!n[f].childNodes.length&&n[f].parentNode.removeChild(n[f])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l=g.lastChild}h.nodeType?t.push(h):t=p.merge(t,h)}l&&(g.removeChild(l),h=l=g=null);if(!p.support.appendChecked)for(s=0;(h=t[s])!=null;s++)p.nodeName(h,"input")?bG(h):type
 of h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(s=0;(h=t[s])!=null;s++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[s+1,0].concat(r)),s+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(ms
 ie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^margin/,bO=new RegExp("^("+q+")(.*)$","i"),bP=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bQ=new RegExp("^([-+])=("+q+")","i"),bR={},bS={position:"absolute",visibility:"hidden",display:"block"},bT={letterSpacing:0,fontWeight:400,lineHeight:1},bU=["Top","Right","Bottom","Left"],bV=["Webkit","O","Moz","ms"],bW=p.fn.toggle;p.fn.extend({css:funct
 ion(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return bZ(this,!0)},hide:function(){return bZ(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bW.apply(this,arguments):this.each(function(){(c?a:bY(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bX(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bQ.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&is
 NaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bX(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bT&&(f=bT[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(a,b){var c,d,e,f,g=getComputedStyle(a,null),h=a.style;return g&&(c=g[b],c===""&&!p.contains(a.ownerDocument.documentElement,a)&&(c=p.style(a,b)),bP.test(c)&&bN.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=c,c=g.width,h.width=d,h.minWidth=e,h.maxWidth=f)),c}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bP.test(e)&&!bM.te
 st(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0||bH(a,"display")!=="none"?ca(a,b,d):p.swap(a,bS,function(){return ca(a,b,d)})},set:function(a,c,d){return b$(a,c,d?b_(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarg
 inRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bP.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bU[d]+b]=e[d]||e[d-2]||e[0];return f}},bN.test(a)||(p.cssHooks[a+b].set=b$)});var cc=/%20/g,cd=/\[\]$/,ce=/\r?\n/g,cf=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,cg=/^(?:select|t
 extarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||cg.test(this.nodeName)||cf.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(ce,"\r\n")}}):{name:b.name,value:c.replace(ce,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ch(d,a[d],c,f);return e.join("&").replace(cc,"+")};var ci,cj,ck=/#.*$/,cl=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cm=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,cn=/^(?:GET|HEAD)$/
 ,co=/^\/\//,cp=/\?/,cq=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,cr=/([?&])_=[^&]*/,cs=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,ct=p.fn.load,cu={},cv={},cw=["*/"]+["*"];try{ci=f.href}catch(cx){ci=e.createElement("a"),ci.href="",ci=ci.href}cj=cs.exec(ci.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&ct)return ct.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("<div>").append(a.replace(cq,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({ty
 pe:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cA(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cA(a,b),a},ajaxSettings:{url:ci,isLocal:cm.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cw},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cy(cu),ajaxTransport:cy(cv),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cB(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHea
 der("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cC(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=""+(c||y),k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cl.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return
  c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(ck,"").replace(co,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=cs.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]==cj[1]&&i[2]==cj[2]&&(i[3]||(i[1]==="http:"?80:443))==(cj[3]||(cj[1]==="http:"?80:443)))),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cz(cu,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!cn.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cp.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cr,"$1_="+z);l.url=A+(A===
 l.url?(cp.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cw+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cz(cv,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cD=[],cE=/\?/,cF=/(=)\?(?=&|$)|\?\?/,cG=p.now();p.ajaxSetup({j
 sonp:"callback",jsonpCallback:function(){var a=cD.pop()||p.expando+"_"+cG++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cF.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cF.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cF,"$1"+f):m?c.data=i.replace(cF,"$1"+f):k&&(c.url+=(cE.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cD.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":fu
 nction(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cH,cI=a.ActiveXObject?function(){for(var a in cH)cH[a](0,1)}:!1,cJ=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cK()||cL()}:cK,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){v
 ar d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cI&&delete cH[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cJ,cI&&(cH||(cH={},p(a).unload(cI)),cH[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});
 var cM,cN,cO=/^(?:toggle|show|hide)$/,cP=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cQ=/queueHooks$/,cR=[cX],cS={"*":[function(a,b){var c,d,e,f=this.createTween(a,b),g=cP.exec(b),h=f.cur(),i=+h||0,j=1;if(g){c=+g[2],d=g[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&i){i=p.css(f.elem,a,!0)||c||1;do e=j=j||".5",i=i/j,p.style(f.elem,a,i+d),j=f.cur()/h;while(j!==1&&j!==e)}f.unit=d,f.start=i,f.end=g[1]?i+(g[1]+1)*c:c}return f}]};p.Animation=p.extend(cV,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d<e;d++)c=a[d],cS[c]=cS[c]||[],cS[c].unshift(b)},prefilter:function(a,b){b?cR.unshift(a):cR.push(a)}}),p.Tween=cY,cY.prototype={constructor:cY,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(p.cssNumber[c]?"":"px")},cur:function(){var a=cY.propHooks[this.prop];return a&&a.get?a.get(this):cY.propHooks._default.get(this)},run:function(a){var b,c=cY.prop
 Hooks[this.prop];return this.pos=b=p.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration),this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):cY.propHooks._default.set(this),this}},cY.prototype.init.prototype=cY.prototype,cY.propHooks={_default:{get:function(a){var b;return a.elem[a.prop]==null||!!a.elem.style&&a.elem.style[a.prop]!=null?(b=p.css(a.elem,a.prop,!1,""),!b||b==="auto"?0:b):a.elem[a.prop]},set:function(a){p.fx.step[a.prop]?p.fx.step[a.prop](a):a.elem.style&&(a.elem.style[p.cssProps[a.prop]]!=null||p.cssHooks[a.prop])?p.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},cY.propHooks.scrollTop=cY.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},p.each(["toggle","show","hide"],function(a,b){var c=p.fn[b];p.fn[b]=function(d,e,f){return d==null||typeof d=="boolean"||!a&&p.isFunction(d)&&p.isFunction(e)?c.apply(this,argum
 ents):this.animate(cZ(b,!0),d,e,f)}}),p.fn.extend({fadeTo:function(a,b,c,d){return this.filter(bY).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=p.isEmptyObject(a),f=p.speed(b,c,d),g=function(){var b=cV(this,p.extend({},a),f);e&&b.stop(!0)};return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=a!=null&&a+"queueHooks",f=p.timers,g=p._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cQ.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem===this&&(a==null||f[c].queue===a)&&(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&p.dequeue(this,a)})}}),p.each({slideDown:cZ("show"),slideUp:cZ("hide"),slideToggle:cZ("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){p.fn[a]=function(a,c,d){return this.a
 nimate(b,a,c,d)}}),p.speed=function(a,b,c){var d=a&&typeof a=="object"?p.extend({},a):{complete:c||!c&&b||p.isFunction(a)&&a,duration:a,easing:c&&b||b&&!p.isFunction(b)&&b};d.duration=p.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in p.fx.speeds?p.fx.speeds[d.duration]:p.fx.speeds._d

<TRUNCATED>

[30/49] ambari git commit: Merge trunk to ambari-rest-api-explorer branch. (jaimin)

Posted by ad...@apache.org.
Merge trunk to ambari-rest-api-explorer branch. (jaimin)


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

Branch: refs/heads/trunk
Commit: 3acd2e6da46494c175250e4f3a9ec074456b12b9
Parents: 3cb45e8 69c5593
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Tue Apr 11 11:20:34 2017 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Tue Apr 11 11:20:34 2017 -0700

----------------------------------------------------------------------
 .../main/resources/ui/admin-web/app/index.html  |    4 +-
 ambari-agent/pom.xml                            |   10 +-
 .../ambari_agent/StatusCommandsExecutor.py      |  209 +--
 .../src/main/python/ambari_agent/main.py        |    5 +-
 .../python/resource_management/TestUtils.py     |   39 +
 .../src/main/python/ambari_commons/network.py   |    2 +
 .../ambari_commons/resources/os_family.json     |    1 +
 .../python/resource_management/core/sudo.py     |   58 +-
 .../python/resource_management/core/utils.py    |   56 +-
 .../libraries/functions/copy_tarball.py         |   24 +-
 .../functions/setup_ranger_plugin_xml.py        |   16 +-
 .../libraries/functions/solr_cloud_util.py      |    7 +-
 .../libraries/functions/stack_select.py         |   16 +-
 .../libraries/script/script.py                  |    8 +-
 ambari-infra/ambari-infra-solr-client/pom.xml   |    5 +
 .../ambari/infra/solr/AmbariSolrCloudCLI.java   |   17 +-
 .../infra/solr/AmbariSolrCloudClient.java       |    9 +
 .../solr/commands/UnsecureZNodeZkCommand.java   |   44 +
 .../FieldAuditLogRequestQueryConverter.java     |    1 -
 .../TopFieldAuditLogRequestQueryConverter.java  |   54 +
 .../logsearch/manager/AuditLogsManager.java     |    3 +-
 .../request/impl/FieldAuditLogRequest.java      |   17 +-
 .../request/impl/TopFieldAuditLogRequest.java   |   40 +
 .../logsearch/rest/AuditLogsResource.java       |    4 +-
 .../logsearch/rest/UserConfigResource.java      |    2 +-
 .../FieldAuditLogRequestQueryConverterTest.java |    3 +-
 ...pFieldAuditLogRequestQueryConverterTest.java |   61 +
 .../ambari-logsearch-web/package.json           |   17 +-
 .../main/webapp/scripts/views/common/Header.js  |    6 +-
 .../conf/unix/ambari-metrics-collector          |    3 +-
 .../server/KdcServerConnectionVerification.java |   31 +-
 .../java/org/apache/ambari/server/Role.java     |    2 +-
 .../server/actionmanager/ActionDBAccessor.java  |   16 +-
 .../actionmanager/ActionDBAccessorImpl.java     |   27 +-
 .../server/actionmanager/ActionManager.java     |    2 +-
 .../server/actionmanager/ActionScheduler.java   |  178 +-
 .../server/actionmanager/HostRoleCommand.java   |   26 +
 .../ambari/server/actionmanager/Request.java    |   10 +-
 .../ambari/server/actionmanager/Stage.java      |   44 +-
 .../apache/ambari/server/agent/ActionQueue.java |   12 +-
 .../ambari/server/agent/AgentRequests.java      |    2 +-
 .../ambari/server/agent/ExecutionCommand.java   |   10 +-
 .../apache/ambari/server/agent/HeartBeat.java   |    6 +-
 .../ambari/server/agent/HeartBeatHandler.java   |   14 +-
 .../ambari/server/agent/HeartBeatResponse.java  |   10 +-
 .../ambari/server/agent/HeartbeatMonitor.java   |    6 +-
 .../ambari/server/agent/HeartbeatProcessor.java |    2 +-
 .../apache/ambari/server/agent/HostInfo.java    |    2 +-
 .../ambari/server/agent/RecoveryReport.java     |    2 +-
 .../server/agent/RegistrationResponse.java      |    2 +-
 .../ambari/server/agent/StatusCommand.java      |    4 +-
 .../alerts/AmbariPerformanceRunnable.java       |    2 +-
 .../server/alerts/StaleAlertRunnable.java       |    2 +-
 .../server/api/AmbariCsrfProtectionFilter.java  |    2 +-
 .../ambari/server/api/AmbariErrorHandler.java   |    2 +-
 .../server/api/handlers/QueryCreateHandler.java |    6 +-
 .../ambari/server/api/predicate/QueryLexer.java |   24 +-
 .../server/api/predicate/QueryParser.java       |    8 +-
 .../expressions/AbstractExpression.java         |    2 +-
 .../expressions/NotLogicalExpression.java       |    2 +-
 .../api/predicate/operators/EqualsOperator.java |    2 +-
 .../operators/GreaterEqualsOperator.java        |    2 +-
 .../predicate/operators/GreaterOperator.java    |    2 +-
 .../api/predicate/operators/InOperator.java     |    2 +-
 .../predicate/operators/LessEqualsOperator.java |    2 +-
 .../api/predicate/operators/LessOperator.java   |    2 +-
 .../predicate/operators/NotEqualsOperator.java  |    2 +-
 .../query/ExtendedResourcePredicateVisitor.java |    2 +-
 .../server/api/query/JpaPredicateVisitor.java   |    4 +-
 .../ambari/server/api/query/JpaSortBuilder.java |    2 +-
 .../api/query/ProcessingPredicateVisitor.java   |    6 +-
 .../ambari/server/api/query/QueryImpl.java      |   60 +-
 .../ambari/server/api/query/QueryInfo.java      |    2 +-
 .../api/query/SubResourcePredicateVisitor.java  |    2 +-
 .../render/AlertSummaryGroupedRenderer.java     |    6 +-
 .../api/query/render/AlertSummaryRenderer.java  |    4 +-
 .../server/api/query/render/BaseRenderer.java   |    2 +-
 .../query/render/ClusterBlueprintRenderer.java  |   36 +-
 .../api/query/render/DefaultRenderer.java       |    4 +-
 .../api/query/render/MinimalRenderer.java       |   10 +-
 .../api/resources/BaseResourceDefinition.java   |    8 +-
 .../resources/ClusterResourceDefinition.java    |    2 +-
 ...ComponentStackVersionResourceDefinition.java |    2 +-
 .../ExtensionLinkResourceDefinition.java        |    2 +-
 .../resources/ExtensionResourceDefinition.java  |    2 +-
 .../ExtensionVersionResourceDefinition.java     |    2 +-
 .../api/resources/FeedResourceDefinition.java   |    2 +-
 .../api/resources/GroupResourceDefinition.java  |    2 +-
 .../HostComponentResourceDefinition.java        |    4 +-
 .../api/resources/JobResourceDefinition.java    |    2 +-
 .../resources/PermissionResourceDefinition.java |    2 +-
 .../resources/ResourceInstanceFactoryImpl.java  |    2 +-
 ...tServiceHostComponentResourceDefinition.java |    2 +-
 .../RootServiceResourceDefinition.java          |    2 +-
 .../resources/ServiceResourceDefinition.java    |    2 +-
 .../StackConfigurationResourceDefinition.java   |    2 +-
 ...ackLevelConfigurationResourceDefinition.java |    2 +-
 .../api/resources/StackResourceDefinition.java  |    2 +-
 .../StackServiceResourceDefinition.java         |    2 +-
 .../StackVersionResourceDefinition.java         |    2 +-
 .../api/resources/UserResourceDefinition.java   |    2 +-
 .../ViewInstanceResourceDefinition.java         |    2 +-
 .../ViewVersionResourceDefinition.java          |    2 +-
 .../resources/WorkflowResourceDefinition.java   |    2 +-
 .../server/api/rest/BootStrapResource.java      |    4 +-
 .../api/services/AlertDefinitionService.java    |    2 +-
 .../server/api/services/AlertGroupService.java  |    2 +-
 .../api/services/AlertHistoryService.java       |    2 +-
 .../server/api/services/AlertNoticeService.java |    2 +-
 .../server/api/services/AlertService.java       |    2 +-
 .../server/api/services/AlertTargetService.java |    2 +-
 .../server/api/services/AmbariMetaInfo.java     |   46 +-
 .../ambari/server/api/services/BaseRequest.java |    6 +-
 .../ClusterKerberosDescriptorService.java       |    2 +-
 .../api/services/ClusterPrivilegeService.java   |    2 +-
 .../server/api/services/ClusterService.java     |    2 +-
 .../services/ClusterStackVersionService.java    |    4 +-
 .../CompatibleRepositoryVersionService.java     |    4 +-
 .../server/api/services/ComponentService.java   |    4 +-
 .../server/api/services/ConfigGroupService.java |    2 +-
 .../api/services/ConfigurationService.java      |    2 +-
 .../server/api/services/CredentialService.java  |    2 +-
 .../api/services/ExtensionLinksService.java     |    2 +-
 .../server/api/services/ExtensionsService.java  |    4 +-
 .../api/services/HostComponentService.java      |    6 +-
 .../services/HostKerberosIdentityService.java   |    2 +-
 .../ambari/server/api/services/HostService.java |    2 +-
 .../api/services/HostStackVersionService.java   |    4 +-
 .../server/api/services/InstanceService.java    |    2 +-
 .../ambari/server/api/services/JobService.java  |    2 +-
 .../server/api/services/LoggingService.java     |    2 +-
 .../api/services/OperatingSystemService.java    |    4 +-
 .../api/services/PersistKeyValueImpl.java       |    4 +-
 .../api/services/PersistKeyValueService.java    |    2 +-
 .../api/services/RecommendationService.java     |    2 +-
 .../server/api/services/RepositoryService.java  |    2 +-
 .../api/services/RepositoryVersionService.java  |    4 +-
 .../ambari/server/api/services/RequestBody.java |    6 +-
 .../server/api/services/RequestFactory.java     |    2 +-
 .../api/services/RequestScheduleService.java    |    2 +-
 .../server/api/services/RequestService.java     |    2 +-
 .../ambari/server/api/services/ResultImpl.java  |    2 +-
 .../api/services/ResultPostProcessorImpl.java   |    4 +-
 .../api/services/RoleAuthorizationService.java  |    2 +-
 .../server/api/services/RootServiceService.java |    6 +-
 .../services/ServiceConfigVersionService.java   |    2 +-
 .../server/api/services/ServiceService.java     |    4 +-
 .../server/api/services/StacksService.java      |   30 +-
 .../server/api/services/StageService.java       |    2 +-
 .../server/api/services/TaskAttemptService.java |    2 +-
 .../ambari/server/api/services/TaskService.java |    2 +-
 .../api/services/UpgradeGroupService.java       |    2 +-
 .../server/api/services/UpgradeItemService.java |    2 +-
 .../server/api/services/UpgradeService.java     |    2 +-
 .../api/services/UpgradeSummaryService.java     |    2 +-
 .../server/api/services/ValidationService.java  |    2 +-
 .../api/services/VersionDefinitionService.java  |    2 +-
 .../api/services/WidgetLayoutService.java       |    2 +-
 .../server/api/services/WidgetService.java      |    2 +-
 .../server/api/services/WorkflowService.java    |    2 +-
 .../services/groups/GroupPrivilegeService.java  |    2 +-
 .../api/services/groups/MemberService.java      |    2 +-
 .../services/parsers/JsonRequestBodyParser.java |   10 +-
 .../api/services/serializers/CsvSerializer.java |    6 +-
 .../StackAdvisorBlueprintProcessor.java         |   16 +-
 .../stackadvisor/StackAdvisorRequest.java       |   16 +-
 .../stackadvisor/StackAdvisorRunner.java        |    2 +-
 ...rationDependenciesRecommendationCommand.java |   12 +-
 .../ConfigurationRecommendationCommand.java     |   12 +-
 .../commands/StackAdvisorCommand.java           |    6 +-
 .../recommendations/RecommendationResponse.java |    6 +-
 .../users/ActiveWidgetLayoutService.java        |    2 +-
 .../users/UserAuthorizationService.java         |    2 +-
 .../services/users/UserPrivilegeService.java    |    2 +-
 .../views/ViewExternalSubResourceService.java   |    4 +-
 .../api/services/views/ViewInstanceService.java |    2 +-
 .../services/views/ViewPermissionService.java   |    2 +-
 .../services/views/ViewPrivilegeService.java    |    2 +-
 .../services/views/ViewSubResourceService.java  |    2 +-
 .../api/services/views/ViewVersionService.java  |    2 +-
 .../ambari/server/api/util/TreeNodeImpl.java    |    6 +-
 ...ClusterPrivilegeChangeRequestAuditEvent.java |    4 +-
 .../ViewPrivilegeChangeRequestAuditEvent.java   |    4 +-
 .../eventcreator/PrivilegeEventCreator.java     |    2 +-
 .../RepositoryVersionEventCreator.java          |    4 +-
 .../RequestAuditEventCreatorHelper.java         |    2 +-
 .../eventcreator/ViewPrivilegeEventCreator.java |    2 +-
 .../server/bootstrap/BSHostStatusCollector.java |    2 +-
 .../ambari/server/bootstrap/BSRunner.java       |    2 +-
 .../ambari/server/bootstrap/BootStrapImpl.java  |    4 +-
 .../ambari/server/bootstrap/SshHostInfo.java    |    2 +-
 .../server/checks/AbstractCheckDescriptor.java  |    2 +-
 .../server/checks/AtlasPresenceCheck.java       |    4 +-
 .../ambari/server/checks/CheckDescription.java  |    5 +-
 .../server/checks/ClientRetryPropertyCheck.java |    2 +-
 .../checks/ComponentsInstallationCheck.java     |    6 +-
 .../server/checks/ConfigurationMergeCheck.java  |    2 +-
 .../ambari/server/checks/HealthCheck.java       |    2 +-
 .../HiveDynamicServiceDiscoveryCheck.java       |    2 +-
 .../checks/HostsMasterMaintenanceCheck.java     |    4 +-
 .../server/checks/InstallPackagesCheck.java     |    6 +-
 ...apReduce2JobHistoryStatePreservingCheck.java |    2 +-
 .../server/checks/PreviousUpgradeCompleted.java |    2 +-
 .../checks/SecondaryNamenodeDeletedCheck.java   |    2 +-
 .../checks/ServiceCheckValidityCheck.java       |   13 +-
 .../server/checks/ServicePresenceCheck.java     |   56 +-
 .../ServicesMapReduceDistributedCacheCheck.java |    2 +-
 .../ServicesTezDistributedCacheCheck.java       |    2 +-
 .../ambari/server/checks/ServicesUpCheck.java   |    6 +-
 .../server/checks/UpgradeCheckRegistry.java     |   12 +-
 .../server/checks/VersionMismatchCheck.java     |    2 +-
 .../collections/functors/ContainsPredicate.java |    2 +-
 .../DelegatedMultiplePredicateContainer.java    |    2 +-
 .../collections/functors/EqualsPredicate.java   |    2 +-
 .../functors/PredicateClassFactory.java         |    2 +-
 .../server/configuration/Configuration.java     |    2 +-
 .../ambari/server/controller/ActionRequest.java |   19 +-
 .../AmbariCustomCommandExecutionHelper.java     |    3 +-
 .../server/controller/AmbariHandlerList.java    |    4 +-
 .../server/controller/AuthToLocalBuilder.java   |    8 +-
 .../server/controller/ClusterResponse.java      |   17 +-
 .../server/controller/ConfigurationRequest.java |    4 +-
 .../server/controller/ExecuteActionRequest.java |   20 +-
 .../controller/ExtensionLinkResponse.java       |    2 +-
 .../controller/ExtensionVersionResponse.java    |    2 +-
 .../server/controller/KerberosHelperImpl.java   |  118 +-
 .../server/controller/LdapSyncRequest.java      |    2 +-
 .../controller/MaintenanceStateHelper.java      |    6 +-
 .../server/controller/PrereqCheckRequest.java   |    2 +-
 .../controller/RequestsByStatusesRequest.java   |    2 +-
 .../controller/RootServiceResponseFactory.java  |    8 +-
 .../server/controller/ServiceRequest.java       |   10 +-
 .../server/controller/ShortTaskStatus.java      |   19 +-
 .../StackServiceComponentResponse.java          |    2 +-
 .../server/controller/StackServiceResponse.java |   10 +-
 .../server/controller/StackVersionResponse.java |    2 +-
 .../ambari/server/controller/UserRequest.java   |    2 +-
 .../gsinstaller/ClusterDefinition.java          |   26 +-
 .../gsinstaller/GSInstallerNoOpProvider.java    |    2 +-
 .../gsinstaller/GSInstallerProviderModule.java  |    2 +-
 .../GSInstallerResourceProvider.java            |   12 +-
 .../AbstractAuthorizedResourceProvider.java     |    2 +-
 .../internal/AbstractPropertyProvider.java      |   10 +-
 .../internal/AbstractProviderModule.java        |   70 +-
 .../internal/AbstractResourceProvider.java      |   16 +-
 .../internal/ActionResourceProvider.java        |   10 +-
 .../ActiveWidgetLayoutResourceProvider.java     |   14 +-
 .../AlertDefinitionResourceProvider.java        |   16 +-
 .../internal/AlertGroupResourceProvider.java    |   34 +-
 .../internal/AlertHistoryResourceProvider.java  |   10 +-
 .../internal/AlertNoticeResourceProvider.java   |   10 +-
 .../internal/AlertResourceProvider.java         |   10 +-
 .../internal/AlertSummaryPropertyProvider.java  |   14 +-
 .../internal/AlertTargetResourceProvider.java   |   34 +-
 .../AmbariPrivilegeResourceProvider.java        |    6 +-
 .../controller/internal/AppCookieManager.java   |    2 +-
 .../internal/ArtifactResourceProvider.java      |   26 +-
 .../controller/internal/BaseClusterRequest.java |    4 +-
 .../controller/internal/BaseProvider.java       |   22 +-
 .../BlueprintConfigurationProcessor.java        |  186 +-
 .../internal/BlueprintResourceProvider.java     |   28 +-
 .../controller/internal/CalculatedStatus.java   |   18 +-
 .../internal/ClientConfigResourceProvider.java  |   80 +-
 .../internal/ClusterControllerImpl.java         |   22 +-
 ...usterKerberosDescriptorResourceProvider.java |    8 +-
 .../ClusterPrivilegeResourceProvider.java       |    6 +-
 .../internal/ClusterResourceProvider.java       |   16 +-
 .../ClusterStackVersionResourceProvider.java    |   26 +-
 ...atibleRepositoryVersionResourceProvider.java |    2 +-
 .../internal/ConfigGroupResourceProvider.java   |   34 +-
 .../internal/ConfigurationResourceProvider.java |   22 +-
 .../internal/CredentialResourceProvider.java    |   10 +-
 .../internal/ExportBlueprintRequest.java        |   30 +-
 .../server/controller/internal/Extension.java   |   20 +-
 .../internal/ExtensionLinkResourceProvider.java |   14 +-
 .../internal/ExtensionResourceProvider.java     |    8 +-
 .../ExtensionVersionResourceProvider.java       |    8 +-
 .../internal/FeedResourceProvider.java          |   10 +-
 .../GroupPrivilegeResourceProvider.java         |    6 +-
 .../internal/GroupResourceProvider.java         |   14 +-
 .../HostComponentProcessResourceProvider.java   |    8 +-
 .../internal/HostComponentResourceProvider.java |   50 +-
 .../HostKerberosIdentityResourceProvider.java   |    4 +-
 .../internal/HostResourceProvider.java          |   32 +-
 .../internal/InstanceResourceProvider.java      |   10 +-
 .../internal/JobResourceProvider.java           |   14 +-
 .../KerberosDescriptorResourceProvider.java     |    2 +-
 .../internal/LdapSyncEventResourceProvider.java |   28 +-
 .../internal/LoggingResourceProvider.java       |    6 +-
 .../internal/MemberResourceProvider.java        |   18 +-
 .../OperatingSystemResourceProvider.java        |    4 +-
 .../internal/PermissionResourceProvider.java    |    8 +-
 .../PreUpgradeCheckResourceProvider.java        |    2 +-
 .../internal/PrivilegeResourceProvider.java     |   22 +-
 .../internal/PropertyPredicateVisitor.java      |    2 +-
 .../QuickLinkArtifactResourceProvider.java      |   16 +-
 .../RecommendationResourceProvider.java         |   14 +-
 .../internal/RemoteClusterResourceProvider.java |   10 +-
 .../internal/RepositoryResourceProvider.java    |    8 +-
 .../RepositoryVersionResourceProvider.java      |   12 +-
 .../internal/RequestResourceFilter.java         |    2 +-
 .../internal/RequestResourceProvider.java       |   28 +-
 .../RequestScheduleResourceProvider.java        |   22 +-
 .../internal/RequestStageContainer.java         |    2 +-
 .../RoleAuthorizationResourceProvider.java      |    8 +-
 .../RootServiceComponentPropertyProvider.java   |    4 +-
 .../RootServiceComponentResourceProvider.java   |    8 +-
 ...ootServiceHostComponentResourceProvider.java |   10 +-
 .../internal/RootServiceResourceProvider.java   |    8 +-
 .../ServiceConfigVersionResourceProvider.java   |   24 +-
 .../internal/ServiceResourceProvider.java       |   42 +-
 .../internal/SimplifyingPredicateVisitor.java   |    6 +-
 .../controller/internal/SortRequestImpl.java    |    2 +-
 .../server/controller/internal/Stack.java       |   76 +-
 .../internal/StackAdvisorResourceProvider.java  |   22 +-
 .../internal/StackArtifactResourceProvider.java |   18 +-
 ...ConfigurationDependencyResourceProvider.java |   12 +-
 .../StackConfigurationResourceProvider.java     |   10 +-
 .../internal/StackDefinedPropertyProvider.java  |   10 +-
 .../StackDependencyResourceProvider.java        |   10 +-
 ...StackLevelConfigurationResourceProvider.java |   10 +-
 .../internal/StackResourceProvider.java         |    8 +-
 .../StackServiceComponentResourceProvider.java  |   12 +-
 .../internal/StackServiceResourceProvider.java  |   16 +-
 .../internal/StackVersionResourceProvider.java  |    8 +-
 .../internal/StageResourceProvider.java         |   14 +-
 .../internal/TargetClusterResourceProvider.java |   12 +-
 .../internal/TaskAttemptResourceProvider.java   |   16 +-
 .../internal/TaskResourceProvider.java          |    8 +-
 .../internal/ThemeArtifactResourceProvider.java |   16 +-
 .../controller/internal/URLStreamProvider.java  |    2 +-
 .../internal/UpgradeGroupResourceProvider.java  |   12 +-
 .../internal/UpgradeItemResourceProvider.java   |   75 +-
 .../internal/UpgradeResourceProvider.java       |   86 +-
 .../UpgradeSummaryResourceProvider.java         |   14 +-
 .../UserAuthorizationResourceProvider.java      |   10 +-
 .../internal/UserPrivilegeResourceProvider.java |    6 +-
 .../internal/UserResourceProvider.java          |   14 +-
 .../internal/ValidationResourceProvider.java    |   10 +-
 .../VersionDefinitionResourceProvider.java      |    2 +-
 .../internal/ViewInstanceResourceProvider.java  |   14 +-
 .../ViewPermissionResourceProvider.java         |    8 +-
 .../internal/ViewPrivilegeResourceProvider.java |    8 +-
 .../internal/ViewResourceProvider.java          |    8 +-
 .../internal/ViewURLResourceProvider.java       |    6 +-
 .../internal/ViewVersionResourceProvider.java   |    8 +-
 .../internal/WidgetLayoutResourceProvider.java  |   18 +-
 .../internal/WidgetResourceProvider.java        |   12 +-
 .../internal/WorkflowResourceProvider.java      |   14 +-
 .../controller/jdbc/JDBCResourceProvider.java   |   10 +-
 .../controller/jmx/JMXPropertyProvider.java     |    8 +-
 .../controller/logging/LogLineResult.java       |    2 +-
 .../logging/LoggingRequestHelperImpl.java       |    4 +-
 .../logging/LoggingSearchPropertyProvider.java  |    2 +-
 .../MetricsDataTransferMethodFactory.java       |    4 +-
 .../MetricsDownsamplingMethodFactory.java       |    2 +-
 .../metrics/RestMetricsPropertyProvider.java    |   10 +-
 .../ThreadPoolEnabledPropertyProvider.java      |    4 +-
 .../GangliaComponentPropertyProvider.java       |    6 +-
 .../GangliaHostComponentPropertyProvider.java   |    6 +-
 .../ganglia/GangliaHostPropertyProvider.java    |    2 +-
 .../metrics/ganglia/GangliaMetric.java          |    2 +-
 .../ganglia/GangliaPropertyProvider.java        |   24 +-
 .../ganglia/GangliaReportPropertyProvider.java  |    6 +-
 .../metrics/timeline/AMSPropertyProvider.java   |   26 +-
 .../timeline/AMSReportPropertyProvider.java     |    8 +-
 .../cache/TimelineMetricCacheEntryFactory.java  |    4 +-
 .../controller/predicate/AndPredicate.java      |    2 +-
 .../controller/predicate/ArrayPredicate.java    |    8 +-
 .../controller/predicate/EqualsPredicate.java   |    2 +-
 .../predicate/GreaterEqualsPredicate.java       |    2 +-
 .../controller/predicate/GreaterPredicate.java  |    2 +-
 .../predicate/LessEqualsPredicate.java          |    2 +-
 .../controller/predicate/LessPredicate.java     |    2 +-
 .../controller/predicate/OrPredicate.java       |    2 +-
 .../ambari/server/controller/spi/Resource.java  |    2 +-
 ...eredThreadPoolExecutorCompletionService.java |    2 +-
 .../controller/utilities/PredicateBuilder.java  |   12 +-
 .../controller/utilities/PropertyHelper.java    |   26 +-
 .../customactions/ActionDefinitionManager.java  |   12 +-
 .../customactions/ActionDefinitionXml.java      |    2 +-
 .../ambari/server/events/HostsRemovedEvent.java |    2 +-
 .../alerts/AlertAggregateListener.java          |    2 +-
 .../listeners/alerts/AlertHostListener.java     |    2 +-
 .../alerts/AlertStateChangedListener.java       |    4 +-
 .../listeners/tasks/TaskStatusListener.java     |    2 +-
 .../upgrade/HostVersionOutOfSyncListener.java   |    4 +-
 .../listeners/upgrade/StackVersionListener.java |    2 +-
 .../ambari/server/metadata/ActionMetadata.java  |   10 +-
 .../metadata/AmbariServiceAlertDefinitions.java |    2 +-
 .../server/metadata/RoleCommandOrder.java       |    8 +-
 .../system/impl/AmbariMetricSinkImpl.java       |    2 +-
 .../system/impl/AmbariPerformanceMonitor.java   |    2 +-
 .../server/notifications/DispatchFactory.java   |    2 +-
 .../dispatchers/SNMPDispatcher.java             |    2 +-
 .../orm/AmbariJpaLocalTxnInterceptor.java       |    2 +-
 .../orm/AmbariLocalSessionInterceptor.java      |    2 +-
 .../apache/ambari/server/orm/dao/AlertsDAO.java |    6 +-
 .../orm/dao/ConfigGroupHostMappingDAO.java      |   14 +-
 .../ambari/server/orm/dao/ExtensionLinkDAO.java |    4 +-
 .../apache/ambari/server/orm/dao/GroupDAO.java  |    2 +-
 .../server/orm/dao/HostConfigMappingDAO.java    |   22 +-
 .../apache/ambari/server/orm/dao/HostDAO.java   |    2 +-
 .../server/orm/dao/HostRoleCommandDAO.java      |   65 +-
 .../dao/HostRoleCommandStatusSummaryDTO.java    |    4 +-
 .../apache/ambari/server/orm/dao/MemberDAO.java |    2 +-
 .../ambari/server/orm/dao/ServiceConfigDAO.java |    2 +-
 .../apache/ambari/server/orm/dao/StageDAO.java  |   76 +-
 .../ambari/server/orm/dao/UpgradeDAO.java       |    5 -
 .../apache/ambari/server/orm/dao/UserDAO.java   |    4 +-
 .../orm/entities/AlertCurrentEntity_.java       |    2 +-
 .../orm/entities/AlertDefinitionEntity.java     |    2 +-
 .../orm/entities/AlertHistoryEntity_.java       |    2 +-
 .../server/orm/entities/AlertNoticeEntity_.java |    2 +-
 .../server/orm/entities/AlertTargetEntity.java  |    4 +-
 .../server/orm/entities/ClusterEntity.java      |   13 +-
 .../orm/entities/HostRoleCommandEntity.java     |   33 +-
 .../orm/entities/HostRoleCommandEntity_.java    |    2 +-
 .../orm/entities/OperatingSystemEntity.java     |    2 +-
 .../server/orm/entities/PrincipalEntity.java    |    2 +-
 .../server/orm/entities/ResourceEntity.java     |    2 +-
 .../ambari/server/orm/entities/StageEntity.java |   28 +-
 .../server/orm/entities/StageEntityPK.java      |   35 +-
 .../server/orm/entities/StageEntity_.java       |    2 +-
 .../server/orm/entities/UpgradeEntity.java      |   27 +-
 .../ambari/server/orm/entities/UserEntity.java  |    2 +-
 .../ambari/server/orm/entities/ViewEntity.java  |   14 +-
 .../server/orm/entities/ViewInstanceEntity.java |   18 +-
 .../server/orm/helpers/dbms/PostgresHelper.java |    2 +-
 .../server/orm/models/HostComponentSummary.java |    2 +-
 .../ambari/server/proxy/ProxyService.java       |    2 +-
 .../server/security/SecurePasswordHelper.java   |    2 +-
 .../AmbariKerberosAuthenticationProperties.java |    2 +-
 .../AmbariLdapAuthenticationProvider.java       |    4 +-
 .../AmbariPamAuthenticationProvider.java        |    4 +-
 .../authorization/LdapServerProperties.java     |    2 +-
 .../server/security/authorization/User.java     |    2 +-
 .../server/security/authorization/Users.java    |   46 +-
 .../jwt/JwtAuthenticationProperties.java        |    2 +-
 .../encryption/AbstractCredentialStore.java     |    2 +-
 .../security/encryption/CredentialProvider.java |    2 +-
 .../encryption/CredentialStoreServiceImpl.java  |    2 +-
 .../encryption/InMemoryCredentialStore.java     |    2 +-
 .../encryption/MasterKeyServiceImpl.java        |    2 +-
 .../security/ldap/AmbariLdapDataPopulator.java  |   18 +-
 .../server/security/ldap/LdapBatchDto.java      |   18 +-
 .../server/security/ldap/LdapGroupDto.java      |    2 +-
 .../server/security/ldap/LdapSyncDto.java       |    4 +-
 .../security/unsecured/rest/ConnectionInfo.java |    2 +-
 .../serveraction/ServerActionExecutor.java      |  118 +-
 .../kerberos/ADKerberosOperationHandler.java    |    2 +-
 .../AbstractPrepareKerberosServerAction.java    |    6 +-
 .../kerberos/CreateKeytabFilesServerAction.java |    4 +-
 .../kerberos/CreatePrincipalsServerAction.java  |    2 +-
 .../kerberos/DestroyPrincipalsServerAction.java |    2 +-
 .../kerberos/IPAKerberosOperationHandler.java   |    4 +-
 .../kerberos/KerberosOperationHandler.java      |   24 +-
 .../kerberos/MITKerberosOperationHandler.java   |    8 +-
 .../PrepareDisableKerberosServerAction.java     |   10 +-
 .../PrepareEnableKerberosServerAction.java      |    4 +-
 .../PrepareKerberosIdentitiesServerAction.java  |    6 +-
 .../UpdateKerberosConfigsServerAction.java      |   10 +-
 .../upgrades/FinalizeUpgradeAction.java         |   12 +-
 .../FixCapacitySchedulerOrderingPolicy.java     |  118 ++
 .../upgrades/FixYarnWebServiceUrl.java          |  103 ++
 .../upgrades/UpgradeUserKerberosDescriptor.java |    6 +-
 .../apache/ambari/server/stack/BaseModule.java  |    4 +-
 .../ambari/server/stack/ComponentModule.java    |    8 +-
 .../server/stack/ConfigurationDirectory.java    |    6 +-
 .../ambari/server/stack/ConfigurationInfo.java  |    6 +-
 .../server/stack/ConfigurationModule.java       |    6 +-
 .../ambari/server/stack/ExtensionDirectory.java |    2 +-
 .../ambari/server/stack/ExtensionModule.java    |    8 +-
 .../apache/ambari/server/stack/HostsType.java   |    4 +-
 .../ambari/server/stack/MasterHostResolver.java |    8 +-
 .../stack/QuickLinksConfigurationModule.java    |    4 +-
 .../ambari/server/stack/ServiceDirectory.java   |    4 +-
 .../ambari/server/stack/ServiceModule.java      |   36 +-
 .../ambari/server/stack/StackContext.java       |    4 +-
 .../ambari/server/stack/StackDirectory.java     |    4 +-
 .../ambari/server/stack/StackManager.java       |   18 +-
 .../apache/ambari/server/stack/StackModule.java |   27 +-
 .../apache/ambari/server/stack/ThemeModule.java |    4 +-
 .../ambari/server/stageplanner/RoleGraph.java   |    8 +-
 .../server/stageplanner/RoleGraphNode.java      |    6 +-
 .../apache/ambari/server/state/CheckHelper.java |    2 +-
 .../org/apache/ambari/server/state/Cluster.java |   30 +-
 .../ambari/server/state/ComponentInfo.java      |    6 +-
 .../ambari/server/state/ConfigHelper.java       |    2 +-
 .../apache/ambari/server/state/ConfigImpl.java  |    2 +-
 .../ambari/server/state/ConfigMergeHelper.java  |    2 +-
 .../ambari/server/state/DependencyInfo.java     |    2 +-
 .../ambari/server/state/DesiredConfig.java      |    2 +-
 .../ambari/server/state/ExtensionInfo.java      |    6 +-
 .../apache/ambari/server/state/HostConfig.java  |    6 +-
 .../ambari/server/state/PropertyInfo.java       |   10 +-
 .../server/state/ServiceComponentImpl.java      |   19 +-
 .../apache/ambari/server/state/ServiceImpl.java |   10 +-
 .../apache/ambari/server/state/ServiceInfo.java |   50 +-
 .../ambari/server/state/ServiceOsSpecific.java  |    2 +-
 .../apache/ambari/server/state/StackInfo.java   |   33 +-
 .../ambari/server/state/UpgradeHelper.java      |   58 +-
 .../state/alert/AggregateDefinitionMapping.java |    6 +-
 .../state/alert/AlertDefinitionFactory.java     |    2 +-
 .../server/state/alert/AlertDefinitionHash.java |   16 +-
 .../ambari/server/state/alert/MetricSource.java |    4 +-
 .../server/state/cluster/ClusterImpl.java       |   48 +-
 .../server/state/cluster/ClustersImpl.java      |   22 +-
 .../state/configgroup/ConfigGroupImpl.java      |   12 +-
 .../server/state/fsm/StateMachineFactory.java   |    5 +-
 .../state/host/HostHealthyHeartbeatEvent.java   |    2 +-
 .../kerberos/AbstractKerberosDescriptor.java    |    2 +-
 .../AbstractKerberosDescriptorContainer.java    |   49 +-
 .../KerberosConfigurationDescriptor.java        |    6 +-
 .../state/kerberos/KerberosDescriptor.java      |   12 +-
 .../KerberosDescriptorUpdateHelper.java         |   14 +-
 .../kerberos/KerberosIdentityDescriptor.java    |   18 +
 .../kerberos/KerberosKeytabDescriptor.java      |    6 +-
 .../kerberos/KerberosPrincipalDescriptor.java   |    2 +-
 .../kerberos/KerberosServiceDescriptor.java     |    4 +-
 .../KerberosServiceDescriptorFactory.java       |    2 +-
 .../kerberos/VariableReplacementHelper.java     |    4 +-
 .../quicklinks/QuickLinksConfiguration.java     |    4 +-
 .../ambari/server/state/scheduler/Batch.java    |    2 +-
 .../server/state/scheduler/BatchRequestJob.java |    4 +-
 .../services/AlertNoticeDispatchService.java    |   34 +-
 .../services/AmbariServerAlertService.java      |    2 +-
 .../state/services/MetricsRetrievalService.java |   29 +-
 .../services/RetryUpgradeActionService.java     |    2 +-
 .../server/state/stack/ConfigurationXml.java    |    6 +-
 .../state/stack/ExtensionMetainfoXml.java       |    6 +-
 .../server/state/stack/MetricDefinition.java    |    2 +-
 .../ambari/server/state/stack/OsFamily.java     |    8 +-
 .../server/state/stack/PrerequisiteCheck.java   |    4 +-
 .../server/state/stack/RepositoryXml.java       |    4 +-
 .../server/state/stack/ServiceMetainfoXml.java  |    2 +-
 .../server/state/stack/StackMetainfoXml.java    |    2 +-
 .../state/stack/StackRoleCommandOrder.java      |    8 +-
 .../ambari/server/state/stack/UpgradePack.java  |   26 +-
 .../state/stack/upgrade/ClusterGrouping.java    |    8 +-
 .../state/stack/upgrade/ColocatedGrouping.java  |  108 +-
 .../state/stack/upgrade/ConfigureTask.java      |    2 +-
 .../server/state/stack/upgrade/Grouping.java    |   16 +-
 .../stack/upgrade/RepositoryVersionHelper.java  |    2 +-
 .../stack/upgrade/ServiceCheckGrouping.java     |    8 +-
 .../state/stack/upgrade/StageWrapper.java       |    4 +-
 .../state/stack/upgrade/TaskWrapperBuilder.java |   14 +-
 .../svccomphost/ServiceComponentHostImpl.java   |    2 +-
 .../ambari/server/state/theme/Layout.java       |    4 +-
 .../ambari/server/state/theme/Placement.java    |    4 +-
 .../ambari/server/state/theme/Section.java      |    4 +-
 .../ambari/server/state/theme/TabLayout.java    |    4 +-
 .../server/state/theme/ThemeConfiguration.java  |    8 +-
 .../ambari/server/topology/AmbariContext.java   |   20 +-
 .../server/topology/BlueprintFactory.java       |    6 +-
 .../ambari/server/topology/BlueprintImpl.java   |   24 +-
 .../server/topology/BlueprintValidatorImpl.java |   32 +-
 .../topology/ClusterConfigurationRequest.java   |   22 +-
 .../server/topology/ClusterTopologyImpl.java    |   14 +-
 .../ambari/server/topology/Configuration.java   |   22 +-
 .../server/topology/ConfigurationFactory.java   |    4 +-
 .../ambari/server/topology/HostGroupImpl.java   |   16 +-
 .../ambari/server/topology/HostGroupInfo.java   |    4 +-
 .../ambari/server/topology/HostRequest.java     |   12 +-
 .../ambari/server/topology/LogicalRequest.java  |   26 +-
 .../server/topology/PersistedStateImpl.java     |   16 +-
 .../ambari/server/topology/TopologyManager.java |   24 +-
 .../tasks/PersistHostResourcesTask.java         |    4 +-
 .../validators/ClusterConfigTypeValidator.java  |    2 +-
 .../validators/RequiredPasswordValidator.java   |    8 +-
 .../server/upgrade/AbstractUpgradeCatalog.java  |   20 +-
 .../ambari/server/upgrade/StackUpgradeUtil.java |    2 +-
 .../server/upgrade/UpgradeCatalog200.java       |   22 +-
 .../server/upgrade/UpgradeCatalog210.java       |   42 +-
 .../server/upgrade/UpgradeCatalog212.java       |   16 +-
 .../server/upgrade/UpgradeCatalog2121.java      |    6 +-
 .../server/upgrade/UpgradeCatalog220.java       |    6 +-
 .../server/upgrade/UpgradeCatalog221.java       |    2 +-
 .../server/upgrade/UpgradeCatalog222.java       |    6 +-
 .../server/upgrade/UpgradeCatalog230.java       |    6 +-
 .../server/upgrade/UpgradeCatalog240.java       |   12 +-
 .../server/upgrade/UpgradeCatalog242.java       |    2 +-
 .../server/upgrade/UpgradeCatalog250.java       |    2 +-
 .../apache/ambari/server/utils/HTTPUtils.java   |    2 +-
 .../server/utils/JaxbMapKeyListAdapter.java     |    2 +-
 .../server/utils/JaxbMapKeyMapAdapter.java      |    2 +-
 .../server/utils/JaxbMapKeyValAdapter.java      |    2 +-
 .../apache/ambari/server/utils/Parallel.java    |   12 +-
 .../apache/ambari/server/utils/SetUtils.java    |    4 +-
 .../ambari/server/utils/ShellCommandUtil.java   |    4 +-
 .../apache/ambari/server/utils/StageUtils.java  |   60 +-
 .../ambari/server/utils/VersionUtils.java       |    4 +-
 .../apache/ambari/server/view/ClusterImpl.java  |    2 +-
 .../ambari/server/view/RemoteAmbariCluster.java |    4 +-
 .../view/RemoteAmbariClusterRegistry.java       |    4 +-
 .../server/view/RemoteAmbariStreamProvider.java |    4 +-
 .../server/view/ViewAmbariStreamProvider.java   |    4 +-
 .../ambari/server/view/ViewContextImpl.java     |    4 +-
 .../view/ViewExternalSubResourceProvider.java   |   12 +-
 .../ambari/server/view/ViewExtractor.java       |    2 +-
 .../apache/ambari/server/view/ViewRegistry.java |   83 +-
 .../server/view/ViewSubResourceDefinition.java  |    2 +-
 .../server/view/ViewSubResourceProvider.java    |   12 +-
 .../server/view/ViewURLStreamProvider.java      |    4 +-
 .../server/view/persistence/DataStoreImpl.java  |   20 +-
 ambari-server/src/main/python/ambari-server.py  |    4 +-
 .../python/ambari_server/serverConfiguration.py |    3 +
 .../main/resources/Ambari-DDL-Derby-CREATE.sql  |    1 +
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  |    1 +
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql |    1 +
 .../resources/Ambari-DDL-Postgres-CREATE.sql    |    1 +
 .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql |    3 +-
 .../resources/Ambari-DDL-SQLServer-CREATE.sql   |    1 +
 ambari-server/src/main/resources/alerts.json    |   12 +
 .../1.6.1.2.2.0/role_command_order.json         |   14 +
 .../0.1.0/configuration/ams-env.xml             |   11 +
 .../0.1.0/configuration/ams-grafana-ini.xml     |   11 +
 .../HDP/grafana-llapdaemon-daemons.json         |  313 +++-
 .../0.1.0/package/scripts/hbase.py              |   11 +-
 .../package/scripts/metrics_grafana_util.py     |    8 +-
 .../0.1.0/package/scripts/params.py             |    5 +
 .../0.1.0/role_command_order.json               |    9 +
 .../ATLAS/0.1.0.2.3/package/scripts/params.py   |    5 +
 .../DRUID/0.9.2/package/scripts/superset.py     |    2 +-
 .../FALCON/0.5.0.2.1/role_command_order.json    |    7 +
 .../0.96.0.2.0/package/scripts/params_linux.py  |    9 +-
 .../HBASE/0.96.0.2.0/role_command_order.json    |   10 +
 .../HDFS/2.1.0.2.0/configuration/hadoop-env.xml |    2 +-
 .../2.1.0.2.0/package/scripts/params_linux.py   |   11 +-
 .../HDFS/2.1.0.2.0/role_command_order.json      |   22 +
 .../configuration/ranger-hdfs-audit.xml         |    9 +
 .../3.0.0.3.0/package/scripts/params_linux.py   |    9 +-
 .../HDFS/3.0.0.3.0/service_advisor.py           |   27 +-
 .../HIVE/0.12.0.2.0/configuration/hive-env.xml  |    3 +-
 .../0.12.0.2.0/package/scripts/params_linux.py  |    6 +-
 .../HIVE/0.12.0.2.0/role_command_order.json     |   14 +
 .../HIVE/2.1.0.3.0/configuration/hive-env.xml   |    1 +
 .../configuration/ranger-hive-audit.xml         |    9 +
 .../2.1.0.3.0/package/scripts/params_linux.py   |    6 +-
 .../HIVE/2.1.0.3.0/service_advisor.py           |   25 +-
 .../KAFKA/0.8.1/package/scripts/params.py       |    9 +-
 .../KAFKA/0.8.1/role_command_order.json         |    7 +
 .../KAFKA/0.9.0/role_command_order.json         |    6 +
 .../1.10.3-10/configuration/kerberos-env.xml    |   15 +
 .../1.10.3-10/configuration/krb5-conf.xml       |   43 +-
 .../package/scripts/kerberos_common.py          |    5 +-
 .../1.10.3-10/package/scripts/params.py         |    2 +
 .../1.10.3-10/package/templates/krb5_conf.j2    |   54 -
 .../KERBEROS/1.10.3-10/properties/krb5_conf.j2  |   60 +
 .../0.5.0.2.2/package/scripts/params_linux.py   |   11 +-
 .../KNOX/0.5.0.2.2/role_command_order.json      |    7 +
 .../MAHOUT/1.0.0.2.3/role_command_order.json    |    6 +
 .../OOZIE/4.0.0.2.0/role_command_order.json     |    9 +
 .../PIG/0.12.0.2.0/role_command_order.json      |    6 +
 .../PIG/0.16.1.3.0/configuration/pig-env.xml    |   41 +
 .../PIG/0.16.1.3.0/configuration/pig-log4j.xml  |   65 +
 .../0.16.1.3.0/configuration/pig-properties.xml |   93 +
 .../PIG/0.16.1.3.0/kerberos.json                |   17 +
 .../common-services/PIG/0.16.1.3.0/metainfo.xml |  101 ++
 .../PIG/0.16.1.3.0/package/files/pigSmoke.sh    |   18 +
 .../PIG/0.16.1.3.0/package/scripts/params.py    |   31 +
 .../0.16.1.3.0/package/scripts/params_linux.py  |  104 ++
 .../package/scripts/params_windows.py           |   45 +
 .../PIG/0.16.1.3.0/package/scripts/pig.py       |   80 +
 .../0.16.1.3.0/package/scripts/pig_client.py    |   71 +
 .../0.16.1.3.0/package/scripts/service_check.py |  142 ++
 .../PIG/0.16.1.3.0/service_advisor.py           |  171 ++
 .../RANGER/0.4.0/role_command_order.json        |    8 +
 .../RANGER/0.5.0/role_command_order.json        |    6 +
 .../RANGER/0.6.0/role_command_order.json        |    6 +
 .../0.5.0.2.3/package/scripts/params.py         |   10 +-
 .../0.5.0.2.3/role_command_order.json           |    7 +
 .../SLIDER/0.91.0.3.0/service_advisor.py        |    7 +-
 .../SPARK/1.2.1/role_command_order.json         |    6 +
 .../SPARK/1.5.2/role_command_order.json         |    6 +
 .../SPARK/1.6.0/role_command_order.json         |    8 +
 .../SPARK/2.2.0/service_advisor.py              |    7 +-
 .../SPARK2/2.0.0/role_command_order.json        |    6 +
 .../SQOOP/1.4.4.2.0/role_command_order.json     |    6 +
 .../STORM/0.10.0/role_command_order.json        |    8 +
 .../STORM/0.9.1/package/scripts/params_linux.py |    6 +-
 .../STORM/0.9.1/role_command_order.json         |   13 +
 .../STORM/0.9.3/role_command_order.json         |    7 +
 .../TEZ/0.4.0.2.1/configuration/tez-site.xml    |    2 +-
 .../0.4.0.2.1/package/scripts/params_linux.py   |    2 +
 .../TEZ/0.4.0.2.1/role_command_order.json       |    6 +
 .../TEZ/0.9.0.3.0/service_advisor.py            |    9 +-
 .../configuration-mapred/mapred-site.xml        |    2 +-
 .../2.1.0.2.0/package/scripts/params_linux.py   |   10 +-
 .../YARN/2.1.0.2.0/package/scripts/yarn.py      |   16 +-
 .../YARN/2.1.0.2.0/role_command_order.json      |   21 +
 .../configuration/ranger-yarn-audit.xml         |    9 +
 .../3.0.0.3.0/package/scripts/params_linux.py   |    9 +-
 .../YARN/3.0.0.3.0/package/scripts/yarn.py      |   14 +-
 .../YARN/3.0.0.3.0/service_advisor.py           |  259 +--
 .../0.6.0.2.5/package/scripts/master.py         |   10 +-
 .../ZOOKEEPER/3.4.5/role_command_order.json     |    9 +
 .../ZOOKEEPER/3.4.9/service_advisor.py          |   13 +-
 .../host_scripts/alert_version_select.py        |  104 ++
 .../src/main/resources/properties.json          |    1 +
 .../stacks/BIGTOP/0.8/services/stack_advisor.py |    3 +-
 .../2.0.6/hooks/before-ANY/scripts/params.py    |    1 +
 .../stacks/HDP/2.0.6/services/stack_advisor.py  |    7 +-
 .../stacks/HDP/2.1/services/stack_advisor.py    |    3 +-
 .../services/HDFS/configuration/hadoop-env.xml  |    2 +-
 .../stacks/HDP/2.2/services/stack_advisor.py    |    3 +-
 .../services/HDFS/configuration/hadoop-env.xml  |    2 +-
 .../stacks/HDP/2.3/services/stack_advisor.py    |    3 +-
 .../stacks/HDP/2.3/upgrades/config-upgrade.xml  |    6 +
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml |   10 +
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml |   10 +
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml |   16 +
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml |   29 +
 .../stacks/HDP/2.3/upgrades/upgrade-2.3.xml     |   10 +
 .../stacks/HDP/2.3/upgrades/upgrade-2.4.xml     |   10 +
 .../stacks/HDP/2.3/upgrades/upgrade-2.5.xml     |   11 +
 .../stacks/HDP/2.3/upgrades/upgrade-2.6.xml     |   21 +
 .../services/HDFS/configuration/hadoop-env.xml  |    2 +-
 .../stacks/HDP/2.4/upgrades/config-upgrade.xml  |    5 +
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.4.xml |   10 +
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml |   16 +
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml |   31 +-
 .../stacks/HDP/2.4/upgrades/upgrade-2.4.xml     |   10 +
 .../stacks/HDP/2.4/upgrades/upgrade-2.5.xml     |   11 +
 .../stacks/HDP/2.4/upgrades/upgrade-2.6.xml     |   21 +
 .../stacks/HDP/2.5/services/stack_advisor.py    |  277 ++-
 .../stacks/HDP/2.5/upgrades/config-upgrade.xml  |    6 +
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml |   16 +
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml |   29 +
 .../stacks/HDP/2.5/upgrades/upgrade-2.5.xml     |   16 +
 .../stacks/HDP/2.5/upgrades/upgrade-2.6.xml     |   23 +
 .../resources/stacks/HDP/2.6/repos/repoinfo.xml |   16 +-
 .../HDP/2.6/services/ACCUMULO/metainfo.xml      |    2 +-
 .../ATLAS/configuration/ranger-atlas-audit.xml  |   33 +
 .../stacks/HDP/2.6/services/ATLAS/metainfo.xml  |    2 +-
 .../stacks/HDP/2.6/services/DRUID/metainfo.xml  |    2 +-
 .../stacks/HDP/2.6/services/FALCON/metainfo.xml |    2 +-
 .../stacks/HDP/2.6/services/FLUME/metainfo.xml  |    2 +-
 .../HBASE/configuration/ranger-hbase-audit.xml  |   33 +
 .../stacks/HDP/2.6/services/HBASE/metainfo.xml  |    2 +-
 .../services/HDFS/configuration/hadoop-env.xml  |    2 +-
 .../HDFS/configuration/ranger-hdfs-audit.xml    |   33 +
 .../stacks/HDP/2.6/services/HDFS/metainfo.xml   |    2 +-
 .../HIVE/configuration/ranger-hive-audit.xml    |   33 +
 .../stacks/HDP/2.6/services/HIVE/metainfo.xml   |    2 +-
 .../KAFKA/configuration/ranger-kafka-audit.xml  |   33 +
 .../stacks/HDP/2.6/services/KAFKA/metainfo.xml  |    2 +-
 .../KNOX/configuration/ranger-knox-audit.xml    |   33 +
 .../stacks/HDP/2.6/services/KNOX/metainfo.xml   |    2 +-
 .../stacks/HDP/2.6/services/MAHOUT/metainfo.xml |    2 +-
 .../stacks/HDP/2.6/services/OOZIE/metainfo.xml  |    2 +-
 .../stacks/HDP/2.6/services/PIG/metainfo.xml    |    2 +-
 .../stacks/HDP/2.6/services/RANGER/metainfo.xml |    2 +-
 .../configuration/ranger-kms-audit.xml          |   33 +
 .../HDP/2.6/services/RANGER_KMS/metainfo.xml    |    2 +-
 .../stacks/HDP/2.6/services/SLIDER/metainfo.xml |    2 +-
 .../STORM/configuration/ranger-storm-audit.xml  |   33 +
 .../stacks/HDP/2.6/services/STORM/metainfo.xml  |    2 +-
 .../YARN/configuration/ranger-yarn-audit.xml    |   33 +
 .../stacks/HDP/2.6/services/YARN/metainfo.xml   |    2 +-
 .../stacks/HDP/2.6/services/stack_advisor.py    |   27 +-
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml  |  108 ++
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |   63 +-
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml     |   43 +
 .../stacks/HDP/3.0/services/PIG/metainfo.xml    |   27 +
 .../stacks/HDPWIN/2.1/services/stack_advisor.py |    9 +-
 .../stacks/HDPWIN/2.2/services/stack_advisor.py |    3 +-
 .../KERBEROS/configuration/kerberos-env.xml     |   15 +
 .../KERBEROS/configuration/krb5-conf.xml        |   43 +-
 .../KERBEROS/package/scripts/kerberos_common.py |    5 +-
 .../services/KERBEROS/package/scripts/params.py |    2 +
 .../KERBEROS/package/templates/krb5_conf.j2     |   54 -
 .../services/KERBEROS/properties/krb5_conf.j2   |   60 +
 .../stacks/PERF/1.0/services/stack_advisor.py   |    3 +-
 .../1.0/upgrades/nonrolling-upgrade-2.0.xml     |   10 +
 .../stacks/PERF/1.0/upgrades/upgrade-2.0.xml    |   10 +
 .../src/main/resources/stacks/stack_advisor.py  |   88 +-
 .../ExecutionCommandWrapperTest.java            |   28 +-
 .../actionmanager/TestActionDBAccessorImpl.java |   69 +-
 .../server/actionmanager/TestActionManager.java |   12 +-
 .../actionmanager/TestActionScheduler.java      |  250 +--
 .../TestActionSchedulerThreading.java           |    4 +-
 .../ambari/server/actionmanager/TestStage.java  |    2 +-
 .../server/agent/HeartbeatProcessorTest.java    |   36 +-
 .../server/agent/HeartbeatTestHelper.java       |    6 +-
 .../ambari/server/agent/TestActionQueue.java    |   12 +-
 .../server/agent/TestHeartbeatHandler.java      |   52 +-
 .../server/agent/TestHeartbeatMonitor.java      |    2 +-
 .../alerts/AgentHeartbeatAlertRunnableTest.java |    4 +-
 .../alerts/AmbariPerformanceRunnableTest.java   |    4 +-
 .../server/alerts/StaleAlertRunnableTest.java   |    4 +-
 .../server/api/handlers/CreateHandlerTest.java  |    6 +-
 .../server/api/handlers/DeleteHandlerTest.java  |    2 +-
 .../api/handlers/QueryCreateHandlerTest.java    |   98 +-
 .../server/api/handlers/ReadHandlerTest.java    |    4 +-
 .../server/api/handlers/UpdateHandlerTest.java  |    4 +-
 .../server/api/predicate/QueryLexerTest.java    |   40 +-
 .../server/api/predicate/QueryParserTest.java   |   56 +-
 .../predicate/operators/AndOperatorTest.java    |    4 +-
 .../predicate/operators/EqualsOperatorTest.java |    2 +-
 .../operators/GreaterEqualsOperatorTest.java    |    2 +-
 .../operators/GreaterOperatorTest.java          |    2 +-
 .../api/predicate/operators/InOperatorTest.java |    6 +-
 .../operators/LessEqualsOperatorTest.java       |    2 +-
 .../predicate/operators/LessOperatorTest.java   |    2 +-
 .../operators/NotEqualsOperatorTest.java        |    2 +-
 .../predicate/operators/NotOperatorTest.java    |    2 +-
 .../api/predicate/operators/OrOperatorTest.java |    4 +-
 .../ExtendedResourcePredicateVisitorTest.java   |   18 +-
 .../server/api/query/JpaSortBuilderTest.java    |    2 +-
 .../query/ProcessingPredicateVisitorTest.java   |   12 +-
 .../ambari/server/api/query/QueryImplTest.java  |   62 +-
 .../ambari/server/api/query/QueryInfoTest.java  |    2 +-
 .../render/ClusterBlueprintRendererTest.java    |   44 +-
 .../api/query/render/DefaultRendererTest.java   |   32 +-
 .../render/MetricsPaddingRendererTest.java      |    4 +-
 .../api/query/render/MinimalRendererTest.java   |   40 +-
 .../resources/BaseResourceDefinitionTest.java   |   10 +-
 .../PermissionResourceDefinitionTest.java       |    2 +-
 .../resources/SimpleResourceDefinitionTest.java |    2 +-
 .../ViewInstanceResourceDefinitionTest.java     |    2 +-
 .../server/api/services/ActionServiceTest.java  |    2 +-
 .../server/api/services/AmbariMetaInfoTest.java |   31 +-
 .../server/api/services/BaseServiceTest.java    |    2 +-
 .../api/services/BlueprintServiceTest.java      |    2 +-
 .../ClusterKerberosDescriptorServiceTest.java   |    2 +-
 .../services/ClusterPrivilegeServiceTest.java   |    2 +-
 .../server/api/services/ClusterServiceTest.java |    2 +-
 .../ClusterStackVersionServiceTest.java         |    2 +-
 .../api/services/ComponentServiceTest.java      |    2 +-
 .../api/services/ConfigGroupServiceTest.java    |    2 +-
 .../api/services/ConfigurationServiceTest.java  |    2 +-
 .../api/services/CredentialServiceTest.java     |    2 +-
 .../api/services/ExtensionsServiceTest.java     |    2 +-
 .../server/api/services/FeedServiceTest.java    |    2 +-
 .../server/api/services/GroupServiceTest.java   |    2 +-
 .../api/services/HostComponentServiceTest.java  |    2 +-
 .../HostKerberosIdentityServiceTest.java        |    2 +-
 .../server/api/services/HostServiceTest.java    |    2 +-
 .../services/HostStackVersionServiceTest.java   |    2 +-
 .../api/services/InstanceServiceTest.java       |    2 +-
 .../server/api/services/JobServiceTest.java     |    2 +-
 .../api/services/LdapSyncEventServiceTest.java  |    2 +-
 .../api/services/NamedPropertySetTest.java      |    6 +-
 .../api/services/PermissionServiceTest.java     |    2 +-
 .../services/PersistenceManagerImplTest.java    |   32 +-
 .../services/PreUpgradeCheckServiceTest.java    |    2 +-
 .../api/services/PrivilegeServiceTest.java      |    2 +-
 .../api/services/RecommendationServiceTest.java |    2 +-
 .../api/services/RepositoryServiceTest.java     |    2 +-
 .../server/api/services/RequestFactoryTest.java |   18 +-
 .../services/RoleAuthorizationServiceTest.java  |    2 +-
 .../api/services/RootServiceServiceTest.java    |    2 +-
 .../server/api/services/ServiceServiceTest.java |    2 +-
 .../server/api/services/StacksServiceTest.java  |    2 +-
 .../api/services/TargetClusterServiceTest.java  |    2 +-
 .../api/services/TaskAttemptServiceTest.java    |    2 +-
 .../api/services/UpgradeItemServiceTest.java    |    2 +-
 .../api/services/ValidationServiceTest.java     |    2 +-
 .../services/ViewSubResourceServiceTest.java    |   12 +-
 .../api/services/WorkflowServiceTest.java       |    2 +-
 .../parsers/JsonRequestBodyParserTest.java      |   20 +-
 .../serializers/JsonSerializerTest.java         |   16 +-
 .../StackAdvisorBlueprintProcessorTest.java     |   30 +-
 .../ConfigurationRecommendationCommandTest.java |   12 +-
 .../audit/request/AllPostAndPutCreator.java     |    2 +-
 .../creator/RequestEventCreatorTest.java        |    2 +-
 .../ambari/server/bootstrap/BootStrapTest.java  |    6 +-
 .../checks/AbstractCheckDescriptorTest.java     |    2 +-
 .../checks/ClientRetryPropertyCheckTest.java    |    8 +-
 .../checks/ComponentsInstallationCheckTest.java |   12 +-
 .../checks/ConfigurationMergeCheckTest.java     |    2 +-
 .../HiveDynamicServiceDiscoveryCheckTest.java   |    6 +-
 .../checks/HiveMultipleMetastoreCheckTest.java  |    8 +-
 .../checks/HostsMasterMaintenanceCheckTest.java |    2 +-
 .../checks/HostsRepositoryVersionCheckTest.java |    6 +-
 .../server/checks/InstallPackagesCheckTest.java |    6 +-
 ...duce2JobHistoryStatePreservingCheckTest.java |    6 +-
 .../server/checks/RangerAuditDbCheckTest.java   |    4 +-
 .../server/checks/RangerPasswordCheckTest.java  |    2 +-
 .../server/checks/RangerSSLConfigCheckTest.java |    4 +-
 .../checks/ServiceCheckValidityCheckTest.java   |   20 +-
 .../server/checks/ServicePresenceCheckTest.java |   59 +-
 ...vicesMapReduceDistributedCacheCheckTest.java |   10 +-
 ...rvicesNamenodeHighAvailabilityCheckTest.java |    2 +-
 .../ServicesNamenodeTruncateCheckTest.java      |    2 +-
 .../ServicesTezDistributedCacheCheckTest.java   |   10 +-
 .../server/checks/ServicesUpCheckTest.java      |   10 +-
 .../ServicesYarnWorkPreservingCheckTest.java    |    2 +-
 ...nTimelineServerStatePreservingCheckTest.java |   12 +-
 .../collections/functors/AndPredicateTest.java  |    8 +-
 .../functors/ContainsPredicateTest.java         |    8 +-
 .../functors/ContextTransformerTest.java        |    8 +-
 .../functors/EqualsPredicateTest.java           |    4 +-
 .../collections/functors/NotPredicateTest.java  |    2 +-
 .../collections/functors/OrPredicateTest.java   |    8 +-
 .../AmbariCustomCommandExecutionHelperTest.java |   12 +-
 .../controller/AmbariHandlerListTest.java       |    6 +-
 .../AmbariManagementControllerImplTest.java     |   64 +-
 .../AmbariManagementControllerTest.java         |  386 ++--
 .../BackgroundCustomCommandExecutionTest.java   |    8 +-
 .../server/controller/ClusterRequestTest.java   |    2 +-
 .../server/controller/ClusterResponseTest.java  |    2 +-
 .../server/controller/KerberosHelperTest.java   |    2 +-
 .../server/controller/LdapSyncRequestTest.java  |    8 +-
 .../controller/MaintenanceStateHelperTest.java  |    4 +-
 ...hYarnCapacitySchedulerReleaseConfigTest.java |    8 +-
 .../AbstractControllerResourceProviderTest.java |    4 +-
 .../AbstractDRResourceProviderTest.java         |    4 +-
 .../AbstractJDBCResourceProviderTest.java       |    4 +-
 .../internal/AbstractResourceProviderTest.java  |   36 +-
 .../internal/ActionResourceProviderTest.java    |    8 +-
 .../AlertDefinitionResourceProviderTest.java    |   10 +-
 .../AlertGroupResourceProviderTest.java         |   38 +-
 .../internal/AlertResourceProviderTest.java     |    4 +-
 .../AlertTargetResourceProviderTest.java        |   22 +-
 .../AmbariPrivilegeResourceProviderTest.java    |   44 +-
 .../internal/ArtifactResourceProviderTest.java  |   68 +-
 .../internal/BaseBlueprintProcessorTest.java    |   12 +-
 .../controller/internal/BaseProviderTest.java   |   32 +-
 .../BlueprintConfigurationProcessorTest.java    | 1695 +++++++++---------
 .../internal/BlueprintResourceProviderTest.java |   68 +-
 .../internal/CalculatedStatusTest.java          |   12 +-
 .../ClientConfigResourceProviderTest.java       |  116 +-
 .../internal/ClusterControllerImplTest.java     |  104 +-
 ...rKerberosDescriptorResourceProviderTest.java |   52 +-
 .../ClusterPrivilegeResourceProviderTest.java   |   28 +-
 .../internal/ClusterResourceProviderTest.java   |   70 +-
 ...ClusterStackVersionResourceProviderTest.java |   60 +-
 ...leRepositoryVersionResourceProviderTest.java |    4 +-
 .../internal/ComponentResourceProviderTest.java |   32 +-
 .../ConfigGroupResourceProviderTest.java        |   76 +-
 .../ConfigurationResourceProviderTest.java      |   16 +-
 .../CredentialResourceProviderTest.java         |    8 +-
 .../internal/ExportBlueprintRequestTest.java    |    2 +-
 .../internal/ExtensionResourceProviderTest.java |    6 +-
 .../internal/FeedResourceProviderTest.java      |   24 +-
 .../GroupPrivilegeResourceProviderTest.java     |    4 +-
 .../internal/GroupResourceProviderTest.java     |   10 +-
 .../HostComponentResourceProviderTest.java      |   38 +-
 ...ostKerberosIdentityResourceProviderTest.java |   10 +-
 .../internal/HostResourceProviderTest.java      |   56 +-
 .../internal/InstanceResourceProviderTest.java  |   16 +-
 .../internal/JMXHostProviderTest.java           |   36 +-
 .../internal/JobResourceProviderTest.java       |   12 +-
 .../LdapSyncEventResourceProviderTest.java      |   18 +-
 .../internal/MemberResourceProviderTest.java    |    6 +-
 .../internal/PageResponseImplTest.java          |    8 +-
 .../PermissionResourceProviderTest.java         |    2 +-
 .../PreUpgradeCheckResourceProviderTest.java    |    8 +-
 .../internal/ProvisionClusterRequestTest.java   |   56 +-
 .../internal/QueryResponseImplTest.java         |    8 +-
 .../RemoteClusterResourceProviderTest.java      |    8 +-
 .../RepositoryResourceProviderTest.java         |    8 +-
 .../RepositoryVersionResourceProviderTest.java  |   28 +-
 .../internal/RequestOperationLevelTest.java     |    2 +-
 .../internal/RequestResourceProviderTest.java   |   82 +-
 .../RequestScheduleResourceProviderTest.java    |   45 +-
 .../internal/RequestStageContainerTest.java     |   12 +-
 .../RoleAuthorizationResourceProviderTest.java  |    6 +-
 ...ootServiceComponentPropertyProviderTest.java |    2 +-
 ...ootServiceComponentResourceProviderTest.java |    6 +-
 ...erviceHostComponentResourceProviderTest.java |    8 +-
 .../RootServiceResourceProviderTest.java        |    6 +-
 .../internal/ScaleClusterRequestTest.java       |   16 +-
 .../controller/internal/SchemaImplTest.java     |   12 +-
 .../internal/ServiceResourceProviderTest.java   |   36 +-
 .../SimplifyingPredicateVisitorTest.java        |    2 +-
 .../StackAdvisorResourceProviderTest.java       |   18 +-
 .../StackArtifactResourceProviderTest.java      |    6 +-
 ...igurationDependencyResourceProviderTest.java |    4 +-
 .../StackConfigurationResourceProviderTest.java |   12 +-
 .../StackDefinedPropertyProviderTest.java       |   20 +-
 .../StackDependencyResourceProviderTest.java    |   44 +-
 ...kLevelConfigurationResourceProviderTest.java |   12 +-
 .../internal/StackResourceProviderTest.java     |    6 +-
 .../server/controller/internal/StackTest.java   |    8 +-
 .../internal/StageResourceProviderTest.java     |    6 +-
 .../TargetClusterResourceProviderTest.java      |   22 +-
 .../TaskAttemptResourceProviderTest.java        |    6 +-
 .../internal/TaskResourceProviderTest.java      |   10 +-
 .../controller/internal/TestIvoryService.java   |   18 +-
 .../internal/URLStreamProviderTest.java         |    4 +-
 .../internal/UpgradeResourceProviderTest.java   |    4 +-
 .../UpgradeSummaryResourceProviderTest.java     |   18 +-
 .../UserPrivilegeResourceProviderTest.java      |   10 +-
 .../internal/UserResourceProviderDBTest.java    |   16 +-
 .../VersionDefinitionResourceProviderTest.java  |   12 +-
 .../ViewInstanceResourceProviderTest.java       |   20 +-
 .../ViewPermissionResourceProviderTest.java     |    4 +-
 .../ViewPrivilegeResourceProviderTest.java      |    6 +-
 .../internal/ViewURLResourceProviderTest.java   |    2 +-
 .../WidgetLayoutResourceProviderTest.java       |   14 +-
 .../internal/WorkflowResourceProviderTest.java  |    6 +-
 .../server/controller/ivory/FeedTest.java       |   30 +-
 .../controller/jmx/TestStreamProvider.java      |    2 +-
 .../LoggingRequestHelperFactoryImplTest.java    |    4 +-
 .../logging/LoggingRequestHelperImplTest.java   |   12 +-
 .../LoggingSearchPropertyProviderTest.java      |    4 +-
 .../metrics/JMXPropertyProviderTest.java        |   24 +-
 .../RestMetricsPropertyProviderTest.java        |   24 +-
 .../metrics/ganglia/GangliaMetricTest.java      |    4 +-
 .../ganglia/GangliaPropertyProviderTest.java    |   58 +-
 .../GangliaReportPropertyProviderTest.java      |    2 +-
 .../metrics/ganglia/TestStreamProvider.java     |    2 +-
 .../timeline/AMSPropertyProviderTest.java       |   28 +-
 .../timeline/AMSReportPropertyProviderTest.java |    4 +-
 .../timeline/MetricsPaddingMethodTest.java      |   14 +-
 .../timeline/MetricsRequestHelperTest.java      |    2 +-
 .../timeline/cache/TimelineMetricCacheTest.java |   16 +-
 .../controller/predicate/AndPredicateTest.java  |   12 +-
 .../predicate/CategoryIsEmptyPredicateTest.java |    2 +-
 .../predicate/EqualsPredicateTest.java          |    8 +-
 .../predicate/GreaterEqualsPredicateTest.java   |    4 +-
 .../predicate/GreaterPredicateTest.java         |    6 +-
 .../predicate/LessEqualsPredicateTest.java      |    4 +-
 .../controller/predicate/LessPredicateTest.java |    4 +-
 .../controller/predicate/NotPredicateTest.java  |    4 +-
 .../controller/predicate/OrPredicateTest.java   |   12 +-
 .../predicate/PredicateVisitorTest.java         |    2 +-
 ...ThreadPoolExecutorCompletionServiceTest.java |    6 +-
 .../utilities/PropertyHelperTest.java           |   12 +-
 .../utilities/webserver/StartServer.java        |    2 +-
 .../credentialapi/CredentialUtilTest.java       |   12 +-
 .../apache/ambari/server/events/EventsTest.java |    2 +-
 .../ambari/server/events/MockEventListener.java |    8 +-
 .../listeners/tasks/TaskStatusListenerTest.java |    4 +-
 .../AlertMaintenanceModeListenerTest.java       |    2 +-
 .../HostVersionOutOfSyncListenerTest.java       |   28 +-
 .../upgrade/StackVersionListenerTest.java       |    2 +-
 .../server/hooks/users/UserHookServiceTest.java |    2 +-
 .../metadata/AgentAlertDefinitionsTest.java     |    2 +-
 .../server/metadata/RoleCommandOrderTest.java   |    4 +-
 .../dispatchers/AlertScriptDispatcherTest.java  |    2 +-
 .../dispatchers/AmbariSNMPDispatcherTest.java   |   58 +-
 .../dispatchers/EmailDispatcherTest.java        |   12 +-
 .../dispatchers/SNMPDispatcherTest.java         |   60 +-
 .../ambari/server/orm/DBAccessorImplTest.java   |   10 +-
 .../apache/ambari/server/orm/OrmTestHelper.java |    8 +-
 .../apache/ambari/server/orm/TestOrmImpl.java   |    2 +-
 .../server/orm/dao/AlertDefinitionDAOTest.java  |    2 +-
 .../ambari/server/orm/dao/AlertsDAOTest.java    |    4 +-
 .../server/orm/dao/ConfigGroupDAOTest.java      |    8 +-
 .../server/orm/dao/HostVersionDAOTest.java      |    4 +-
 .../ambari/server/orm/dao/RequestDAOTest.java   |   23 +-
 .../ambari/server/orm/dao/StageDAOTest.java     |    4 +-
 .../ambari/server/orm/dao/UpgradeDAOTest.java   |   23 +-
 .../ambari/server/orm/dao/WidgetDAOTest.java    |    2 +-
 .../server/orm/dao/WidgetLayoutDAOTest.java     |    2 +-
 .../apache/ambari/server/orm/db/DDLTests.java   |    6 +-
 .../orm/entities/LdapSyncSpecEntityTest.java    |    4 +-
 .../orm/entities/PrincipalEntityTest.java       |    4 +-
 .../orm/entities/ViewInstanceEntityTest.java    |    2 +-
 .../ambari/server/proxy/ProxyServiceTest.java   |   28 +-
 .../scheduler/ExecutionScheduleManagerTest.java |   10 +-
 .../AmbariServerSecurityHeaderFilterTest.java   |    4 +-
 .../AmbariViewsSecurityHeaderFilterTest.java    |    4 +-
 .../server/security/CertificateManagerTest.java |    2 +-
 .../security/SecurePasswordHelperTest.java      |    2 +-
 ...ariKerberosAuthenticationPropertiesTest.java |    6 +-
 .../AmbariPamAuthenticationProviderTest.java    |    2 +-
 .../authorization/AuthorizationHelperTest.java  |    4 +-
 .../security/authorization/UsersTest.java       |    4 +-
 .../encryption/MasterKeyServiceTest.java        |    4 +-
 .../ldap/AmbariLdapDataPopulatorTest.java       |   20 +-
 .../security/ldap/LdapPerformanceTest.java      |    4 +-
 .../serveraction/ServerActionExecutorTest.java  |    2 +-
 .../ADKerberosOperationHandlerTest.java         |    4 +-
 .../FinalizeKerberosServerActionTest.java       |    4 +-
 .../kerberos/KerberosOperationHandlerTest.java  |    2 +-
 .../kerberos/KerberosServerActionTest.java      |   12 +-
 .../UpdateKerberosConfigsServerActionTest.java  |    8 +-
 .../AutoSkipFailedSummaryActionTest.java        |    8 +-
 .../ComponentVersionCheckActionTest.java        |   12 +-
 .../FixCapacitySchedulerOrderingPolicyTest.java |  127 ++
 .../upgrades/FixOozieAdminUsersTest.java        |    2 +-
 .../upgrades/FixYarnWebServiceUrlTest.java      |  305 ++++
 .../HBaseEnvMaxDirectMemorySizeActionTest.java  |    2 +-
 .../upgrades/HiveEnvClasspathActionTest.java    |    2 +-
 .../upgrades/KerberosKeytabsActionTest.java     |    6 +-
 .../upgrades/RangerConfigCalculationTest.java   |    4 +-
 .../RangerKerberosConfigCalculationTest.java    |    2 +-
 .../upgrades/RangerKmsProxyConfigTest.java      |    2 +-
 .../RangerWebAlertConfigActionTest.java         |    6 +-
 .../upgrades/UpgradeActionTest.java             |   32 +-
 .../UpgradeUserKerberosDescriptorTest.java      |    4 +-
 .../server/stack/ComponentModuleTest.java       |   22 +-
 .../ambari/server/stack/ServiceModuleTest.java  |   76 +-
 .../stack/StackManagerCommonServicesTest.java   |    2 +-
 .../server/stack/StackManagerExtensionTest.java |    2 +-
 .../ambari/server/stack/StackManagerTest.java   |   30 +-
 .../ambari/server/stack/StackModuleTest.java    |   13 +-
 .../ambari/server/state/CheckHelperTest.java    |   10 +-
 .../ambari/server/state/ConfigGroupTest.java    |   16 +-
 .../ambari/server/state/PropertyInfoTest.java   |    2 +-
 .../server/state/RequestExecutionTest.java      |    4 +-
 .../server/state/ServiceComponentTest.java      |   21 +-
 .../ambari/server/state/ServiceInfoTest.java    |   49 +-
 .../apache/ambari/server/state/ServiceTest.java |    4 +-
 .../ambari/server/state/UpgradeHelperTest.java  |  188 +-
 .../state/alerts/AlertDefinitionHashTest.java   |   16 +-
 .../alerts/AlertStateChangedEventTest.java      |   30 +-
 .../state/cluster/ClusterDeadlockTest.java      |   16 +-
 .../server/state/cluster/ClusterImplTest.java   |   14 +-
 .../state/cluster/ClustersDeadlockTest.java     |    6 +-
 .../server/state/cluster/ClustersImplTest.java  |    4 +-
 .../ConcurrentServiceConfigVersionTest.java     |    4 +-
 ...omponentHostConcurrentWriteDeadlockTest.java |    8 +-
 .../KerberosComponentDescriptorTest.java        |   14 +-
 .../KerberosConfigurationDescriptorTest.java    |   14 +-
 .../state/kerberos/KerberosDescriptorTest.java  |   45 +-
 .../KerberosIdentityDescriptorTest.java         |   18 +-
 .../kerberos/KerberosKeytabDescriptorTest.java  |    6 +-
 .../KerberosPrincipalDescriptorTest.java        |    4 +-
 .../kerberos/KerberosServiceDescriptorTest.java |   16 +-
 .../kerberos/VariableReplacementHelperTest.java |   16 +-
 .../state/scheduler/BatchRequestJobTest.java    |    4 +-
 .../AlertNoticeDispatchServiceTest.java         |   10 +-
 .../services/MetricsRetrievalServiceTest.java   |   63 +
 .../services/RetryUpgradeActionServiceTest.java |   14 +-
 .../ambari/server/state/stack/OSFamilyTest.java |   16 +-
 .../upgrade/RepositoryVersionHelperTest.java    |    2 +-
 .../svccomphost/ServiceComponentHostTest.java   |   24 +-
 .../server/testing/DeadlockWarningThread.java   |    4 +-
 .../server/testing/DeadlockedThreadsTest.java   |    2 +-
 .../server/topology/AmbariContextTest.java      |   32 +-
 .../server/topology/BlueprintFactoryTest.java   |    6 +-
 .../server/topology/BlueprintImplTest.java      |   18 +-
 .../topology/BlueprintValidatorImplTest.java    |   20 +-
 .../ClusterConfigurationRequestTest.java        |   10 +-
 .../ClusterDeployWithStartOnlyTest.java         |   12 +-
 ...InstallWithoutStartOnComponentLevelTest.java |   12 +-
 .../ClusterInstallWithoutStartTest.java         |   12 +-
 .../topology/ClusterTopologyImplTest.java       |   22 +-
 .../topology/ConfigurationFactoryTest.java      |   14 +-
 .../server/topology/ConfigurationTest.java      |  106 +-
 .../topology/RequiredPasswordValidatorTest.java |   24 +-
 .../ambari/server/topology/SettingTest.java     |    6 +-
 .../server/topology/TopologyManagerTest.java    |   12 +-
 .../ClusterConfigTypeValidatorTest.java         |   14 +-
 .../upgrade/AbstractUpgradeCatalogTest.java     |    6 +-
 .../server/upgrade/UpgradeCatalog200Test.java   |   12 +-
 .../server/upgrade/UpgradeCatalog210Test.java   |   32 +-
 .../server/upgrade/UpgradeCatalog212Test.java   |    8 +-
 .../server/upgrade/UpgradeCatalog220Test.java   |    8 +-
 .../server/upgrade/UpgradeCatalog221Test.java   |   10 +-
 .../server/upgrade/UpgradeCatalog230Test.java   |    2 +-
 .../server/upgrade/UpgradeCatalog240Test.java   |   34 +-
 .../server/upgrade/UpgradeCatalog242Test.java   |    4 +-
 .../server/upgrade/UpgradeCatalog250Test.java   |   54 +-
 .../ambari/server/upgrade/UpgradeTest.java      |    2 +-
 .../ambari/server/utils/SetUtilsTest.java       |   10 +-
 .../ambari/server/utils/StageUtilsTest.java     |   40 +-
 .../ambari/server/utils/TestParallel.java       |    8 +-
 .../ambari/server/view/ClusterImplTest.java     |    4 +-
 .../view/ViewAmbariStreamProviderTest.java      |   16 +-
 .../ambari/server/view/ViewExtractorTest.java   |    6 +-
 .../ambari/server/view/ViewRegistryTest.java    |   40 +-
 .../view/ViewSubResourceProviderTest.java       |    6 +-
 .../server/view/ViewURLStreamProviderTest.java  |   44 +-
 .../server/view/events/EventImplTest.java       |    2 +-
 .../view/persistence/DataStoreImplTest.java     |    4 +-
 .../InstanceValidationResultImplTest.java       |    2 +-
 .../stacks/2.0.6/HDFS/test_hdfs_client.py       |   11 +-
 .../stacks/2.0.6/YARN/test_nodemanager.py       |    6 +-
 .../python/stacks/2.0.6/configs/default.json    |   24 +
 .../stacks/2.2/KERBEROS/test_kerberos_client.py |    4 +-
 .../python/stacks/2.2/KERBEROS/use_cases.py     |    5 +-
 .../stacks/2.3/ATLAS/test_metadata_server.py    |    6 +-
 .../stacks/2.5/RANGER/test_ranger_admin.py      |    8 +-
 .../stacks/2.6/RANGER/test_ranger_admin.py      |    8 +-
 .../test_filtering_identity_descriptor.json     |   74 +
 .../HDP/2.0.7/services/SYSTEMML/metainfo.xml    |   39 +
 .../stacks/HDP/2.0.8/services/HIVE/metainfo.xml |  174 ++
 .../HDP/2.0.8/services/SYSTEMML/metainfo.xml    |   39 +
 .../upgrades/upgrade_multi_server_tasks.xml     |   88 +
 ambari-web/app/app.js                           |    4 +
 ambari-web/app/assets/index.html                |    4 +-
 ambari-web/app/assets/test/tests.js             |    6 +-
 ambari-web/app/config.js                        |    2 -
 ambari-web/app/controllers/application.js       |   10 +-
 ambari-web/app/controllers/experimental.js      |    2 +-
 .../controllers/global/cluster_controller.js    |   31 +-
 .../global/errors_handler_controller.js         |    2 +-
 .../global/user_settings_controller.js          |    2 +-
 .../global/wizard_watcher_controller.js         |    2 +-
 ambari-web/app/controllers/installer.js         |   23 +-
 ambari-web/app/controllers/main.js              |   28 +-
 .../main/admin/kerberos/wizard_controller.js    |   18 +-
 ambari-web/app/controllers/main/host/details.js |   14 +-
 .../controllers/main/service/add_controller.js  |   43 +-
 ambari-web/app/controllers/wizard.js            |   62 +-
 .../app/controllers/wizard/step1_controller.js  |    6 +-
 .../app/controllers/wizard/step3_controller.js  |   15 +-
 .../app/controllers/wizard/step4_controller.js  |    2 +
 .../app/controllers/wizard/step6_controller.js  |    8 +-
 .../app/controllers/wizard/step9_controller.js  |    3 +-
 .../wizards/kerberos_descriptor_properties.js   |    5 +
 ambari-web/app/mappers/stack_service_mapper.js  |    1 +
 ambari-web/app/messages.js                      |    8 +-
 ambari-web/app/mixins.js                        |    3 +-
 ambari-web/app/mixins/common/persist.js         |  166 ++
 ambari-web/app/mixins/common/persist_mixin.js   |   45 -
 ambari-web/app/mixins/common/userPref.js        |  126 --
 .../main/host/details/actions/check_host.js     |  110 +-
 .../app/mixins/wizard/addSecurityConfigs.js     |    4 +-
 .../mixins/wizard/assign_master_components.js   |    1 +
 ambari-web/app/models/cluster_states.js         |    3 +-
 ambari-web/app/models/host_component.js         |    3 +-
 ambari-web/app/models/repository.js             |   15 +-
 ambari-web/app/models/stack_service.js          |    1 +
 ambari-web/app/routes/add_kerberos_routes.js    |   22 +-
 ambari-web/app/routes/add_service_routes.js     |   16 +-
 ambari-web/app/routes/installer.js              |   25 +-
 ambari-web/app/routes/main.js                   |   34 +-
 ambari-web/app/routes/stack_upgrade_routes.js   |    2 +-
 .../app/styles/theme/bootstrap-ambari.css       |   42 +-
 ambari-web/app/styles/widgets.less              |    1 +
 ambari-web/app/templates/application.hbs        |   10 +-
 .../common/assign_master_components.hbs         |   14 +-
 .../common/configs/overriddenProperty.hbs       |    4 +-
 .../common/configs/service_config_category.hbs  |   16 +-
 .../common/configs/services_config.hbs          |    6 +-
 .../app/templates/common/form/dropdown.hbs      |    2 +-
 ambari-web/app/templates/common/modal_popup.hbs |   16 +-
 ambari-web/app/templates/common/pagination.hbs  |    2 +-
 ambari-web/app/templates/installer.hbs          |   24 +-
 ambari-web/app/templates/login.hbs              |   12 +-
 ambari-web/app/templates/main.hbs               |    2 +-
 .../stack_upgrade/stack_upgrade_wizard.hbs      |   47 +-
 .../templates/main/service/services/oozie.hbs   |   40 -
 ambari-web/app/templates/wizard/step0.hbs       |    9 +-
 ambari-web/app/templates/wizard/step1.hbs       |   72 +-
 ambari-web/app/templates/wizard/step10.hbs      |    2 +-
 ambari-web/app/templates/wizard/step2.hbs       |  246 +--
 ambari-web/app/templates/wizard/step3.hbs       |   63 +-
 .../step3/step3_host_warning_popup_footer.hbs   |    5 +-
 .../wizard/step3/step3_host_warnings_popup.hbs  |   35 +-
 .../step3/step3_registered_hosts_popup.hbs      |    2 +-
 ambari-web/app/templates/wizard/step4.hbs       |   20 +-
 .../step4/step4_ranger_requirements_popup.hbs   |    2 +-
 ambari-web/app/templates/wizard/step6.hbs       |   18 +-
 ambari-web/app/templates/wizard/step7.hbs       |    4 +-
 ambari-web/app/templates/wizard/step8.hbs       |    8 +-
 ambari-web/app/templates/wizard/step9.hbs       |   46 +-
 .../wizard/step9/step9HostTasksLogPopup.hbs     |    2 +-
 ambari-web/app/utils/ajax/ajax.js               |   24 +-
 ambari-web/app/utils/helper.js                  |   55 +-
 ambari-web/app/utils/persist.js                 |  101 --
 ambari-web/app/views.js                         |    1 -
 .../common/assign_master_components_view.js     |    4 +
 ambari-web/app/views/common/checkbox_view.js    |    3 +-
 .../configs/service_configs_by_category_view.js |    8 +-
 ambari-web/app/views/common/controls_view.js    |    5 +-
 ambari-web/app/views/common/modal_popup.js      |    1 +
 .../views/common/modal_popups/alert_popup.js    |    1 +
 .../common/modal_popups/confirmation_popup.js   |    1 +
 .../app/views/common/quick_view_link_view.js    |    8 -
 ambari-web/app/views/common/table_view.js       |    2 +-
 ambari-web/app/views/login.js                   |    6 +-
 ambari-web/app/views/main/dashboard/widgets.js  |    2 +-
 .../app/views/main/service/info/summary.js      |    9 +-
 .../main/service/manage_config_groups_view.js   |    2 +-
 ambari-web/app/views/main/service/menu.js       |   40 +-
 .../app/views/main/service/reconfigure.js       |    8 +-
 ambari-web/app/views/main/service/service.js    |   23 +-
 .../app/views/main/service/services/hbase.js    |    6 -
 .../app/views/main/service/services/hdfs.js     |    4 -
 .../app/views/main/service/services/oozie.js    |   29 -
 ambari-web/app/views/wizard/step1_view.js       |   13 +-
 ambari-web/app/views/wizard/step2_view.js       |    4 +-
 .../wizard/step3/hostWarningPopupBody_view.js   |    3 +-
 .../wizard/step3/hostWarningPopupFooter_view.js |    4 +-
 ambari-web/app/views/wizard/step6_view.js       |   12 +-
 ambari-web/app/views/wizard/step9_view.js       |    1 +
 .../global/cluster_controller_test.js           |   73 +-
 ambari-web/test/controllers/installer_test.js   |   23 +-
 .../test/controllers/main/service/item_test.js  |    2 +-
 ambari-web/test/controllers/main_test.js        |   67 -
 .../test/controllers/wizard/step3_test.js       |   34 -
 ambari-web/test/controllers/wizard_test.js      |   47 +-
 ambari-web/test/init_test.js                    |   27 +
 .../test/mappers/stack_service_mapper_test.js   |    7 +-
 ambari-web/test/mixins/common/persist_test.js   |  125 ++
 .../test/views/common/quick_link_view_test.js   |   10 -
 ambari-web/test/views/common/table_view_test.js |   14 +-
 .../test/views/main/dashboard/widgets_test.js   |    2 +-
 .../views/main/service/info/summary_test.js     |   26 -
 ambari-web/test/views/main/service/item_test.js |  166 +-
 .../service/manage_config_groups_view_test.js   |  125 ++
 ambari-web/test/views/main/service/menu_test.js |  210 ++-
 .../views/main/service/reassign_view_test.js    |  128 ++
 .../test/views/main/service/reconfigure_test.js |  126 ++
 .../test/views/main/service/service_test.js     |  264 +++
 .../views/main/service/services/hbase_test.js   |   23 -
 .../views/main/service/services/hdfs_test.js    |   20 -
 .../views/main/service/services/oozie_test.js   |   55 -
 ambari-web/test/views/wizard/step1_view_test.js |   16 +-
 .../step3/hostWarningPopupFooter_view_test.js   |   14 +-
 .../vendor/scripts/theme/bootstrap-ambari.js    |   29 +-
 ambari-web/vendor/scripts/visualsearch.js       |    2 +-
 .../stacks/ODPi/2.0/services/stack_advisor.py   |   21 +-
 .../uploads/parsers/xml/XMLParser.java          |    2 +
 .../uploads/parsers/xml/XMLParser.java          |    2 +
 .../main/resources/ui/app/routes/queries/new.js |    5 +-
 .../src/main/resources/ui/app/styles/app.scss   |   41 +-
 .../ui/app/styles/bootstrap-overrides.scss      |   25 +-
 .../resources/ui/app/templates/application.hbs  |    2 +-
 .../app/templates/components/alert-message.hbs  |    6 +-
 .../components/top-application-bar.hbs          |    2 +-
 .../ui/app/utils/hive-explainer/renderer.js     |   40 +-
 .../src/main/resources/ui/pig-web/app/app.js    |   19 +-
 .../apache/ambari/view/utils/hdfs/HdfsApi.java  |    1 +
 .../ui/app/components/bundle-config.js          |    1 +
 .../resources/ui/app/components/coord-config.js |    1 +
 .../ui/app/components/designer-workspace.js     |    1 +
 .../ui/app/components/flow-designer.js          |   17 +-
 .../ui/app/components/global-config.js          |    5 +
 .../resources/ui/app/components/job-config.js   |   32 +-
 .../ui/app/components/workflow-credentials.js   |    2 +-
 .../ui/app/domain/cytoscape-flow-renderer.js    |   20 +-
 .../resources/ui/app/domain/cytoscape-style.js  |   10 +-
 .../src/main/resources/ui/app/index.html        |   14 +
 .../src/main/resources/ui/app/routes/index.js   |    5 +-
 .../ui/app/services/workflow-manager-configs.js |   27 +
 .../src/main/resources/ui/app/styles/app.less   |    3 -
 .../app/templates/components/bundle-config.hbs  |    2 +-
 .../app/templates/components/coord-config.hbs   |    2 +-
 .../templates/components/credentials-config.hbs |    2 +-
 .../app/templates/components/flow-designer.hbs  |    2 +-
 .../app/templates/components/global-config.hbs  |    2 +-
 .../templates/components/transition-config.hbs  |   34 +-
 .../components/workflow-credentials.hbs         |   13 +-
 .../main/resources/ui/public/assets/custom.png  |  Bin 0 -> 350 bytes
 .../main/resources/ui/public/assets/distcp.png  |  Bin 0 -> 229 bytes
 .../main/resources/ui/public/assets/email.png   |  Bin 0 -> 340 bytes
 .../src/main/resources/ui/public/assets/fs.png  |  Bin 0 -> 254 bytes
 .../main/resources/ui/public/assets/hive.png    |  Bin 0 -> 270 bytes
 .../main/resources/ui/public/assets/hive2.png   |  Bin 0 -> 270 bytes
 .../main/resources/ui/public/assets/java.png    |  Bin 0 -> 385 bytes
 .../resources/ui/public/assets/map-reduce.png   |  Bin 0 -> 552 bytes
 .../src/main/resources/ui/public/assets/pig.png |  Bin 0 -> 342 bytes
 .../main/resources/ui/public/assets/shell.png   |  Bin 0 -> 222 bytes
 .../main/resources/ui/public/assets/spark.png   |  Bin 0 -> 381 bytes
 .../main/resources/ui/public/assets/sqoop.png   |  Bin 0 -> 482 bytes
 .../src/main/resources/ui/public/assets/ssh.png |  Bin 0 -> 222 bytes
 .../resources/ui/public/assets/sub-workflow.png |  Bin 0 -> 433 bytes
 .../services/workflow-manager-configs-test.js   |   28 +
 dev-support/test-patch.sh                       |   88 +-
 docs/pom.xml                                    |   15 +-
 docs/src/site/apt/index.apt                     |    2 +-
 docs/src/site/apt/whats-new.apt                 |   24 +-
 docs/src/site/site.xml                          |    2 +
 1353 files changed, 14682 insertions(+), 9155 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupPrivilegeService.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupPrivilegeService.java
index 72f4d82,0000000..6b6a674
mode 100644,000000..100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupPrivilegeService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupPrivilegeService.java
@@@ -1,113 -1,0 +1,113 @@@
 +/*
 + * 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.groups;
 +
 +import java.util.HashMap;
 +import java.util.Map;
 +
 +import javax.ws.rs.GET;
 +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 org.apache.ambari.server.api.resources.ResourceInstance;
 +import org.apache.ambari.server.api.services.BaseService;
 +import org.apache.ambari.server.api.services.Request;
 +import org.apache.ambari.server.controller.GroupPrivilegeResponse;
 +import org.apache.ambari.server.controller.PrivilegeResponse;
 +import org.apache.ambari.server.controller.spi.Resource;
 +
 +import io.swagger.annotations.Api;
 +import io.swagger.annotations.ApiImplicitParam;
 +import io.swagger.annotations.ApiImplicitParams;
 +import io.swagger.annotations.ApiOperation;
 +import io.swagger.annotations.ApiParam;
 +import io.swagger.annotations.ApiResponse;
 +import io.swagger.annotations.ApiResponses;
 +
 +/**
 + *  Service responsible for group privilege resource requests.
 + */
 +@Path("/groups/{groupName}/privileges")
 +@Api(value = "Groups", description = "Endpoint for group specific operations")
 +public class GroupPrivilegeService extends BaseService {
 +
 +  /**
 +   * Handles: GET  /groups/{groupName}/privileges
 +   * Get all group privileges.
 +   * @param headers
 +   * @param ui
 +   * @param groupName
 +   * @return
 +   */
 +  @GET
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Get all privileges", nickname = "GroupPrivilegeService#getPrivileges", notes = "Returns all privileges for group.", response = GroupPrivilegeResponse.class, responseContainer = "List")
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "fields", value = "Filter user privileges", defaultValue = "PrivilegeInfo/*", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "sortBy", value = "Sort user privileges (asc | desc)", defaultValue = "PrivilegeInfo/user_name.asc", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
 +    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
 +    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
 +  })
 +
 +  public Response getPrivileges(@Context HttpHeaders headers, @Context UriInfo ui,
 +                                @ApiParam(value = "group name", required = true) @PathParam("groupName") String groupName) {
 +    return handleRequest(headers, null, ui, Request.Type.GET, createPrivilegeResource(groupName, null));
 +  }
 +
 +
 +  /**
 +   * Handles: GET /groups/{groupName}/privileges{privilegeID}
 +   * Get a specific privilege for a group.
 +   *
 +   * @param headers       http headers
 +   * @param ui            uri info
 +   * @param groupName     group name
 +   * @param privilegeId   privilege id
 +   * @return privilege instance representation
 +   */
 +  @GET
 +  @Path("{privilegeId}")
 +  @Produces("text/plain")
 +  @ApiOperation(value = "Get group privilege", nickname = "GroupPrivilegeService#getPrivilege", notes = "Returns group privilege details.", response = GroupPrivilegeResponse.class)
 +  @ApiImplicitParams({
 +    @ApiImplicitParam(name = "fields", value = "Filter group privilege details", defaultValue = "PrivilegeInfo/*", dataType = "string", paramType = "query")
 +  })
 +  @ApiResponses(value = {
 +    @ApiResponse(code = 200, message = "Successful operation", response = PrivilegeResponse.class)}
 +  )
 +  public Response getPrivilege(@Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "group name", required = true) @PathParam ("groupName") String groupName,
 +                               @ApiParam(value = "privilege id", required = true) @PathParam("privilegeId") String privilegeId) {
 +    return handleRequest(headers, null, ui, Request.Type.GET, createPrivilegeResource(groupName, privilegeId));
 +  }
 +
 +
 +
 +  protected ResourceInstance createPrivilegeResource(String groupName, String privilegeId) {
-     final Map<Resource.Type, String> mapIds = new HashMap<Resource.Type, String>();
++    final Map<Resource.Type, String> mapIds = new HashMap<>();
 +    mapIds.put(Resource.Type.Group, groupName);
 +    mapIds.put(Resource.Type.GroupPrivilege, privilegeId);
 +    return createResource(Resource.Type.GroupPrivilege, mapIds);
 +  }
 +}


[22/49] ambari git commit: Merge branch 'trunk' into ambari-rest-api-explorer

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/e250b901/ambari-server/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/e250b901/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProvider.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/e250b901/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/e250b901/ambari-web/pom.xml
----------------------------------------------------------------------


[33/49] ambari git commit: AMBARI-20951. Integrate HostService resource with Swagger

Posted by ad...@apache.org.
AMBARI-20951. Integrate HostService resource with Swagger


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

Branch: refs/heads/trunk
Commit: 0e13b01849f1b13010a83b01861102a5febb5e7c
Parents: 4ede671
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Mon Apr 24 09:46:37 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Mon May 8 20:52:42 2017 +0200

----------------------------------------------------------------------
 .../ambari/server/api/services/BaseService.java |  26 ++
 .../ambari/server/api/services/HostService.java | 188 +++++++++---
 .../request/eventcreator/HostEventCreator.java  |   4 +-
 .../ambari/server/controller/HostRequest.java   |  72 ++---
 .../ambari/server/controller/HostResponse.java  | 287 +++++--------------
 .../controller/RootServiceResponseFactory.java  |   2 +-
 .../internal/HostResourceProvider.java          | 188 ++++++------
 .../controller/internal/HostStatusHelper.java   |   7 +-
 ...ootServiceHostComponentResourceProvider.java |   2 +-
 .../internal/ScaleClusterRequest.java           |  10 +-
 .../controller/utilities/PropertyHelper.java    |   2 +-
 .../ambari/server/state/host/HostImpl.java      |   6 +-
 .../ambari/server/topology/AmbariContext.java   |   2 +-
 .../ambari/server/topology/HostRequest.java     |   2 +-
 .../server/api/services/HostServiceTest.java    |   2 +-
 .../request/creator/HostEventCreatorTest.java   |   4 +-
 .../AmbariManagementControllerTest.java         |  54 ++--
 .../internal/AbstractResourceProviderTest.java  |   5 +-
 .../internal/HostResourceProviderTest.java      |  74 ++---
 ...erviceHostComponentResourceProviderTest.java |  11 +-
 .../internal/ScaleClusterRequestTest.java       |  14 +-
 .../server/topology/TopologyManagerTest.java    |   4 +-
 22 files changed, 434 insertions(+), 532 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
index 0185d37..76d2b70 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
@@ -49,6 +49,32 @@ import org.slf4j.LoggerFactory;
 public abstract class BaseService {
   public final static MediaType MEDIA_TYPE_TEXT_CSV_TYPE = new MediaType("text", "csv");
 
+  static final String SUCCESSFUL_OPERATION = "Successful operation";
+  static final String REQUEST_ACCEPTED = "Request is accepted, but not completely processed yet";
+  static final String INVALID_ARGUMENTS = "Invalid arguments";
+  static final String CLUSTER_NOT_FOUND = "Cluster not found";
+  static final String CLUSTER_OR_HOST_NOT_FOUND = "Cluster or host not found";
+  static final String NOT_AUTHENTICATED = "Not authenticated";
+  static final String PERMISSION_DENIED = "Not permitted to perform the operation";
+  static final String SERVER_ERROR = "Internal server error";
+
+  static final String QUERY_FIELDS = "fields";
+  static final String QUERY_FILTER_DESCRIPTION = "Filter fields in the response (identifier fields are mandatory)";
+  static final String QUERY_SORT = "sortBy";
+  static final String QUERY_SORT_DESCRIPTION = "Sort resources in result by (asc | desc)";
+  static final String QUERY_PAGE_SIZE = "page_size";
+  static final String QUERY_PAGE_SIZE_DESCRIPTION = "The number of resources to be returned for the paged response.";
+  static final String DEFAULT_PAGE_SIZE = "10";
+  static final String QUERY_FROM = "from";
+  static final String QUERY_FROM_DESCRIPTION = "The starting page resource (inclusive).  \"start\" is also accepted.";
+  static final String QUERY_FROM_TYPE = "integer";
+  static final String QUERY_FROM_VALUES = "range[0, infinity]";
+  static final String DEFAULT_FROM = "0";
+  static final String QUERY_TO = "to";
+  static final String QUERY_TO_DESCRIPTION = "The ending page resource (inclusive).  \"end\" is also accepted.";
+  static final String QUERY_TO_TYPE = "integer";
+  static final String QUERY_TO_VALUES = "range[1, infinity]";
+
   /**
    * Logger instance.
    */

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
index c26c5d8..7b5f9cf 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
@@ -34,23 +34,39 @@ import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 
 import org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.controller.HostResponse;
 import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.http.HttpStatus;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 
 /**
  * Service responsible for hosts resource requests.
  */
-@Path("/hosts/")
+@Path("/hosts")
+@Api(value = "/hosts", description = "Endpoint for host-specific operations")
 public class HostService extends BaseService {
 
+  private static final String UNKNOWN_HOSTS = "Attempt to add hosts that have not been registered";
+  private static final String HOST_ALREADY_EXISTS = "Attempt to create a host which already exists";
+  private static final String HOST_REQUEST_TYPE = "org.apache.ambari.server.controller.HostRequest";
+
   /**
    * Parent cluster id.
    */
-  private String m_clusterName;
+  private final String m_clusterName;
 
   /**
    * Constructor.
    */
   public HostService() {
+    this(null);
   }
 
   /**
@@ -68,17 +84,28 @@ public class HostService extends BaseService {
    *
    * @param headers  http headers
    * @param ui       uri info
-   * @param hostName host id
+   * @param hostName host name
    * @return host resource representation
    */
   @GET
   @Path("{hostName}")
   @Produces("text/plain")
+  @ApiOperation(value = "Returns information about a single host", response = HostResponse.Wrapper.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = "string", paramType = "query"),
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = CLUSTER_OR_HOST_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = SERVER_ERROR),
+  })
   public Response getHost(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                          @PathParam("hostName") String hostName) {
-
+    @ApiParam(value = "host name", required = true) @PathParam("hostName") String hostName
+  ) {
     return handleRequest(headers, body, ui, Request.Type.GET,
-        createHostResource(m_clusterName, hostName, ui));
+        createHostResource(m_clusterName, hostName));
   }
 
   /**
@@ -91,9 +118,24 @@ public class HostService extends BaseService {
    */
   @GET
   @Produces("text/plain")
+  @ApiOperation(value = "Returns a collection of all hosts", response = HostResponse.Wrapper.class, responseContainer = "List")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, defaultValue = "Hosts/*", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION, defaultValue = "Hosts/host_name.asc", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = "integer", paramType = "query"),
+    @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, allowableValues = QUERY_FROM_VALUES, defaultValue = DEFAULT_FROM, dataType = QUERY_FROM_TYPE, paramType = "query"),
+    @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, allowableValues = QUERY_TO_VALUES, dataType = QUERY_TO_TYPE, paramType = "query"),
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = CLUSTER_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = SERVER_ERROR),
+  })
   public Response getHosts(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
     return handleRequest(headers, body, ui, Request.Type.GET,
-        createHostResource(m_clusterName, null, ui));
+        createHostResource(m_clusterName, null));
   }
 
   /**
@@ -109,10 +151,23 @@ public class HostService extends BaseService {
    */
   @POST
   @Produces("text/plain")
+  @ApiOperation(value = "Creates multiple hosts in a single request")
+  @ApiImplicitParams({
+    @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = "body", allowMultiple = true)
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_CREATED, message = SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = REQUEST_ACCEPTED),
+    @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = UNKNOWN_HOSTS),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = CLUSTER_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_CONFLICT, message = HOST_ALREADY_EXISTS),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = SERVER_ERROR),
+  })
   public Response createHosts(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-
     return handleRequest(headers, body, ui, Request.Type.POST,
-        createHostResource(m_clusterName, null, ui));
+        createHostResource(m_clusterName, null));
   }
 
   /**
@@ -122,18 +177,32 @@ public class HostService extends BaseService {
    * @param body     http body
    * @param headers  http headers
    * @param ui       uri info
-   * @param hostName host id
+   * @param hostName host name
    *
    * @return host resource representation
    */
   @POST
   @Path("{hostName}")
   @Produces("text/plain")
+  @ApiOperation(value = "Creates a host")
+  @ApiImplicitParams({
+    @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = "body")
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_CREATED, message = SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = REQUEST_ACCEPTED),
+    @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = INVALID_ARGUMENTS),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = CLUSTER_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_CONFLICT, message = HOST_ALREADY_EXISTS),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = SERVER_ERROR),
+  })
   public Response createHost(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                          @PathParam("hostName") String hostName) {
-
+    @ApiParam(value = "host name", required = true) @PathParam("hostName") String hostName
+  ) {
     return handleRequest(headers, body, ui, Request.Type.POST,
-        createHostResource(m_clusterName, hostName, ui));
+        createHostResource(m_clusterName, hostName));
   }
 
   /**
@@ -143,18 +212,31 @@ public class HostService extends BaseService {
    * @param body     http body
    * @param headers  http headers
    * @param ui       uri info
-   * @param hostName host id
+   * @param hostName host name
    *
    * @return information regarding updated host
    */
   @PUT
   @Path("{hostName}")
   @Produces("text/plain")
+  @ApiOperation(value = "Updates a host")
+  @ApiImplicitParams({
+    @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = "body")
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = REQUEST_ACCEPTED),
+    @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = INVALID_ARGUMENTS),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = CLUSTER_OR_HOST_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = SERVER_ERROR),
+  })
   public Response updateHost(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                          @PathParam("hostName") String hostName) {
-
+     @ApiParam(value = "host name", required = true) @PathParam("hostName") String hostName
+  ) {
     return handleRequest(headers, body, ui, Request.Type.PUT,
-        createHostResource(m_clusterName, hostName, ui));
+        createHostResource(m_clusterName, hostName));
   }
 
   /**
@@ -169,10 +251,22 @@ public class HostService extends BaseService {
    */
   @PUT
   @Produces("text/plain")
+  @ApiOperation(value = "Updates multiple hosts in a single request")
+  @ApiImplicitParams({
+    @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = "body", allowMultiple = true)
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = REQUEST_ACCEPTED),
+    @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = INVALID_ARGUMENTS),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = CLUSTER_OR_HOST_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = SERVER_ERROR),
+  })
   public Response updateHosts(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-
     return handleRequest(headers, body, ui, Request.Type.PUT,
-        createHostResource(m_clusterName, null, ui));
+        createHostResource(m_clusterName, null));
   }
 
   /**
@@ -181,32 +275,50 @@ public class HostService extends BaseService {
    *
    * @param headers  http headers
    * @param ui       uri info
-   * @param hostName host id
+   * @param hostName host name
    *
    * @return host resource representation
    */
   @DELETE
   @Path("{hostName}")
   @Produces("text/plain")
+  @ApiOperation(value = "Deletes a host")
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = CLUSTER_OR_HOST_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = SERVER_ERROR),
+  })
   public Response deleteHost(@Context HttpHeaders headers, @Context UriInfo ui,
-                             @PathParam("hostName") String hostName) {
-
+    @ApiParam(value = "host name", required = true) @PathParam("hostName") String hostName
+  ) {
     return handleRequest(headers, null, ui, Request.Type.DELETE,
-        createHostResource(m_clusterName, hostName, ui));
+        createHostResource(m_clusterName, hostName));
   }
 
   @DELETE
   @Produces("text/plain")
+  @ApiOperation(value = "Deletes multiple hosts in a single request")
+  @ApiImplicitParams({
+    @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = "body", allowMultiple = true)
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = CLUSTER_OR_HOST_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = SERVER_ERROR),
+  })
   public Response deleteHosts(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-
     return handleRequest(headers, body, ui, Request.Type.DELETE,
-            createHostResource(m_clusterName, null, ui));
+            createHostResource(m_clusterName, null));
   }
 
   /**
    * Get the host_components sub-resource.
    *
-   * @param hostName host id
+   * @param hostName host name
    * @return the host_components service
    */
   @Path("{hostName}/host_components")
@@ -217,7 +329,7 @@ public class HostService extends BaseService {
   /**
    * Get the kerberos_identities sub-resource.
    *
-   * @param hostName host id
+   * @param hostName host name
    * @return the host_components service
    */
   @Path("{hostName}/kerberos_identities")
@@ -228,7 +340,7 @@ public class HostService extends BaseService {
   /**
    * Get the alerts sub-resource.
    *
-   * @param hostName host id
+   * @param hostName host name
    * @return the alerts service
    */
   @Path("{hostName}/alerts")
@@ -239,11 +351,8 @@ public class HostService extends BaseService {
   /**
    * Gets the alert history service
    *
-   * @param request
-   *          the request
-   * @param hostName
-   *          the host name
-   *
+   * @param request the request
+   * @param hostName the host name
    * @return the alert history service
    */
   @Path("{hostName}/alert_history")
@@ -257,11 +366,8 @@ public class HostService extends BaseService {
   /**
    * Gets the host stack versions service.
    *
-   * @param request
-   *          the request
-   * @param hostName
-   *          the host name
-   *
+   * @param request the request
+   * @param hostName the host name
    * @return the host stack versions service
    */
   @Path("{hostName}/stack_versions")
@@ -274,15 +380,11 @@ public class HostService extends BaseService {
   /**
    * Create a service resource instance.
    *
-   *
-   *
    * @param clusterName  cluster
    * @param hostName     host name
-   * @param ui           uri information
-   *
    * @return a host resource instance
    */
-  ResourceInstance createHostResource(String clusterName, String hostName, UriInfo ui) {
+  protected ResourceInstance createHostResource(String clusterName, String hostName) {
     Map<Resource.Type,String> mapIds = new HashMap<>();
     mapIds.put(Resource.Type.Host, hostName);
     if (clusterName != null) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/HostEventCreator.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/HostEventCreator.java b/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/HostEventCreator.java
index d05fe9d..eec7a3a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/HostEventCreator.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/HostEventCreator.java
@@ -59,7 +59,7 @@ public class HostEventCreator implements RequestAuditEventCreator {
   /**
    * Pattern to retrieve hostname from url
    */
-  private static final Pattern HOSTNAME_PATTERN = Pattern.compile(".*" + HostResourceProvider.HOST_NAME_PROPERTY_ID + "\\s*=\\s*([^&\\s]+).*");
+  private static final Pattern HOSTNAME_PATTERN = Pattern.compile(".*" + HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID + "\\s*=\\s*([^&\\s]+).*");
 
   /**
    * {@inheritDoc}
@@ -109,7 +109,7 @@ public class HostEventCreator implements RequestAuditEventCreator {
           .withResultStatus(result.getStatus())
           .withUrl(request.getURI())
           .withRemoteIp(request.getRemoteAddress())
-          .withHostName(RequestAuditEventCreatorHelper.getNamedProperty(request, HostResourceProvider.HOST_NAME_PROPERTY_ID))
+          .withHostName(RequestAuditEventCreatorHelper.getNamedProperty(request, HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID))
           .build();
       case QUERY_POST:
         return AddComponentToHostRequestAuditEvent.builder()

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/main/java/org/apache/ambari/server/controller/HostRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/HostRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/HostRequest.java
index a616839..98fd37d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/HostRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/HostRequest.java
@@ -19,28 +19,28 @@
 package org.apache.ambari.server.controller;
 
 import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
 
-public class HostRequest {
+import org.apache.ambari.server.controller.internal.HostResourceProvider;
+
+import io.swagger.annotations.ApiModelProperty;
+
+public class HostRequest implements ApiModel {
 
   private String hostname;
   private String publicHostname;
   private String clusterName; // CREATE/UPDATE
-  private Map<String, String> hostAttributes; // CREATE/UPDATE
   private String rackInfo;
   private List<ConfigurationRequest> desiredConfigs; // UPDATE
   private String maintenanceState; // UPDATE
   private String blueprint;
-  private String hostgroup;
-  private String hostToClone;
+  private String hostGroup;
 
-  public HostRequest(String hostname, String clusterName, Map<String, String> hostAttributes) {
+  public HostRequest(String hostname, String clusterName) {
     this.hostname = hostname;
     this.clusterName = clusterName;
-    this.hostAttributes = hostAttributes;
   }
 
+  @ApiModelProperty(name = HostResourceProvider.HOST_NAME_PROPERTY_ID)
   public String getHostname() {
     return hostname;
   }
@@ -49,6 +49,7 @@ public class HostRequest {
     this.hostname = hostname;
   }
 
+  @ApiModelProperty(hidden = true)
   public String getClusterName() {
     return clusterName;
   }
@@ -57,14 +58,7 @@ public class HostRequest {
     this.clusterName = clusterName;
   }
 
-  public Map<String, String> getHostAttributes() {
-    return hostAttributes;
-  }
-
-  public void setHostAttributes(Map<String, String> hostAttributes) {
-    this.hostAttributes = hostAttributes;
-  }
-  
+  @ApiModelProperty(name = HostResourceProvider.RACK_INFO_PROPERTY_ID)
   public String getRackInfo() {
     return rackInfo;
   }
@@ -72,7 +66,8 @@ public class HostRequest {
   public void setRackInfo(String info) {
     rackInfo = info;
   }
-  
+
+  @ApiModelProperty(name = HostResourceProvider.PUBLIC_NAME_PROPERTY_ID)
   public String getPublicHostName() {
     return publicHostname;
   }
@@ -84,15 +79,17 @@ public class HostRequest {
   public void setDesiredConfigs(List<ConfigurationRequest> request) {
     desiredConfigs = request;
   }
-  
+
+  @ApiModelProperty(name = HostResourceProvider.DESIRED_CONFIGS_PROPERTY_ID)
   public List<ConfigurationRequest> getDesiredConfigs() {
     return desiredConfigs;
   }
-  
+
   public void setMaintenanceState(String state) {
     maintenanceState = state;
   }
-  
+
+  @ApiModelProperty(name = HostResourceProvider.MAINTENANCE_STATE_PROPERTY_ID)
   public String getMaintenanceState() {
     return maintenanceState;
   }
@@ -101,44 +98,21 @@ public class HostRequest {
     blueprint = blueprintName;
   }
 
+  @ApiModelProperty(name = HostResourceProvider.BLUEPRINT_PROPERTY_ID)
   public String getBlueprintName() {
     return blueprint;
   }
 
-  public void setHostGroupName(String hostgroupName) {
-    hostgroup = hostgroupName;
+  public void setHostGroupName(String hostGroupName) {
+    hostGroup = hostGroupName;
   }
 
+  @ApiModelProperty(name = HostResourceProvider.HOST_GROUP_PROPERTY_ID)
   public String getHostGroupName() {
-    return hostgroup;
-  }
-
-  public void setHostToClone(String hostname) {
-    hostToClone = hostname;
-  }
-
-  public String getHostToClone() {
-    return hostToClone;
+    return hostGroup;
   }
 
   public String toString() {
-    StringBuilder sb = new StringBuilder();
-    sb.append("{ hostname=").append(hostname).append(", clusterName=").append(clusterName);
-    if (hostAttributes != null) {
-      sb.append(", hostAttributes=[");
-      int i = 0;
-      for (Entry<String, String> attr : hostAttributes.entrySet()) {
-        if (i != 0) {
-          sb.append(",");
-        }
-        ++i;
-        sb.append(attr.getKey());
-        sb.append("=");
-        sb.append(attr.getValue());
-      }
-      sb.append(']');
-    }
-    sb.append(" }");
-    return sb.toString();
+    return "{ hostname=" + hostname + ", clusterName=" + clusterName + " }";
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java
index 8032801..2479514 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java
@@ -22,16 +22,20 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Objects;
 
 import org.apache.ambari.server.agent.AgentEnv;
 import org.apache.ambari.server.agent.DiskInfo;
 import org.apache.ambari.server.agent.RecoveryReport;
+import org.apache.ambari.server.controller.internal.HostResourceProvider;
 import org.apache.ambari.server.state.AgentVersion;
-import org.apache.ambari.server.state.DesiredConfig;
 import org.apache.ambari.server.state.HostConfig;
 import org.apache.ambari.server.state.HostHealthStatus;
+import org.apache.ambari.server.state.HostState;
 import org.apache.ambari.server.state.MaintenanceState;
 
+import io.swagger.annotations.ApiModelProperty;
+
 public class HostResponse {
 
   private String hostname;
@@ -44,42 +48,28 @@ public class HostResponse {
   private String ipv4;
 
   /**
-   * Host IP if ipv6 interface available
-   */
-  private String ipv6;
-
-  /**
    * Count of cores on Host
    */
-  private int cpuCount;
+  private long cpuCount;
   
   /**
    * Count of physical cores on Host
    */
-  private int phCpuCount;
-  
-  
+  private long phCpuCount;
+
   /**
    * Os Architecture
    */
   private String osArch;
 
+  private String osFamily;
+
   /**
    * OS Type
    */
   private String osType;
 
   /**
-   * OS Information
-   */
-  private String osInfo;
-
-  /**
-   * Amount of available memory for the Host
-   */
-  private long availableMemBytes;
-
-  /**
    * Amount of physical memory for the Host
    */
   private long totalMemBytes;
@@ -137,14 +127,12 @@ public class HostResponse {
   /**
    * Public name.
    */
-  private String publicHostname = null;
+  private String publicHostname;
 
   /**
    * Host State
    */
-  private String hostState;
-
-  private Map<String, DesiredConfig> desiredConfigs;
+  private HostState hostState;
 
   /**
    * Configs derived from Config groups
@@ -156,25 +144,22 @@ public class HostResponse {
    */
   private String status;
 
-  private MaintenanceState maintenanceState = null;
+  private MaintenanceState maintenanceState;
 
   public HostResponse(String hostname, String clusterName,
-                      String ipv4, String ipv6, int cpuCount, int phCpuCount, String osArch, String osType,
-                      String osInfo, long availableMemBytes, long totalMemBytes,
+                      String ipv4, int cpuCount, int phCpuCount, String osArch, String osType,
+                      long totalMemBytes,
                       List<DiskInfo> disksInfo, long lastHeartbeatTime,
                       long lastRegistrationTime, String rackInfo,
                       Map<String, String> hostAttributes, AgentVersion agentVersion,
-                      HostHealthStatus healthStatus, String hostState, String status) {
+                      HostHealthStatus healthStatus, HostState hostState, String status) {
     this.hostname = hostname;
     this.clusterName = clusterName;
     this.ipv4 = ipv4;
-    this.ipv6 = ipv6;
     this.cpuCount = cpuCount;
     this.phCpuCount = phCpuCount;
     this.osArch = osArch;
     this.osType = osType;
-    this.osInfo = osInfo;
-    this.availableMemBytes = availableMemBytes;
     this.totalMemBytes = totalMemBytes;
     this.disksInfo = disksInfo;
     this.lastHeartbeatTime = lastHeartbeatTime;
@@ -183,37 +168,30 @@ public class HostResponse {
     this.hostAttributes = hostAttributes;
     this.agentVersion = agentVersion;
     this.healthStatus = healthStatus;
-    this.setHostState(hostState);
+    this.hostState = hostState;
     this.status = status;
   }
 
   //todo: why are we passing in empty strings for host/cluster name instead of null?
   public HostResponse(String hostname) {
-    this(hostname, "", "", "",
-        0, 0, "", "",
-        "", 0, 0, new ArrayList<DiskInfo>(),
+    this(hostname, "", "",
+      0, 0, "", "",
+      0, new ArrayList<DiskInfo>(),
         0, 0, "",
         new HashMap<String, String>(),
         null, null, null, null);
   }
 
-  /**
-   * @return the hostname
-   */
+  @ApiModelProperty(name = HostResourceProvider.HOST_NAME_PROPERTY_ID)
   public String getHostname() {
     return hostname;
   }
 
-  /**
-   * @param hostname the hostname to set
-   */
   public void setHostname(String hostname) {
     this.hostname = hostname;
   }
 
-  /**
-   * @return the clusterNames
-   */
+  @ApiModelProperty(name = HostResourceProvider.CLUSTER_NAME_PROPERTY_ID)
   public String getClusterName() {
     return clusterName;
   }
@@ -225,300 +203,175 @@ public class HostResponse {
     this.clusterName = clusterName;
   }
 
-  /**
-   * @return the ipv4
-   */
+  @ApiModelProperty(name = HostResourceProvider.IP_PROPERTY_ID)
   public String getIpv4() {
     return ipv4;
   }
 
-  /**
-   * @param ipv4 the ipv4 to set
-   */
   public void setIpv4(String ipv4) {
     this.ipv4 = ipv4;
   }
 
-  /**
-   * @return the ipv6
-   */
-  public String getIpv6() {
-    return ipv6;
-  }
-
-  /**
-   * @param ipv6 the ipv6 to set
-   */
-  public void setIpv6(String ipv6) {
-    this.ipv6 = ipv6;
-  }
-
-  /**
-   * @return the cpuCount
-   */
-  public int getCpuCount() {
+  @ApiModelProperty(name = HostResourceProvider.CPU_COUNT_PROPERTY_ID)
+  public long getCpuCount() {
     return cpuCount;
   }
 
-  /**
-   * @param cpuCount the cpuCount to set
-   */
-  public void setCpuCount(int cpuCount) {
+  public void setCpuCount(long cpuCount) {
     this.cpuCount = cpuCount;
   }
 
-  /**
-  * @return the phCpuCount
-  */
-  public int getPhCpuCount() {
+  @ApiModelProperty(name = HostResourceProvider.PHYSICAL_CPU_COUNT_PROPERTY_ID)
+  public long getPhCpuCount() {
     return phCpuCount;
   }
 
-  /**
-  * @param phCpuCount the physical cpu count to set
-  */
-  public void setPhCpuCount(int phCpuCount) {
+  public void setPhCpuCount(long phCpuCount) {
     this.phCpuCount = phCpuCount;
   }
 
-  
-  
-  /**
-   * @return the osArch
-   */
+  @ApiModelProperty(name = HostResourceProvider.OS_ARCH_PROPERTY_ID)
   public String getOsArch() {
     return osArch;
   }
 
-  /**
-   * @param osArch the osArch to set
-   */
   public void setOsArch(String osArch) {
     this.osArch = osArch;
   }
 
-  /**
-   * @return the osType
-   */
-  public String getOsType() {
-    return osType;
+  @ApiModelProperty(name = HostResourceProvider.OS_FAMILY_PROPERTY_ID)
+  public String getOsFamily() {
+    return osFamily;
   }
 
-  /**
-   * @param osType the osType to set
-   */
-  public void setOsType(String osType) {
-    this.osType = osType;
+  public void setOsFamily(String osFamily) {
+    this.osFamily = osFamily;
   }
 
-  /**
-   * @return the osInfo
-   */
-  public String getOsInfo() {
-    return osInfo;
-  }
-
-  /**
-   * @param osInfo the osInfo to set
-   */
-  public void setOsInfo(String osInfo) {
-    this.osInfo = osInfo;
-  }
-
-  /**
-   * @return the availableMemBytes
-   */
-  public long getAvailableMemBytes() {
-    return availableMemBytes;
+  @ApiModelProperty(name = HostResourceProvider.OS_TYPE_PROPERTY_ID)
+  public String getOsType() {
+    return osType;
   }
 
-  /**
-   * @param availableMemBytes the availableMemBytes to set
-   */
-  public void setAvailableMemBytes(long availableMemBytes) {
-    this.availableMemBytes = availableMemBytes;
+  public void setOsType(String osType) {
+    this.osType = osType;
   }
 
-  /**
-   * @return the totalMemBytes
-   */
+  @ApiModelProperty(name = HostResourceProvider.TOTAL_MEM_PROPERTY_ID)
   public long getTotalMemBytes() {
     return totalMemBytes;
   }
 
-  /**
-   * @param totalMemBytes the totalMemBytes to set
-   */
   public void setTotalMemBytes(long totalMemBytes) {
     this.totalMemBytes = totalMemBytes;
   }
 
-  /**
-   * @return the disksInfo
-   */
+  @ApiModelProperty(name = HostResourceProvider.DISK_INFO_PROPERTY_ID)
   public List<DiskInfo> getDisksInfo() {
     return disksInfo;
   }
 
-  /**
-   * @param disksInfo the disksInfo to set
-   */
   public void setDisksInfo(List<DiskInfo> disksInfo) {
     this.disksInfo = disksInfo;
   }
 
-  /**
-   * @return the lastHeartbeatTime
-   */
+  @ApiModelProperty(name = HostResourceProvider.LAST_HEARTBEAT_TIME_PROPERTY_ID)
   public long getLastHeartbeatTime() {
     return lastHeartbeatTime;
   }
 
-  /**
-   * @param lastHeartbeatTime the lastHeartbeatTime to set
-   */
   public void setLastHeartbeatTime(long lastHeartbeatTime) {
     this.lastHeartbeatTime = lastHeartbeatTime;
   }
 
-  /**
-   * @return the lastRegistrationTime
-   */
+  @ApiModelProperty(name = HostResourceProvider.LAST_REGISTRATION_TIME_PROPERTY_ID)
   public long getLastRegistrationTime() {
     return lastRegistrationTime;
   }
 
-  /**
-   * @param lastRegistrationTime the lastRegistrationTime to set
-   */
   public void setLastRegistrationTime(long lastRegistrationTime) {
     this.lastRegistrationTime = lastRegistrationTime;
   }
 
-  /**
-   * @return the rackInfo
-   */
+  @ApiModelProperty(name = HostResourceProvider.RACK_INFO_PROPERTY_ID)
   public String getRackInfo() {
     return rackInfo;
   }
 
-  /**
-   * @param rackInfo the rackInfo to set
-   */
   public void setRackInfo(String rackInfo) {
     this.rackInfo = rackInfo;
   }
 
-  /**
-   * @return the hostAttributes
-   */
+  @ApiModelProperty(hidden = true)
   public Map<String, String> getHostAttributes() {
     return hostAttributes;
   }
 
-  /**
-   * @param hostAttributes the hostAttributes to set
-   */
   public void setHostAttributes(Map<String, String> hostAttributes) {
     this.hostAttributes = hostAttributes;
   }
 
-  /**
-   * @return the agentVersion
-   */
+  @ApiModelProperty(hidden = true)
   public AgentVersion getAgentVersion() {
     return agentVersion;
   }
 
-  /**
-   * @param agentVersion the agentVersion to set
-   */
   public void setAgentVersion(AgentVersion agentVersion) {
     this.agentVersion = agentVersion;
   }
 
-  /**
-   * @return the healthStatus
-   */
-  public HostHealthStatus getHealthStatus() {
-    return healthStatus;
+  @ApiModelProperty(name = HostResourceProvider.HOST_HEALTH_REPORT_PROPERTY_ID)
+  public String getHealthReport() {
+    return healthStatus.getHealthReport();
   }
 
-  /**
-   * @param healthStatus the healthStatus to set
-   */
   public void setHealthStatus(HostHealthStatus healthStatus) {
     this.healthStatus = healthStatus;
   }
 
-
-
   @Override
   public boolean equals(Object o) {
     if (this == o) return true;
     if (o == null || getClass() != o.getClass()) return false;
 
-    HostResponse that = (HostResponse) o;
-
-    if (hostname != null ?
-        !hostname.equals(that.hostname) : that.hostname != null) {
-      return false;
-    }
+    HostResponse other = (HostResponse) o;
 
-    return true;
+    return Objects.equals(hostname, other.hostname);
   }
 
   @Override
   public int hashCode() {
-    int result = hostname != null ? hostname.hashCode() : 0;
-    return result;
+    return Objects.hashCode(hostname);
   }
 
+  @ApiModelProperty(name = HostResourceProvider.PUBLIC_NAME_PROPERTY_ID)
   public String getPublicHostName() {
     return publicHostname;
   }
-  
+
   public void setPublicHostName(String name) {
     publicHostname = name;
   }
 
-  /**
-   * @return the hostState
-   */
-  public String getHostState() {
+  @ApiModelProperty(name = HostResourceProvider.STATE_PROPERTY_ID)
+  public HostState getHostState() {
     return hostState;
   }
 
-  /**
-   * @param hostState the hostState to set
-   */
-  public void setHostState(String hostState) {
+  public void setHostState(HostState hostState) {
     this.hostState = hostState;
   }
 
-  
+  @ApiModelProperty(name = HostResourceProvider.LAST_AGENT_ENV_PROPERTY_ID)
   public AgentEnv getLastAgentEnv() {
     return lastAgentEnv;
   }
   
-  /**
-   * @param agentEnv
-   */
   public void setLastAgentEnv(AgentEnv agentEnv) {
     lastAgentEnv = agentEnv;
   }
   
-  /**
-   * @param desired
-   */
-  public void setDesiredConfigs(Map<String, DesiredConfig> desired) {
-    desiredConfigs = desired;
-  }
-  
-  public Map<String, DesiredConfig> getDesiredConfigs() {
-    return desiredConfigs;
-  }
-
+  @ApiModelProperty(name = HostResourceProvider.DESIRED_CONFIGS_PROPERTY_ID)
   public Map<String, HostConfig> getDesiredHostConfigs() {
     return desiredHostConfigs;
   }
@@ -527,6 +380,7 @@ public class HostResponse {
     this.desiredHostConfigs = desiredHostConfigs;
   }
 
+  @ApiModelProperty(name = HostResourceProvider.HOST_STATUS_PROPERTY_ID)
   public String getStatus() {
     return status;
   }
@@ -535,31 +389,25 @@ public class HostResponse {
     this.status = status;
   }
 
-  /**
-   * @param state the maintenance state
-   */
   public void setMaintenanceState(MaintenanceState state) {
     maintenanceState = state;
   }
   
-  /**
-   * @return the maintenance state
-   */
+  @ApiModelProperty(name = HostResourceProvider.MAINTENANCE_STATE_PROPERTY_ID)
   public MaintenanceState getMaintenanceState() {
     return maintenanceState;
   }
 
   /**
    * Get the recovery summary for the host
-   * @return
    */
+  @ApiModelProperty(name = HostResourceProvider.RECOVERY_SUMMARY_PROPERTY_ID)
   public String getRecoverySummary() {
     return recoverySummary;
   }
 
   /**
    * Set the recovery summary for the host
-   * @return
    */
   public void setRecoverySummary(String recoverySummary) {
     this.recoverySummary = recoverySummary;
@@ -567,17 +415,22 @@ public class HostResponse {
 
   /**
    * Get the detailed recovery report
-   * @return
    */
+  @ApiModelProperty(name = HostResourceProvider.RECOVERY_REPORT_PROPERTY_ID)
   public RecoveryReport getRecoveryReport() {
     return recoveryReport;
   }
 
   /**
    * Set the detailed recovery report
-   * @param recoveryReport
    */
   public void setRecoveryReport(RecoveryReport recoveryReport) {
     this.recoveryReport = recoveryReport;
   }
+
+  public interface Wrapper extends ApiModel {
+    @ApiModelProperty(name = HostResourceProvider.RESPONSE_KEY)
+    @SuppressWarnings("unused")
+    HostResponse getHostResponse();
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java
index 40fe369..2ceb769 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java
@@ -223,7 +223,7 @@ public class RootServiceResponseFactory extends
             RUNNING_STATE, getComponentVersion(component.getComponentName(), host), component.getProperties()));
         else
           response.add(new RootServiceHostComponentResponse(host.getHostname(), component.getComponentName(),
-            host.getHostState(), getComponentVersion(component.getComponentName(), host), component.getProperties()));
+            host.getHostState().toString(), getComponentVersion(component.getComponentName(), host), component.getProperties()));
       }
     }
     

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
index f604a7f..8a78911 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
@@ -39,7 +39,6 @@ import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.ConfigurationRequest;
 import org.apache.ambari.server.controller.HostRequest;
 import org.apache.ambari.server.controller.HostResponse;
-import org.apache.ambari.server.controller.MaintenanceStateHelper;
 import org.apache.ambari.server.controller.RequestStatusResponse;
 import org.apache.ambari.server.controller.ServiceComponentHostRequest;
 import org.apache.ambari.server.controller.spi.NoSuchParentResourceException;
@@ -88,78 +87,67 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
   // ----- Property ID constants ---------------------------------------------
 
   // Hosts
-  public static final String HOST_CLUSTER_NAME_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "cluster_name");
-  public static final String HOST_NAME_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "host_name");
-  public static final String HOST_PUBLIC_NAME_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "public_host_name");
-  public static final String HOST_IP_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "ip");
-  public static final String HOST_TOTAL_MEM_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "total_mem");
-  public static final String HOST_CPU_COUNT_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "cpu_count");
-  public static final String HOST_PHYSICAL_CPU_COUNT_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "ph_cpu_count");
-  public static final String HOST_OS_ARCH_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "os_arch");
-  public static final String HOST_OS_TYPE_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "os_type");
-  public static final String HOST_OS_FAMILY_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "os_family");
-  public static final String HOST_RACK_INFO_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "rack_info");
-  public static final String HOST_LAST_HEARTBEAT_TIME_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "last_heartbeat_time");
-  public static final String HOST_LAST_REGISTRATION_TIME_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "last_registration_time");
-  public static final String HOST_DISK_INFO_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "disk_info");
-
-
-  public static final String HOST_HOST_STATUS_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "host_status");
-  public static final String HOST_MAINTENANCE_STATE_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "maintenance_state");
-
-  public static final String HOST_HOST_HEALTH_REPORT_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "host_health_report");
-  public static final String HOST_RECOVERY_REPORT_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "recovery_report");
-  public static final String HOST_RECOVERY_SUMMARY_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "recovery_summary");
-  public static final String HOST_STATE_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "host_state");
-  public static final String HOST_LAST_AGENT_ENV_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "last_agent_env");
-  public static final String HOST_DESIRED_CONFIGS_PROPERTY_ID =
-      PropertyHelper.getPropertyId("Hosts", "desired_configs");
-
-  public static final String BLUEPRINT_PROPERTY_ID =
-      PropertyHelper.getPropertyId(null, "blueprint");
-  public static final String HOSTGROUP_PROPERTY_ID =
-      PropertyHelper.getPropertyId(null, "host_group");
-  public static final String HOST_NAME_NO_CATEGORY_PROPERTY_ID =
-      PropertyHelper.getPropertyId(null, "host_name");
-  public static final String HOST_COUNT_PROPERTY_ID =
-      PropertyHelper.getPropertyId(null, "host_count");
-  public static final String HOST_PREDICATE_PROPERTY_ID =
-      PropertyHelper.getPropertyId(null, "host_predicate");
+  public static final String RESPONSE_KEY = "Hosts";
+
+  public static final String CLUSTER_NAME_PROPERTY_ID = "cluster_name";
+  public static final String CPU_COUNT_PROPERTY_ID = "cpu_count";
+  public static final String DESIRED_CONFIGS_PROPERTY_ID = "desired_configs";
+  public static final String DISK_INFO_PROPERTY_ID = "disk_info";
+  public static final String HOST_HEALTH_REPORT_PROPERTY_ID = "host_health_report";
+  public static final String HOST_NAME_PROPERTY_ID = "host_name";
+  public static final String HOST_STATUS_PROPERTY_ID = "host_status";
+  public static final String IP_PROPERTY_ID = "ip";
+  public static final String LAST_AGENT_ENV_PROPERTY_ID = "last_agent_env";
+  public static final String LAST_HEARTBEAT_TIME_PROPERTY_ID = "last_heartbeat_time";
+  public static final String LAST_REGISTRATION_TIME_PROPERTY_ID = "last_registration_time";
+  public static final String MAINTENANCE_STATE_PROPERTY_ID = "maintenance_state";
+  public static final String OS_ARCH_PROPERTY_ID = "os_arch";
+  public static final String OS_FAMILY_PROPERTY_ID = "os_family";
+  public static final String OS_TYPE_PROPERTY_ID = "os_type";
+  public static final String PHYSICAL_CPU_COUNT_PROPERTY_ID = "ph_cpu_count";
+  public static final String PUBLIC_NAME_PROPERTY_ID = "public_host_name";
+  public static final String RACK_INFO_PROPERTY_ID = "rack_info";
+  public static final String RECOVERY_REPORT_PROPERTY_ID = "recovery_report";
+  public static final String RECOVERY_SUMMARY_PROPERTY_ID = "recovery_summary";
+  public static final String STATE_PROPERTY_ID = "host_state";
+  public static final String TOTAL_MEM_PROPERTY_ID = "total_mem";
+
+  public static final String HOST_CLUSTER_NAME_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + CLUSTER_NAME_PROPERTY_ID;
+  public static final String HOST_CPU_COUNT_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + CPU_COUNT_PROPERTY_ID;
+  public static final String HOST_DESIRED_CONFIGS_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + DESIRED_CONFIGS_PROPERTY_ID;
+  public static final String HOST_DISK_INFO_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + DISK_INFO_PROPERTY_ID;
+  public static final String HOST_HOST_HEALTH_REPORT_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + HOST_HEALTH_REPORT_PROPERTY_ID;
+  public static final String HOST_HOST_STATUS_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + HOST_STATUS_PROPERTY_ID;
+  public static final String HOST_IP_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + IP_PROPERTY_ID;
+  public static final String HOST_LAST_AGENT_ENV_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + LAST_AGENT_ENV_PROPERTY_ID;
+  public static final String HOST_LAST_HEARTBEAT_TIME_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + LAST_HEARTBEAT_TIME_PROPERTY_ID;
+  public static final String HOST_LAST_REGISTRATION_TIME_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + LAST_REGISTRATION_TIME_PROPERTY_ID;
+  public static final String HOST_MAINTENANCE_STATE_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + MAINTENANCE_STATE_PROPERTY_ID;
+  public static final String HOST_HOST_NAME_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + HOST_NAME_PROPERTY_ID;
+  public static final String HOST_OS_ARCH_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + OS_ARCH_PROPERTY_ID;
+  public static final String HOST_OS_FAMILY_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + OS_FAMILY_PROPERTY_ID;
+  public static final String HOST_OS_TYPE_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + OS_TYPE_PROPERTY_ID;
+  public static final String HOST_PHYSICAL_CPU_COUNT_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + PHYSICAL_CPU_COUNT_PROPERTY_ID;
+  public static final String HOST_PUBLIC_NAME_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + PUBLIC_NAME_PROPERTY_ID;
+  public static final String HOST_RACK_INFO_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + RACK_INFO_PROPERTY_ID;
+  public static final String HOST_RECOVERY_REPORT_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + RECOVERY_REPORT_PROPERTY_ID;
+  public static final String HOST_RECOVERY_SUMMARY_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + RECOVERY_SUMMARY_PROPERTY_ID;
+  public static final String HOST_STATE_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + STATE_PROPERTY_ID;
+  public static final String HOST_TOTAL_MEM_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + TOTAL_MEM_PROPERTY_ID;
+
+  public static final String BLUEPRINT_PROPERTY_ID = "blueprint";
+  public static final String HOST_GROUP_PROPERTY_ID = "host_group";
+  public static final String HOST_COUNT_PROPERTY_ID = "host_count";
+  public static final String HOST_PREDICATE_PROPERTY_ID = "host_predicate";
 
   //todo use the same json structure for cluster host addition (cluster template and upscale)
-  public static final String HOST_RACK_INFO_NO_CATEGORY_PROPERTY_ID =
-      PropertyHelper.getPropertyId(null, "rack_info");
 
   protected static final String FORCE_DELETE_COMPONENTS = "force_delete_components";
 
 
   private static Set<String> pkPropertyIds =
     new HashSet<>(Arrays.asList(new String[]{
-      HOST_NAME_PROPERTY_ID}));
-
-  @Inject
-  private MaintenanceStateHelper maintenanceStateHelper;
+      HOST_HOST_NAME_PROPERTY_ID}));
 
   @Inject
   private OsFamily osFamily;
@@ -250,7 +238,7 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
         setResourceProperty(resource, HOST_CLUSTER_NAME_PROPERTY_ID,
             response.getClusterName(), requestedIds);
       }
-      setResourceProperty(resource, HOST_NAME_PROPERTY_ID,
+      setResourceProperty(resource, HOST_HOST_NAME_PROPERTY_ID,
           response.getHostname(), requestedIds);
       setResourceProperty(resource, HOST_PUBLIC_NAME_PROPERTY_ID,
           response.getPublicHostName(), requestedIds);
@@ -259,22 +247,15 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
       setResourceProperty(resource, HOST_TOTAL_MEM_PROPERTY_ID,
           response.getTotalMemBytes(), requestedIds);
       setResourceProperty(resource, HOST_CPU_COUNT_PROPERTY_ID,
-          (long) response.getCpuCount(), requestedIds);
+          response.getCpuCount(), requestedIds);
       setResourceProperty(resource, HOST_PHYSICAL_CPU_COUNT_PROPERTY_ID,
-          (long) response.getPhCpuCount(), requestedIds);
+          response.getPhCpuCount(), requestedIds);
       setResourceProperty(resource, HOST_OS_ARCH_PROPERTY_ID,
           response.getOsArch(), requestedIds);
       setResourceProperty(resource, HOST_OS_TYPE_PROPERTY_ID,
           response.getOsType(), requestedIds);
-
-      String hostOsFamily = osFamily.find(response.getOsType());
-      if (hostOsFamily == null) {
-        LOG.error("Can not find host OS family. For OS type = '{}' and host name = '{}'",
-            response.getOsType(), response.getHostname());
-      }
       setResourceProperty(resource, HOST_OS_FAMILY_PROPERTY_ID,
-          hostOsFamily, requestedIds);
-
+          response.getOsFamily(), requestedIds);
       setResourceProperty(resource, HOST_RACK_INFO_PROPERTY_ID,
           response.getRackInfo(), requestedIds);
       setResourceProperty(resource, HOST_LAST_HEARTBEAT_TIME_PROPERTY_ID,
@@ -286,7 +267,7 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
       setResourceProperty(resource, HOST_HOST_STATUS_PROPERTY_ID,
           response.getStatus(),requestedIds);
       setResourceProperty(resource, HOST_HOST_HEALTH_REPORT_PROPERTY_ID,
-          response.getHealthStatus().getHealthReport(), requestedIds);
+          response.getHealthReport(), requestedIds);
       setResourceProperty(resource, HOST_RECOVERY_REPORT_PROPERTY_ID,
           response.getRecoveryReport(), requestedIds);
       setResourceProperty(resource, HOST_RECOVERY_SUMMARY_PROPERTY_ID,
@@ -363,12 +344,11 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
     Set<String> baseUnsupported = super.checkPropertyIds(propertyIds);
 
     baseUnsupported.remove(BLUEPRINT_PROPERTY_ID);
-    baseUnsupported.remove(HOSTGROUP_PROPERTY_ID);
-    baseUnsupported.remove(HOST_NAME_NO_CATEGORY_PROPERTY_ID);
-    //todo: constants
+    baseUnsupported.remove(HOST_GROUP_PROPERTY_ID);
+    baseUnsupported.remove(HOST_NAME_PROPERTY_ID);
     baseUnsupported.remove(HOST_COUNT_PROPERTY_ID);
     baseUnsupported.remove(HOST_PREDICATE_PROPERTY_ID);
-    baseUnsupported.remove(HOST_RACK_INFO_NO_CATEGORY_PROPERTY_ID);
+    baseUnsupported.remove(RACK_INFO_PROPERTY_ID);
 
     return checkConfigPropertyIds(baseUnsupported, "Hosts");
   }
@@ -397,7 +377,7 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
     Set<Map<String, Object>> properties = request.getProperties();
     if (properties != null && ! properties.isEmpty()) {
       //todo: for now, either all or none of the hosts need to specify a hg.  Unable to mix.
-      String hgName = (String) properties.iterator().next().get(HOSTGROUP_PROPERTY_ID);
+      String hgName = (String) properties.iterator().next().get(HOST_GROUP_PROPERTY_ID);
       isHostGroupRequest = hgName != null && ! hgName.isEmpty();
     }
     return isHostGroupRequest;
@@ -413,21 +393,21 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
   private HostRequest getRequest(Map<String, Object> properties) {
 
     if (properties == null) {
-      return  new HostRequest(null, null, null);
+      return new HostRequest(null, null);
     }
 
     HostRequest hostRequest = new HostRequest(
         getHostNameFromProperties(properties),
-        (String) properties.get(HOST_CLUSTER_NAME_PROPERTY_ID),
-        null);
+        (String) properties.get(HOST_CLUSTER_NAME_PROPERTY_ID)
+    );
     hostRequest.setPublicHostName((String) properties.get(HOST_PUBLIC_NAME_PROPERTY_ID));
 
     String rackInfo = (String) ((null != properties.get(HOST_RACK_INFO_PROPERTY_ID))? properties.get(HOST_RACK_INFO_PROPERTY_ID):
-            properties.get(HOST_RACK_INFO_NO_CATEGORY_PROPERTY_ID));
+            properties.get(RACK_INFO_PROPERTY_ID));
 
     hostRequest.setRackInfo(rackInfo);
     hostRequest.setBlueprintName((String) properties.get(BLUEPRINT_PROPERTY_ID));
-    hostRequest.setHostGroupName((String) properties.get(HOSTGROUP_PROPERTY_ID));
+    hostRequest.setHostGroupName((String) properties.get(HOST_GROUP_PROPERTY_ID));
 
     Object o = properties.get(HOST_MAINTENANCE_STATE_PROPERTY_ID);
     if (null != o) {
@@ -446,7 +426,6 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
    * Accepts a request with registered hosts and if the request contains a cluster name then will map all of the
    * hosts onto that cluster.
    * @param request Request that must contain registered hosts, and optionally a cluster.
-   * @throws AmbariException
    */
   public synchronized void createHosts(Request request)
       throws AmbariException {
@@ -469,7 +448,7 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
     for (Map<String, Object> propertyMap : propertySet) {
       HostRequest hostRequest = getRequest(propertyMap);
       hostRequests.add(hostRequest);
-      if (! propertyMap.containsKey(HOSTGROUP_PROPERTY_ID)) {
+      if (! propertyMap.containsKey(HOST_GROUP_PROPERTY_ID)) {
         createHostResource(clusters, duplicates, unknowns, allHosts, hostRequest);
       }
     }
@@ -518,9 +497,6 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
         clusterSet.add(hostRequest.getClusterName());
         allClusterSet.add(hostRequest.getClusterName());
         hostClustersMap.put(hostRequest.getHostname(), clusterSet);
-        if (hostRequest.getHostAttributes() != null) {
-          hostAttributes.put(hostRequest.getHostname(), hostRequest.getHostAttributes());
-        }
       }
     }
     clusters.updateHostWithClusterAndAttributes(hostClustersMap, hostAttributes);
@@ -603,7 +579,7 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
 
     for (HostRequest request : requests) {
       try {
-        response.addAll(getHosts(controller, request));
+        response.addAll(getHosts(controller, request, osFamily));
       } catch (HostNotFoundException e) {
         if (requests.size() == 1) {
           // only throw exception if 1 request.
@@ -615,7 +591,10 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
     return response;
   }
 
-  protected static Set<HostResponse> getHosts(AmbariManagementController controller, HostRequest request)
+  /**
+   * @param osFamily provides OS to OS family lookup; may be null if OS family is ignored anyway (eg. for liveness check)
+   */
+  protected static Set<HostResponse> getHosts(AmbariManagementController controller, HostRequest request, OsFamily osFamily)
       throws AmbariException {
 
     //TODO/FIXME host can only belong to a single cluster so get host directly from Cluster
@@ -665,6 +644,13 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
           r.setClusterName(clusterName);
           r.setDesiredHostConfigs(h.getDesiredHostConfigs(cluster, desiredConfigs));
           r.setMaintenanceState(h.getMaintenanceState(cluster.getClusterId()));
+          if (osFamily != null) {
+            String hostOsFamily = osFamily.find(r.getOsType());
+            if (hostOsFamily == null) {
+              LOG.error("Can not find host OS family. For OS type = '{}' and host name = '{}'", r.getOsType(), r.getHostname());
+            }
+            r.setOsFamily(hostOsFamily);
+          }
 
           response.add(r);
         } else if (hostName != null) {
@@ -726,13 +712,6 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
         // do nothing
       }
 
-      if (null != request.getHostAttributes()) {
-        if(!AuthorizationHelper.isAuthorized(ResourceType.CLUSTER, resourceId, RoleAuthorization.HOST_ADD_DELETE_HOSTS)) {
-          throw new AuthorizationException("The authenticated user is not authorized to update host attributes");
-        }
-        host.setHostAttributes(request.getHostAttributes());
-      }
-
       String  rackInfo        = host.getRackInfo();
       String  requestRackInfo = request.getRackInfo();
       boolean rackChange      = requestRackInfo != null && !requestRackInfo.equals(rackInfo);
@@ -999,9 +978,6 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
 
   /**
    * Removes hostname from the stateful cluster topology
-   * @param clusters
-   * @param hostRequest
-   * @throws AmbariException
    */
   private void removeHostFromClusterTopology(Clusters clusters, HostRequest hostRequest) throws AmbariException{
     if (hostRequest.getClusterName() == null) {
@@ -1032,10 +1008,10 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
    * @return the host name for the host request
    */
   private String getHostNameFromProperties(Map<String, Object> properties) {
-    String hostname = (String) properties.get(HOST_NAME_PROPERTY_ID);
+    String hostname = (String) properties.get(HOST_HOST_NAME_PROPERTY_ID);
 
     return hostname != null ? hostname :
-        (String) properties.get(HOST_NAME_NO_CATEGORY_PROPERTY_ID);
+        (String) properties.get(HOST_NAME_PROPERTY_ID);
   }
 
   //todo: for api/v1/hosts we also end up here so we need to ensure proper 400 response

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStatusHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStatusHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStatusHelper.java
index 96457ed..11512c4 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStatusHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStatusHelper.java
@@ -72,9 +72,8 @@ public class HostStatusHelper {
     HostResponse hostResponse;
 
     try {
-      HostRequest hostRequest = new HostRequest(hostName, clusterName,
-        Collections.<String, String>emptyMap());
-      Set<HostResponse> hosts = HostResourceProvider.getHosts(managementController, hostRequest);
+      HostRequest hostRequest = new HostRequest(hostName, clusterName);
+      Set<HostResponse> hosts = HostResourceProvider.getHosts(managementController, hostRequest, null);
 
       hostResponse = hosts.size() == 1 ? hosts.iterator().next() : null;
     } catch (AmbariException e) {
@@ -83,6 +82,6 @@ public class HostStatusHelper {
     }
     //Cluster without host
     return hostResponse != null &&
-      !hostResponse.getHostState().equals(HostState.HEARTBEAT_LOST.name());
+      !hostResponse.getHostState().equals(HostState.HEARTBEAT_LOST);
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProvider.java
index c2fb844..d5c33c1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProvider.java
@@ -163,7 +163,7 @@ public class RootServiceHostComponentResourceProvider extends
     AmbariManagementController controller = getManagementController();
     //Get all hosts of all clusters
     Set<HostResponse> hosts = HostResourceProvider.getHosts(controller,
-        new HostRequest(request.getHostName(), null, null));
+        new HostRequest(request.getHostName(), null), null);
 
     return controller.getRootServiceResponseFactory().getRootServiceHostComponent(request, hosts);
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java
index b5d2f9d..5e9091f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java
@@ -112,7 +112,7 @@ public class ScaleClusterRequest extends BaseClusterRequest {
       throw new InvalidTopologyTemplateException("Blueprint name must be specified for all host groups");
     }
 
-    String hgName = String.valueOf(properties.get(HostResourceProvider.HOSTGROUP_PROPERTY_ID));
+    String hgName = String.valueOf(properties.get(HostResourceProvider.HOST_GROUP_PROPERTY_ID));
     if (hgName == null || hgName.equals("null")) {
       throw new InvalidTopologyTemplateException("A name must be specified for all host groups");
     }
@@ -187,8 +187,8 @@ public class ScaleClusterRequest extends BaseClusterRequest {
     String rackInfo = null;
     if (properties.containsKey(HostResourceProvider.HOST_RACK_INFO_PROPERTY_ID)) {
       rackInfo = (String) properties.get(HostResourceProvider.HOST_RACK_INFO_PROPERTY_ID);
-    } else if (properties.containsKey(HostResourceProvider.HOST_RACK_INFO_NO_CATEGORY_PROPERTY_ID)) {
-      rackInfo = (String) properties.get(HostResourceProvider.HOST_RACK_INFO_NO_CATEGORY_PROPERTY_ID);
+    } else if (properties.containsKey(HostResourceProvider.RACK_INFO_PROPERTY_ID)) {
+      rackInfo = (String) properties.get(HostResourceProvider.RACK_INFO_PROPERTY_ID);
     } else {
       LOGGER.debug("No rack info provided");
     }
@@ -226,9 +226,9 @@ public class ScaleClusterRequest extends BaseClusterRequest {
    */
   //todo: this was copied exactly from HostResourceProvider
   private String getHostNameFromProperties(Map<String, Object> properties) {
-    String hostName = (String) properties.get(HostResourceProvider.HOST_NAME_PROPERTY_ID);
+    String hostName = (String) properties.get(HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID);
     if (hostName == null) {
-      hostName = (String) properties.get(HostResourceProvider.HOST_NAME_NO_CATEGORY_PROPERTY_ID);
+      hostName = (String) properties.get(HostResourceProvider.HOST_NAME_PROPERTY_ID);
     }
     return hostName;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PropertyHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PropertyHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PropertyHelper.java
index c747a33..3fb59be 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PropertyHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PropertyHelper.java
@@ -49,7 +49,7 @@ public class PropertyHelper {
   private static final String SQLSERVER_PROPERTIES_FILE = "sqlserver_properties.json";
   private static final String JMX_PROPERTIES_FILE = "jmx_properties.json";
   private static final String KEY_PROPERTIES_FILE = "key_properties.json";
-  private static final char EXTERNAL_PATH_SEP = '/';
+  public static final char EXTERNAL_PATH_SEP = '/';
 
   /**
    * Aggregate functions implicitly supported by the Metrics Service

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java
index db228b1..4624ea8 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java
@@ -938,25 +938,21 @@ public class HostImpl implements Host {
   public HostResponse convertToResponse() {
     HostResponse r = new HostResponse(getHostName());
 
-    r.setAgentVersion(getAgentVersion());
-    r.setAvailableMemBytes(getAvailableMemBytes());
     r.setPhCpuCount(getPhCpuCount());
     r.setCpuCount(getCpuCount());
     r.setDisksInfo(getDisksInfo());
     r.setHealthStatus(getHealthStatus());
     r.setHostAttributes(getHostAttributes());
     r.setIpv4(getIPv4());
-    r.setIpv6(getIPv6());
     r.setLastHeartbeatTime(getLastHeartbeatTime());
     r.setLastAgentEnv(lastAgentEnv);
     r.setLastRegistrationTime(getLastRegistrationTime());
     r.setOsArch(getOsArch());
-    r.setOsInfo(getOsInfo());
     r.setOsType(getOsType());
     r.setRackInfo(getRackInfo());
     r.setTotalMemBytes(getTotalMemBytes());
     r.setPublicHostName(getPublicHostName());
-    r.setHostState(getState().toString());
+    r.setHostState(getState());
     r.setStatus(getStatus());
     r.setRecoveryReport(getRecoveryReport());
     r.setRecoverySummary(getRecoveryReport().getSummary());

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java b/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
index 6d12402..f2b616c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
@@ -264,7 +264,7 @@ public class AmbariContext {
 
     Map<String, Object> properties = new HashMap<>();
     properties.put(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID, clusterName);
-    properties.put(HostResourceProvider.HOST_NAME_PROPERTY_ID, hostName);
+    properties.put(HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID, hostName);
     properties.put(HostResourceProvider.HOST_RACK_INFO_PROPERTY_ID, host.getRackInfo());
 
     try {

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/main/java/org/apache/ambari/server/topology/HostRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/topology/HostRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/topology/HostRequest.java
index 168d13b..54420a4 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/topology/HostRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/topology/HostRequest.java
@@ -488,7 +488,7 @@ public class HostRequest implements Comparable<HostRequest> {
     private void buildPropertyMap(HostImpl host) {
       hostResource = new ResourceImpl(Resource.Type.Host);
 
-      hostResource.setProperty(HostResourceProvider.HOST_NAME_PROPERTY_ID,
+      hostResource.setProperty(HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID,
           host.getHostName());
       hostResource.setProperty(HostResourceProvider.HOST_PUBLIC_NAME_PROPERTY_ID,
           host.getPublicHostName());

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostServiceTest.java
index 6aef04d..84f08ae 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/HostServiceTest.java
@@ -96,7 +96,7 @@ public class HostServiceTest extends BaseServiceTest {
     }
 
     @Override
-    ResourceInstance createHostResource(String clusterName, String hostName, UriInfo ui) {
+    protected ResourceInstance createHostResource(String clusterName, String hostName) {
       assertEquals(m_clusterId, clusterName);
       assertEquals(m_hostId, hostName);
       return getTestResource();

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/test/java/org/apache/ambari/server/audit/request/creator/HostEventCreatorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/audit/request/creator/HostEventCreatorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/audit/request/creator/HostEventCreatorTest.java
index 2d1cefc..bc32aff 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/audit/request/creator/HostEventCreatorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/audit/request/creator/HostEventCreatorTest.java
@@ -45,7 +45,7 @@ public class HostEventCreatorTest extends AuditEventCreatorTestBase{
     HostEventCreator creator = new HostEventCreator();
 
     Map<String,Object> properties = new HashMap<>();
-    properties.put(HostResourceProvider.HOST_NAME_PROPERTY_ID, "ambari1.example.com");
+    properties.put(HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID, "ambari1.example.com");
 
     Request request = AuditEventCreatorTestHelper.createRequest(Request.Type.POST, Resource.Type.Host, properties, null);
     Result result = AuditEventCreatorTestHelper.createResult(new ResultStatus(ResultStatus.STATUS.OK));
@@ -73,7 +73,7 @@ public class HostEventCreatorTest extends AuditEventCreatorTestBase{
 
     properties.put("host_components", set);
 
-    Request request = AuditEventCreatorTestHelper.createRequest(Request.Type.QUERY_POST, Resource.Type.Host, properties, null, HostResourceProvider.HOST_NAME_PROPERTY_ID + "=ambari1.example.com");
+    Request request = AuditEventCreatorTestHelper.createRequest(Request.Type.QUERY_POST, Resource.Type.Host, properties, null, HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID + "=ambari1.example.com");
     Result result = AuditEventCreatorTestHelper.createResult(new ResultStatus(ResultStatus.STATUS.OK));
 
     AuditEvent event = AuditEventCreatorTestHelper.getEvent(creator, request, result);

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
index 554e089..d613a2e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
@@ -1803,7 +1803,7 @@ public class AmbariManagementControllerTest {
 
     Map<String, String> hostAttributes = null;
 
-    HostRequest r1 = new HostRequest(host1, null, hostAttributes);
+    HostRequest r1 = new HostRequest(host1, null);
     r1.toString();
 
     Set<HostRequest> requests = new HashSet<>();
@@ -1820,7 +1820,7 @@ public class AmbariManagementControllerTest {
     setOsFamily(clusters.getHost(host1), "redhat", "5.9");
     setOsFamily(clusters.getHost(host2), "redhat", "5.9");
 
-    HostRequest request = new HostRequest(host2, "foo", new HashMap<String, String>());
+    HostRequest request = new HostRequest(host2, "foo");
     requests.add(request);
 
     try {
@@ -1874,9 +1874,9 @@ public class AmbariManagementControllerTest {
     setOsFamily(clusters.getHost(host2), "redhat", "5.9");
     setOsFamily(clusters.getHost(host3), "redhat", "5.9");
 
-    HostRequest r1 = new HostRequest(host1, cluster1, null);
-    HostRequest r2 = new HostRequest(host2, cluster1, null);
-    HostRequest r3 = new HostRequest(host3, null, null);
+    HostRequest r1 = new HostRequest(host1, cluster1);
+    HostRequest r2 = new HostRequest(host2, cluster1);
+    HostRequest r3 = new HostRequest(host3, null);
 
     Set<HostRequest> set1 = new HashSet<>();
     set1.add(r1);
@@ -1902,7 +1902,7 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       HostRequest rInvalid =
-          new HostRequest(host1, null, null);
+          new HostRequest(host1, null);
       set1.add(rInvalid);
       HostResourceProviderTest.createHosts(controller, set1);
       fail("Expected failure for invalid host");
@@ -1915,7 +1915,7 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       HostRequest rInvalid =
-          new HostRequest(host1, cluster1, null);
+          new HostRequest(host1, cluster1);
       set1.add(rInvalid);
       HostResourceProviderTest.createHosts(controller, set1);
       fail("Expected failure for invalid cluster");
@@ -1928,9 +1928,9 @@ public class AmbariManagementControllerTest {
     try {
       set1.clear();
       HostRequest rInvalid1 =
-          new HostRequest(host1, cluster1, null);
+          new HostRequest(host1, cluster1);
       HostRequest rInvalid2 =
-          new HostRequest(host1, cluster1, null);
+          new HostRequest(host1, cluster1);
       set1.add(rInvalid1);
       set1.add(rInvalid2);
       HostResourceProviderTest.createHosts(controller, set1);
@@ -3094,7 +3094,7 @@ public class AmbariManagementControllerTest {
     attrs.put("a2", "b2");
     clusters.getHost(host4).setHostAttributes(attrs);
 
-    HostRequest r = new HostRequest(null, null, null);
+    HostRequest r = new HostRequest(null, null);
 
     Set<HostResponse> resps = HostResourceProviderTest.getHosts(controller, Collections.singleton(r));
 
@@ -3127,7 +3127,7 @@ public class AmbariManagementControllerTest {
 
     Assert.assertEquals(4, foundHosts.size());
 
-    r = new HostRequest(host1, null, null);
+    r = new HostRequest(host1, null);
     resps = HostResourceProviderTest.getHosts(controller, Collections.singleton(r));
     Assert.assertEquals(1, resps.size());
     HostResponse resp = resps.iterator().next();
@@ -8884,7 +8884,7 @@ public class AmbariManagementControllerTest {
     // Case 1: Attempt delete when components still exist
     Set<HostRequest> requests = new HashSet<>();
     requests.clear();
-    requests.add(new HostRequest(host1, cluster1, null));
+    requests.add(new HostRequest(host1, cluster1));
     try {
       HostResourceProviderTest.deleteHosts(controller, requests, false, false);
       fail("Expect failure deleting hosts when components exist and have not been deleted.");
@@ -8993,7 +8993,7 @@ public class AmbariManagementControllerTest {
     // Case 1: Attempt delete when components still exist
     Set<HostRequest> requests = new HashSet<>();
     requests.clear();
-    requests.add(new HostRequest(host1, cluster1, null));
+    requests.add(new HostRequest(host1, cluster1));
     try {
       HostResourceProviderTest.deleteHosts(controller, requests);
       fail("Expect failure deleting hosts when components exist and have not been deleted.");
@@ -9020,7 +9020,7 @@ public class AmbariManagementControllerTest {
 
     // Deletion without specifying cluster should be successful
     requests.clear();
-    requests.add(new HostRequest(host1, null, null));
+    requests.add(new HostRequest(host1, null));
     try {
       HostResourceProviderTest.deleteHosts(controller, requests);
     } catch (Exception e) {
@@ -9033,7 +9033,7 @@ public class AmbariManagementControllerTest {
 
     // Case 3: Delete host that is still part of the cluster, and specify the cluster_name in the request
     requests.clear();
-    requests.add(new HostRequest(host2, cluster1, null));
+    requests.add(new HostRequest(host2, cluster1));
     try {
       HostResourceProviderTest.deleteHosts(controller, requests);
     } catch (Exception e) {
@@ -9046,7 +9046,7 @@ public class AmbariManagementControllerTest {
 
     // Case 4: Attempt to delete a host that has already been deleted
     requests.clear();
-    requests.add(new HostRequest(host1, null, null));
+    requests.add(new HostRequest(host1, null));
     try {
       HostResourceProviderTest.deleteHosts(controller, requests);
       Assert.fail("Expected a HostNotFoundException trying to remove a host that was already deleted.");
@@ -9064,7 +9064,7 @@ public class AmbariManagementControllerTest {
 
     // Case 5: Attempt to delete a host that was never added to the cluster
     requests.clear();
-    requests.add(new HostRequest(host3, null, null));
+    requests.add(new HostRequest(host3, null));
     try {
       HostResourceProviderTest.deleteHosts(controller, requests);
       Assert.fail("Expected a HostNotFoundException trying to remove a host that was never added.");
@@ -9307,7 +9307,7 @@ public class AmbariManagementControllerTest {
 
     // add some hosts
     Set<HostRequest> hrs = new HashSet<>();
-    hrs.add(new HostRequest(HOST1, CLUSTER_NAME, null));
+    hrs.add(new HostRequest(HOST1, CLUSTER_NAME));
     HostResourceProviderTest.createHosts(amc, hrs);
 
     Set<ServiceRequest> serviceRequests = new HashSet<>();
@@ -9422,9 +9422,9 @@ public class AmbariManagementControllerTest {
     ComponentResourceProviderTest.createComponents(amc, serviceComponentRequests);
 
     Set<HostRequest> hostRequests = new HashSet<>();
-    hostRequests.add(new HostRequest(host1, cluster1, null));
-    hostRequests.add(new HostRequest(host2, cluster1, null));
-    hostRequests.add(new HostRequest(host3, cluster1, null));
+    hostRequests.add(new HostRequest(host1, cluster1));
+    hostRequests.add(new HostRequest(host2, cluster1));
+    hostRequests.add(new HostRequest(host3, cluster1));
 
     HostResourceProviderTest.createHosts(amc, hostRequests);
 
@@ -9703,7 +9703,7 @@ public class AmbariManagementControllerTest {
     ComponentResourceProviderTest.createComponents(amc, serviceComponentRequests);
 
     Set<HostRequest> hostRequests = new HashSet<>();
-    hostRequests.add(new HostRequest(HOST1, CLUSTER_NAME, null));
+    hostRequests.add(new HostRequest(HOST1, CLUSTER_NAME));
 
     HostResourceProviderTest.createHosts(amc, hostRequests);
 
@@ -10232,7 +10232,7 @@ public class AmbariManagementControllerTest {
     }
 
     // passivate a host
-    HostRequest hr = new HostRequest(host1, cluster1, requestProperties);
+    HostRequest hr = new HostRequest(host1, cluster1);
     hr.setMaintenanceState(MaintenanceState.ON.name());
     HostResourceProviderTest.updateHosts(controller, Collections.singleton(hr)
     );
@@ -10274,9 +10274,9 @@ public class AmbariManagementControllerTest {
     }
 
     // passivate several hosts
-    HostRequest hr1 = new HostRequest(host1, cluster1, requestProperties);
+    HostRequest hr1 = new HostRequest(host1, cluster1);
     hr1.setMaintenanceState(MaintenanceState.ON.name());
-    HostRequest hr2 = new HostRequest(host2, cluster1, requestProperties);
+    HostRequest hr2 = new HostRequest(host2, cluster1);
     hr2.setMaintenanceState(MaintenanceState.ON.name());
     Set<HostRequest> set = new HashSet<>();
     set.add(hr1);
@@ -10292,9 +10292,9 @@ public class AmbariManagementControllerTest {
         host.getMaintenanceState(cluster.getClusterId()));
 
     // reset
-    hr1 = new HostRequest(host1, cluster1, requestProperties);
+    hr1 = new HostRequest(host1, cluster1);
     hr1.setMaintenanceState(MaintenanceState.OFF.name());
-    hr2 = new HostRequest(host2, cluster1, requestProperties);
+    hr2 = new HostRequest(host2, cluster1);
     hr2.setMaintenanceState(MaintenanceState.OFF.name());
     set = new HashSet<>();
     set.add(hr1);

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java
index c761323..e828ab1 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractResourceProviderTest.java
@@ -468,7 +468,7 @@ public class AbstractResourceProviderTest {
     private final HostRequest hostRequest;
 
     public HostRequestSetMatcher(String hostname, String clusterName, Map<String, String> hostAttributes) {
-      hostRequest = new HostRequest(hostname, clusterName, hostAttributes);
+      hostRequest = new HostRequest(hostname, clusterName);
       add(hostRequest);
     }
 
@@ -488,8 +488,7 @@ public class AbstractResourceProviderTest {
 
       return request instanceof HostRequest &&
           eq(((HostRequest) request).getClusterName(), hostRequest.getClusterName()) &&
-          eq(((HostRequest) request).getHostname(), hostRequest.getHostname()) &&
-          eq(((HostRequest) request).getHostAttributes(), hostRequest.getHostAttributes());
+          eq(((HostRequest) request).getHostname(), hostRequest.getHostname());
     }
 
     @Override


[12/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/css/print.css
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/css/print.css b/ambari-web/api-docs/css/print.css
new file mode 100644
index 0000000..77073f1
--- /dev/null
+++ b/ambari-web/api-docs/css/print.css
@@ -0,0 +1,1167 @@
+/* Original style from softwaremaniacs.org (c) Ivan Sagalaev <Ma...@SoftwareManiacs.Org> */
+.swagger-section pre code {
+  display: block;
+  padding: 0.5em;
+  background: #F0F0F0;
+}
+.swagger-section pre code,
+.swagger-section pre .subst,
+.swagger-section pre .tag .title,
+.swagger-section pre .lisp .title,
+.swagger-section pre .clojure .built_in,
+.swagger-section pre .nginx .title {
+  color: black;
+}
+.swagger-section pre .string,
+.swagger-section pre .title,
+.swagger-section pre .constant,
+.swagger-section pre .parent,
+.swagger-section pre .tag .value,
+.swagger-section pre .rules .value,
+.swagger-section pre .rules .value .number,
+.swagger-section pre .preprocessor,
+.swagger-section pre .ruby .symbol,
+.swagger-section pre .ruby .symbol .string,
+.swagger-section pre .aggregate,
+.swagger-section pre .template_tag,
+.swagger-section pre .django .variable,
+.swagger-section pre .smalltalk .class,
+.swagger-section pre .addition,
+.swagger-section pre .flow,
+.swagger-section pre .stream,
+.swagger-section pre .bash .variable,
+.swagger-section pre .apache .tag,
+.swagger-section pre .apache .cbracket,
+.swagger-section pre .tex .command,
+.swagger-section pre .tex .special,
+.swagger-section pre .erlang_repl .function_or_atom,
+.swagger-section pre .markdown .header {
+  color: #800;
+}
+.swagger-section pre .comment,
+.swagger-section pre .annotation,
+.swagger-section pre .template_comment,
+.swagger-section pre .diff .header,
+.swagger-section pre .chunk,
+.swagger-section pre .markdown .blockquote {
+  color: #888;
+}
+.swagger-section pre .number,
+.swagger-section pre .date,
+.swagger-section pre .regexp,
+.swagger-section pre .literal,
+.swagger-section pre .smalltalk .symbol,
+.swagger-section pre .smalltalk .char,
+.swagger-section pre .go .constant,
+.swagger-section pre .change,
+.swagger-section pre .markdown .bullet,
+.swagger-section pre .markdown .link_url {
+  color: #080;
+}
+.swagger-section pre .label,
+.swagger-section pre .javadoc,
+.swagger-section pre .ruby .string,
+.swagger-section pre .decorator,
+.swagger-section pre .filter .argument,
+.swagger-section pre .localvars,
+.swagger-section pre .array,
+.swagger-section pre .attr_selector,
+.swagger-section pre .important,
+.swagger-section pre .pseudo,
+.swagger-section pre .pi,
+.swagger-section pre .doctype,
+.swagger-section pre .deletion,
+.swagger-section pre .envvar,
+.swagger-section pre .shebang,
+.swagger-section pre .apache .sqbracket,
+.swagger-section pre .nginx .built_in,
+.swagger-section pre .tex .formula,
+.swagger-section pre .erlang_repl .reserved,
+.swagger-section pre .prompt,
+.swagger-section pre .markdown .link_label,
+.swagger-section pre .vhdl .attribute,
+.swagger-section pre .clojure .attribute,
+.swagger-section pre .coffeescript .property {
+  color: #8888ff;
+}
+.swagger-section pre .keyword,
+.swagger-section pre .id,
+.swagger-section pre .phpdoc,
+.swagger-section pre .title,
+.swagger-section pre .built_in,
+.swagger-section pre .aggregate,
+.swagger-section pre .css .tag,
+.swagger-section pre .javadoctag,
+.swagger-section pre .phpdoc,
+.swagger-section pre .yardoctag,
+.swagger-section pre .smalltalk .class,
+.swagger-section pre .winutils,
+.swagger-section pre .bash .variable,
+.swagger-section pre .apache .tag,
+.swagger-section pre .go .typename,
+.swagger-section pre .tex .command,
+.swagger-section pre .markdown .strong,
+.swagger-section pre .request,
+.swagger-section pre .status {
+  font-weight: bold;
+}
+.swagger-section pre .markdown .emphasis {
+  font-style: italic;
+}
+.swagger-section pre .nginx .built_in {
+  font-weight: normal;
+}
+.swagger-section pre .coffeescript .javascript,
+.swagger-section pre .javascript .xml,
+.swagger-section pre .tex .formula,
+.swagger-section pre .xml .javascript,
+.swagger-section pre .xml .vbscript,
+.swagger-section pre .xml .css,
+.swagger-section pre .xml .cdata {
+  opacity: 0.5;
+}
+.swagger-section .swagger-ui-wrap {
+  line-height: 1;
+  font-family: "Droid Sans", sans-serif;
+  max-width: 960px;
+  margin-left: auto;
+  margin-right: auto;
+  /* JSONEditor specific styling */
+}
+.swagger-section .swagger-ui-wrap b,
+.swagger-section .swagger-ui-wrap strong {
+  font-family: "Droid Sans", sans-serif;
+  font-weight: bold;
+}
+.swagger-section .swagger-ui-wrap q,
+.swagger-section .swagger-ui-wrap blockquote {
+  quotes: none;
+}
+.swagger-section .swagger-ui-wrap p {
+  line-height: 1.4em;
+  padding: 0 0 10px;
+  color: #333333;
+}
+.swagger-section .swagger-ui-wrap q:before,
+.swagger-section .swagger-ui-wrap q:after,
+.swagger-section .swagger-ui-wrap blockquote:before,
+.swagger-section .swagger-ui-wrap blockquote:after {
+  content: none;
+}
+.swagger-section .swagger-ui-wrap .heading_with_menu h1,
+.swagger-section .swagger-ui-wrap .heading_with_menu h2,
+.swagger-section .swagger-ui-wrap .heading_with_menu h3,
+.swagger-section .swagger-ui-wrap .heading_with_menu h4,
+.swagger-section .swagger-ui-wrap .heading_with_menu h5,
+.swagger-section .swagger-ui-wrap .heading_with_menu h6 {
+  display: block;
+  clear: none;
+  float: left;
+  -moz-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  -ms-box-sizing: border-box;
+  box-sizing: border-box;
+  width: 60%;
+}
+.swagger-section .swagger-ui-wrap table {
+  border-collapse: collapse;
+  border-spacing: 0;
+}
+.swagger-section .swagger-ui-wrap table thead tr th {
+  padding: 5px;
+  font-size: 0.9em;
+  color: #666666;
+  border-bottom: 1px solid #999999;
+}
+.swagger-section .swagger-ui-wrap table tbody tr:last-child td {
+  border-bottom: none;
+}
+.swagger-section .swagger-ui-wrap table tbody tr.offset {
+  background-color: #f0f0f0;
+}
+.swagger-section .swagger-ui-wrap table tbody tr td {
+  padding: 6px;
+  font-size: 0.9em;
+  border-bottom: 1px solid #cccccc;
+  vertical-align: top;
+  line-height: 1.3em;
+}
+.swagger-section .swagger-ui-wrap ol {
+  margin: 0px 0 10px;
+  padding: 0 0 0 18px;
+  list-style-type: decimal;
+}
+.swagger-section .swagger-ui-wrap ol li {
+  padding: 5px 0px;
+  font-size: 0.9em;
+  color: #333333;
+}
+.swagger-section .swagger-ui-wrap ol,
+.swagger-section .swagger-ui-wrap ul {
+  list-style: none;
+}
+.swagger-section .swagger-ui-wrap h1 a,
+.swagger-section .swagger-ui-wrap h2 a,
+.swagger-section .swagger-ui-wrap h3 a,
+.swagger-section .swagger-ui-wrap h4 a,
+.swagger-section .swagger-ui-wrap h5 a,
+.swagger-section .swagger-ui-wrap h6 a {
+  text-decoration: none;
+}
+.swagger-section .swagger-ui-wrap h1 a:hover,
+.swagger-section .swagger-ui-wrap h2 a:hover,
+.swagger-section .swagger-ui-wrap h3 a:hover,
+.swagger-section .swagger-ui-wrap h4 a:hover,
+.swagger-section .swagger-ui-wrap h5 a:hover,
+.swagger-section .swagger-ui-wrap h6 a:hover {
+  text-decoration: underline;
+}
+.swagger-section .swagger-ui-wrap h1 span.divider,
+.swagger-section .swagger-ui-wrap h2 span.divider,
+.swagger-section .swagger-ui-wrap h3 span.divider,
+.swagger-section .swagger-ui-wrap h4 span.divider,
+.swagger-section .swagger-ui-wrap h5 span.divider,
+.swagger-section .swagger-ui-wrap h6 span.divider {
+  color: #aaaaaa;
+}
+.swagger-section .swagger-ui-wrap a {
+  color: #547f00;
+}
+.swagger-section .swagger-ui-wrap a img {
+  border: none;
+}
+.swagger-section .swagger-ui-wrap article,
+.swagger-section .swagger-ui-wrap aside,
+.swagger-section .swagger-ui-wrap details,
+.swagger-section .swagger-ui-wrap figcaption,
+.swagger-section .swagger-ui-wrap figure,
+.swagger-section .swagger-ui-wrap footer,
+.swagger-section .swagger-ui-wrap header,
+.swagger-section .swagger-ui-wrap hgroup,
+.swagger-section .swagger-ui-wrap menu,
+.swagger-section .swagger-ui-wrap nav,
+.swagger-section .swagger-ui-wrap section,
+.swagger-section .swagger-ui-wrap summary {
+  display: block;
+}
+.swagger-section .swagger-ui-wrap pre {
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+  background-color: #fcf6db;
+  border: 1px solid #e5e0c6;
+  padding: 10px;
+}
+.swagger-section .swagger-ui-wrap pre code {
+  line-height: 1.6em;
+  background: none;
+}
+.swagger-section .swagger-ui-wrap .content > .content-type > div > label {
+  clear: both;
+  display: block;
+  color: #0F6AB4;
+  font-size: 1.1em;
+  margin: 0;
+  padding: 15px 0 5px;
+}
+.swagger-section .swagger-ui-wrap .content pre {
+  font-size: 12px;
+  margin-top: 5px;
+  padding: 5px;
+}
+.swagger-section .swagger-ui-wrap .icon-btn {
+  cursor: pointer;
+}
+.swagger-section .swagger-ui-wrap .info_title {
+  padding-bottom: 10px;
+  font-weight: bold;
+  font-size: 25px;
+}
+.swagger-section .swagger-ui-wrap p.big,
+.swagger-section .swagger-ui-wrap div.big p {
+  font-size: 1em;
+  margin-bottom: 10px;
+}
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.string input,
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.url input,
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.text textarea,
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.numeric input {
+  width: 500px !important;
+}
+.swagger-section .swagger-ui-wrap .info_license {
+  padding-bottom: 5px;
+}
+.swagger-section .swagger-ui-wrap .info_tos {
+  padding-bottom: 5px;
+}
+.swagger-section .swagger-ui-wrap .message-fail {
+  color: #cc0000;
+}
+.swagger-section .swagger-ui-wrap .info_url {
+  padding-bottom: 5px;
+}
+.swagger-section .swagger-ui-wrap .info_email {
+  padding-bottom: 5px;
+}
+.swagger-section .swagger-ui-wrap .info_name {
+  padding-bottom: 5px;
+}
+.swagger-section .swagger-ui-wrap .info_description {
+  padding-bottom: 10px;
+  font-size: 15px;
+}
+.swagger-section .swagger-ui-wrap .markdown ol li,
+.swagger-section .swagger-ui-wrap .markdown ul li {
+  padding: 3px 0px;
+  line-height: 1.4em;
+  color: #333333;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input,
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input,
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input {
+  display: block;
+  padding: 4px;
+  width: auto;
+  clear: both;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title,
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title,
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title {
+  font-size: 1.3em;
+}
+.swagger-section .swagger-ui-wrap table.fullwidth {
+  width: 100%;
+}
+.swagger-section .swagger-ui-wrap .model-signature {
+  font-family: "Droid Sans", sans-serif;
+  font-size: 1em;
+  line-height: 1.5em;
+}
+.swagger-section .swagger-ui-wrap .model-signature .signature-nav a {
+  text-decoration: none;
+  color: #AAA;
+}
+.swagger-section .swagger-ui-wrap .model-signature .signature-nav a:hover {
+  text-decoration: underline;
+  color: black;
+}
+.swagger-section .swagger-ui-wrap .model-signature .signature-nav .selected {
+  color: black;
+  text-decoration: none;
+}
+.swagger-section .swagger-ui-wrap .model-signature .propType {
+  color: #5555aa;
+}
+.swagger-section .swagger-ui-wrap .model-signature pre:hover {
+  background-color: #ffffdd;
+}
+.swagger-section .swagger-ui-wrap .model-signature pre {
+  font-size: .85em;
+  line-height: 1.2em;
+  overflow: auto;
+  max-height: 200px;
+  cursor: pointer;
+}
+.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav {
+  display: block;
+  margin: 0;
+  padding: 0;
+}
+.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li:last-child {
+  padding-right: 0;
+  border-right: none;
+}
+.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li {
+  float: left;
+  margin: 0 5px 5px 0;
+  padding: 2px 5px 2px 0;
+  border-right: 1px solid #ddd;
+}
+.swagger-section .swagger-ui-wrap .model-signature .propOpt {
+  color: #555;
+}
+.swagger-section .swagger-ui-wrap .model-signature .snippet small {
+  font-size: 0.75em;
+}
+.swagger-section .swagger-ui-wrap .model-signature .propOptKey {
+  font-style: italic;
+}
+.swagger-section .swagger-ui-wrap .model-signature .description .strong {
+  font-weight: bold;
+  color: #000;
+  font-size: .9em;
+}
+.swagger-section .swagger-ui-wrap .model-signature .description div {
+  font-size: 0.9em;
+  line-height: 1.5em;
+  margin-left: 1em;
+}
+.swagger-section .swagger-ui-wrap .model-signature .description .stronger {
+  font-weight: bold;
+  color: #000;
+}
+.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper {
+  border-spacing: 0;
+  position: absolute;
+  background-color: #ffffff;
+  border: 1px solid #bbbbbb;
+  display: none;
+  font-size: 11px;
+  max-width: 400px;
+  line-height: 30px;
+  color: black;
+  padding: 5px;
+  margin-left: 10px;
+}
+.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper th {
+  text-align: center;
+  background-color: #eeeeee;
+  border: 1px solid #bbbbbb;
+  font-size: 11px;
+  color: #666666;
+  font-weight: bold;
+  padding: 5px;
+  line-height: 15px;
+}
+.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {
+  font-weight: bold;
+}
+.swagger-section .swagger-ui-wrap .model-signature .propName {
+  font-weight: bold;
+}
+.swagger-section .swagger-ui-wrap .model-signature .signature-container {
+  clear: both;
+}
+.swagger-section .swagger-ui-wrap .body-textarea {
+  width: 300px;
+  height: 100px;
+  border: 1px solid #aaa;
+}
+.swagger-section .swagger-ui-wrap .markdown p code,
+.swagger-section .swagger-ui-wrap .markdown li code {
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+  background-color: #f0f0f0;
+  color: black;
+  padding: 1px 3px;
+}
+.swagger-section .swagger-ui-wrap .required {
+  font-weight: bold;
+}
+.swagger-section .swagger-ui-wrap input.parameter {
+  width: 300px;
+  border: 1px solid #aaa;
+}
+.swagger-section .swagger-ui-wrap h1 {
+  color: black;
+  font-size: 1.5em;
+  line-height: 1.3em;
+  padding: 10px 0 10px 0;
+  font-family: "Droid Sans", sans-serif;
+  font-weight: bold;
+}
+.swagger-section .swagger-ui-wrap .editor_holder {
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+  font-size: 0.9em;
+}
+.swagger-section .swagger-ui-wrap .editor_holder label {
+  font-weight: normal!important;
+  /* JSONEditor uses bold by default for all labels, we revert that back to normal to not give the impression that by default fields are required */
+}
+.swagger-section .swagger-ui-wrap .editor_holder label.required {
+  font-weight: bold!important;
+}
+.swagger-section .swagger-ui-wrap .heading_with_menu {
+  float: none;
+  clear: both;
+  overflow: hidden;
+  display: block;
+}
+.swagger-section .swagger-ui-wrap .heading_with_menu ul {
+  display: block;
+  clear: none;
+  float: right;
+  -moz-box-sizing: border-box;
+  -webkit-box-sizing: border-box;
+  -ms-box-sizing: border-box;
+  box-sizing: border-box;
+  margin-top: 10px;
+}
+.swagger-section .swagger-ui-wrap h2 {
+  color: black;
+  font-size: 1.3em;
+  padding: 10px 0 10px 0;
+}
+.swagger-section .swagger-ui-wrap h2 a {
+  color: black;
+}
+.swagger-section .swagger-ui-wrap h2 span.sub {
+  font-size: 0.7em;
+  color: #999999;
+  font-style: italic;
+}
+.swagger-section .swagger-ui-wrap h2 span.sub a {
+  color: #777777;
+}
+.swagger-section .swagger-ui-wrap span.weak {
+  color: #666666;
+}
+.swagger-section .swagger-ui-wrap .message-success {
+  color: #89BF04;
+}
+.swagger-section .swagger-ui-wrap caption,
+.swagger-section .swagger-ui-wrap th,
+.swagger-section .swagger-ui-wrap td {
+  text-align: left;
+  font-weight: normal;
+  vertical-align: middle;
+}
+.swagger-section .swagger-ui-wrap .code {
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea {
+  font-family: "Droid Sans", sans-serif;
+  height: 250px;
+  padding: 4px;
+  display: block;
+  clear: both;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select {
+  display: block;
+  clear: both;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean {
+  float: none;
+  clear: both;
+  overflow: hidden;
+  display: block;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label {
+  display: block;
+  float: left;
+  clear: none;
+  margin: 0;
+  padding: 0;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input {
+  display: block;
+  float: left;
+  clear: none;
+  margin: 0 5px 0 0;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label {
+  color: black;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label {
+  display: block;
+  clear: both;
+  width: auto;
+  padding: 0 0 3px;
+  color: #666666;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr {
+  padding-left: 3px;
+  color: #888888;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints {
+  margin-left: 0;
+  font-style: italic;
+  font-size: 0.9em;
+  margin: 0;
+}
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.buttons {
+  margin: 0;
+  padding: 0;
+}
+.swagger-section .swagger-ui-wrap span.blank,
+.swagger-section .swagger-ui-wrap span.empty {
+  color: #888888;
+  font-style: italic;
+}
+.swagger-section .swagger-ui-wrap .markdown h3 {
+  color: #547f00;
+}
+.swagger-section .swagger-ui-wrap .markdown h4 {
+  color: #666666;
+}
+.swagger-section .swagger-ui-wrap .markdown pre {
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+  background-color: #fcf6db;
+  border: 1px solid #e5e0c6;
+  padding: 10px;
+  margin: 0 0 10px 0;
+}
+.swagger-section .swagger-ui-wrap .markdown pre code {
+  line-height: 1.6em;
+}
+.swagger-section .swagger-ui-wrap div.gist {
+  margin: 20px 0 25px 0 !important;
+}
+.swagger-section .swagger-ui-wrap ul#resources {
+  font-family: "Droid Sans", sans-serif;
+  font-size: 0.9em;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource {
+  border-bottom: 1px solid #dddddd;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a,
+.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a {
+  color: black;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a,
+.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a {
+  color: #555555;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource:last-child {
+  border-bottom: none;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading {
+  border: 1px solid transparent;
+  float: none;
+  clear: both;
+  overflow: hidden;
+  display: block;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options {
+  overflow: hidden;
+  padding: 0;
+  display: block;
+  clear: none;
+  float: right;
+  margin: 14px 10px 0 0;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li {
+  float: left;
+  clear: none;
+  margin: 0;
+  padding: 2px 10px;
+  border-right: 1px solid #dddddd;
+  color: #666666;
+  font-size: 0.9em;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a {
+  color: #aaaaaa;
+  text-decoration: none;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover {
+  text-decoration: underline;
+  color: black;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover,
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active,
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active {
+  text-decoration: underline;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first {
+  padding-left: 0;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last {
+  padding-right: 0;
+  border-right: none;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first {
+  padding-left: 0;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 {
+  color: #999999;
+  padding-left: 0;
+  display: block;
+  clear: none;
+  float: left;
+  font-family: "Droid Sans", sans-serif;
+  font-weight: bold;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a {
+  color: #999999;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover {
+  color: black;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation {
+  float: none;
+  clear: both;
+  overflow: hidden;
+  display: block;
+  margin: 0 0 10px;
+  padding: 0;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading {
+  float: none;
+  clear: both;
+  overflow: hidden;
+  display: block;
+  margin: 0;
+  padding: 0;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 {
+  display: block;
+  clear: none;
+  float: left;
+  width: auto;
+  margin: 0;
+  padding: 0;
+  line-height: 1.1em;
+  color: black;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path {
+  padding-left: 10px;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a {
+  color: black;
+  text-decoration: none;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover {
+  text-decoration: underline;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a {
+  text-transform: uppercase;
+  text-decoration: none;
+  color: white;
+  display: inline-block;
+  width: 50px;
+  font-size: 0.7em;
+  text-align: center;
+  padding: 7px 0 4px;
+  -moz-border-radius: 2px;
+  -webkit-border-radius: 2px;
+  -o-border-radius: 2px;
+  -ms-border-radius: 2px;
+  -khtml-border-radius: 2px;
+  border-radius: 2px;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span {
+  margin: 0;
+  padding: 0;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options {
+  overflow: hidden;
+  padding: 0;
+  display: block;
+  clear: none;
+  float: right;
+  margin: 6px 10px 0 0;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li {
+  float: left;
+  clear: none;
+  margin: 0;
+  padding: 2px 10px;
+  font-size: 0.9em;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a {
+  text-decoration: none;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access {
+  color: black;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content {
+  border-top: none;
+  padding: 10px;
+  -moz-border-radius-bottomleft: 6px;
+  -webkit-border-bottom-left-radius: 6px;
+  -o-border-bottom-left-radius: 6px;
+  -ms-border-bottom-left-radius: 6px;
+  -khtml-border-bottom-left-radius: 6px;
+  border-bottom-left-radius: 6px;
+  -moz-border-radius-bottomright: 6px;
+  -webkit-border-bottom-right-radius: 6px;
+  -o-border-bottom-right-radius: 6px;
+  -ms-border-bottom-right-radius: 6px;
+  -khtml-border-bottom-right-radius: 6px;
+  border-bottom-right-radius: 6px;
+  margin: 0 0 20px;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 {
+  font-size: 1.1em;
+  margin: 0;
+  padding: 15px 0 5px;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header {
+  float: none;
+  clear: both;
+  overflow: hidden;
+  display: block;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a {
+  padding: 4px 0 0 10px;
+  display: inline-block;
+  font-size: 0.9em;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit {
+  display: block;
+  clear: none;
+  float: left;
+  padding: 6px 8px;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header span.response_throbber {
+  background-image: url('../images/throbber.gif');
+  width: 128px;
+  height: 16px;
+  display: block;
+  clear: none;
+  float: right;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error {
+  outline: 2px solid black;
+  outline-color: #cc0000;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre {
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;
+  padding: 10px;
+  font-size: 0.9em;
+  max-height: 400px;
+  overflow-y: auto;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading {
+  background-color: #f9f2e9;
+  border: 1px solid #f0e0ca;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a {
+  background-color: #c5862b;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li {
+  border-right: 1px solid #dddddd;
+  border-right-color: #f0e0ca;
+  color: #c5862b;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a {
+  color: #c5862b;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content {
+  background-color: #faf5ee;
+  border: 1px solid #f0e0ca;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 {
+  color: #c5862b;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a {
+  color: #dcb67f;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading {
+  background-color: #fcffcd;
+  border: 1px solid black;
+  border-color: #ffd20f;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a {
+  text-transform: uppercase;
+  background-color: #ffd20f;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li {
+  border-right: 1px solid #dddddd;
+  border-right-color: #ffd20f;
+  color: #ffd20f;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a {
+  color: #ffd20f;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content {
+  background-color: #fcffcd;
+  border: 1px solid black;
+  border-color: #ffd20f;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 {
+  color: #ffd20f;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a {
+  color: #6fc992;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading {
+  background-color: #f5e8e8;
+  border: 1px solid #e8c6c7;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a {
+  text-transform: uppercase;
+  background-color: #a41e22;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li {
+  border-right: 1px solid #dddddd;
+  border-right-color: #e8c6c7;
+  color: #a41e22;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a {
+  color: #a41e22;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {
+  background-color: #f7eded;
+  border: 1px solid #e8c6c7;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 {
+  color: #a41e22;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a {
+  color: #c8787a;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading {
+  background-color: #e7f6ec;
+  border: 1px solid #c3e8d1;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a {
+  background-color: #10a54a;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li {
+  border-right: 1px solid #dddddd;
+  border-right-color: #c3e8d1;
+  color: #10a54a;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a {
+  color: #10a54a;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content {
+  background-color: #ebf7f0;
+  border: 1px solid #c3e8d1;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 {
+  color: #10a54a;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a {
+  color: #6fc992;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading {
+  background-color: #FCE9E3;
+  border: 1px solid #F5D5C3;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a {
+  background-color: #D38042;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li {
+  border-right: 1px solid #dddddd;
+  border-right-color: #f0cecb;
+  color: #D38042;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a {
+  color: #D38042;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content {
+  background-color: #faf0ef;
+  border: 1px solid #f0cecb;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 {
+  color: #D38042;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a {
+  color: #dcb67f;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading {
+  background-color: #e7f0f7;
+  border: 1px solid #c3d9ec;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a {
+  background-color: #0f6ab4;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li {
+  border-right: 1px solid #dddddd;
+  border-right-color: #c3d9ec;
+  color: #0f6ab4;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a {
+  color: #0f6ab4;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content {
+  background-color: #ebf3f9;
+  border: 1px solid #c3d9ec;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 {
+  color: #0f6ab4;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a {
+  color: #6fa5d2;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading {
+  background-color: #e7f0f7;
+  border: 1px solid #c3d9ec;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a {
+  background-color: #0f6ab4;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li {
+  border-right: 1px solid #dddddd;
+  border-right-color: #c3d9ec;
+  color: #0f6ab4;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a {
+  color: #0f6ab4;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content {
+  background-color: #ebf3f9;
+  border: 1px solid #c3d9ec;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 {
+  color: #0f6ab4;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a {
+  color: #6fa5d2;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {
+  border-top: none;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last {
+  padding-right: 0;
+  border-right: none;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active {
+  text-decoration: underline;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first {
+  padding-left: 0;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child,
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first {
+  padding-left: 0;
+}
+.swagger-section .swagger-ui-wrap p#colophon {
+  margin: 0 15px 40px 15px;
+  padding: 10px 0;
+  font-size: 0.8em;
+  border-top: 1px solid #dddddd;
+  font-family: "Droid Sans", sans-serif;
+  color: #999999;
+  font-style: italic;
+}
+.swagger-section .swagger-ui-wrap p#colophon a {
+  text-decoration: none;
+  color: #547f00;
+}
+.swagger-section .swagger-ui-wrap h3 {
+  color: black;
+  font-size: 1.1em;
+  padding: 10px 0 10px 0;
+}
+.swagger-section .swagger-ui-wrap .markdown ol,
+.swagger-section .swagger-ui-wrap .markdown ul {
+  font-family: "Droid Sans", sans-serif;
+  margin: 5px 0 10px;
+  padding: 0 0 0 18px;
+  list-style-type: disc;
+}
+.swagger-section .swagger-ui-wrap form.form_box {
+  background-color: #ebf3f9;
+  border: 1px solid #c3d9ec;
+  padding: 10px;
+}
+.swagger-section .swagger-ui-wrap form.form_box label {
+  color: #0f6ab4 !important;
+}
+.swagger-section .swagger-ui-wrap form.form_box input[type=submit] {
+  display: block;
+  padding: 10px;
+}
+.swagger-section .swagger-ui-wrap form.form_box p.weak {
+  font-size: 0.8em;
+}
+.swagger-section .swagger-ui-wrap form.form_box p {
+  font-size: 0.9em;
+  padding: 0 0 15px;
+  color: #7e7b6d;
+}
+.swagger-section .swagger-ui-wrap form.form_box p a {
+  color: #646257;
+}
+.swagger-section .swagger-ui-wrap form.form_box p strong {
+  color: black;
+}
+.swagger-section .title {
+  font-style: bold;
+}
+.swagger-section .secondary_form {
+  display: none;
+}
+.swagger-section .main_image {
+  display: block;
+  margin-left: auto;
+  margin-right: auto;
+}
+.swagger-section .oauth_body {
+  margin-left: 100px;
+  margin-right: 100px;
+}
+.swagger-section .oauth_submit {
+  text-align: center;
+}
+.swagger-section .api-popup-dialog {
+  z-index: 10000;
+  position: absolute;
+  width: 500px;
+  background: #FFF;
+  padding: 20px;
+  border: 1px solid #ccc;
+  border-radius: 5px;
+  display: none;
+  font-size: 13px;
+  color: #777;
+}
+.swagger-section .api-popup-dialog .api-popup-title {
+  font-size: 24px;
+  padding: 10px 0;
+}
+.swagger-section .api-popup-dialog .api-popup-title {
+  font-size: 24px;
+  padding: 10px 0;
+}
+.swagger-section .api-popup-dialog p.error-msg {
+  padding-left: 5px;
+  padding-bottom: 5px;
+}
+.swagger-section .api-popup-dialog button.api-popup-authbtn {
+  height: 30px;
+}
+.swagger-section .api-popup-dialog button.api-popup-cancel {
+  height: 30px;
+}
+.swagger-section .api-popup-scopes {
+  padding: 10px 20px;
+}
+.swagger-section .api-popup-scopes li {
+  padding: 5px 0;
+  line-height: 20px;
+}
+.swagger-section .api-popup-scopes .api-scope-desc {
+  padding-left: 20px;
+  font-style: italic;
+}
+.swagger-section .api-popup-scopes li input {
+  position: relative;
+  top: 2px;
+}
+.swagger-section .api-popup-actions {
+  padding-top: 10px;
+}
+#header {
+  display: none;
+}
+.swagger-section .swagger-ui-wrap .model-signature pre {
+  max-height: none;
+}
+.swagger-section .swagger-ui-wrap .body-textarea {
+  width: 100px;
+}
+.swagger-section .swagger-ui-wrap input.parameter {
+  width: 100px;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options {
+  display: none;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints {
+  display: block !important;
+}
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content {
+  display: block !important;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/css/reset.css
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/css/reset.css b/ambari-web/api-docs/css/reset.css
new file mode 100644
index 0000000..b2b0789
--- /dev/null
+++ b/ambari-web/api-docs/css/reset.css
@@ -0,0 +1,125 @@
+/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */
+html,
+body,
+div,
+span,
+applet,
+object,
+iframe,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+p,
+blockquote,
+pre,
+a,
+abbr,
+acronym,
+address,
+big,
+cite,
+code,
+del,
+dfn,
+em,
+img,
+ins,
+kbd,
+q,
+s,
+samp,
+small,
+strike,
+strong,
+sub,
+sup,
+tt,
+var,
+b,
+u,
+i,
+center,
+dl,
+dt,
+dd,
+ol,
+ul,
+li,
+fieldset,
+form,
+label,
+legend,
+table,
+caption,
+tbody,
+tfoot,
+thead,
+tr,
+th,
+td,
+article,
+aside,
+canvas,
+details,
+embed,
+figure,
+figcaption,
+footer,
+header,
+hgroup,
+menu,
+nav,
+output,
+ruby,
+section,
+summary,
+time,
+mark,
+audio,
+video {
+  margin: 0;
+  padding: 0;
+  border: 0;
+  font-size: 100%;
+  font: inherit;
+  vertical-align: baseline;
+}
+/* HTML5 display-role reset for older browsers */
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+menu,
+nav,
+section {
+  display: block;
+}
+body {
+  line-height: 1;
+}
+ol,
+ul {
+  list-style: none;
+}
+blockquote,
+q {
+  quotes: none;
+}
+blockquote:before,
+blockquote:after,
+q:before,
+q:after {
+  content: '';
+  content: none;
+}
+table {
+  border-collapse: collapse;
+  border-spacing: 0;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/css/screen.css
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/css/screen.css b/ambari-web/api-docs/css/screen.css
new file mode 100644
index 0000000..12ec0c5
--- /dev/null
+++ b/ambari-web/api-docs/css/screen.css
@@ -0,0 +1,9 @@
+.swagger-section .swagger-collapse:before {
+  content: "-";
+}
+.swagger-section .swagger-expand:before {
+  content: "+";
+}
+.swagger-section .property-selector input[type="checkbox"] {
+  margin: 3px;
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/css/standalone.css
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/css/standalone.css b/ambari-web/api-docs/css/standalone.css
new file mode 100644
index 0000000..1e5cd69
--- /dev/null
+++ b/ambari-web/api-docs/css/standalone.css
@@ -0,0 +1,294 @@
+/*==========  Header  ==========*/
+header.site-header {
+    z-index: 1000;
+    background: transparent;
+    font-size: 14px;
+    position: static;
+    padding: 20px 0 20px 0;
+}
+header.site-header.header-fixed {
+    background: rgba(255,255,255,0.8);
+    position: fixed;
+}
+header.site-header a {
+    color: #333;
+}
+header.site-header li * {
+    -webkit-backface-visibility: hidden !important;
+}
+header.site-header nav {
+    background: none;
+    border: 0;
+    margin: 0;
+}
+header.site-header nav li.active a {
+    background: none;
+    color: #000;
+}
+header.site-header nav ul,
+header.site-header nav li {
+    margin: 0;
+}
+header.site-header nav .navbar-brand {
+    font-weight: bold;
+    margin: 0;
+    display: inline-block;
+    float: left;
+    font-size: 24px;
+    margin-right: 20px;
+    color: #000;
+    padding: 0 15px 0 15px;
+    margin: 0;
+    width: 120px;
+}
+header.site-header nav .navbar-brand a {
+    background: url("../images/senodio.png") center left no-repeat;
+    width: 130px;
+    height: 40px;
+    display: block;
+    margin-top: 5px;
+    background-size: 48%;
+}
+header.site-header nav .navbar-brand img {
+    position: relative;
+    height: 36px;
+    margin-right: 10px;
+    top: 2px;
+    display: none;
+}
+header.site-header nav .navbar-brand span {
+    display: none;
+}
+header.site-header .navbar-default .navbar-collapse {
+    border-color: transparent;
+}
+header.site-header .navbar-default .navbar-nav>.active>a,
+header.site-header .navbar-default .navbar-default .navbar-nav>.active>a:hover,
+header.site-header .navbar-default .navbar-default .navbar-nav>.active>a:focus {
+    background: transparent;
+}
+header.site-header .navbar-default .navbar-nav>.open>a {
+    background: none;
+}
+header.site-header .navbar-toggle {
+    border: 0;
+}
+header.site-header .navbar-toggle:hover {
+    background: none;
+}
+header.site-header .navbar-toggle:hover .icon-bar {
+    background: #000;
+}
+header.site-header .btn-dro {
+    padding: 15px;
+    line-height: 20px;
+    background: none;
+    display: inline-block;
+    color: #777;
+    cursor: pointer;
+}
+header.site-header .btn-dro:hover {
+    color: #666;
+}
+header.site-header .btn-dro i {
+    position: relative;
+    top: 1px;
+    margin-left: 5px;
+    width: 6px;
+    display: inline-block;
+    font-size: 10px;
+}
+header.site-header .dropdown .dropdown-menu>.active>a,
+header.site-header .dropdown .dropdown-menu>.active>a:hover,
+header.site-header .dropdown .dropdown-menu>.active>a:focus {
+    background-color: none;
+}
+header.site-header .dropdown .dropdown-menu {
+    min-width: 130px;
+    background: #fff;
+    -webkit-transform: scale(0.8) translateY(-10%);
+    transform: scale(0.8) translateY(-10%);
+    transition: 0.1s cubic-bezier(0.3, 0, 0, 1.3);
+    opacity: 0;
+    pointer-events: none;
+    display: block;
+    left: 0;
+    border: 0;
+    border-radius: 3px;
+}
+header.site-header .dropdown .dropdown-menu ::after {
+    position: absolute;
+    top: -6px;
+    left: 26px;
+    display: inline-block;
+    border-right: 6px solid transparent;
+    border-bottom: 6px solid #fff;
+    border-left: 6px solid transparent;
+    content: '';
+}
+header.site-header .dropdown .dropdown-menu .divider {
+    background-color: rgba(0,0,0,0.1);
+}
+header.site-header .dropdown.open .dropdown-menu {
+    opacity: 1;
+    pointer-events: auto;
+    -webkit-transform: none;
+    transform: none;
+}
+header.site-header a.login {
+    color: #666;
+    border: 1px solid #f1f1f1;
+    border-radius: 100px;
+    margin-left: 10px;
+    text-transform: uppercase;
+    letter-spacing: 1px;
+    font-weight: bold;
+    padding: 0;
+    line-height: 30px;
+    display: inline-block;
+    padding-left: 15px;
+    padding-right: 14px;
+    margin-top: 10px;
+    font-size: 12px;
+}
+header.site-header a.login:hover {
+    background: #f1f1f1;
+}
+/*==========  Header with dark background behind  ==========*/
+@media screen and (min-width: 990px) {
+    .header-dark header.site-header {
+        position: absolute;
+        left: 0;
+        right: 0;
+        top: 0;
+        border-bottom: 1px solid rgba(255,255,255,0.1);
+    }
+    .header-dark header.site-header h1.navbar-brand a {
+        background-image: url("/auth0-styleguide/img/logo-grey-horizontal.png");
+    }
+    .header-dark header.site-header .navbar-default .navbar-nav>.active>a,
+    .header-dark header.site-header .navbar-default .navbar-nav>.active>a:hover,
+    .header-dark header.site-header .navbar-default .navbar-nav>.active>a:focus {
+        color: #fff;
+    }
+    .header-dark header.site-header .dropdown a {
+        color: #333;
+    }
+    .header-dark header.site-header .navbar-default .navbar-nav>li>a {
+        color: #d0d2d3;
+    }
+    .header-dark header.site-header .navbar-default .navbar-nav>li>a:hover {
+        color: #fff;
+        background: none;
+    }
+    .header-dark header.site-header nav li .btn-dro {
+        color: #d0d2d3;
+    }
+    .header-dark header.site-header nav li .btn-dro:hover {
+        color: #fff;
+    }
+    .header-dark header.site-header a.btn {
+        border-color: #fff;
+    }
+    .header-dark header.site-header a.btn:hover {
+        border-color: #fff;
+        color: #000;
+    }
+    .site-header.navbar-fixed-top,
+    .site-header.navbar-fixed-bottom {
+        background: #fff;
+        position: fixed !important;
+        right: 0;
+        left: 0;
+        z-index: 1030;
+        transform: translate3d(0, 0, 0);
+        -webkit-transform: translate3d(0, 0, 0);
+        background: rgba(255,255,255,0.9);
+    }
+}
+.navbar-header {
+    position: relative;
+}
+a.hiring {
+    background: #44c7f4;
+    text-transform: uppercase;
+    position: absolute;
+    top: 16px;
+    left: -104px;
+    font-weight: bold;
+    padding: 2px 6px;
+    border-radius: 3px;
+    color: #fff !important;
+    display: inline-block;
+    font-size: 11px;
+}
+a.hiring::after {
+    position: absolute;
+    content: "";
+    right: -4px;
+    top: 5px;
+    width: 0;
+    height: 0;
+    border-top: 5px solid transparent;
+    border-bottom: 5px solid transparent;
+    border-left: 5px solid #44c7f4;
+}
+/*==========  Responsive  ==========*/
+@media screen and (max-width: 990px) {
+    header.site-header {
+        position: static;
+        text-align: left;
+        padding: 10px 0;
+    }
+    header.site-header .navbar-left {
+        border-top: 1px solid #f1f1f1;
+    }
+    header.site-header li {
+        padding: 8px 0;
+        border-bottom: 1px solid #f1f1f1;
+    }
+    header.site-header li:last-child {
+        border-bottom: 0;
+    }
+    header.site-header li a {
+        display: block;
+    }
+    header.site-header li.dropdown {
+        display: block;
+        padding: 0;
+        opacity: 1;
+        overflow: hidden;
+    }
+    header.site-header li.dropdown .btn-dro {
+        display: none;
+    }
+    header.site-header li.dropdown .divider {
+        display: none;
+    }
+    header.site-header li.dropdown ul.dropdown-menu {
+        min-width: 0;
+        position: static;
+        margin: 0;
+        box-shadow: none;
+        border-left: 4px solid #ccc;
+        opacity: 1;
+        transform: none;
+        transition: none;
+        border-radius: 0;
+        margin: 0;
+        padding: 0;
+        width: 100%;
+        background: #f8f8f8;
+        pointer-events: all;
+    }
+    header.site-header li.dropdown ul.dropdown-menu li:last-child {
+        border-bottom: 0;
+    }
+    header.site-header nav a.login {
+        margin-bottom: 20px;
+        font-size: 14px;
+        padding: 10px;
+        display: block;
+        text-align: center;
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/css/typography.css
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/css/typography.css b/ambari-web/api-docs/css/typography.css
new file mode 100644
index 0000000..27c3751
--- /dev/null
+++ b/ambari-web/api-docs/css/typography.css
@@ -0,0 +1,26 @@
+/* droid-sans-regular - latin */
+@font-face {
+  font-family: 'Droid Sans';
+  font-style: normal;
+  font-weight: 400;
+  src: url('../fonts/droid-sans-v6-latin-regular.eot'); /* IE9 Compat Modes */
+  src: local('Droid Sans'), local('DroidSans'),
+       url('../fonts/droid-sans-v6-latin-regular.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
+       url('../fonts/droid-sans-v6-latin-regular.woff2') format('woff2'), /* Super Modern Browsers */
+       url('../fonts/droid-sans-v6-latin-regular.woff') format('woff'), /* Modern Browsers */
+       url('../fonts/droid-sans-v6-latin-regular.ttf') format('truetype'), /* Safari, Android, iOS */
+       url('../fonts/droid-sans-v6-latin-regular.svg#DroidSans') format('svg'); /* Legacy iOS */
+}
+/* droid-sans-700 - latin */
+@font-face {
+  font-family: 'Droid Sans';
+  font-style: normal;
+  font-weight: 700;
+  src: url('../fonts/droid-sans-v6-latin-700.eot'); /* IE9 Compat Modes */
+  src: local('Droid Sans Bold'), local('DroidSans-Bold'),
+       url('../fonts/droid-sans-v6-latin-700.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
+       url('../fonts/droid-sans-v6-latin-700.woff2') format('woff2'), /* Super Modern Browsers */
+       url('../fonts/droid-sans-v6-latin-700.woff') format('woff'), /* Modern Browsers */
+       url('../fonts/droid-sans-v6-latin-700.ttf') format('truetype'), /* Safari, Android, iOS */
+       url('../fonts/droid-sans-v6-latin-700.svg#DroidSans') format('svg'); /* Legacy iOS */
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.eot
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.eot b/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.eot
new file mode 100644
index 0000000..d852498
Binary files /dev/null and b/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.eot differ


[48/49] ambari git commit: Merge remote-tracking branch 'origin/trunk' into ambari-rest-api-explorer

Posted by ad...@apache.org.
Merge remote-tracking branch 'origin/trunk' into ambari-rest-api-explorer


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

Branch: refs/heads/trunk
Commit: 651bdcbdf86c8addace33b1f9bac066633296106
Parents: 51fc3cf 7c92953
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Tue May 23 11:52:00 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Tue May 23 11:52:00 2017 +0200

----------------------------------------------------------------------
 .../clusters/ClustersManageAccessCtrl.js        |    2 +-
 .../stackVersions/StackVersionsCreateCtrl.js    |   19 +
 .../stackVersions/StackVersionsEditCtrl.js      |  102 +-
 .../ui/admin-web/app/scripts/i18n.config.js     |    2 +-
 .../ui/admin-web/app/scripts/services/Stack.js  |    3 +-
 .../resources/ui/admin-web/app/views/main.html  |   50 +-
 .../views/stackVersions/stackVersionPage.html   |    3 +-
 .../ui/admin-web/app/views/users/create.html    |    2 +-
 ambari-agent/conf/unix/install-helper.sh        |    3 +-
 ambari-agent/pom.xml                            |    1 +
 .../src/main/python/ambari_agent/ActionQueue.py |    9 +-
 .../main/python/ambari_agent/AmbariConfig.py    |   83 +-
 .../src/main/python/ambari_agent/Controller.py  |   18 +-
 .../ambari_agent/CustomServiceOrchestrator.py   |   38 +-
 .../src/main/python/ambari_agent/Hardware.py    |    2 +
 .../src/main/python/ambari_agent/HostInfo.py    |   15 +-
 .../src/main/python/ambari_agent/NetUtil.py     |    5 +-
 .../ambari_agent/StatusCommandsExecutor.py      |  279 +-
 .../python/ambari_agent/alerts/web_alert.py     |    5 +-
 .../src/main/python/ambari_agent/hostname.py    |    8 +
 ambari-agent/src/packages/tarball/all.xml       |   11 +-
 .../test/python/ambari_agent/TestActionQueue.py |   13 +-
 .../test/python/ambari_agent/TestController.py  |   14 +
 .../TestCustomServiceOrchestrator.py            |   51 -
 .../test/python/ambari_agent/TestHardware.py    |    4 +-
 .../src/test/python/ambari_agent/TestShell.py   |    2 +-
 .../python/resource_management/TestScript.py    |   56 +-
 .../main/python/ambari_commons/inet_utils.py    |   43 +-
 .../src/main/python/ambari_commons/network.py   |   20 +-
 .../libraries/functions/conf_select.py          |   13 +-
 .../libraries/functions/curl_krb_request.py     |   17 +-
 .../libraries/functions/decorator.py            |   23 +-
 .../libraries/functions/jmx.py                  |    7 +-
 .../libraries/functions/namenode_ha_utils.py    |    6 +-
 .../functions/setup_ranger_plugin_xml.py        |   26 +-
 .../libraries/functions/version_select_util.py  |   40 +
 .../libraries/script/script.py                  |  171 +-
 .../HIVE/package/scripts/mysql_service.py       |    5 +
 ambari-infra/.gitignore                         |    6 +
 ambari-infra/ambari-infra-assembly/pom.xml      |   91 +
 .../src/main/package/deb/manager/control        |   22 +
 .../src/main/package/deb/manager/postinst       |   15 +
 .../src/main/package/deb/manager/postrm         |   15 +
 .../src/main/package/deb/manager/preinst        |   15 +
 .../src/main/package/deb/manager/prerm          |   15 +
 ambari-infra/ambari-infra-manager/README.md     |   31 +
 ambari-infra/ambari-infra-manager/build.xml     |   54 +
 .../ambari-infra-manager/docker/Dockerfile      |   52 +
 .../ambari-infra-manager/docker/bin/start.sh    |   21 +
 .../docker/infra-manager-docker.sh              |   85 +
 ambari-infra/ambari-infra-manager/pom.xml       |  431 ++
 .../org/apache/ambari/infra/InfraManager.java   |  186 +
 .../infra/common/InfraManagerConstants.java     |   29 +
 .../infra/conf/InfraManagerApiDocConfig.java    |   54 +
 .../ambari/infra/conf/InfraManagerConfig.java   |   36 +
 .../conf/batch/InfraManagerBatchConfig.java     |  282 +
 .../infra/job/dummy/DummyItemProcessor.java     |   36 +
 .../ambari/infra/job/dummy/DummyItemWriter.java |   36 +
 .../ambari/infra/job/dummy/DummyObject.java     |   40 +
 .../apache/ambari/infra/manager/JobManager.java |  274 +
 .../infra/model/ExecutionContextResponse.java   |   40 +
 .../ambari/infra/model/JobDetailsResponse.java  |   53 +
 .../model/JobExecutionDetailsResponse.java      |   49 +
 .../infra/model/JobExecutionInfoResponse.java   |  141 +
 .../ambari/infra/model/JobExecutionRequest.java |   46 +
 .../infra/model/JobExecutionRestartRequest.java |   52 +
 .../infra/model/JobExecutionStopRequest.java    |   50 +
 .../infra/model/JobInstanceDetailsResponse.java |   54 +
 .../infra/model/JobInstanceStartRequest.java    |   49 +
 .../ambari/infra/model/JobOperationParams.java  |   31 +
 .../apache/ambari/infra/model/JobRequest.java   |   37 +
 .../apache/ambari/infra/model/PageRequest.java  |   49 +
 .../model/StepExecutionContextResponse.java     |   58 +
 .../infra/model/StepExecutionInfoResponse.java  |  115 +
 .../model/StepExecutionProgressResponse.java    |   53 +
 .../infra/model/StepExecutionRequest.java       |   49 +
 .../infra/model/wrapper/JobExecutionData.java   |  118 +
 .../infra/model/wrapper/StepExecutionData.java  |  133 +
 .../ambari/infra/rest/JobExceptionMapper.java   |  110 +
 .../apache/ambari/infra/rest/JobResource.java   |  191 +
 .../src/main/resources/dummy/dummy.txt          |    3 +
 .../src/main/resources/infra-manager-env.sh     |   18 +
 .../src/main/resources/infra-manager.properties |   18 +
 .../src/main/resources/infraManager.sh          |   20 +
 .../src/main/resources/log4j.xml                |   31 +
 .../src/main/resources/swagger/swagger.html     |  115 +
 .../src/main/resources/webapp/index.html        |   24 +
 .../infra/solr/AmbariSolrCloudClient.java       |    4 +-
 .../src/main/resources/solrCloudCli.sh          |    2 +-
 ambari-infra/pom.xml                            |    1 +
 ambari-logsearch/README.md                      |    9 +-
 .../ambari-logsearch-config-api/.gitignore      |    1 +
 .../ambari-logsearch-config-api/pom.xml         |   49 +
 .../config/api/InputConfigMonitor.java          |   50 +
 .../config/api/LogLevelFilterMonitor.java       |   44 +
 .../logsearch/config/api/LogSearchConfig.java   |  132 +
 .../config/api/LogSearchConfigFactory.java      |   68 +
 .../api/model/inputconfig/Conditions.java       |   24 +
 .../config/api/model/inputconfig/Fields.java    |   26 +
 .../api/model/inputconfig/FilterDescriptor.java |   39 +
 .../model/inputconfig/FilterGrokDescriptor.java |   28 +
 .../model/inputconfig/FilterJsonDescriptor.java |   23 +
 .../inputconfig/FilterKeyValueDescriptor.java   |   28 +
 .../api/model/inputconfig/InputConfig.java      |   28 +
 .../api/model/inputconfig/InputDescriptor.java  |   54 +
 .../inputconfig/InputFileBaseDescriptor.java    |   28 +
 .../model/inputconfig/InputFileDescriptor.java  |   23 +
 .../inputconfig/InputS3FileDescriptor.java      |   26 +
 .../model/inputconfig/MapDateDescriptor.java    |   26 +
 .../inputconfig/MapFieldCopyDescriptor.java     |   24 +
 .../model/inputconfig/MapFieldDescriptor.java   |   24 +
 .../inputconfig/MapFieldNameDescriptor.java     |   24 +
 .../inputconfig/MapFieldValueDescriptor.java    |   26 +
 .../api/model/inputconfig/PostMapValues.java    |   26 +
 .../model/loglevelfilter/LogLevelFilter.java    |   79 +
 .../model/loglevelfilter/LogLevelFilterMap.java |   33 +
 .../config/api/LogSearchConfigClass1.java       |   73 +
 .../config/api/LogSearchConfigClass2.java       |   73 +
 .../config/api/LogSearchConfigFactoryTest.java  |   58 +
 .../config/api/NonLogSearchConfigClass.java     |   23 +
 .../src/test/resources/log4j.xml                |   34 +
 .../.gitignore                                  |    1 +
 .../ambari-logsearch-config-zookeeper/pom.xml   |   84 +
 .../config/zookeeper/LogSearchConfigZK.java     |  362 +
 .../model/inputconfig/impl/ConditionsImpl.java  |   37 +
 .../model/inputconfig/impl/FieldsImpl.java      |   39 +
 .../model/inputconfig/impl/FilterAdapter.java   |   42 +
 .../inputconfig/impl/FilterDescriptorImpl.java  |  113 +
 .../impl/FilterGrokDescriptorImpl.java          |   66 +
 .../impl/FilterJsonDescriptorImpl.java          |   25 +
 .../impl/FilterKeyValueDescriptorImpl.java      |   63 +
 .../model/inputconfig/impl/InputAdapter.java    |   58 +
 .../model/inputconfig/impl/InputConfigGson.java |   46 +
 .../model/inputconfig/impl/InputConfigImpl.java |   54 +
 .../inputconfig/impl/InputDescriptorImpl.java   |  204 +
 .../impl/InputFileBaseDescriptorImpl.java       |   66 +
 .../impl/InputFileDescriptorImpl.java           |   25 +
 .../impl/InputS3FileDescriptorImpl.java         |   53 +
 .../inputconfig/impl/MapDateDescriptorImpl.java |   58 +
 .../impl/MapFieldCopyDescriptorImpl.java        |   45 +
 .../impl/MapFieldNameDescriptorImpl.java        |   45 +
 .../impl/MapFieldValueDescriptorImpl.java       |   58 +
 .../inputconfig/impl/PostMapValuesAdapter.java  |   99 +
 .../inputconfig/impl/PostMapValuesImpl.java     |   40 +
 ambari-logsearch/ambari-logsearch-it/pom.xml    |  204 +-
 .../logsearch/domain/StoryDataRegistry.java     |   43 +-
 .../logsearch/steps/AbstractLogSearchSteps.java |  161 +
 .../logsearch/steps/LogSearchDockerSteps.java   |  197 +-
 .../logsearch/steps/LogSearchUISteps.java       |  212 +
 .../ambari/logsearch/steps/SolrSteps.java       |    4 +-
 .../logsearch/story/LogSearchApiQueryStory.java |   22 -
 .../story/LogSearchBackendStories.java          |   75 +
 .../ambari/logsearch/story/LogSearchStory.java  |   60 -
 .../logsearch/story/LogSearchStoryLocator.java  |   97 +
 .../logsearch/story/LogSearchUIStories.java     |   92 +
 .../logsearch/story/LogfeederParsingStory.java  |   22 -
 .../ambari/logsearch/web/AbstractPage.java      |   63 +
 .../org/apache/ambari/logsearch/web/Home.java   |   39 +
 .../story/log_search_api_query_story.story      |   17 -
 .../story/logfeeder_parsing_story.story         |   20 -
 .../stories/backend/log_search_api_tests.story  |   17 +
 .../backend/logfeeder_parsing_tests.story       |   20 +
 .../resources/stories/selenium/login.ui.story   |   20 +
 .../ambari-logsearch-logfeeder/pom.xml          |   66 +-
 .../org/apache/ambari/logfeeder/LogFeeder.java  |  386 +-
 .../ambari/logfeeder/common/ConfigBlock.java    |  107 +-
 .../ambari/logfeeder/common/ConfigHandler.java  |  420 ++
 .../ambari/logfeeder/common/ConfigItem.java     |   97 +
 .../apache/ambari/logfeeder/filter/Filter.java  |   53 +-
 .../ambari/logfeeder/filter/FilterGrok.java     |   11 +-
 .../ambari/logfeeder/filter/FilterJSON.java     |    3 -
 .../ambari/logfeeder/filter/FilterKeyValue.java |   12 +-
 .../logfeeder/input/AbstractInputFile.java      |   16 +-
 .../apache/ambari/logfeeder/input/Input.java    |  112 +-
 .../logfeeder/input/InputConfigUploader.java    |   94 +
 .../ambari/logfeeder/input/InputFile.java       |    6 +-
 .../ambari/logfeeder/input/InputManager.java    |  304 +-
 .../ambari/logfeeder/input/InputS3File.java     |    5 +-
 .../ambari/logfeeder/input/InputSimulate.java   |   41 +-
 .../logfeeder/logconfig/FilterLogData.java      |   87 -
 .../logfeeder/logconfig/LogConfigFetcher.java   |  168 -
 .../logfeeder/logconfig/LogConfigHandler.java   |  213 -
 .../logfeeder/logconfig/LogFeederFilter.java    |   90 -
 .../logconfig/LogFeederFilterWrapper.java       |   55 -
 .../logfeeder/loglevelfilter/FilterLogData.java |   73 +
 .../loglevelfilter/LogLevelFilterHandler.java   |  157 +
 .../apache/ambari/logfeeder/mapper/Mapper.java  |    4 +-
 .../ambari/logfeeder/mapper/MapperDate.java     |   15 +-
 .../logfeeder/mapper/MapperFieldCopy.java       |   13 +-
 .../logfeeder/mapper/MapperFieldName.java       |   14 +-
 .../logfeeder/mapper/MapperFieldValue.java      |   14 +-
 .../logfeeder/metrics/LogFeederAMSClient.java   |   12 +-
 .../apache/ambari/logfeeder/output/Output.java  |    3 -
 .../logfeeder/output/OutputLineFilter.java      |    2 +-
 .../ambari/logfeeder/output/OutputManager.java  |   19 +-
 .../ambari/logfeeder/output/OutputS3File.java   |   96 +-
 .../ambari/logfeeder/util/LogFeederUtil.java    |   73 +-
 .../apache/ambari/logfeeder/util/SSLUtil.java   |    5 +-
 .../src/main/resources/log4j.xml                |    6 +-
 .../ambari/logfeeder/filter/FilterGrokTest.java |   37 +-
 .../ambari/logfeeder/filter/FilterJSONTest.java |   14 +-
 .../logfeeder/filter/FilterKeyValueTest.java    |   41 +-
 .../ambari/logfeeder/input/InputFileTest.java   |   25 +-
 .../logfeeder/input/InputManagerTest.java       |   70 +-
 .../logconfig/LogConfigHandlerTest.java         |  108 +-
 .../ambari/logfeeder/mapper/MapperDateTest.java |   44 +-
 .../logfeeder/mapper/MapperFieldCopyTest.java   |   19 +-
 .../logfeeder/mapper/MapperFieldNameTest.java   |   19 +-
 .../logfeeder/mapper/MapperFieldValueTest.java  |   29 +-
 .../logfeeder/output/OutputLineFilterTest.java  |   22 +-
 .../logfeeder/output/OutputManagerTest.java     |   21 +-
 .../logfeeder/output/OutputS3FileTest.java      |   17 +-
 .../src/test/resources/logfeeder.properties     |    3 +-
 .../ambari-logsearch-server/pom.xml             |   18 +-
 .../org/apache/ambari/logsearch/LogSearch.java  |    1 +
 .../ambari/logsearch/common/MessageEnums.java   |    3 +-
 .../logsearch/common/PropertiesHelper.java      |    3 +
 .../ambari/logsearch/conf/SecurityConfig.java   |   15 +
 .../conf/global/LogSearchConfigState.java       |   35 +
 .../ambari/logsearch/configurer/Configurer.java |   23 +
 .../configurer/LogSearchConfigConfigurer.java   |   69 +
 .../configurer/LogfeederFilterConfigurer.java   |   66 -
 .../configurer/SolrAuditAliasConfigurer.java    |    2 +-
 .../configurer/SolrCollectionConfigurer.java    |   12 +-
 .../logsearch/configurer/SolrConfigurer.java    |   23 -
 .../ambari/logsearch/dao/AuditSolrDao.java      |    2 +-
 .../logsearch/dao/ServiceLogsSolrDao.java       |    2 +-
 .../ambari/logsearch/dao/UserConfigSolrDao.java |   81 +-
 .../ambari/logsearch/doc/DocConstants.java      |   12 +-
 .../handler/AbstractSolrConfigHandler.java      |  122 +
 .../logsearch/handler/UpgradeSchemaHandler.java |  139 +
 .../handler/UploadConfigurationHandler.java     |  164 +-
 .../logsearch/manager/AuditLogsManager.java     |    5 +
 .../ambari/logsearch/manager/ManagerBase.java   |   30 +
 .../logsearch/manager/ServiceLogsManager.java   |    5 +
 .../logsearch/manager/ShipperConfigManager.java |  108 +
 .../logsearch/manager/UserConfigManager.java    |   24 -
 .../model/common/LSServerConditions.java        |   41 +
 .../logsearch/model/common/LSServerFields.java  |   43 +
 .../logsearch/model/common/LSServerFilter.java  |  130 +
 .../model/common/LSServerFilterGrok.java        |   73 +
 .../model/common/LSServerFilterJson.java        |   31 +
 .../model/common/LSServerFilterKeyValue.java    |   71 +
 .../logsearch/model/common/LSServerInput.java   |  149 +
 .../model/common/LSServerInputConfig.java       |   87 +
 .../model/common/LSServerInputFile.java         |   31 +
 .../model/common/LSServerInputFileBase.java     |   72 +
 .../model/common/LSServerInputS3File.java       |   59 +
 .../model/common/LSServerLogLevelFilter.java    |  100 +
 .../model/common/LSServerLogLevelFilterMap.java |   65 +
 .../logsearch/model/common/LSServerMapDate.java |   61 +
 .../model/common/LSServerMapField.java          |   30 +
 .../model/common/LSServerMapFieldCopy.java      |   49 +
 .../model/common/LSServerMapFieldName.java      |   49 +
 .../model/common/LSServerMapFieldValue.java     |   61 +
 .../model/common/LSServerPostMapValues.java     |   63 +
 .../common/LSServerPostMapValuesSerializer.java |   39 +
 .../model/common/LogFeederDataMap.java          |   50 -
 .../model/common/LogfeederFilterData.java       |   87 -
 .../logsearch/rest/AuditLogsResource.java       |   10 +
 .../logsearch/rest/ServiceLogsResource.java     |   11 +
 .../logsearch/rest/ShipperConfigResource.java   |  108 +
 .../logsearch/rest/UserConfigResource.java      |   18 -
 .../web/filters/LogSearchConfigStateFilter.java |  102 +
 ...rchExternalServerAuthenticationProvider.java |    5 +-
 .../ambari-logsearch-web/.gitignore             |    1 +
 .../webapp/templates/common/Header_tmpl.html    |    5 +-
 ambari-logsearch/docker/Dockerfile              |   17 +-
 ambari-logsearch/docker/bin/start.sh            |    8 +
 ambari-logsearch/docker/logsearch-docker.sh     |   18 +-
 .../test-config/logfeeder/logfeeder.properties  |   13 +-
 .../test-config/logsearch/logsearch.properties  |    6 +-
 ambari-logsearch/pom.xml                        |    2 +
 ambari-metrics/ambari-metrics-assembly/pom.xml  |   20 +
 .../src/main/assembly/monitor-windows.xml       |    7 +
 .../src/main/assembly/monitor.xml               |    9 +-
 .../timeline/AbstractTimelineMetricsSink.java   |   26 +-
 .../sink/timeline/AggregationResult.java        |   60 +
 .../metrics2/sink/timeline/MetricAggregate.java |  110 +
 .../sink/timeline/MetricClusterAggregate.java   |   73 +
 .../sink/timeline/MetricHostAggregate.java      |   81 +
 .../metrics2/sink/timeline/TimelineMetric.java  |    6 +-
 .../TimelineMetricWithAggregatedValues.java     |   65 +
 .../AbstractTimelineMetricSinkTest.java         |   10 +
 .../availability/MetricCollectorHATest.java     |   10 +
 .../cache/HandleConnectExceptionTest.java       |   10 +
 .../sink/flume/FlumeTimelineMetricsSink.java    |   26 +-
 .../ambari-metrics/datasource.js                |  162 +-
 .../ambari-metrics/partials/query.editor.html   |   14 +-
 .../ambari-metrics/queryCtrl.js                 |    9 +-
 .../timeline/HadoopTimelineMetricsSink.java     |   27 +-
 .../timeline/HadoopTimelineMetricsSinkTest.java |   14 +-
 .../conf/unix/log4j.properties                  |   31 +
 .../conf/windows/log4j.properties               |   29 +
 .../ambari-metrics-host-aggregator/pom.xml      |  120 +
 .../AbstractMetricPublisherThread.java          |  134 +
 .../aggregator/AggregatedMetricsPublisher.java  |  101 +
 .../host/aggregator/AggregatorApplication.java  |  180 +
 .../host/aggregator/AggregatorWebService.java   |   56 +
 .../host/aggregator/RawMetricsPublisher.java    |   60 +
 .../host/aggregator/TimelineMetricsHolder.java  |   98 +
 .../conf/unix/ambari-metrics-monitor            |    2 +-
 .../src/main/python/core/aggregator.py          |  110 +
 .../main/python/core/application_metric_map.py  |    7 +-
 .../src/main/python/core/config_reader.py       |   41 +-
 .../src/main/python/core/controller.py          |   28 +
 .../src/main/python/core/emitter.py             |   12 +-
 .../src/main/python/core/stop_handler.py        |    3 +-
 .../src/main/python/main.py                     |    6 +-
 .../kafka/KafkaTimelineMetricsReporter.java     |   27 +
 .../kafka/KafkaTimelineMetricsReporterTest.java |    4 +
 .../storm/StormTimelineMetricsReporter.java     |   23 +
 .../sink/storm/StormTimelineMetricsSink.java    |   21 +
 .../ambari-metrics-storm-sink/pom.xml           |    2 +-
 .../storm/StormTimelineMetricsReporter.java     |   22 +
 .../sink/storm/StormTimelineMetricsSink.java    |   22 +
 .../ambari-metrics-timelineservice/pom.xml      |    2 +-
 .../timeline/HBaseTimelineMetricStore.java      |   78 +-
 .../metrics/timeline/PhoenixHBaseAccessor.java  |  112 +-
 .../timeline/TimelineMetricConfiguration.java   |    2 +
 .../metrics/timeline/TimelineMetricStore.java   |   10 +
 .../timeline/TimelineMetricsAggregatorSink.java |    4 +-
 .../timeline/aggregators/MetricAggregate.java   |  110 -
 .../aggregators/MetricClusterAggregate.java     |   73 -
 .../aggregators/MetricHostAggregate.java        |   81 -
 .../TimelineMetricAppAggregator.java            |    1 +
 .../TimelineMetricClusterAggregator.java        |   13 +-
 .../TimelineMetricClusterAggregatorSecond.java  |    2 +
 .../TimelineMetricHostAggregator.java           |    1 +
 .../aggregators/TimelineMetricReadHelper.java   |    2 +
 .../TimelineMetricMetadataManager.java          |   38 +
 .../discovery/TimelineMetricMetadataSync.java   |   57 +
 .../timeline/query/PhoenixTransactSQL.java      |   12 +
 .../webapp/TimelineWebServices.java             |   49 +
 .../timeline/ITPhoenixHBaseAccessor.java        |    4 +-
 .../metrics/timeline/MetricTestHelper.java      |    2 +-
 .../timeline/PhoenixHBaseAccessorTest.java      |    4 +-
 .../timeline/TestMetricHostAggregate.java       |    8 +-
 .../timeline/TestTimelineMetricStore.java       |   11 +
 .../TimelineMetricsAggregatorMemorySink.java    |    4 +-
 .../aggregators/ITClusterAggregator.java        |   12 +-
 .../aggregators/ITMetricAggregator.java         |   13 +-
 ...melineMetricClusterAggregatorSecondTest.java |    1 +
 .../timeline/discovery/TestMetadataManager.java |    8 +
 .../timeline/discovery/TestMetadataSync.java    |   12 +
 ambari-metrics/pom.xml                          |    1 +
 ambari-server/conf/unix/install-helper.sh       |   19 +-
 ambari-server/pom.xml                           |   16 +-
 ambari-server/src/main/assemblies/server.xml    |    7 +
 .../ambari/annotations/TransactionalLock.java   |    6 +-
 .../server/actionmanager/ActionDBAccessor.java  |   50 +-
 .../actionmanager/ActionDBAccessorImpl.java     |    5 +-
 .../server/actionmanager/ActionManager.java     |    4 +-
 .../server/actionmanager/ActionScheduler.java   |   25 +-
 .../server/actionmanager/HostRoleCommand.java   |   10 +
 .../ambari/server/actionmanager/Request.java    |   18 +-
 .../server/actionmanager/RequestFactory.java    |    4 +-
 .../ambari/server/actionmanager/Stage.java      |   16 +-
 .../server/actionmanager/StageFactory.java      |    1 -
 .../server/actionmanager/StageFactoryImpl.java  |    4 +-
 .../ambari/server/agent/ComponentStatus.java    |   28 +-
 .../ambari/server/agent/ExecutionCommand.java   |    2 +-
 .../ambari/server/agent/HeartBeatResponse.java  |    3 -
 .../ambari/server/agent/HeartbeatProcessor.java |   20 -
 .../ambari/server/alerts/AlertRunnable.java     |   27 +
 .../alerts/AmbariPerformanceRunnable.java       |    4 +-
 .../alerts/ComponentVersionAlertRunnable.java   |  195 +
 .../server/api/handlers/RequestHandler.java     |    2 +-
 .../api/predicate/expressions/Expression.java   |   14 +-
 .../predicate/operators/LogicalOperator.java    |    2 +-
 .../api/predicate/operators/Operator.java       |    8 +-
 .../predicate/operators/RelationalOperator.java |    2 +-
 .../ambari/server/api/query/JpaSortBuilder.java |    2 +-
 .../apache/ambari/server/api/query/Query.java   |   18 +-
 .../server/api/query/render/Renderer.java       |   12 +-
 .../api/resources/BaseResourceDefinition.java   |    3 +-
 .../RequestScheduleResourceDefinition.java      |    6 +-
 .../server/api/resources/ResourceInstance.java  |   12 +-
 .../api/resources/ResourceInstanceFactory.java  |    2 +-
 .../server/api/rest/BootStrapResource.java      |    2 +-
 .../api/services/AlertDefinitionService.java    |    3 -
 .../api/services/ResultPostProcessor.java       |    2 +-
 .../server/api/services/ResultStatus.java       |    4 +-
 .../api/services/parsers/RequestBodyParser.java |   12 +-
 .../persistence/PersistenceManager.java         |    6 +-
 .../StackAdvisorBlueprintProcessor.java         |   67 +-
 .../stackadvisor/StackAdvisorRequest.java       |    2 +-
 .../commands/StackAdvisorCommandType.java       |    2 +-
 .../apache/ambari/server/api/util/TreeNode.java |   28 +-
 .../ambari/server/bootstrap/BSRunner.java       |    9 +-
 .../server/checks/AbstractCheckDescriptor.java  |   25 +
 .../checks/DatabaseConsistencyCheckHelper.java  |  196 +-
 .../server/checks/RangerSSLConfigCheck.java     |    1 -
 .../ambari/server/checks/ServicesUpCheck.java   |    2 -
 .../ambari/server/checks/UpgradeCheckGroup.java |    2 +-
 .../server/configuration/Configuration.java     |   81 +-
 .../AmbariCustomCommandExecutionHelper.java     |   27 +-
 .../controller/AmbariManagementController.java  |   12 +-
 .../AmbariManagementControllerImpl.java         |   82 +-
 .../controller/AmbariManagementHelper.java      |  175 +
 .../ambari/server/controller/AmbariServer.java  |    9 +-
 .../server/controller/KerberosHelper.java       |    2 +-
 .../server/controller/KerberosHelperImpl.java   |   51 +-
 .../controller/MaintenanceStateHelper.java      |    4 +-
 .../server/controller/RequestRequest.java       |   11 +
 .../controller/ServiceComponentResponse.java    |   37 +-
 .../gsinstaller/ClusterDefinition.java          |  434 --
 .../gsinstaller/GSInstallerClusterProvider.java |   71 -
 .../GSInstallerComponentProvider.java           |   88 -
 .../GSInstallerHostComponentProvider.java       |   99 -
 .../gsinstaller/GSInstallerHostProvider.java    |   86 -
 .../gsinstaller/GSInstallerNoOpProvider.java    |   60 -
 .../gsinstaller/GSInstallerProviderModule.java  |   93 -
 .../GSInstallerResourceProvider.java            |  234 -
 .../gsinstaller/GSInstallerServiceProvider.java |   82 -
 .../gsinstaller/GSInstallerStateProvider.java   |   35 -
 .../internal/AbstractProviderModule.java        |    2 +-
 .../internal/AbstractResourceProvider.java      |    2 +-
 .../internal/ArtifactResourceProvider.java      |   20 +-
 .../BlueprintConfigurationProcessor.java        |  145 +-
 .../internal/ClientConfigResourceProvider.java  |   41 +-
 .../ClusterStackVersionResourceProvider.java    |  153 +-
 .../internal/ComponentResourceProvider.java     |   11 +-
 .../internal/ExportBlueprintRequest.java        |    6 -
 .../internal/HostResourceProvider.java          |    4 +-
 .../HostStackVersionResourceProvider.java       |    9 +-
 .../internal/JobResourceProvider.java           |    8 +-
 .../internal/ObservableResourceProvider.java    |    4 +-
 .../internal/ProvisionClusterRequest.java       |   21 +-
 .../internal/RequestResourceProvider.java       |   96 +-
 .../internal/RequestStageContainer.java         |   11 +-
 .../internal/ResourceProviderObserver.java      |    2 +-
 .../internal/ScaleClusterRequest.java           |    7 -
 .../internal/StageResourceProvider.java         |   89 +-
 .../internal/TaskAttemptResourceProvider.java   |   10 +-
 .../internal/TaskResourceProvider.java          |    3 +
 .../internal/UpgradeResourceProvider.java       |   72 +-
 .../VersionDefinitionResourceProvider.java      |    5 +-
 .../internal/WidgetLayoutResourceProvider.java  |    2 +-
 .../internal/WidgetResourceProvider.java        |    2 +-
 .../internal/WorkflowResourceProvider.java      |    8 +-
 .../server/controller/ivory/IvoryService.java   |   34 +-
 .../controller/jdbc/ConnectionFactory.java      |    2 +-
 .../server/controller/jmx/JMXHostProvider.java  |   10 +-
 .../logging/LogSearchDataRetrievalService.java  |   75 +-
 .../logging/LoggingRequestHelper.java           |    8 +-
 .../logging/LoggingRequestHelperImpl.java       |    6 +
 .../controller/metrics/MetricHostProvider.java  |   10 +-
 .../metrics/MetricsPaddingMethod.java           |    2 +-
 .../metrics/MetricsServiceProvider.java         |    4 +-
 .../controller/predicate/BasePredicate.java     |    2 +-
 .../controller/predicate/PredicateVisitor.java  |   10 +-
 .../predicate/PredicateVisitorAcceptor.java     |    2 +-
 .../spi/ExtendedResourceProvider.java           |    2 +-
 .../server/controller/spi/PageRequest.java      |   10 +-
 .../server/controller/spi/PageResponse.java     |   10 +-
 .../ambari/server/controller/spi/Predicate.java |    2 +-
 .../server/controller/spi/PropertyProvider.java |    4 +-
 .../server/controller/spi/ProviderModule.java   |    4 +-
 .../server/controller/spi/QueryResponse.java    |    8 +-
 .../server/controller/spi/RequestStatus.java    |    8 +-
 .../spi/ResourcePredicateEvaluator.java         |    2 +-
 .../ambari/server/controller/spi/Schema.java    |    4 +-
 .../server/controller/spi/SchemaFactory.java    |    2 +-
 .../server/controller/spi/SortRequest.java      |    6 +-
 .../controller/utilities/StreamProvider.java    |    4 +-
 .../events/AlertDefinitionDisabledEvent.java    |    2 +-
 .../EntityManagerCacheInvalidationEvent.java    |    5 -
 .../alerts/AlertMaintenanceModeListener.java    |   60 +-
 .../listeners/alerts/AlertReceivedListener.java |    2 +-
 .../listeners/upgrade/StackVersionListener.java |   20 +-
 .../server/hooks/users/UserHookService.java     |    3 +-
 .../system/impl/AmbariMetricSinkImpl.java       |   47 +-
 .../server/notifications/DispatchCallback.java  |    4 +-
 .../apache/ambari/server/orm/DBAccessor.java    |   33 +-
 .../ambari/server/orm/DBAccessorImpl.java       |   49 +
 .../server/orm/JPATableGenerationStrategy.java  |    2 +-
 .../orm/cache/ConfigGroupHostMapping.java       |   16 +-
 .../server/orm/cache/HostConfigMapping.java     |   32 +-
 .../ambari/server/orm/dao/ExtensionDAO.java     |    2 +-
 .../ambari/server/orm/dao/ExtensionLinkDAO.java |   39 +-
 .../server/orm/dao/HostComponentStateDAO.java   |   20 +
 .../server/orm/dao/HostRoleCommandDAO.java      |   18 +-
 .../ambari/server/orm/dao/RequestDAO.java       |  264 +-
 .../dao/ServiceComponentDesiredStateDAO.java    |   24 +
 .../server/orm/dao/TopologyHostTaskDAO.java     |   11 +
 .../orm/dao/TopologyLogicalRequestDAO.java      |   12 +
 .../server/orm/dao/TopologyLogicalTaskDAO.java  |   12 +
 .../ambari/server/orm/dao/UpgradeDAO.java       |   30 +-
 .../orm/entities/AlertDefinitionEntity.java     |    2 +-
 .../orm/entities/BlueprintConfiguration.java    |   16 +-
 .../orm/entities/ClusterConfigEntity.java       |   11 +
 .../orm/entities/ExecutionCommandEntity.java    |    5 +
 .../orm/entities/ExtensionLinkEntity.java       |    1 +
 .../orm/entities/HostComponentStateEntity.java  |    7 +-
 .../orm/entities/HostRoleCommandEntity.java     |   27 +-
 .../server/orm/entities/PrivilegeEntity.java    |   10 +
 .../orm/entities/RepositoryVersionEntity.java   |    6 +-
 .../server/orm/entities/RequestEntity.java      |   25 +
 .../entities/RequestOperationLevelEntity.java   |    4 +-
 .../entities/RequestResourceFilterEntity.java   |    5 +
 .../orm/entities/RoleSuccessCriteriaEntity.java |    5 +
 .../ServiceComponentDesiredStateEntity.java     |   19 +
 .../entities/ServiceComponentVersionEntity.java |   26 +-
 .../ambari/server/orm/entities/StageEntity.java |   24 +-
 .../server/orm/entities/StageEntity_.java       |    4 -
 .../orm/entities/TopologyHostRequestEntity.java |    5 +
 .../orm/entities/TopologyHostTaskEntity.java    |   15 +-
 .../entities/TopologyLogicalRequestEntity.java  |    5 +
 .../orm/entities/TopologyLogicalTaskEntity.java |   30 +-
 .../server/orm/entities/UpgradeEntity.java      |    7 +-
 .../server/orm/entities/UpgradeGroupEntity.java |    2 +-
 .../server/orm/entities/UpgradeItemEntity.java  |    5 +
 .../ambari/server/orm/entities/UserEntity.java  |    5 +-
 .../ambari/server/orm/entities/ViewEntity.java  |    9 +
 .../server/orm/entities/ViewInstanceEntity.java |    9 +
 .../server/orm/entities/ViewURLEntity.java      |    1 -
 .../server/orm/helpers/dbms/DbmsHelper.java     |   22 +-
 .../orm/helpers/dbms/GenericDbmsHelper.java     |    8 +
 .../server/orm/helpers/dbms/MySqlHelper.java    |   12 +
 .../server/orm/helpers/dbms/OracleHelper.java   |   12 +
 .../server/orm/helpers/dbms/PostgresHelper.java |   12 +
 .../ambari/server/scheduler/ExecutionJob.java   |   10 +-
 .../server/scheduler/ExecutionScheduler.java    |   16 +-
 .../ambari/server/security/SecurityHelper.java  |    4 +-
 .../AmbariPamAuthenticationProvider.java        |   25 +-
 .../authorization/LdapServerProperties.java     |    4 +-
 .../security/authorization/ResourceType.java    |    2 +-
 .../server/security/authorization/UserName.java |   76 +
 .../server/security/authorization/Users.java    |    4 +-
 .../security/encryption/MasterKeyService.java   |    4 +-
 .../kerberos/KerberosConfigDataFile.java        |   14 +-
 .../kerberos/KerberosIdentityDataFile.java      |   24 +-
 .../upgrades/AbstractUpgradeServerAction.java   |   74 +
 .../upgrades/ComponentVersionCheckAction.java   |    2 +-
 .../upgrades/FinalizeUpgradeAction.java         |   41 +-
 .../FixCapacitySchedulerOrderingPolicy.java     |    5 +
 .../upgrades/UpdateDesiredStackAction.java      |   14 +-
 .../ambari/server/stack/ConfigurationInfo.java  |    6 +-
 .../ambari/server/stack/ExtensionModule.java    |    2 +
 .../stack/QuickLinksConfigurationModule.java    |    2 +-
 .../server/stack/StackDefinitionModule.java     |   16 +-
 .../ambari/server/stack/StackDirectory.java     |    4 +
 .../ambari/server/stack/StackManager.java       |   79 +-
 .../apache/ambari/server/stack/StackModule.java |    6 +-
 .../apache/ambari/server/stack/ThemeModule.java |    2 +-
 .../apache/ambari/server/stack/Validable.java   |   10 +-
 .../ambari/server/stageplanner/RoleGraph.java   |    2 +-
 .../apache/ambari/server/state/AlertState.java  |    4 +
 .../org/apache/ambari/server/state/Cluster.java |   54 +-
 .../server/state/CommandScriptDefinition.java   |    2 +-
 .../org/apache/ambari/server/state/Config.java  |   22 +-
 .../apache/ambari/server/state/ConfigImpl.java  |    2 +-
 .../server/state/CustomCommandDefinition.java   |    5 +
 .../ambari/server/state/ExtensionInfo.java      |   26 +-
 .../ambari/server/state/HostHealthStatus.java   |    2 +-
 .../ambari/server/state/ServiceComponent.java   |   15 +
 .../server/state/ServiceComponentImpl.java      |  166 +-
 .../apache/ambari/server/state/ServiceImpl.java |    2 +-
 .../apache/ambari/server/state/StackInfo.java   |   27 +-
 .../ambari/server/state/UpgradeContext.java     |    9 +
 .../ambari/server/state/UpgradeHelper.java      |    4 +-
 .../server/state/ValueAttributesInfo.java       |    2 +-
 .../ambari/server/state/action/Action.java      |   14 +-
 .../server/state/alert/AlertDefinitionHash.java |    2 -
 .../server/state/cluster/ClusterImpl.java       |  225 +-
 .../server/state/cluster/ClustersImpl.java      |    4 -
 .../server/state/configgroup/ConfigGroup.java   |   32 +-
 .../state/configgroup/ConfigGroupFactory.java   |   15 +-
 .../state/configgroup/ConfigGroupImpl.java      |    8 -
 .../server/state/fsm/MultipleArcTransition.java |    2 +-
 .../server/state/fsm/SingleArcTransition.java   |    2 +-
 .../ambari/server/state/fsm/StateMachine.java   |    6 +-
 .../server/state/fsm/StateMachineFactory.java   |    4 +-
 .../kerberos/AbstractKerberosDescriptor.java    |    2 +-
 .../state/repository/VersionDefinitionXml.java  |   24 +-
 .../state/scheduler/RequestExecution.java       |   56 +-
 .../state/services/MetricsRetrievalService.java |    6 +-
 .../state/stack/ExtensionMetainfoXml.java       |   11 +
 .../state/stack/upgrade/ClusterGrouping.java    |   31 +-
 .../upgrade/ConfigUpgradeChangeDefinition.java  |    3 +-
 .../server/state/stack/upgrade/Grouping.java    |    2 +-
 .../state/stack/upgrade/HostOrderGrouping.java  |    1 -
 .../state/stack/upgrade/StageWrapper.java       |   65 +
 .../ambari/server/state/stack/upgrade/Task.java |    6 +
 .../server/state/stack/upgrade/TaskWrapper.java |   33 +-
 .../state/stack/upgrade/TaskWrapperBuilder.java |    5 +-
 .../state/stack/upgrade/UpgradeFunction.java    |    2 +-
 .../ambari/server/topology/AmbariContext.java   |    3 +
 .../ambari/server/topology/Blueprint.java       |   42 +-
 .../server/topology/BlueprintFactory.java       |    2 +-
 .../ambari/server/topology/BlueprintImpl.java   |   15 +
 .../server/topology/BlueprintValidator.java     |    4 +-
 .../server/topology/BlueprintValidatorImpl.java |   88 +-
 .../topology/ClusterConfigurationRequest.java   |   67 +-
 .../ambari/server/topology/ClusterTopology.java |    2 +
 .../server/topology/ClusterTopologyImpl.java    |   37 +-
 .../ambari/server/topology/HostGroup.java       |   28 +-
 .../ambari/server/topology/LogicalRequest.java  |   38 +-
 .../ambari/server/topology/PersistedState.java  |    7 +
 .../server/topology/PersistedStateImpl.java     |   15 +-
 .../ambari/server/topology/TopologyManager.java |   99 +-
 .../ambari/server/topology/TopologyRequest.java |   22 +-
 .../server/topology/TopologyRequestFactory.java |    2 +-
 .../server/topology/TopologyValidator.java      |    2 +-
 .../server/topology/tasks/TopologyTask.java     |    4 +-
 .../validators/ChainedTopologyValidator.java    |   58 +
 .../validators/HiveServiceValidator.java        |    2 +-
 .../RequiredConfigPropertiesValidator.java      |  188 +
 .../validators/RequiredPasswordValidator.java   |    6 +-
 .../validators/StackConfigTypeValidator.java    |   64 +
 .../validators/TopologyValidatorFactory.java    |   35 +
 .../validators/TopologyValidatorService.java    |   52 +
 .../server/upgrade/AbstractUpgradeCatalog.java  |    5 +-
 .../server/upgrade/SchemaUpgradeHelper.java     |    2 +
 .../server/upgrade/UpgradeCatalog212.java       |    3 -
 .../server/upgrade/UpgradeCatalog250.java       |  100 +-
 .../server/upgrade/UpgradeCatalog251.java       |  169 +
 .../server/upgrade/UpgradeCatalog252.java       |   94 +
 .../server/upgrade/UpgradeCatalog300.java       |   80 +-
 .../apache/ambari/server/utils/StageUtils.java  |    8 +-
 .../server/view/ViewInstanceHandlerList.java    |    4 +-
 .../view/ViewInstanceOperationHandler.java      |   96 +
 .../apache/ambari/server/view/ViewRegistry.java |   57 +-
 .../view/persistence/SchemaManagerFactory.java  |    2 +-
 .../src/main/package/rpm/postinstall.sh         |   18 -
 ambari-server/src/main/python/ambari-server.py  |  307 +-
 .../src/main/python/ambari_server/dbCleanup.py  |   37 +-
 .../python/ambari_server/resourceFilesKeeper.py |   11 +-
 .../python/ambari_server/serverConfiguration.py |    1 +
 .../main/python/ambari_server/serverUpgrade.py  |   31 +-
 .../main/python/ambari_server/setupMpacks.py    |   47 +-
 .../src/main/python/azuredb_create_generator.py |   85 +
 ambari-server/src/main/resources/.gitignore     |    1 +
 .../main/resources/Ambari-DDL-Derby-CREATE.sql  |    7 +-
 .../main/resources/Ambari-DDL-MySQL-CREATE.sql  |    7 +-
 .../main/resources/Ambari-DDL-Oracle-CREATE.sql |    7 +-
 .../resources/Ambari-DDL-Postgres-CREATE.sql    |    7 +-
 .../resources/Ambari-DDL-SQLAnywhere-CREATE.sql |    7 +-
 .../resources/Ambari-DDL-SQLServer-CREATE.sql   |    7 +-
 ambari-server/src/main/resources/alerts.json    |   12 +
 .../configuration/accumulo-logsearch-conf.xml   |  124 -
 .../package/scripts/accumulo_script.py          |   50 -
 .../1.6.1.2.2.0/package/scripts/params.py       |   17 +-
 .../hadoop-metrics2-accumulo.properties.j2      |    3 +
 .../templates/input.config-accumulo.json.j2     |   92 +
 .../configuration/infra-logsearch-conf.xml      |   80 -
 .../0.1.0/package/scripts/infra_solr.py         |    6 +-
 .../0.1.0/package/scripts/params.py             |    1 +
 .../0.1.0/package/scripts/status_params.py      |    6 +
 .../templates/input.config-ambari-infra.json.j2 |   48 +
 .../0.1.0/configuration/ams-env.xml             |    8 +
 .../0.1.0/configuration/ams-logsearch-conf.xml  |  201 -
 .../0.1.0/configuration/ams-site.xml            |   11 +
 .../AMBARI_METRICS/0.1.0/metainfo.xml           |    3 +
 .../HDP/grafana-hbase-misc.json                 |   18 +-
 .../HDP/grafana-hbase-regionservers.json        |   17 +-
 .../HDP/grafana-hdfs-datanodes.json             |   18 +-
 .../HDP/grafana-hdfs-home.json                  |   18 +-
 .../HDP/grafana-hdfs-namenodes.json             |   18 +-
 .../HDP/grafana-hdfs-topn.json                  |   18 +-
 .../HDP/grafana-hive-hivemetastore.json         |   18 +-
 .../HDP/grafana-hive-hiverserver2.json          |   18 +-
 .../HDP/grafana-kafka-hosts.json                |   18 +-
 .../HDP/grafana-llapdaemon-daemons.json         |   17 +-
 .../HDP/grafana-llapdaemon-heatmaps.json        |   17 +-
 .../HDP/grafana-solr-cores-dashboard.json       |   18 +-
 .../HDP/grafana-solr-hosts-dashboard.json       |   18 +-
 .../HDP/grafana-yarn-nodemanagers.json          |   18 +-
 .../HDP/grafana-yarn-resourcemanagers.json      |   18 +-
 .../default/grafana-ambari-server-database.json |   19 +-
 .../default/grafana-ambari-server-topn.json     |   18 +-
 .../default/grafana-ambari-server.json          |   18 +-
 .../default/grafana-ams-hbase-misc.json         |   18 +-
 .../grafana-ams-hbase-regionservers.json        |   17 +-
 .../default/grafana-system-servers.json         |   18 +-
 .../AMBARI_METRICS/0.1.0/package/scripts/ams.py |   30 +
 .../0.1.0/package/scripts/metrics_collector.py  |   66 +-
 .../package/scripts/metrics_grafana_util.py     |   37 +-
 .../0.1.0/package/scripts/params.py             |   18 +-
 .../0.1.0/package/scripts/service_check.py      |   22 +-
 .../hadoop-metrics2-hbase.properties.j2         |    3 +
 .../input.config-ambari-metrics.json.j2         |  169 +
 .../package/templates/metric_monitor.ini.j2     |    9 +
 .../configuration/atlas-logsearch-conf.xml      |   80 -
 .../ATLAS/0.1.0.2.3/package/scripts/metadata.py |   14 +-
 .../package/scripts/metadata_server.py          |   78 -
 .../ATLAS/0.1.0.2.3/package/scripts/params.py   |    3 +
 .../templates/input.config-atlas.json.j2        |   48 +
 .../configuration/application-properties.xml    |   10 +-
 .../ATLAS/0.7.0.2.5/role_command_order.json     |    2 +-
 .../common-services/ATLAS/0.7.0.3.0/alerts.json |   39 +
 .../configuration/application-properties.xml    |  546 ++
 .../ATLAS/0.7.0.3.0/configuration/atlas-env.xml |  182 +
 .../0.7.0.3.0/configuration/atlas-log4j.xml     |  170 +
 .../configuration/atlas-solrconfig.xml          |  641 ++
 .../configuration/ranger-atlas-audit.xml        |  141 +
 .../ranger-atlas-plugin-properties.xml          |  132 +
 .../ranger-atlas-policymgr-ssl.xml              |   73 +
 .../configuration/ranger-atlas-security.xml     |   77 +
 .../ATLAS/0.7.0.3.0/kerberos.json               |  100 +
 .../ATLAS/0.7.0.3.0/metainfo.xml                |  190 +
 .../0.7.0.3.0/package/scripts/atlas_client.py   |   57 +
 .../ATLAS/0.7.0.3.0/package/scripts/metadata.py |  243 +
 .../package/scripts/metadata_server.py          |  187 +
 .../ATLAS/0.7.0.3.0/package/scripts/params.py   |  417 ++
 .../0.7.0.3.0/package/scripts/service_check.py  |   55 +
 .../package/scripts/setup_ranger_atlas.py       |   70 +
 .../0.7.0.3.0/package/scripts/status_params.py  |   60 +
 .../package/templates/atlas_hbase_setup.rb.j2   |   42 +
 .../package/templates/atlas_jaas.conf.j2        |   26 +
 .../package/templates/atlas_kafka_acl.sh.j2     |   41 +
 .../templates/input.config-atlas.json.j2        |   48 +
 .../package/templates/kafka_jaas.conf.j2        |   41 +
 .../ATLAS/0.7.0.3.0/quicklinks/quicklinks.json  |   36 +
 .../ATLAS/0.7.0.3.0/role_command_order.json     |    7 +
 .../ATLAS/0.7.0.3.0/service_advisor.py          |  441 ++
 .../ATLAS/0.7.0.3.0/themes/theme.json           |  619 ++
 .../ATLAS/0.7.0.3.0/themes/theme_version_2.json |  845 +++
 .../configuration/falcon-logsearch-conf.xml     |   80 -
 .../0.5.0.2.1/package/scripts/falcon_client.py  |   10 -
 .../0.5.0.2.1/package/scripts/falcon_server.py  |   59 -
 .../templates/input.config-falcon.json.j2       |   48 +
 .../configuration/flume-logsearch-conf.xml      |   80 -
 .../FLUME/1.4.0.2.0/package/scripts/params.py   |   24 +-
 .../templates/flume-metrics2.properties.j2      |    2 +
 .../templates/input.config-flume.json.j2        |   53 +
 .../configuration/hbase-logsearch-conf.xml      |  111 -
 .../0.96.0.2.0/package/scripts/hbase_master.py  |   49 -
 .../package/scripts/hbase_regionserver.py       |   49 -
 .../0.96.0.2.0/package/scripts/params_linux.py  |   17 +-
 .../package/scripts/phoenix_queryserver.py      |    6 +-
 ...-metrics2-hbase.properties-GANGLIA-MASTER.j2 |    2 +
 ...doop-metrics2-hbase.properties-GANGLIA-RS.j2 |    3 +-
 .../templates/input.config-hbase.json.j2        |   79 +
 .../common-services/HBASE/2.0.0.3.0/alerts.json |  127 +
 .../HBASE/2.0.0.3.0/configuration/hbase-env.xml |  279 +
 .../2.0.0.3.0/configuration/hbase-log4j.xml     |  188 +
 .../2.0.0.3.0/configuration/hbase-policy.xml    |   53 +
 .../2.0.0.3.0/configuration/hbase-site.xml      |  774 ++
 .../configuration/ranger-hbase-audit.xml        |  132 +
 .../ranger-hbase-plugin-properties.xml          |  135 +
 .../ranger-hbase-policymgr-ssl.xml              |   66 +
 .../configuration/ranger-hbase-security.xml     |   74 +
 .../HBASE/2.0.0.3.0/kerberos.json               |  160 +
 .../HBASE/2.0.0.3.0/metainfo.xml                |  232 +
 .../HBASE/2.0.0.3.0/metrics.json                | 4733 +++++++++++++
 .../2.0.0.3.0/package/files/draining_servers.rb |  164 +
 .../package/files/hbase-smoke-cleanup.sh        |   23 +
 .../2.0.0.3.0/package/files/hbaseSmokeVerify.sh |   34 +
 .../HBASE/2.0.0.3.0/package/scripts/__init__.py |   19 +
 .../2.0.0.3.0/package/scripts/functions.py      |   54 +
 .../HBASE/2.0.0.3.0/package/scripts/hbase.py    |  230 +
 .../2.0.0.3.0/package/scripts/hbase_client.py   |   81 +
 .../package/scripts/hbase_decommission.py       |   94 +
 .../2.0.0.3.0/package/scripts/hbase_master.py   |  163 +
 .../package/scripts/hbase_regionserver.py       |  174 +
 .../2.0.0.3.0/package/scripts/hbase_service.py  |   66 +
 .../2.0.0.3.0/package/scripts/hbase_upgrade.py  |   42 +
 .../HBASE/2.0.0.3.0/package/scripts/params.py   |   28 +
 .../2.0.0.3.0/package/scripts/params_linux.py   |  426 ++
 .../2.0.0.3.0/package/scripts/params_windows.py |   43 +
 .../package/scripts/phoenix_queryserver.py      |   92 +
 .../package/scripts/phoenix_service.py          |   56 +
 .../2.0.0.3.0/package/scripts/service_check.py  |   99 +
 .../package/scripts/setup_ranger_hbase.py       |  106 +
 .../2.0.0.3.0/package/scripts/status_params.py  |   68 +
 .../HBASE/2.0.0.3.0/package/scripts/upgrade.py  |  106 +
 .../package/templates/hbase-smoke.sh.j2         |   44 +
 .../2.0.0.3.0/package/templates/hbase.conf.j2   |   35 +
 .../package/templates/hbase_client_jaas.conf.j2 |   23 +
 .../templates/hbase_grant_permissions.j2        |   39 +
 .../package/templates/hbase_master_jaas.conf.j2 |   26 +
 .../templates/hbase_queryserver_jaas.conf.j2    |   26 +
 .../templates/hbase_regionserver_jaas.conf.j2   |   26 +
 .../templates/input.config-hbase.json.j2        |   79 +
 .../package/templates/regionservers.j2          |   20 +
 .../HBASE/2.0.0.3.0/quicklinks/quicklinks.json  |   97 +
 .../HBASE/2.0.0.3.0/role_command_order.json     |   10 +
 .../HBASE/2.0.0.3.0/service_advisor.py          |  675 ++
 .../HBASE/2.0.0.3.0/themes/theme.json           |  407 ++
 .../HBASE/2.0.0.3.0/widgets.json                |  510 ++
 .../configuration/hdfs-logsearch-conf.xml       |  248 -
 .../common-services/HDFS/2.1.0.2.0/metainfo.xml |    6 +-
 .../package/alerts/alert_metrics_deviation.py   |   10 +-
 .../HDFS/2.1.0.2.0/package/scripts/datanode.py  |  103 +-
 .../package/scripts/datanode_upgrade.py         |   38 +-
 .../2.1.0.2.0/package/scripts/hdfs_client.py    |   45 -
 .../2.1.0.2.0/package/scripts/hdfs_namenode.py  |   11 +-
 .../2.1.0.2.0/package/scripts/journalnode.py    |   57 -
 .../HDFS/2.1.0.2.0/package/scripts/namenode.py  |   57 -
 .../2.1.0.2.0/package/scripts/nfsgateway.py     |   58 -
 .../HDFS/2.1.0.2.0/package/scripts/params.py    |    2 +-
 .../2.1.0.2.0/package/scripts/params_linux.py   |    2 +
 .../HDFS/2.1.0.2.0/package/scripts/snamenode.py |   60 -
 .../HDFS/2.1.0.2.0/package/scripts/utils.py     |    5 +-
 .../2.1.0.2.0/package/scripts/zkfc_slave.py     |   43 -
 .../package/templates/input.config-hdfs.json.j2 |  216 +
 .../HDFS/3.0.0.3.0/configuration/hadoop-env.xml |  200 +-
 .../hadoop-metrics2.properties.xml              |    2 +
 .../HDFS/3.0.0.3.0/configuration/hdfs-log4j.xml |  382 +-
 .../common-services/HDFS/3.0.0.3.0/metainfo.xml |   10 +-
 .../HDFS/3.0.0.3.0/package/scripts/datanode.py  |   58 -
 .../3.0.0.3.0/package/scripts/hdfs_client.py    |   45 -
 .../3.0.0.3.0/package/scripts/journalnode.py    |   57 -
 .../HDFS/3.0.0.3.0/package/scripts/namenode.py  |   57 -
 .../3.0.0.3.0/package/scripts/nfsgateway.py     |   58 -
 .../HDFS/3.0.0.3.0/package/scripts/snamenode.py |   60 -
 .../3.0.0.3.0/package/scripts/zkfc_slave.py     |   43 -
 .../HIVE/0.12.0.2.0/configuration/hive-env.xml  |    3 +-
 .../configuration/hive-logsearch-conf.xml       |  117 -
 .../package/alerts/alert_llap_app_status.py     |    4 +-
 .../HIVE/0.12.0.2.0/package/scripts/hive.py     |   25 +-
 .../package/scripts/hive_metastore.py           |   55 +-
 .../0.12.0.2.0/package/scripts/hive_server.py   |   61 -
 .../package/scripts/hive_server_interactive.py  |   64 -
 .../0.12.0.2.0/package/scripts/params_linux.py  |   28 +-
 .../package/scripts/setup_ranger_hive.py        |   58 +
 .../package/scripts/webhcat_server.py           |   67 -
 .../hadoop-metrics2-hivemetastore.properties.j2 |    2 +
 .../hadoop-metrics2-hiveserver2.properties.j2   |    2 +
 .../templates/hadoop-metrics2-llapdaemon.j2     |    4 +-
 .../hadoop-metrics2-llaptaskscheduler.j2        |    4 +-
 .../package/templates/input.config-hive.json.j2 |   85 +
 .../HIVE/2.1.0.3.0/configuration/hcat-env.xml   |   48 +-
 .../HIVE/2.1.0.3.0/configuration/hive-env.xml   |   80 +-
 .../configuration/hive-interactive-env.xml      |   63 +-
 .../common-services/HIVE/2.1.0.3.0/metainfo.xml |   11 +-
 .../package/alerts/alert_llap_app_status.py     |    4 +-
 .../2.1.0.3.0/package/scripts/hive_metastore.py |   55 +-
 .../2.1.0.3.0/package/scripts/hive_server.py    |   61 -
 .../package/scripts/hive_server_interactive.py  |   64 -
 .../2.1.0.3.0/package/scripts/params_linux.py   |   28 +-
 .../package/scripts/setup_ranger_hive.py        |   58 +
 .../2.1.0.3.0/package/scripts/webhcat_server.py |   67 -
 .../hadoop-metrics2-hivemetastore.properties.j2 |    2 +
 .../hadoop-metrics2-hiveserver2.properties.j2   |    2 +
 .../templates/hadoop-metrics2-llapdaemon.j2     |    4 +-
 .../hadoop-metrics2-llaptaskscheduler.j2        |    4 +-
 .../HIVE/2.1.0.3.0/service_advisor.py           |    7 +
 .../KAFKA/0.10.0.3.0/alerts.json                |   32 +
 .../0.10.0.3.0/configuration/kafka-broker.xml   |  559 ++
 .../0.10.0.3.0/configuration/kafka-env.xml      |  111 +
 .../0.10.0.3.0/configuration/kafka-log4j.xml    |  170 +
 .../configuration/kafka_client_jaas_conf.xml    |   41 +
 .../configuration/kafka_jaas_conf.xml           |   59 +
 .../configuration/ranger-kafka-audit.xml        |  130 +
 .../ranger-kafka-plugin-properties.xml          |  148 +
 .../ranger-kafka-policymgr-ssl.xml              |   66 +
 .../configuration/ranger-kafka-security.xml     |   64 +
 .../KAFKA/0.10.0.3.0/kerberos.json              |   76 +
 .../KAFKA/0.10.0.3.0/metainfo.xml               |  109 +
 .../KAFKA/0.10.0.3.0/metrics.json               |  239 +
 .../KAFKA/0.10.0.3.0/package/scripts/kafka.py   |  276 +
 .../0.10.0.3.0/package/scripts/kafka_broker.py  |  151 +
 .../KAFKA/0.10.0.3.0/package/scripts/params.py  |  341 +
 .../0.10.0.3.0/package/scripts/service_check.py |   70 +
 .../package/scripts/setup_ranger_kafka.py       |   90 +
 .../0.10.0.3.0/package/scripts/status_params.py |   26 +
 .../KAFKA/0.10.0.3.0/package/scripts/upgrade.py |   78 +
 .../KAFKA/0.10.0.3.0/package/scripts/utils.py   |   38 +
 .../templates/input.config-kafka.json.j2        |   92 +
 .../0.10.0.3.0/package/templates/kafka.conf.j2  |   35 +
 .../package/templates/kafka_client_jaas.conf.j2 |   29 +
 .../package/templates/kafka_jaas.conf.j2        |   41 +
 .../package/templates/tools-log4j.properties.j2 |   21 +
 .../KAFKA/0.10.0.3.0/role_command_order.json    |    7 +
 .../KAFKA/0.10.0.3.0/service_advisor.py         |  363 +
 .../KAFKA/0.10.0.3.0/widgets.json               |  182 +
 .../KAFKA/0.8.1/configuration/kafka-broker.xml  |   23 +-
 .../configuration/kafka-logsearch-conf.xml      |  124 -
 .../KAFKA/0.8.1/package/scripts/kafka_broker.py |    6 +
 .../KAFKA/0.8.1/package/scripts/params.py       |   18 +-
 .../0.8.1/package/scripts/service_check.py      |   15 +-
 .../templates/input.config-kafka.json.j2        |   92 +
 .../KAFKA/0.9.0/configuration/kafka-broker.xml  |    2 +-
 .../package/scripts/kerberos_client.py          |   21 -
 .../0.5.0.2.2/configuration/gateway-site.xml    |    2 +-
 .../configuration/knox-logsearch-conf.xml       |   93 -
 .../0.5.0.2.2/package/scripts/knox_gateway.py   |   61 -
 .../package/templates/input.config-knox.json.j2 |   60 +
 .../common-services/KNOX/0.5.0.3.0/alerts.json  |   32 +
 .../0.5.0.3.0/configuration/admin-topology.xml  |   97 +
 .../0.5.0.3.0/configuration/gateway-log4j.xml   |  110 +
 .../0.5.0.3.0/configuration/gateway-site.xml    |   71 +
 .../KNOX/0.5.0.3.0/configuration/knox-env.xml   |   83 +
 .../configuration/knoxsso-topology.xml          |  126 +
 .../KNOX/0.5.0.3.0/configuration/ldap-log4j.xml |   93 +
 .../configuration/ranger-knox-audit.xml         |  132 +
 .../ranger-knox-plugin-properties.xml           |  132 +
 .../configuration/ranger-knox-policymgr-ssl.xml |   66 +
 .../configuration/ranger-knox-security.xml      |   64 +
 .../KNOX/0.5.0.3.0/configuration/topology.xml   |  174 +
 .../KNOX/0.5.0.3.0/configuration/users-ldif.xml |  140 +
 .../KNOX/0.5.0.3.0/kerberos.json                |   81 +
 .../common-services/KNOX/0.5.0.3.0/metainfo.xml |  109 +
 .../package/files/validateKnoxStatus.py         |   43 +
 .../KNOX/0.5.0.3.0/package/scripts/knox.py      |  192 +
 .../0.5.0.3.0/package/scripts/knox_gateway.py   |  220 +
 .../KNOX/0.5.0.3.0/package/scripts/knox_ldap.py |   59 +
 .../KNOX/0.5.0.3.0/package/scripts/params.py    |   29 +
 .../0.5.0.3.0/package/scripts/params_linux.py   |  457 ++
 .../0.5.0.3.0/package/scripts/params_windows.py |   71 +
 .../0.5.0.3.0/package/scripts/service_check.py  |   96 +
 .../package/scripts/setup_ranger_knox.py        |  121 +
 .../0.5.0.3.0/package/scripts/status_params.py  |   59 +
 .../KNOX/0.5.0.3.0/package/scripts/upgrade.py   |  118 +
 .../package/templates/input.config-knox.json.j2 |   60 +
 .../package/templates/krb5JAASLogin.conf.j2     |   30 +
 .../KNOX/0.5.0.3.0/role_command_order.json      |    7 +
 .../KNOX/0.5.0.3.0/service_advisor.py           |  253 +
 .../configuration/logfeeder-ambari-config.xml   |    1 +
 .../logfeeder-custom-logsearch-conf.xml         |   46 -
 .../configuration/logfeeder-properties.xml      |   10 +
 .../logsearch-common-properties.xml             |   23 +
 .../configuration/logsearch-properties.xml      |   10 -
 .../scripts/logsearch_config_aggregator.py      |   77 -
 .../LOGSEARCH/0.5.0/package/scripts/params.py   |   57 +-
 .../0.5.0/package/scripts/service_check.py      |    9 +-
 .../0.5.0/package/scripts/setup_logfeeder.py    |   15 +-
 .../templates/HadoopServiceConfig.json.j2       |  545 +-
 .../templates/input.config-logsearch.json.j2    |    6 +-
 .../LOGSEARCH/0.5.0/themes/theme.json           |    4 +-
 .../configuration/oozie-logsearch-conf.xml      |   80 -
 .../4.0.0.2.0/package/scripts/oozie_server.py   |   63 -
 .../templates/input.config-oozie.json.j2        |   48 +
 .../common-services/OOZIE/4.2.0.3.0/alerts.json |   45 +
 .../OOZIE/4.2.0.3.0/configuration/oozie-env.xml |  255 +
 .../4.2.0.3.0/configuration/oozie-log4j.xml     |  149 +
 .../4.2.0.3.0/configuration/oozie-site.xml      |  254 +
 .../OOZIE/4.2.0.3.0/kerberos.json               |   70 +
 .../OOZIE/4.2.0.3.0/metainfo.xml                |  203 +
 .../package/alerts/alert_check_oozie_server.py  |  244 +
 .../4.2.0.3.0/package/files/oozieSmoke2.sh      |   84 +
 .../files/prepareOozieHdfsDirectories.sh        |   42 +
 .../4.2.0.3.0/package/files/wrap_ooziedb.sh     |   31 +
 .../scripts/check_oozie_server_status.py        |   38 +
 .../OOZIE/4.2.0.3.0/package/scripts/oozie.py    |  516 ++
 .../4.2.0.3.0/package/scripts/oozie_client.py   |   78 +
 .../4.2.0.3.0/package/scripts/oozie_server.py   |  163 +
 .../package/scripts/oozie_server_upgrade.py     |  237 +
 .../4.2.0.3.0/package/scripts/oozie_service.py  |  188 +
 .../OOZIE/4.2.0.3.0/package/scripts/params.py   |   39 +
 .../4.2.0.3.0/package/scripts/params_linux.py   |  374 +
 .../4.2.0.3.0/package/scripts/params_windows.py |   34 +
 .../4.2.0.3.0/package/scripts/service_check.py  |  140 +
 .../4.2.0.3.0/package/scripts/status_params.py  |   65 +
 .../package/templates/adminusers.txt.j2         |   28 +
 .../templates/input.config-oozie.json.j2        |   48 +
 .../package/templates/oozie-log4j.properties.j2 |   93 +
 .../4.2.0.3.0/package/templates/oozie.conf.j2   |   35 +
 .../package/templates/zkmigrator_jaas.conf.j2   |   26 +
 .../OOZIE/4.2.0.3.0/quicklinks/quicklinks.json  |   45 +
 .../OOZIE/4.2.0.3.0/role_command_order.json     |    9 +
 .../OOZIE/4.2.0.3.0/themes/theme.json           |  116 +
 .../configuration/ranger-logsearch-conf.xml     |  111 -
 .../0.4.0/package/scripts/setup_ranger_xml.py   |  119 +-
 .../templates/input.config-ranger.json.j2       |   79 +
 .../RANGER/0.5.0/role_command_order.json        |    2 +-
 .../RANGER/0.7.0.3.0/alerts.json                |   76 +
 .../0.7.0.3.0/configuration/admin-log4j.xml     |  132 +
 .../configuration/admin-properties.xml          |  163 +
 .../configuration/atlas-tagsync-ssl.xml         |   72 +
 .../configuration/ranger-admin-site.xml         |  785 +++
 .../0.7.0.3.0/configuration/ranger-env.xml      |  513 ++
 .../0.7.0.3.0/configuration/ranger-site.xml     |   30 +
 .../configuration/ranger-solr-configuration.xml |   59 +
 .../ranger-tagsync-policymgr-ssl.xml            |   72 +
 .../configuration/ranger-tagsync-site.xml       |  206 +
 .../configuration/ranger-ugsync-site.xml        |  574 ++
 .../tagsync-application-properties.xml          |   62 +
 .../0.7.0.3.0/configuration/tagsync-log4j.xml   |   90 +
 .../0.7.0.3.0/configuration/usersync-log4j.xml  |   89 +
 .../configuration/usersync-properties.xml       |   32 +
 .../RANGER/0.7.0.3.0/kerberos.json              |  153 +
 .../RANGER/0.7.0.3.0/metainfo.xml               |  189 +
 .../alerts/alert_ranger_admin_passwd_check.py   |  195 +
 .../RANGER/0.7.0.3.0/package/scripts/params.py  |  448 ++
 .../0.7.0.3.0/package/scripts/ranger_admin.py   |  217 +
 .../0.7.0.3.0/package/scripts/ranger_service.py |   69 +
 .../0.7.0.3.0/package/scripts/ranger_tagsync.py |  139 +
 .../package/scripts/ranger_usersync.py          |  124 +
 .../0.7.0.3.0/package/scripts/service_check.py  |   49 +
 .../0.7.0.3.0/package/scripts/setup_ranger.py   |  153 +
 .../package/scripts/setup_ranger_xml.py         |  853 +++
 .../0.7.0.3.0/package/scripts/status_params.py  |   39 +
 .../RANGER/0.7.0.3.0/package/scripts/upgrade.py |   31 +
 .../templates/input.config-ranger.json.j2       |   79 +
 .../package/templates/ranger_admin_pam.j2       |   22 +
 .../package/templates/ranger_remote_pam.j2      |   22 +
 .../package/templates/ranger_solr_jaas_conf.j2  |   26 +
 .../properties/ranger-solrconfig.xml.j2         | 1874 +++++
 .../RANGER/0.7.0.3.0/quicklinks/quicklinks.json |   41 +
 .../RANGER/0.7.0.3.0/role_command_order.json    |    9 +
 .../RANGER/0.7.0.3.0/service_advisor.py         |  793 +++
 .../0.7.0.3.0/themes/theme_version_1.json       |  722 ++
 .../0.7.0.3.0/themes/theme_version_2.json       | 1470 ++++
 .../0.7.0.3.0/themes/theme_version_3.json       |  692 ++
 .../0.7.0.3.0/themes/theme_version_5.json       |   48 +
 .../RANGER/0.7.0/configuration/ranger-env.xml   |   22 +
 .../0.7.0/properties/ranger-solrconfig.xml.j2   |    9 +-
 .../RANGER/0.7.0/themes/theme_version_5.json    |   26 +
 .../configuration/ranger-kms-logsearch-conf.xml |   80 -
 .../RANGER_KMS/0.5.0.2.3/metainfo.xml           |    9 +
 .../RANGER_KMS/0.5.0.2.3/package/scripts/kms.py |   20 +
 .../0.5.0.2.3/package/scripts/params.py         |   34 +-
 .../templates/input.config-ranger-kms.json.j2   |   48 +
 .../0.5.0.2.3/role_command_order.json           |    2 +-
 .../RANGER_KMS/0.5.0.3.0/alerts.json            |   32 +
 .../0.5.0.3.0/configuration/dbks-site.xml       |  206 +
 .../0.5.0.3.0/configuration/kms-env.xml         |  116 +
 .../0.5.0.3.0/configuration/kms-log4j.xml       |  120 +
 .../0.5.0.3.0/configuration/kms-properties.xml  |  166 +
 .../0.5.0.3.0/configuration/kms-site.xml        |  133 +
 .../configuration/ranger-kms-audit.xml          |  124 +
 .../configuration/ranger-kms-policymgr-ssl.xml  |   68 +
 .../configuration/ranger-kms-security.xml       |   64 +
 .../0.5.0.3.0/configuration/ranger-kms-site.xml |  104 +
 .../RANGER_KMS/0.5.0.3.0/kerberos.json          |   84 +
 .../RANGER_KMS/0.5.0.3.0/metainfo.xml           |  115 +
 .../RANGER_KMS/0.5.0.3.0/package/scripts/kms.py |  677 ++
 .../0.5.0.3.0/package/scripts/kms_server.py     |  117 +
 .../0.5.0.3.0/package/scripts/kms_service.py    |   58 +
 .../0.5.0.3.0/package/scripts/params.py         |  331 +
 .../0.5.0.3.0/package/scripts/service_check.py  |   41 +
 .../0.5.0.3.0/package/scripts/status_params.py  |   36 +
 .../0.5.0.3.0/package/scripts/upgrade.py        |   30 +
 .../templates/input.config-ranger-kms.json.j2   |   48 +
 .../0.5.0.3.0/role_command_order.json           |    7 +
 .../RANGER_KMS/0.5.0.3.0/service_advisor.py     |  281 +
 .../0.5.0.3.0/themes/theme_version_1.json       |  303 +
 .../0.5.0.3.0/themes/theme_version_2.json       |  124 +
 .../common-services/SPARK/1.2.1/alerts.json     |   48 +
 .../configuration/spark-logsearch-conf.xml      |   98 -
 .../scripts/alerts/alert_spark_livy_port.py     |  148 +
 .../scripts/alerts/alert_spark_thrift_port.py   |  151 +
 .../SPARK/1.2.1/package/scripts/params.py       |    3 +-
 .../1.2.1/package/scripts/service_check.py      |    2 +-
 .../templates/input.config-spark.json.j2        |   66 +
 .../SPARK/1.2.1/quicklinks/quicklinks.json      |    1 +
 .../common-services/SPARK/2.2.0/metainfo.xml    |   13 +-
 .../2.2.0/package/scripts/job_history_server.py |  108 +
 .../SPARK/2.2.0/package/scripts/livy_server.py  |  151 +
 .../SPARK/2.2.0/package/scripts/livy_service.py |   48 +
 .../SPARK/2.2.0/package/scripts/params.py       |  268 +
 .../2.2.0/package/scripts/service_check.py      |   62 +
 .../SPARK/2.2.0/package/scripts/setup_livy.py   |   88 +
 .../SPARK/2.2.0/package/scripts/setup_spark.py  |  116 +
 .../SPARK/2.2.0/package/scripts/spark_client.py |   62 +
 .../2.2.0/package/scripts/spark_service.py      |  146 +
 .../package/scripts/spark_thrift_server.py      |   91 +
 .../2.2.0/package/scripts/status_params.py      |   45 +
 .../SPARK/2.2.0/scripts/job_history_server.py   |  106 -
 .../SPARK/2.2.0/scripts/livy_server.py          |  149 -
 .../SPARK/2.2.0/scripts/livy_service.py         |   48 -
 .../SPARK/2.2.0/scripts/params.py               |  266 -
 .../SPARK/2.2.0/scripts/service_check.py        |   62 -
 .../SPARK/2.2.0/scripts/setup_livy.py           |   88 -
 .../SPARK/2.2.0/scripts/setup_spark.py          |  116 -
 .../SPARK/2.2.0/scripts/spark_client.py         |   60 -
 .../SPARK/2.2.0/scripts/spark_service.py        |  145 -
 .../SPARK/2.2.0/scripts/spark_thrift_server.py  |   89 -
 .../SPARK/2.2.0/scripts/status_params.py        |   45 -
 .../common-services/SPARK2/2.0.0/alerts.json    |   48 +
 .../configuration/spark2-logsearch-conf.xml     |   98 -
 .../scripts/alerts/alert_spark2_livy_port.py    |  148 +
 .../scripts/alerts/alert_spark2_thrift_port.py  |  152 +
 .../SPARK2/2.0.0/package/scripts/params.py      |    3 +-
 .../2.0.0/package/scripts/service_check.py      |    2 +-
 .../templates/input.config-spark2.json.j2       |   66 +
 .../SPARK2/2.0.0/quicklinks/quicklinks.json     |    1 +
 .../sqoop-atlas-application.properties.xml      |   47 +
 .../SQOOP/1.4.4.3.0/configuration/sqoop-env.xml |   87 +
 .../1.4.4.3.0/configuration/sqoop-site.xml      |   38 +
 .../SQOOP/1.4.4.3.0/kerberos.json               |   20 +
 .../SQOOP/1.4.4.3.0/metainfo.xml                |  115 +
 .../SQOOP/1.4.4.3.0/package/scripts/__init__.py |   19 +
 .../SQOOP/1.4.4.3.0/package/scripts/params.py   |   27 +
 .../1.4.4.3.0/package/scripts/params_linux.py   |  135 +
 .../1.4.4.3.0/package/scripts/params_windows.py |   30 +
 .../1.4.4.3.0/package/scripts/service_check.py  |   62 +
 .../SQOOP/1.4.4.3.0/package/scripts/sqoop.py    |  124 +
 .../1.4.4.3.0/package/scripts/sqoop_client.py   |   66 +
 .../SQOOP/1.4.4.3.0/role_command_order.json     |    6 +
 .../SQOOP/1.4.4.3.0/service_advisor.py          |  197 +
 .../STORM/0.9.1/configuration/storm-env.xml     |   11 +
 .../configuration/storm-logsearch-conf.xml      |  110 -
 .../STORM/0.9.1/package/scripts/drpc_server.py  |   52 -
 .../STORM/0.9.1/package/scripts/nimbus.py       |   45 -
 .../STORM/0.9.1/package/scripts/pacemaker.py    |   52 -
 .../STORM/0.9.1/package/scripts/params_linux.py |   14 +-
 .../STORM/0.9.1/package/scripts/ui_server.py    |   53 -
 .../0.9.1/package/templates/config.yaml.j2      |    2 +
 .../templates/input.config-storm.json.j2        |   78 +
 .../templates/storm-metrics2.properties.j2      |    2 +
 .../0.9.1/package/templates/storm_jaas.conf.j2  |    8 +
 .../common-services/STORM/1.0.1.3.0/alerts.json |  145 +
 .../configuration/ranger-storm-audit.xml        |  133 +
 .../ranger-storm-plugin-properties.xml          |  121 +
 .../ranger-storm-policymgr-ssl.xml              |   70 +
 .../configuration/ranger-storm-security.xml     |   67 +
 .../storm-atlas-application.properties.xml      |   31 +
 .../configuration/storm-cluster-log4j.xml       |  133 +
 .../STORM/1.0.1.3.0/configuration/storm-env.xml |  165 +
 .../1.0.1.3.0/configuration/storm-site.xml      | 1002 +++
 .../configuration/storm-worker-log4j.xml        |  189 +
 .../STORM/1.0.1.3.0/kerberos.json               |  134 +
 .../STORM/1.0.1.3.0/metainfo.xml                |  179 +
 .../STORM/1.0.1.3.0/metrics.json                | 1202 ++++
 .../alerts/check_supervisor_process_win.py      |   50 +
 .../STORM/1.0.1.3.0/package/files/wordCount.jar |  Bin 0 -> 690588 bytes
 .../1.0.1.3.0/package/scripts/drpc_server.py    |   91 +
 .../STORM/1.0.1.3.0/package/scripts/nimbus.py   |  116 +
 .../1.0.1.3.0/package/scripts/nimbus_prod.py    |   81 +
 .../1.0.1.3.0/package/scripts/pacemaker.py      |   90 +
 .../STORM/1.0.1.3.0/package/scripts/params.py   |   28 +
 .../1.0.1.3.0/package/scripts/params_linux.py   |  424 ++
 .../1.0.1.3.0/package/scripts/params_windows.py |   60 +
 .../STORM/1.0.1.3.0/package/scripts/rest_api.py |   85 +
 .../STORM/1.0.1.3.0/package/scripts/service.py  |   95 +
 .../1.0.1.3.0/package/scripts/service_check.py  |   79 +
 .../package/scripts/setup_ranger_storm.py       |  133 +
 .../1.0.1.3.0/package/scripts/status_params.py  |   83 +
 .../STORM/1.0.1.3.0/package/scripts/storm.py    |  182 +
 .../1.0.1.3.0/package/scripts/storm_upgrade.py  |  177 +
 .../package/scripts/storm_yaml_utils.py         |   53 +
 .../1.0.1.3.0/package/scripts/supervisor.py     |  117 +
 .../package/scripts/supervisor_prod.py          |   84 +
 .../package/scripts/supervisord_service.py      |   33 +
 .../1.0.1.3.0/package/scripts/ui_server.py      |  137 +
 .../package/templates/client_jaas.conf.j2       |   33 +
 .../1.0.1.3.0/package/templates/config.yaml.j2  |   72 +
 .../templates/input.config-storm.json.j2        |   78 +
 .../templates/storm-metrics2.properties.j2      |   32 +
 .../1.0.1.3.0/package/templates/storm.conf.j2   |   35 +
 .../package/templates/storm_jaas.conf.j2        |   65 +
 .../package/templates/worker-launcher.cfg.j2    |   19 +
 .../STORM/1.0.1.3.0/quicklinks/quicklinks.json  |   45 +
 .../STORM/1.0.1.3.0/role_command_order.json     |   13 +
 .../STORM/1.0.1.3.0/service_advisor.py          |  387 +
 .../STORM/1.0.1.3.0/widgets.json                |  127 +
 .../STORM/1.1.0/configuration/storm-site.xml    |   44 +
 .../common-services/STORM/1.1.0/kerberos.json   |  138 +
 .../common-services/STORM/1.1.0/metainfo.xml    |   44 +
 .../mapred-logsearch-conf.xml                   |   80 -
 .../configuration/yarn-logsearch-conf.xml       |  104 -
 .../scripts/application_timeline_server.py      |   61 -
 .../2.1.0.2.0/package/scripts/historyserver.py  |   56 -
 .../2.1.0.2.0/package/scripts/nodemanager.py    |   60 -
 .../package/scripts/resourcemanager.py          |   60 -
 .../YARN/2.1.0.2.0/package/scripts/yarn.py      |   36 +-
 .../templates/input.config-mapreduce2.json.j2   |   48 +
 .../package/templates/input.config-yarn.json.j2 |   72 +
 .../YARN/3.0.0.3.0/configuration/yarn-env.xml   |  206 +-
 .../YARN/3.0.0.3.0/configuration/yarn-log4j.xml |  126 +-
 .../YARN/3.0.0.3.0/configuration/yarn-site.xml  |   19 +-
 .../common-services/YARN/3.0.0.3.0/metainfo.xml |    4 +-
 .../scripts/application_timeline_server.py      |   61 -
 .../3.0.0.3.0/package/scripts/historyserver.py  |   56 -
 .../3.0.0.3.0/package/scripts/nodemanager.py    |   60 -
 .../package/scripts/resourcemanager.py          |   60 -
 .../YARN/3.0.0.3.0/package/scripts/yarn.py      |   36 +-
 .../YARN/3.0.0.3.0/service_advisor.py           |  108 +
 .../configuration/zeppelin-logsearch-conf.xml   |   80 -
 .../0.6.0.2.5/package/scripts/master.py         |    6 +
 .../templates/input.config-zeppelin.json.j2     |   48 +
 .../3.4.5/configuration/zookeeper-log4j.xml     |    2 +-
 .../configuration/zookeeper-logsearch-conf.xml  |   76 -
 .../3.4.5/package/scripts/zookeeper_server.py   |   51 -
 .../templates/input.config-zookeeper.json.j2    |   46 +
 .../custom_actions/scripts/install_packages.py  |    2 +-
 .../custom_actions/scripts/ru_execute_tasks.py  |    2 +
 .../src/main/resources/properties.json          |   10 +-
 .../scripts/check_ambari_permissions.py         |   25 +-
 .../scripts/relocate_host_components.py         |  489 --
 .../0.8/services/HDFS/package/scripts/params.py |    2 +-
 .../HIVE/package/scripts/mysql_service.py       |    5 +-
 .../HIVE/package/scripts/postgresql_service.py  |    5 +-
 .../2.0.6/hooks/after-INSTALL/scripts/params.py |   14 +
 .../scripts/shared_initialization.py            |   17 +
 .../before-ANY/scripts/shared_initialization.py |    4 +-
 .../2.0.6/hooks/before-START/scripts/params.py  |   16 +-
 .../templates/hadoop-metrics2.properties.j2     |    2 +
 .../HDP/2.0.6/properties/stack_features.json    |   21 +
 .../stacks/HDP/2.1/services/stack_advisor.py    |   11 +-
 .../services/YARN/configuration/yarn-site.xml   |    8 +-
 .../stacks/HDP/2.2/services/stack_advisor.py    |   61 +-
 .../stacks/HDP/2.3/role_command_order.json      |    4 +-
 .../stacks/HDP/2.3/services/stack_advisor.py    |   35 +-
 .../stacks/HDP/2.3/upgrades/config-upgrade.xml  |   31 +-
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.3.xml |   75 +-
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.4.xml |   73 +-
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml |   77 +-
 .../HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml |   77 +-
 .../stacks/HDP/2.3/upgrades/upgrade-2.3.xml     |    8 +-
 .../stacks/HDP/2.3/upgrades/upgrade-2.4.xml     |    5 +-
 .../stacks/HDP/2.3/upgrades/upgrade-2.5.xml     |    6 +-
 .../stacks/HDP/2.3/upgrades/upgrade-2.6.xml     |    6 +-
 .../stacks/HDP/2.4/upgrades/config-upgrade.xml  |   31 +-
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.4.xml |   73 +-
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml |   77 +-
 .../HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml |   79 +-
 .../stacks/HDP/2.4/upgrades/upgrade-2.4.xml     |    8 +-
 .../stacks/HDP/2.4/upgrades/upgrade-2.5.xml     |    4 +-
 .../stacks/HDP/2.4/upgrades/upgrade-2.6.xml     |    4 +-
 .../services/ATLAS/configuration/atlas-env.xml  |    2 +-
 .../stacks/HDP/2.5/services/stack_advisor.py    |   28 +
 .../stacks/HDP/2.5/upgrades/config-upgrade.xml  |  302 +-
 .../HDP/2.5/upgrades/host-upgrade-2.5.xml       |   50 +-
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.5.xml |   87 +-
 .../HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml |  125 +-
 .../stacks/HDP/2.5/upgrades/upgrade-2.5.xml     |   10 +-
 .../stacks/HDP/2.5/upgrades/upgrade-2.6.xml     |    8 +-
 .../services/ATLAS/configuration/atlas-env.xml  |   41 +
 .../hadoop-metrics2.properties.xml              |    2 +
 .../configuration/hive-interactive-site.xml     |   11 +-
 .../HIVE/configuration/tez-interactive-site.xml |   37 +
 .../stacks/HDP/2.6/services/STORM/metainfo.xml  |    4 +
 .../services/YARN/configuration/yarn-env.xml    |   18 +
 .../services/YARN/configuration/yarn-site.xml   |   22 +
 .../stacks/HDP/2.6/services/stack_advisor.py    |  122 +-
 .../stacks/HDP/2.6/upgrades/config-upgrade.xml  |   30 +
 .../HDP/2.6/upgrades/host-upgrade-2.6.xml       |   48 +-
 .../HDP/2.6/upgrades/nonrolling-upgrade-2.6.xml |   87 +-
 .../stacks/HDP/2.6/upgrades/upgrade-2.6.xml     |    9 +-
 .../before-ANY/scripts/shared_initialization.py |    4 +-
 .../3.0/hooks/before-START/scripts/params.py    |   16 +-
 .../templates/hadoop-metrics2.properties.j2     |    2 +
 .../stacks/HDP/3.0/services/ATLAS/metainfo.xml  |   27 +
 .../stacks/HDP/3.0/services/HBASE/metainfo.xml  |   26 +
 .../services/HDFS/configuration/hadoop-env.xml  |    2 +-
 .../stacks/HDP/3.0/services/KAFKA/metainfo.xml  |   27 +
 .../stacks/HDP/3.0/services/KNOX/metainfo.xml   |   27 +
 .../stacks/HDP/3.0/services/OOZIE/metainfo.xml  |   27 +
 .../stacks/HDP/3.0/services/RANGER/metainfo.xml |   27 +
 .../HDP/3.0/services/RANGER_KMS/metainfo.xml    |   27 +
 .../stacks/HDP/3.0/services/SQOOP/metainfo.xml  |   27 +
 .../stacks/HDP/3.0/services/STORM/metainfo.xml  |   27 +
 .../YARN/configuration-mapred/mapred-env.xml    |    2 +-
 .../YARN/configuration-mapred/mapred-site.xml   |   12 +-
 .../configuration/hbase-logsearch-conf.xml      |  111 -
 .../templates/input.config-hbase.json.j2        |   79 +
 .../configuration/hdfs-logsearch-conf.xml       |  248 -
 .../package/templates/input.config-hdfs.json.j2 |  216 +
 .../KERBEROS/package/scripts/kerberos_client.py |   21 -
 .../src/main/resources/upgrade-pack.xsd         |    1 +
 .../src/main/sh/azuredb_create_generator.sh     |   26 +
 .../ExecutionCommandWrapperTest.java            |    4 +-
 .../ambari/server/actionmanager/StageTest.java  |    2 +-
 .../actionmanager/TestActionDBAccessorImpl.java |   34 +-
 .../server/actionmanager/TestActionManager.java |   44 +-
 .../actionmanager/TestActionScheduler.java      |   43 +-
 .../ambari/server/actionmanager/TestStage.java  |    5 +-
 .../server/agent/HeartbeatProcessorTest.java    |   11 +-
 .../server/agent/HeartbeatTestHelper.java       |    4 +-
 .../server/agent/TestHeartbeatHandler.java      |   17 +-
 .../ComponentVersionAlertRunnableTest.java      |  362 +
 .../server/api/query/JpaSortBuilderTest.java    |    4 -
 .../render/ClusterBlueprintRendererTest.java    |   38 +-
 .../resources/BaseResourceDefinitionTest.java   |    2 +-
 .../server/api/services/AmbariMetaInfoTest.java |   14 +-
 .../StackAdvisorBlueprintProcessorTest.java     |   10 +-
 .../checks/AbstractCheckDescriptorTest.java     |   87 +-
 .../DatabaseConsistencyCheckHelperTest.java     |   73 +-
 ...duce2JobHistoryStatePreservingCheckTest.java |   15 +
 .../checks/ServiceCheckValidityCheckTest.java   |    1 -
 .../ServicesNamenodeTruncateCheckTest.java      |   17 +
 .../AmbariManagementControllerImplTest.java     |    6 +-
 .../AmbariManagementControllerTest.java         |   27 +-
 .../server/controller/KerberosHelperTest.java   |  105 +-
 .../GSInstallerClusterProviderTest.java         |  104 -
 .../GSInstallerComponentProviderTest.java       |  102 -
 .../GSInstallerHostComponentProviderTest.java   |  149 -
 .../GSInstallerHostProviderTest.java            |  153 -
 .../GSInstallerNoOpProviderTest.java            |   46 -
 .../GSInstallerServiceProviderTest.java         |  166 -
 .../TestGSInstallerStateProvider.java           |   36 -
 .../AbstractJDBCResourceProviderTest.java       |    2 +-
 .../BlueprintConfigurationProcessorTest.java    |  720 +-
 .../internal/CalculatedStatusTest.java          |    2 +-
 ...ClusterStackVersionResourceProviderTest.java |  284 +-
 .../internal/ComponentResourceProviderTest.java |   28 +-
 .../internal/HostResourceProviderTest.java      |    5 +-
 .../internal/ProvisionClusterRequestTest.java   |   32 -
 .../controller/internal/RequestImplTest.java    |    4 +-
 .../internal/RequestResourceProviderTest.java   |   68 +-
 .../internal/RequestStageContainerTest.java     |    2 +-
 .../internal/ScaleClusterRequestTest.java       |    6 -
 .../internal/TaskResourceProviderTest.java      |    8 +
 .../internal/UpgradeResourceProviderTest.java   |   66 +-
 .../LogSearchDataRetrievalServiceTest.java      |  248 +-
 .../logging/LoggingRequestHelperImplTest.java   |    9 +
 .../credentialapi/CredentialUtilTest.java       |    1 -
 .../apache/ambari/server/events/EventsTest.java |    4 -
 .../AlertMaintenanceModeListenerTest.java       |    4 +
 .../HostVersionOutOfSyncListenerTest.java       |   42 +-
 .../server/hooks/users/UserHookServiceTest.java |    4 +-
 .../metadata/AgentAlertDefinitionsTest.java     |    2 +-
 .../system/impl/TestAmbariMetricsSinkImpl.java  |   10 +
 .../apache/ambari/server/orm/OrmTestHelper.java |   13 +-
 .../server/orm/dao/HostRoleCommandDAOTest.java  |    2 -
 .../ambari/server/orm/dao/UserDAOTest.java      |    3 +-
 .../orm/entities/HostRoleCommandEntityTest.java |   49 +
 .../server/security/SecurityHelperImplTest.java |    3 +-
 ...ariAuthorizationProviderDisableUserTest.java |    2 +-
 .../AmbariLocalUserProviderTest.java            |    2 +-
 .../AmbariPamAuthenticationProviderTest.java    |   47 +-
 .../AmbariUserAuthenticationFilterTest.java     |    2 +-
 .../security/authorization/UserNameTest.java    |   70 +
 .../security/authorization/UsersTest.java       |    2 +-
 .../ldap/AmbariLdapDataPopulatorTest.java       |    3 +-
 .../serveraction/ServerActionExecutorTest.java  |    9 +-
 .../ComponentVersionCheckActionTest.java        |   69 +-
 .../QuickLinksConfigurationModuleTest.java      |   10 +
 .../stack/StackManagerCommonServicesTest.java   |    4 +-
 .../server/stack/StackManagerExtensionTest.java |   73 +-
 .../server/stack/StackManagerMiscTest.java      |   13 +-
 .../ambari/server/stack/StackManagerMock.java   |    5 +-
 .../ambari/server/stack/StackManagerTest.java   |   33 +-
 .../ambari/server/stack/ThemeModuleTest.java    |   12 +-
 .../server/stageplanner/TestStagePlanner.java   |    2 +-
 .../server/state/ServiceComponentTest.java      |   72 +
 .../ambari/server/state/UpgradeHelperTest.java  |   36 +-
 .../state/alerts/AlertDefinitionHashTest.java   |    2 +-
 .../state/alerts/AlertEventPublisherTest.java   |    3 -
 .../state/alerts/InitialAlertEventTest.java     |    3 -
 .../state/cluster/AlertDataManagerTest.java     |    4 +-
 .../cluster/ClusterEffectiveVersionTest.java    |    2 +
 .../server/state/cluster/ClusterTest.java       |   62 +-
 ...omponentHostConcurrentWriteDeadlockTest.java |    4 -
 .../server/topology/BlueprintImplTest.java      |   13 -
 .../ClusterConfigurationRequestTest.java        |   18 +-
 .../ClusterDeployWithStartOnlyTest.java         |   38 +-
 ...InstallWithoutStartOnComponentLevelTest.java |   34 +-
 .../ClusterInstallWithoutStartTest.java         |   38 +-
 .../topology/ClusterTopologyImplTest.java       |   57 +-
 .../server/topology/LogicalRequestTest.java     |   64 +
 .../topology/RequiredPasswordValidatorTest.java |  113 +-
 .../server/topology/TopologyManagerTest.java    |   14 +-
 .../validators/HiveServiceValidatorTest.java    |    3 +
 .../RequiredConfigPropertiesValidatorTest.java  |  302 +
 .../StackConfigTypeValidatorTest.java           |  126 +
 .../ambari/server/upgrade/SectionDDL.java       |    4 +-
 .../server/upgrade/UpgradeCatalog212Test.java   |   34 +-
 .../server/upgrade/UpgradeCatalog240Test.java   |    3 +-
 .../server/upgrade/UpgradeCatalog250Test.java   |   28 +-
 .../server/upgrade/UpgradeCatalog251Test.java   |  263 +
 .../server/upgrade/UpgradeCatalog252Test.java   |  166 +
 .../server/upgrade/UpgradeCatalog300Test.java   |  139 +
 .../ambari/server/utils/StageUtilsTest.java     |    2 +-
 .../view/ViewInstanceOperationHandlerTest.java  |  105 +
 .../ambari/server/view/ViewRegistryTest.java    |   38 +-
 .../src/test/python/TestAmbariServer.py         |  409 +-
 ambari-server/src/test/python/TestMpacks.py     |   17 +-
 .../src/test/python/TestResourceFilesKeeper.py  |   29 +-
 .../stacks/2.0.6/HBASE/test_hbase_master.py     |  102 -
 .../2.0.6/HBASE/test_hbase_regionserver.py      |  104 -
 .../python/stacks/2.0.6/HDFS/test_datanode.py   |  177 +-
 .../stacks/2.0.6/HDFS/test_hdfs_client.py       |  110 +-
 .../stacks/2.0.6/HDFS/test_journalnode.py       |  114 -
 .../python/stacks/2.0.6/HDFS/test_namenode.py   |  114 -
 .../python/stacks/2.0.6/HDFS/test_nfsgateway.py |  116 -
 .../python/stacks/2.0.6/HDFS/test_snamenode.py  |  117 +-
 .../test/python/stacks/2.0.6/HDFS/test_zkfc.py  |  102 +-
 .../stacks/2.0.6/HIVE/test_hive_server.py       |  112 -
 .../stacks/2.0.6/HIVE/test_webhcat_server.py    |  116 -
 .../stacks/2.0.6/OOZIE/test_oozie_server.py     |  113 -
 .../stacks/2.0.6/YARN/test_historyserver.py     |  304 +-
 .../stacks/2.0.6/YARN/test_nodemanager.py       |  305 +-
 .../stacks/2.0.6/YARN/test_resourcemanager.py   |  160 +-
 .../2.0.6/ZOOKEEPER/test_zookeeper_server.py    |  103 -
 .../python/stacks/2.0.6/configs/default.json    |    4 +-
 .../hooks/after-INSTALL/test_after_install.py   |   25 +-
 .../stacks/2.1/FALCON/test_falcon_client.py     |   24 -
 .../stacks/2.1/FALCON/test_falcon_server.py     |  109 -
 .../stacks/2.1/HIVE/test_hive_metastore.py      |  120 +-
 .../stacks/2.1/STORM/test_storm_drpc_server.py  |  104 -
 .../stacks/2.1/STORM/test_storm_nimbus.py       |  103 -
 .../stacks/2.1/STORM/test_storm_ui_server.py    |   82 -
 .../stacks/2.1/YARN/test_apptimelineserver.py   |  150 +-
 .../stacks/2.1/common/test_stack_advisor.py     |    7 +-
 .../python/stacks/2.2/KNOX/test_knox_gateway.py |  102 -
 .../test/python/stacks/2.3/YARN/test_ats_1_5.py |   98 +-
 .../stacks/2.4/AMBARI_INFRA/test_infra_solr.py  |    3 +
 .../stacks/2.4/LOGSEARCH/test_logfeeder.py      |   29 +-
 .../stacks/2.4/LOGSEARCH/test_logsearch.py      |    4 +-
 .../test/python/stacks/2.4/configs/default.json |    3 +
 .../stacks/2.5/ATLAS/test_atlas_server.py       |   42 -
 .../stacks/2.5/RANGER_KMS/test_kms_server.py    |  111 +-
 .../stacks/2.5/common/test_stack_advisor.py     |  415 ++
 .../stacks/2.5/configs/ranger-kms-secured.json  |    2 +-
 .../stacks/2.6/common/test_stack_advisor.py     |  461 +-
 ambari-server/src/test/python/unitTests.py      |    2 +-
 .../resources/extensions/EXT/0.1/metainfo.xml   |    2 +-
 .../resources/extensions/EXT/0.2/metainfo.xml   |    3 +-
 .../resources/extensions/EXT/0.3/metainfo.xml   |   32 +
 .../EXT/0.3/services/OOZIE2/metainfo.xml        |  118 +
 .../services/OOZIE2/themes/broken_theme.json    |    3 +
 .../stacks/HDP/2.1.1/upgrades/upgrade_test.xml  |    2 +-
 .../HDP/2.2.0/upgrades/upgrade_test_checks.xml  |   21 +-
 .../stacks_with_extensions/HDP/0.3/metainfo.xml |   22 +
 .../HDP/0.3/repos/repoinfo.xml                  |   63 +
 .../HDP/0.3/services/HBASE/metainfo.xml         |   26 +
 .../0.3/services/HDFS/configuration/global.xml  |  145 +
 .../services/HDFS/configuration/hadoop-env.xml  |  223 +
 .../services/HDFS/configuration/hbase-site.xml  |  137 +
 .../services/HDFS/configuration/hdfs-log4j.xml  |  199 +
 .../services/HDFS/configuration/hdfs-site.xml   |  396 ++
 .../HDP/0.3/services/HDFS/metainfo.xml          |   30 +
 .../0.3/services/HDFS/package/dummy-script.py   |   20 +
 .../HDP/0.3/services/HIVE/metainfo.xml          |   26 +
 .../HDP/0.3/services/MAPREDUCE/metainfo.xml     |   23 +
 .../HDP/0.3/services/ZOOKEEPER/metainfo.xml     |   26 +
 ambari-web/app/app.js                           |   13 +
 .../global/background_operations_controller.js  |   12 +-
 ambari-web/app/controllers/installer.js         |   29 +-
 .../journalNode/step1_controller.js             |    2 +-
 .../main/admin/stack_and_upgrade_controller.js  |    5 +
 .../manage_alert_notifications_controller.js    |   28 +-
 .../controllers/main/service/add_controller.js  |    3 +
 .../controllers/main/service/info/summary.js    |    2 +-
 .../service/manage_config_groups_controller.js  |   89 +-
 ambari-web/app/controllers/wizard.js            |   44 +-
 .../app/controllers/wizard/step1_controller.js  |    7 +
 .../wizard/step7/assign_master_controller.js    |  291 +-
 .../app/controllers/wizard/step7_controller.js  |    1 +
 .../app/controllers/wizard/step8_controller.js  |  167 +-
 .../app/controllers/wizard/step9_controller.js  |    2 +-
 ambari-web/app/mappers/stack_mapper.js          |    1 +
 ambari-web/app/messages.js                      |   11 +-
 .../app/mixins/common/configs/configs_saver.js  |   32 +-
 .../mixins/wizard/assign_master_components.js   |   77 +-
 .../app/mixins/wizard/wizardHostsLoading.js     |    6 +-
 ambari-web/app/models/stack.js                  |    1 +
 ambari-web/app/routes/add_service_routes.js     |    1 +
 ambari-web/app/routes/installer.js              |    1 +
 ambari-web/app/routes/main.js                   |    2 +-
 ambari-web/app/styles/alerts.less               |   19 +-
 ambari-web/app/styles/application.less          |   17 +-
 ambari-web/app/styles/bootstrap_overrides.less  |    5 +
 .../app/styles/theme/bootstrap-ambari.css       |   75 +-
 ambari-web/app/styles/top-nav.less              |    2 +-
 ambari-web/app/styles/wizard.less               |    3 +
 .../stack_upgrade/stack_upgrade_wizard.hbs      |   24 +-
 .../admin/stack_upgrade/upgrade_version_box.hbs |    3 +
 ambari-web/app/templates/main/alerts.hbs        |   16 +-
 .../main/alerts/create_alert_notification.hbs   |   12 +
 ambari-web/app/templates/wizard/step1.hbs       |    6 +-
 ambari-web/app/templates/wizard/step10.hbs      |    2 +-
 ambari-web/app/templates/wizard/step3.hbs       |    2 +-
 .../wizard/step3/step3_host_warnings_popup.hbs  |    4 +-
 ambari-web/app/templates/wizard/step4.hbs       |   20 +-
 ambari-web/app/templates/wizard/step6.hbs       |    4 +-
 ambari-web/app/templates/wizard/step7.hbs       |    4 +-
 ambari-web/app/templates/wizard/step8.hbs       |    9 +-
 ambari-web/app/templates/wizard/step9.hbs       |    2 +-
 ambari-web/app/utils/ajax/ajax.js               |   19 +-
 ambari-web/app/utils/helper.js                  |    7 +-
 ambari-web/app/utils/host_progress_popup.js     |    2 +-
 .../common/assign_master_components_view.js     |    4 +
 .../widgets/slider_config_widget_view.js        |   17 +-
 .../common/host_progress_popup_body_view.js     |   20 +-
 .../app/views/common/quick_view_link_view.js    |   24 +-
 ambari-web/app/views/main/admin.js              |    2 +-
 .../stack_upgrade/upgrade_version_box_view.js   |    2 +
 ambari-web/app/views/main/menu.js               |    2 +-
 ambari-web/app/views/main/service/item.js       |    6 +-
 .../app/views/main/service/reassign_view.js     |    4 -
 ambari-web/app/views/wizard/step4_view.js       |    7 +-
 .../views/wizard/step9/hostLogPopupBody_view.js |    2 +-
 ambari-web/pom.xml                              |   20 +-
 .../global/background_operations_test.js        |  179 +-
 ambari-web/test/controllers/installer_test.js   |   12 -
 .../journalNode/step1_controller_test.js        |    4 +-
 ...anage_alert_notifications_controller_test.js |  165 +-
 .../main/service/add_controller_test.js         |   54 +-
 .../test/controllers/wizard/step5_test.js       |   86 +-
 .../step7/assign_master_controller_test.js      |  794 ++-
 .../test/controllers/wizard/step8_test.js       |  132 +-
 ambari-web/test/controllers/wizard_test.js      |   30 +-
 .../mixins/common/configs/configs_saver_test.js |   13 +
 ambari-web/test/utils/helper_test.js            |    5 +
 .../widgets/slider_config_widget_view_test.js   |   23 +-
 .../test/views/common/quick_link_view_test.js   |    2 +-
 .../resourceManager/wizard_view_test.js         |   18 +-
 .../views/main/service/reassign_view_test.js    |   12 -
 ambari-web/yarn.lock                            | 4153 +++++++++++
 .../2.0/hooks/before-START/scripts/params.py    |    2 +
 contrib/views/capacity-scheduler/pom.xml        |   32 +-
 .../ui/app/components/capacityInput.js          |    2 +
 .../src/main/resources/ui/yarn.lock             | 1374 ++++
 contrib/views/files/pom.xml                     |   18 +-
 .../view/filebrowser/DownloadService.java       |    4 +-
 .../files/src/main/resources/ui/package.json    |    2 +-
 .../views/files/src/main/resources/ui/yarn.lock | 6041 ++++++++++++++++
 contrib/views/hawq/pom.xml                      |   20 +-
 .../views/hawq/src/main/resources/ui/yarn.lock  | 6665 ++++++++++++++++++
 contrib/views/hive-next/pom.xml                 |   18 +-
 .../ambari/view/hive2/actor/HiveActor.java      |   32 +-
 .../ambari/view/hive2/actor/JdbcConnector.java  |    8 +-
 .../view/hive2/actor/OperationController.java   |    2 +-
 .../view/hive2/resources/files/FileService.java |    8 +-
 .../view/hive2/resources/jobs/JobService.java   |    9 +-
 .../src/main/resources/ui/hive-web/Brocfile.js  |    1 +
 .../ui/hive-web/app/controllers/index.js        |    2 +-
 .../resources/ui/hive-web/app/routes/splash.js  |    2 +-
 .../src/main/resources/ui/hive-web/bower.json   |    3 +-
 .../src/main/resources/ui/hive-web/package.json |    9 +-
 .../ui/hive-web/vendor/browser-pollyfills.js    |  213 +
 .../src/main/resources/ui/hive-web/yarn.lock    | 5066 +++++++++++++
 contrib/views/hive20/pom.xml                    |   18 +-
 .../ambari/view/hive20/actor/HiveActor.java     |   32 +-
 .../ambari/view/hive20/actor/JdbcConnector.java |    6 -
 .../view/hive20/actor/OperationController.java  |    2 +-
 .../view/hive20/internal/dto/TableStats.java    |   24 +-
 .../internal/parsers/TableMetaParserImpl.java   |    8 +-
 .../generators/InsertFromQueryGenerator.java    |   41 +-
 .../view/hive20/resources/jobs/JobService.java  |   16 +-
 .../resources/system/ranger/RangerService.java  |   26 +-
 .../uploads/query/InsertFromQueryInput.java     |   24 +-
 .../resources/ui/app/adapters/application.js    |    2 +-
 .../src/main/resources/ui/app/adapters/job.js   |    2 +-
 .../resources/ui/app/components/create-table.js |   32 +-
 .../resources/ui/app/components/jobs-browser.js |   18 +-
 .../resources/ui/app/components/setting-list.js |    9 +
 .../resources/ui/app/components/udf-item.js     |    1 +
 .../ui/app/controllers/savedqueries.js          |   24 +
 .../main/resources/ui/app/controllers/udfs.js   |    2 +
 .../routes/databases/database/tables/table.js   |   22 +-
 .../databases/database/tables/upload-table.js   |   16 +-
 .../resources/ui/app/routes/savedqueries.js     |   11 +-
 .../src/main/resources/ui/app/routes/udfs.js    |   10 +-
 .../resources/ui/app/services/auto-refresh.js   |    1 +
 .../src/main/resources/ui/app/styles/app.scss   |   38 +-
 .../app/templates/components/create-table.hbs   |    4 +-
 .../ui/app/templates/components/edit-table.hbs  |    5 -
 .../app/templates/components/jobs-browser.hbs   |   42 +-
 .../components/notification-message.hbs         |    2 +-
 .../app/templates/components/setting-list.hbs   |    8 +-
 .../templates/components/table-rename-form.hbs  |    2 +-
 .../templates/components/table-statistics.hbs   |   12 +-
 .../ui/app/templates/components/udf-edit.hbs    |   66 +-
 .../ui/app/templates/components/udf-item.hbs    |   10 +-
 .../ui/app/templates/components/udf-new.hbs     |   97 +-
 .../app/templates/components/visual-explain.hbs |    7 +-
 .../resources/ui/app/templates/databases.hbs    |    2 +-
 .../databases/database/tables/table.hbs         |   19 +-
 .../ui/app/templates/queries/query.hbs          |   16 +-
 .../resources/ui/app/templates/savedqueries.hbs |   82 +-
 .../main/resources/ui/app/templates/udfs.hbs    |   49 +-
 .../ui/app/utils/hive-explainer/processor.js    |   13 +-
 .../ui/app/utils/hive-explainer/renderer.js     |  230 +-
 .../ui/app/utils/hive-explainer/transformer.js  |   11 +-
 .../hive20/src/main/resources/ui/package.json   |    2 +-
 .../hive20/src/main/resources/ui/yarn.lock      | 6032 ++++++++++++++++
 contrib/views/hueambarimigration/pom.xml        |   18 +-
 .../ui/hueambarimigration-view/package.json     |    2 +-
 .../ui/hueambarimigration-view/yarn.lock        | 5553 +++++++++++++++
 contrib/views/jobs/pom.xml                      |   18 +-
 .../views/jobs/src/main/resources/ui/yarn.lock  | 2537 +++++++
 contrib/views/pig/pom.xml                       |   22 +-
 .../pig/src/main/resources/ui/pig-web/yarn.lock | 2376 +++++++
 contrib/views/pom.xml                           |    1 +
 .../org/apache/ambari/storm/ProxyServlet.java   |   12 +-
 .../ambari/storm/StormDetailsServlet.java       |   81 +
 .../storm/src/main/resources/WEB-INF/web.xml    |    8 +
 .../resources/scripts/components/SearchLogs.jsx |   38 +-
 .../src/main/resources/scripts/router/Router.js |    6 +-
 .../src/main/resources/scripts/utils/Utils.js   |   25 -
 contrib/views/storm/src/main/resources/view.xml |    8 +-
 .../view/utils/hdfs/ConfigurationBuilder.java   |    3 +-
 contrib/views/wfmanager/pom.xml                 |   18 +-
 .../ui/app/components/bundle-config.js          |    3 +-
 .../resources/ui/app/components/coord-config.js |    3 +-
 .../ui/app/components/distcp-action.js          |   15 +-
 .../resources/ui/app/components/drafts-wf.js    |    3 +-
 .../ui/app/components/flow-designer.js          |    1 -
 .../resources/ui/app/components/job-details.js  |   30 +-
 .../ui/app/components/recent-projects.js        |   11 +-
 .../ui/app/components/search-create-new-bar.js  |   21 +-
 .../ui/app/domain/jsplumb-flow-renderer.js      |  194 -
 .../resources/ui/app/domain/layout-manager1.js  |   88 -
 .../resources/ui/app/domain/layout-manager2.js  |   87 -
 .../resources/ui/app/routes/design/jobtab.js    |    2 +-
 .../src/main/resources/ui/app/styles/app.less   |   11 +
 .../app/templates/components/bundle-config.hbs  |    2 +-
 .../app/templates/components/coord-config.hbs   |    2 +-
 .../templates/components/coord-job-details.hbs  |   66 +-
 .../app/templates/components/distcp-action.hbs  |    7 +-
 .../ui/app/templates/components/drafts-wf.hbs   |    6 +-
 .../app/templates/components/flow-designer.hbs  |    2 +-
 .../app/templates/components/hdfs-browser.hbs   |   44 +-
 .../ui/app/templates/components/job-row.hbs     |    4 +-
 .../components/search-create-new-bar.hbs        |    4 +
 .../app/templates/components/search-table.hbs   |    2 +-
 .../components/workflow-job-details.hbs         |    6 +
 .../wfmanager/src/main/resources/ui/bower.json  |    1 -
 .../src/main/resources/ui/ember-cli-build.js    |    2 +-
 .../wfmanager/src/main/resources/ui/yarn.lock   | 5629 +++++++++++++++
 .../config-utils/diff_stack_properties.py       |  154 +
 dev-support/test-patch.sh                       |    9 +-
 docs/pom.xml                                    |   12 +
 pom.xml                                         |    1 +
 1603 files changed, 132226 insertions(+), 22139 deletions(-)
----------------------------------------------------------------------



[28/49] ambari git commit: Merge trunk to ambari-rest-api-explorer branch. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProvider.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProvider.java
index 0d026b6,70a5723..b231ff8
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProvider.java
@@@ -184,31 -198,6 +184,31 @@@ public class ActiveWidgetLayoutResource
      return resources;
    }
  
 +  /**
 +   * Returns the response for the active widget layout that should be returned for the active widget layout REST endpoint
 +   * @param layoutEntity {@link WidgetLayoutEntity}
 +   * @return  {@link ActiveWidgetLayoutResponse}
 +   * @throws SystemException
 +   */
 +  private ActiveWidgetLayoutResponse getResponse(WidgetLayoutEntity layoutEntity) throws SystemException {
 +    String clusterName = null;
 +    try {
 +      clusterName = getManagementController().getClusters().getClusterById(layoutEntity.getClusterId()).getClusterName();
 +    } catch (AmbariException e) {
 +      throw new SystemException(e.getMessage());
 +    }
-     List<HashMap<String,WidgetResponse>> widgets = new ArrayList<HashMap<String,WidgetResponse>>();
++    List<HashMap<String,WidgetResponse>> widgets = new ArrayList<>();
 +    List<WidgetLayoutUserWidgetEntity> widgetLayoutUserWidgetEntityList = layoutEntity.getListWidgetLayoutUserWidgetEntity();
 +    for (WidgetLayoutUserWidgetEntity widgetLayoutUserWidgetEntity : widgetLayoutUserWidgetEntityList) {
 +      WidgetEntity widgetEntity = widgetLayoutUserWidgetEntity.getWidget();
-       HashMap<String, WidgetResponse> widgetInfoMap = new HashMap<String, WidgetResponse>();
++      HashMap<String, WidgetResponse> widgetInfoMap = new HashMap<>();
 +      widgetInfoMap.put("WidgetInfo",WidgetResponse.coerce(widgetEntity));
 +      widgets.add(widgetInfoMap);
 +    }
 +   return  new ActiveWidgetLayoutResponse(layoutEntity.getId(), clusterName, layoutEntity.getDisplayName(), layoutEntity.getLayoutName(),
 +      layoutEntity.getSectionName(), layoutEntity.getScope(), layoutEntity.getUserName(),  widgets);
 +  }
 +
    @Override
    public RequestStatus updateResources(Request request, Predicate predicate)
      throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProvider.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProvider.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProvider.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProvider.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/User.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupServiceTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewSubResourceServiceTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/3acd2e6d/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProviderTest.java
----------------------------------------------------------------------


[32/49] ambari git commit: AMBARI-20951. Integrate HostService resource with Swagger

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
index ac6ac1d..01dd8e3 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
@@ -73,6 +73,7 @@ import org.apache.ambari.server.state.Host;
 import org.apache.ambari.server.state.HostConfig;
 import org.apache.ambari.server.state.HostHealthStatus;
 import org.apache.ambari.server.state.HostHealthStatus.HealthStatus;
+import org.apache.ambari.server.state.HostState;
 import org.apache.ambari.server.state.MaintenanceState;
 import org.apache.ambari.server.state.ServiceComponentHost;
 import org.apache.ambari.server.state.stack.OsFamily;
@@ -162,7 +163,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
 
     // add properties to the request map
     properties.put(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID, "Cluster100");
-    properties.put(HostResourceProvider.HOST_NAME_PROPERTY_ID, "Host100");
+    properties.put(HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID, "Host100");
 
     propertySet.add(properties);
 
@@ -244,7 +245,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID);
-    propertyIds.add(HostResourceProvider.HOST_NAME_PROPERTY_ID);
+    propertyIds.add(HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID);
     propertyIds.add(HostResourceProvider.HOST_MAINTENANCE_STATE_PROPERTY_ID);
 
     Predicate predicate = buildPredicate("Cluster100", null);
@@ -329,11 +330,8 @@ public class HostResourceProviderTest extends EasyMockSupport {
 
     expect(hostResponse1.getClusterName()).andReturn("").anyTimes();
     expect(hostResponse1.getHostname()).andReturn("Host100").anyTimes();
-    expect(hostResponse1.getHealthStatus()).andReturn(healthStatus).anyTimes();
     expect(hostResponse1.getStatus()).andReturn(HealthStatus.HEALTHY.name()).anyTimes();
-
-    expect(healthStatus.getHealthStatus()).andReturn(HostHealthStatus.HealthStatus.HEALTHY).anyTimes();
-    expect(healthStatus.getHealthReport()).andReturn("HEALTHY").anyTimes();
+    expect(hostResponse1.getHealthReport()).andReturn("HEALTHY").anyTimes();
 
 
     expect(ambariMetaInfo.getComponent((String) anyObject(), (String) anyObject(),
@@ -348,7 +346,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID);
-    propertyIds.add(HostResourceProvider.HOST_NAME_PROPERTY_ID);
+    propertyIds.add(HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID);
     propertyIds.add(HostResourceProvider.HOST_HOST_STATUS_PROPERTY_ID);
 
     Predicate predicate = buildPredicate("Cluster100", null);
@@ -443,7 +441,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID);
-    propertyIds.add(HostResourceProvider.HOST_NAME_PROPERTY_ID);
+    propertyIds.add(HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID);
     propertyIds.add(HostResourceProvider.HOST_HOST_STATUS_PROPERTY_ID);
 
     Predicate predicate = buildPredicate("Cluster100", null);
@@ -483,7 +481,6 @@ public class HostResourceProviderTest extends EasyMockSupport {
     AmbariManagementController managementController = injector.getInstance(AmbariManagementController.class);
     Clusters clusters = injector.getInstance(Clusters.class);
     Cluster cluster = createMock(Cluster.class);
-    HostHealthStatus healthStatus = createNiceMock(HostHealthStatus.class);
     AmbariMetaInfo ambariMetaInfo = createNiceMock(AmbariMetaInfo.class);
     ComponentInfo componentInfo = createNiceMock(ComponentInfo.class);
     HostResponse hostResponse1 = createNiceMock(HostResponse.class);
@@ -526,11 +523,8 @@ public class HostResourceProviderTest extends EasyMockSupport {
 
     expect(hostResponse1.getClusterName()).andReturn("Cluster100").anyTimes();
     expect(hostResponse1.getHostname()).andReturn("Host100").anyTimes();
-    expect(hostResponse1.getHealthStatus()).andReturn(healthStatus).anyTimes();
     expect(hostResponse1.getStatus()).andReturn(HealthStatus.UNHEALTHY.name()).anyTimes();
-
-    expect(healthStatus.getHealthStatus()).andReturn(HostHealthStatus.HealthStatus.HEALTHY).anyTimes();
-    expect(healthStatus.getHealthReport()).andReturn("HEALTHY").anyTimes();
+    expect(hostResponse1.getHealthReport()).andReturn("HEALTHY").anyTimes();
 
     expect(ambariMetaInfo.getComponent((String) anyObject(), (String) anyObject(),
         (String) anyObject(), (String) anyObject())).andReturn(componentInfo).anyTimes();
@@ -544,7 +538,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID);
-    propertyIds.add(HostResourceProvider.HOST_NAME_PROPERTY_ID);
+    propertyIds.add(HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID);
     propertyIds.add(HostResourceProvider.HOST_HOST_STATUS_PROPERTY_ID);
 
     Predicate predicate = buildPredicate("Cluster100", null);
@@ -583,7 +577,6 @@ public class HostResourceProviderTest extends EasyMockSupport {
     AmbariManagementController managementController = injector.getInstance(AmbariManagementController.class);
     Clusters clusters = injector.getInstance(Clusters.class);
     Cluster cluster = createMock(Cluster.class);
-    HostHealthStatus healthStatus = createNiceMock(HostHealthStatus.class);
     AmbariMetaInfo ambariMetaInfo = createNiceMock(AmbariMetaInfo.class);
     HostResponse hostResponse1 = createNiceMock(HostResponse.class);
     ResourceProviderFactory resourceProviderFactory = createNiceMock(ResourceProviderFactory.class);
@@ -610,11 +603,8 @@ public class HostResourceProviderTest extends EasyMockSupport {
 
     expect(hostResponse1.getClusterName()).andReturn("Cluster100").anyTimes();
     expect(hostResponse1.getHostname()).andReturn("Host100").anyTimes();
-    expect(hostResponse1.getHealthStatus()).andReturn(healthStatus).anyTimes();
     expect(hostResponse1.getStatus()).andReturn(HealthStatus.UNKNOWN.name()).anyTimes();
-
-    expect(healthStatus.getHealthStatus()).andReturn(HostHealthStatus.HealthStatus.UNKNOWN).anyTimes();
-    expect(healthStatus.getHealthReport()).andReturn("UNKNOWN").anyTimes();
+    expect(hostResponse1.getHealthReport()).andReturn("UNKNOWN").anyTimes();
     expect(resourceProviderFactory.getHostResourceProvider(EasyMock.<Set<String>>anyObject(),
         EasyMock.<Map<Resource.Type, String>>anyObject(),
         eq(managementController))).andReturn(hostResourceProvider).anyTimes();
@@ -622,7 +612,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID);
-    propertyIds.add(HostResourceProvider.HOST_NAME_PROPERTY_ID);
+    propertyIds.add(HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID);
     propertyIds.add(HostResourceProvider.HOST_HOST_STATUS_PROPERTY_ID);
 
     Predicate predicate = buildPredicate("Cluster100", null);
@@ -727,7 +717,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID);
-    propertyIds.add(HostResourceProvider.HOST_NAME_PROPERTY_ID);
+    propertyIds.add(HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID);
     propertyIds.add(HostResourceProvider.HOST_RECOVERY_REPORT_PROPERTY_ID);
     propertyIds.add(HostResourceProvider.HOST_RECOVERY_SUMMARY_PROPERTY_ID);
 
@@ -810,10 +800,8 @@ public class HostResourceProviderTest extends EasyMockSupport {
     expect(cluster.getDesiredConfigs()).andReturn(new HashMap<String, DesiredConfig>()).anyTimes();
     expect(hostResponse1.getClusterName()).andReturn("Cluster100").anyTimes();
     expect(hostResponse1.getHostname()).andReturn("Host100").anyTimes();
-    expect(hostResponse1.getHealthStatus()).andReturn(healthStatus).anyTimes();
     expect(hostResponse1.getStatus()).andReturn(HealthStatus.ALERT.name()).anyTimes();
-    expect(healthStatus.getHealthStatus()).andReturn(HostHealthStatus.HealthStatus.HEALTHY).anyTimes();
-    expect(healthStatus.getHealthReport()).andReturn("HEALTHY").anyTimes();
+    expect(hostResponse1.getHealthReport()).andReturn("HEALTHY").anyTimes();
     expect(ambariMetaInfo.getComponent((String) anyObject(), (String) anyObject(),
         (String) anyObject(), (String) anyObject())).andReturn(componentInfo).anyTimes();
     expect(componentInfo.getCategory()).andReturn("SLAVE").anyTimes();
@@ -825,7 +813,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID);
-    propertyIds.add(HostResourceProvider.HOST_NAME_PROPERTY_ID);
+    propertyIds.add(HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID);
     propertyIds.add(HostResourceProvider.HOST_HOST_STATUS_PROPERTY_ID);
 
     Predicate predicate = buildPredicate("Cluster100", null);
@@ -883,7 +871,6 @@ public class HostResourceProviderTest extends EasyMockSupport {
     AmbariManagementController managementController = injector.getInstance(AmbariManagementController.class);
     Clusters clusters = injector.getInstance(Clusters.class);
     Cluster cluster = createMock(Cluster.class);
-    HostHealthStatus healthStatus = createNiceMock(HostHealthStatus.class);
     AmbariMetaInfo ambariMetaInfo = createNiceMock(AmbariMetaInfo.class);
     HostResponse hostResponse1 = createNiceMock(HostResponse.class);
     ResourceProviderFactory resourceProviderFactory = createNiceMock(ResourceProviderFactory.class);
@@ -915,9 +902,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     expect(cluster.getDesiredConfigs()).andReturn(new HashMap<String, DesiredConfig>()).anyTimes();
     expect(hostResponse1.getClusterName()).andReturn("Cluster100").anyTimes();
     expect(hostResponse1.getHostname()).andReturn("Host100").anyTimes();
-    expect(hostResponse1.getHealthStatus()).andReturn(healthStatus).anyTimes();
-    expect(healthStatus.getHealthStatus()).andReturn(HostHealthStatus.HealthStatus.HEALTHY).anyTimes();
-    expect(healthStatus.getHealthReport()).andReturn("HEALTHY").anyTimes();
+    expect(hostResponse1.getHealthReport()).andReturn("HEALTHY").anyTimes();
     expect(resourceProviderFactory.getHostResourceProvider(EasyMock.<Set<String>>anyObject(),
         EasyMock.<Map<Resource.Type, String>>anyObject(),
         eq(managementController))).andReturn(hostResourceProvider).anyTimes();
@@ -930,7 +915,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     Map<String, Object> properties = new LinkedHashMap<>();
 
     properties.put(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID, "Cluster100");
-    properties.put(HostResourceProvider.HOST_NAME_PROPERTY_ID, "Host100");
+    properties.put(HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID, "Host100");
     properties.put(PropertyHelper.getPropertyId("Hosts.desired_config", "type"), "global");
     properties.put(PropertyHelper.getPropertyId("Hosts.desired_config", "tag"), "version1");
     properties.put(PropertyHelper.getPropertyId("Hosts.desired_config.properties", "a"), "b");
@@ -975,7 +960,6 @@ public class HostResourceProviderTest extends EasyMockSupport {
     AmbariManagementController managementController = injector.getInstance(AmbariManagementController.class);
     Clusters clusters = injector.getInstance(Clusters.class);
     Cluster cluster = createMock(Cluster.class);
-    HostHealthStatus healthStatus = createNiceMock(HostHealthStatus.class);
     AmbariMetaInfo ambariMetaInfo = createNiceMock(AmbariMetaInfo.class);
     HostResponse hostResponse1 = createNiceMock(HostResponse.class);
     ResourceProviderFactory resourceProviderFactory = createNiceMock(ResourceProviderFactory.class);
@@ -1008,9 +992,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     expect(cluster.getDesiredConfigs()).andReturn(new HashMap<String, DesiredConfig>()).anyTimes();
     expect(hostResponse1.getClusterName()).andReturn("Cluster100").anyTimes();
     expect(hostResponse1.getHostname()).andReturn("Host100").anyTimes();
-    expect(hostResponse1.getHealthStatus()).andReturn(healthStatus).anyTimes();
-    expect(healthStatus.getHealthStatus()).andReturn(HostHealthStatus.HealthStatus.HEALTHY).anyTimes();
-    expect(healthStatus.getHealthReport()).andReturn("HEALTHY").anyTimes();
+    expect(hostResponse1.getHealthReport()).andReturn("HEALTHY").anyTimes();
     expect(resourceProviderFactory.getHostResourceProvider(EasyMock.<Set<String>>anyObject(),
         EasyMock.<Map<Resource.Type, String>>anyObject(),
         eq(managementController))).andReturn(hostResourceProvider).anyTimes();
@@ -1147,7 +1129,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     Set<Cluster> setCluster = Collections.singleton(cluster);
 
     // requests
-    HostRequest request1 = new HostRequest("host1", "cluster1", Collections.<String, String>emptyMap());
+    HostRequest request1 = new HostRequest("host1", "cluster1");
 
     Set<HostRequest> setRequests = new HashSet<>();
     setRequests.add(request1);
@@ -1193,7 +1175,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     Cluster cluster = createMock(Cluster.class);
 
     // requests
-    HostRequest request1 = new HostRequest("host1", "cluster1", Collections.<String, String>emptyMap());
+    HostRequest request1 = new HostRequest("host1", "cluster1");
     Set<HostRequest> setRequests = Collections.singleton(request1);
 
     // expectations
@@ -1224,7 +1206,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     Host host = createNiceMock(Host.class);
 
     // requests
-    HostRequest request1 = new HostRequest("host1", "cluster1", Collections.<String, String>emptyMap());
+    HostRequest request1 = new HostRequest("host1", "cluster1");
     Set<HostRequest> setRequests = Collections.singleton(request1);
 
     // expectations
@@ -1264,10 +1246,10 @@ public class HostResourceProviderTest extends EasyMockSupport {
     HostResponse response2 = createNiceMock(HostResponse.class);
 
     // requests
-    HostRequest request1 = new HostRequest("host1", "cluster1", Collections.<String, String>emptyMap());
-    HostRequest request2 = new HostRequest("host2", "cluster1", Collections.<String, String>emptyMap());
-    HostRequest request3 = new HostRequest("host3", "cluster1", Collections.<String, String>emptyMap());
-    HostRequest request4 = new HostRequest("host4", "cluster1", Collections.<String, String>emptyMap());
+    HostRequest request1 = new HostRequest("host1", "cluster1");
+    HostRequest request2 = new HostRequest("host2", "cluster1");
+    HostRequest request3 = new HostRequest("host3", "cluster1");
+    HostRequest request4 = new HostRequest("host4", "cluster1");
 
     Set<HostRequest> setRequests = new HashSet<>();
     setRequests.add(request1);
@@ -1321,7 +1303,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
 
     for (HostRequest request : requests) {
       Map<String, Object> requestProperties = new HashMap<>();
-      requestProperties.put(HostResourceProvider.HOST_NAME_PROPERTY_ID, request.getHostname());
+      requestProperties.put(HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID, request.getHostname());
       requestProperties.put(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID, request.getClusterName());
       properties.add(requestProperties);
     }
@@ -1409,8 +1391,8 @@ public class HostResourceProviderTest extends EasyMockSupport {
                               String status, String recoverySummary, RecoveryReport recoveryReport) {
     Host host = createMock(Host.class);
     HostHealthStatus hostHealthStatus = new HostHealthStatus(HealthStatus.HEALTHY, "");
-    HostResponse hostResponse = new HostResponse(hostName, clusterName, null, null, 1, 1, null,
-        "centos6", null, 1024, 1024, null, 1, 1, null, null, null, hostHealthStatus, "HEALTHY", status);
+    HostResponse hostResponse = new HostResponse(hostName, clusterName, null, 1, 1, null,
+        "centos6", 1024, null, 1, 1, null, null, null, hostHealthStatus, HostState.HEALTHY, status);
 
     hostResponse.setRecoverySummary(recoverySummary);
     hostResponse.setRecoveryReport(recoveryReport);
@@ -1434,11 +1416,11 @@ public class HostResourceProviderTest extends EasyMockSupport {
     PredicateBuilder builder = new PredicateBuilder();
     if (clusterName != null && hostName != null) {
       return builder.property(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID).equals(clusterName)
-      .and().property(HostResourceProvider.HOST_NAME_PROPERTY_ID).equals(hostName).toPredicate();
+      .and().property(HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID).equals(hostName).toPredicate();
     }
 
     return clusterName != null ?
             builder.property(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID).equals(clusterName).toPredicate() :
-            builder.property(HostResourceProvider.HOST_NAME_PROPERTY_ID).equals(hostName).toPredicate();
+            builder.property(HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID).equals(hostName).toPredicate();
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProviderTest.java
index f15c9f2..cbf891b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProviderTest.java
@@ -43,7 +43,6 @@ import org.apache.ambari.server.controller.utilities.PropertyHelper;
 import org.apache.ambari.server.state.Cluster;
 import org.apache.ambari.server.state.Clusters;
 import org.apache.ambari.server.state.Host;
-import org.apache.ambari.server.state.HostHealthStatus;
 import org.easymock.EasyMock;
 import org.junit.Test;
 
@@ -57,7 +56,6 @@ public class RootServiceHostComponentResourceProviderTest {
     Clusters clusters = createNiceMock(Clusters.class);
     Cluster cluster = createNiceMock(Cluster.class);
     Host host1 = createNiceMock(Host.class);
-    HostHealthStatus healthStatus = createNiceMock(HostHealthStatus.class);
 
     HostResponse hostResponse1 = createNiceMock(HostResponse.class);
 
@@ -92,16 +90,13 @@ public class RootServiceHostComponentResourceProviderTest {
 
     expect(hostResponse1.getClusterName()).andReturn("Cluster100").anyTimes();
     expect(hostResponse1.getHostname()).andReturn("Host100").anyTimes();
-    expect(hostResponse1.getHealthStatus()).andReturn(healthStatus).anyTimes();
-
-    expect(healthStatus.getHealthStatus()).andReturn(HostHealthStatus.HealthStatus.HEALTHY).anyTimes();
-    expect(healthStatus.getHealthReport()).andReturn("HEALTHY").anyTimes();
+    expect(hostResponse1.getHealthReport()).andReturn("HEALTHY").anyTimes();
 
     // replay
     replay(managementController, clusters, cluster,
         host1,
         hostResponse1,
-        healthStatus, factory, response);
+        factory, response);
 
 
     ResourceProvider provider = AbstractControllerResourceProvider.getResourceProvider(
@@ -129,7 +124,7 @@ public class RootServiceHostComponentResourceProviderTest {
     verify(managementController, clusters, cluster,
         host1,
         hostResponse1,
-        healthStatus, factory, response);
+        factory, response);
   }
 
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ScaleClusterRequestTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ScaleClusterRequestTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ScaleClusterRequestTest.java
index 48d1351..c5d17bd 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ScaleClusterRequestTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ScaleClusterRequestTest.java
@@ -341,8 +341,8 @@ public class ScaleClusterRequestTest {
 
     properties.put(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID, clusterName);
     properties.put(HostResourceProvider.BLUEPRINT_PROPERTY_ID, blueprintName);
-    properties.put(HostResourceProvider.HOSTGROUP_PROPERTY_ID, GROUP1_NAME);
-    properties.put(HostResourceProvider.HOST_NAME_NO_CATEGORY_PROPERTY_ID, HOST1_NAME);
+    properties.put(HostResourceProvider.HOST_GROUP_PROPERTY_ID, GROUP1_NAME);
+    properties.put(HostResourceProvider.HOST_NAME_PROPERTY_ID, HOST1_NAME);
 
     return properties;
   }
@@ -352,7 +352,7 @@ public class ScaleClusterRequestTest {
 
     properties.put(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID, clusterName);
     properties.put(HostResourceProvider.BLUEPRINT_PROPERTY_ID, blueprintName);
-    properties.put(HostResourceProvider.HOSTGROUP_PROPERTY_ID, GROUP2_NAME);
+    properties.put(HostResourceProvider.HOST_GROUP_PROPERTY_ID, GROUP2_NAME);
     properties.put(HostResourceProvider.HOST_COUNT_PROPERTY_ID, 1);
 
     return properties;
@@ -363,7 +363,7 @@ public class ScaleClusterRequestTest {
 
     properties.put(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID, clusterName);
     properties.put(HostResourceProvider.BLUEPRINT_PROPERTY_ID, blueprintName);
-    properties.put(HostResourceProvider.HOSTGROUP_PROPERTY_ID, GROUP3_NAME);
+    properties.put(HostResourceProvider.HOST_GROUP_PROPERTY_ID, GROUP3_NAME);
     properties.put(HostResourceProvider.HOST_COUNT_PROPERTY_ID, 1);
     properties.put(HostResourceProvider.HOST_PREDICATE_PROPERTY_ID, PREDICATE);
 
@@ -375,7 +375,7 @@ public class ScaleClusterRequestTest {
 
     properties.put(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID, clusterName);
     properties.put(HostResourceProvider.BLUEPRINT_PROPERTY_ID, blueprintName);
-    properties.put(HostResourceProvider.HOSTGROUP_PROPERTY_ID, GROUP3_NAME);
+    properties.put(HostResourceProvider.HOST_GROUP_PROPERTY_ID, GROUP3_NAME);
     properties.put(HostResourceProvider.HOST_COUNT_PROPERTY_ID, 2);
 
     return properties;
@@ -386,8 +386,8 @@ public class ScaleClusterRequestTest {
 
     properties.put(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID, clusterName);
     properties.put(HostResourceProvider.BLUEPRINT_PROPERTY_ID, blueprintName);
-    properties.put(HostResourceProvider.HOSTGROUP_PROPERTY_ID, GROUP1_NAME);
-    properties.put(HostResourceProvider.HOST_NAME_NO_CATEGORY_PROPERTY_ID, HOST2_NAME);
+    properties.put(HostResourceProvider.HOST_GROUP_PROPERTY_ID, GROUP1_NAME);
+    properties.put(HostResourceProvider.HOST_NAME_PROPERTY_ID, HOST2_NAME);
 
     return properties;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/0e13b018/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
index 2d5978b..10406f1 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
@@ -534,8 +534,8 @@ public class TopologyManagerTest {
   public void testScaleHosts__alreadyExistingHost() throws InvalidTopologyTemplateException, InvalidTopologyException, AmbariException, NoSuchStackException {
     HashSet<Map<String, Object>> propertySet = new HashSet<>();
     Map<String,Object> properties = new TreeMap<>();
-    properties.put(HostResourceProvider.HOST_NAME_PROPERTY_ID, "host1");
-    properties.put(HostResourceProvider.HOSTGROUP_PROPERTY_ID, "group1");
+    properties.put(HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID, "host1");
+    properties.put(HostResourceProvider.HOST_GROUP_PROPERTY_ID, "group1");
     properties.put(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID, CLUSTER_NAME);
     properties.put(HostResourceProvider.BLUEPRINT_PROPERTY_ID, BLUEPRINT_NAME);
     propertySet.add(properties);


[15/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProvider.java
index 4f0a6f0..ccc43e8 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProvider.java
@@ -23,6 +23,7 @@ import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.ambari.server.controller.ViewPermissionResponse;
 import org.apache.ambari.server.controller.spi.NoSuchParentResourceException;
 import org.apache.ambari.server.controller.spi.NoSuchResourceException;
 import org.apache.ambari.server.controller.spi.Predicate;
@@ -128,7 +129,8 @@ public class ViewPermissionResourceProvider extends AbstractResourceProvider {
 
         // do not report permissions for views that are not loaded.
         if (viewEntity.isDeployed()) {
-          resources.add(toResource(viewUsePermission, viewEntity.getResourceType(), viewEntity, requestedIds));
+          ViewPermissionResponse viewPermissionResponse = getResponse(viewUsePermission, viewEntity.getResourceType(), viewEntity);
+          resources.add(toResource(viewPermissionResponse, requestedIds));
         }
       }
     }
@@ -139,7 +141,8 @@ public class ViewPermissionResourceProvider extends AbstractResourceProvider {
       ViewEntity viewEntity = viewRegistry.getDefinition(resourceType);
 
       if (viewEntity != null && viewEntity.isDeployed()) {
-        resources.add(toResource(permissionEntity, resourceType, viewEntity, requestedIds));
+        ViewPermissionResponse viewPermissionResponse = getResponse(permissionEntity, resourceType, viewEntity);
+        resources.add(toResource(viewPermissionResponse, requestedIds));
       }
     }
 
@@ -174,18 +177,37 @@ public class ViewPermissionResourceProvider extends AbstractResourceProvider {
 
   // ----- helper methods ----------------------------------------------------
 
-  // convert the given permission entity to a resource
-  private Resource toResource(PermissionEntity entity, ResourceTypeEntity resourceType,
-                              ViewEntity viewEntity, Set<String> requestedIds) {
+  /**
+   * Returns response schema instance for REST endpoint /views/{viewName}/versions/{version}/permissions
+   * @param entity         permission entity {@link PermissionEntity}
+   * @param resourceType   resource type {@link ResourceTypeEntity}
+   * @param viewEntity     view entity {@link ViewEntity}
+   * @return {@link ViewPermissionResponse}
+   */
+  private ViewPermissionResponse getResponse(PermissionEntity entity, ResourceTypeEntity resourceType, ViewEntity viewEntity) {
 
-    Resource resource = new ResourceImpl(Resource.Type.ViewPermission);
+    String viewName = viewEntity.getCommonName();
+    String version = viewEntity.getVersion();
+    Integer permissionId = entity.getId();
+    String permissionName = entity.getPermissionName();
+    String resourceName = resourceType.getName();
+    ViewPermissionResponse.ViewPermissionInfo viewPermissionInfo  = new ViewPermissionResponse.ViewPermissionInfo(viewName,version,
+                                                                    permissionId, permissionName, resourceName);
 
-    setResourceProperty(resource, VIEW_NAME_PROPERTY_ID, viewEntity.getCommonName(), requestedIds);
-    setResourceProperty(resource, VIEW_VERSION_PROPERTY_ID, viewEntity.getVersion(), requestedIds);
+    return new ViewPermissionResponse(viewPermissionInfo);
+  }
+
+  // convert the response to a resource
+  private Resource toResource(ViewPermissionResponse viewPermissionResponse, Set<String> requestedIds) {
+
+    Resource resource = new ResourceImpl(Resource.Type.ViewPermission);
+    ViewPermissionResponse.ViewPermissionInfo viewPermissionInfo  = viewPermissionResponse.getViewPermissionInfo();
+    setResourceProperty(resource, VIEW_NAME_PROPERTY_ID, viewPermissionInfo.getViewName(), requestedIds);
+    setResourceProperty(resource, VIEW_VERSION_PROPERTY_ID, viewPermissionInfo.getVersion(), requestedIds);
 
-    setResourceProperty(resource, PERMISSION_ID_PROPERTY_ID, entity.getId(), requestedIds);
-    setResourceProperty(resource, PERMISSION_NAME_PROPERTY_ID, entity.getPermissionName(), requestedIds);
-    setResourceProperty(resource, RESOURCE_NAME_PROPERTY_ID, resourceType.getName(), requestedIds);
+    setResourceProperty(resource, PERMISSION_ID_PROPERTY_ID, viewPermissionInfo.getPermissionId(), requestedIds);
+    setResourceProperty(resource, PERMISSION_NAME_PROPERTY_ID, viewPermissionInfo.getPermissionName(), requestedIds);
+    setResourceProperty(resource, RESOURCE_NAME_PROPERTY_ID, viewPermissionInfo.getResourceName(), requestedIds);
 
     return resource;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java
index 4055f1a..3cf4a28 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java
@@ -21,9 +21,11 @@ package org.apache.ambari.server.controller.internal;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.ambari.server.controller.ViewVersionResponse;
 import org.apache.ambari.server.controller.spi.NoSuchParentResourceException;
 import org.apache.ambari.server.controller.spi.NoSuchResourceException;
 import org.apache.ambari.server.controller.spi.Predicate;
@@ -35,6 +37,8 @@ import org.apache.ambari.server.controller.spi.SystemException;
 import org.apache.ambari.server.controller.spi.UnsupportedPropertyException;
 import org.apache.ambari.server.orm.entities.ViewEntity;
 import org.apache.ambari.server.view.ViewRegistry;
+import org.apache.ambari.server.view.configuration.ParameterConfig;
+import org.apache.ambari.view.ViewDefinition;
 
 /**
  * Resource provider for view versions.
@@ -131,24 +135,25 @@ public class ViewVersionResourceProvider extends AbstractResourceProvider {
         if (viewName == null || viewName.equals(viewDefinition.getCommonName())) {
           if (viewVersion == null || viewVersion.equals(viewDefinition.getVersion())) {
             Resource resource = new ResourceImpl(Resource.Type.ViewVersion);
-
-            setResourceProperty(resource, VIEW_NAME_PROPERTY_ID, viewDefinition.getCommonName(), requestedIds);
-            setResourceProperty(resource, VIEW_VERSION_PROPERTY_ID, viewDefinition.getVersion(), requestedIds);
-            setResourceProperty(resource, VIEW_BUILD_PROPERTY_ID, viewDefinition.getBuild(), requestedIds);
-            setResourceProperty(resource, LABEL_PROPERTY_ID, viewDefinition.getLabel(), requestedIds);
-            setResourceProperty(resource, DESCRIPTION_PROPERTY_ID, viewDefinition.getDescription(), requestedIds);
+            ViewVersionResponse viewVersionResponse = getResponse(viewDefinition);
+            ViewVersionResponse.ViewVersionInfo viewVersionInfo = viewVersionResponse.getViewVersionInfo();
+            setResourceProperty(resource, VIEW_NAME_PROPERTY_ID, viewVersionInfo.getViewName(), requestedIds);
+            setResourceProperty(resource, VIEW_VERSION_PROPERTY_ID, viewVersionInfo.getVersion(), requestedIds);
+            setResourceProperty(resource, VIEW_BUILD_PROPERTY_ID, viewVersionInfo.getBuildNumber(), requestedIds);
+            setResourceProperty(resource, LABEL_PROPERTY_ID, viewVersionInfo.getLabel(), requestedIds);
+            setResourceProperty(resource, DESCRIPTION_PROPERTY_ID, viewVersionInfo.getDescription(), requestedIds);
             setResourceProperty(resource, MIN_AMBARI_VERSION_PROPERTY_ID,
-                viewDefinition.getConfiguration().getMinAmbariVersion(), requestedIds);
+              viewVersionInfo.getMinAmbariVersion(), requestedIds);
             setResourceProperty(resource, MAX_AMBARI_VERSION_PROPERTY_ID,
-                viewDefinition.getConfiguration().getMaxAmbariVersion(), requestedIds);
+              viewVersionInfo.getMaxAmbariVersion(), requestedIds);
             setResourceProperty(resource, PARAMETERS_PROPERTY_ID,
-                viewDefinition.getConfiguration().getParameters(), requestedIds);
-            setResourceProperty(resource, ARCHIVE_PROPERTY_ID, viewDefinition.getArchive(), requestedIds);
-            setResourceProperty(resource, MASKER_CLASS_PROPERTY_ID, viewDefinition.getMask(), requestedIds);
-            setResourceProperty(resource, VIEW_STATUS_PROPERTY_ID, viewDefinition.getStatus().toString(), requestedIds);
-            setResourceProperty(resource, VIEW_STATUS_DETAIL_PROPERTY_ID, viewDefinition.getStatusDetail(), requestedIds);
-            setResourceProperty(resource, CLUSTER_CONFIG_PROPERTY_ID, viewDefinition.isClusterConfigurable(), requestedIds);
-            setResourceProperty(resource, SYSTEM_PROPERTY_ID, viewDefinition.isSystem(), requestedIds);
+              viewVersionInfo.getParameters(), requestedIds);
+            setResourceProperty(resource, ARCHIVE_PROPERTY_ID, viewVersionInfo.getArchive(), requestedIds);
+            setResourceProperty(resource, MASKER_CLASS_PROPERTY_ID, viewVersionInfo.getMaskerClass(), requestedIds);
+            setResourceProperty(resource, VIEW_STATUS_PROPERTY_ID, viewVersionInfo.getStatus().toString(), requestedIds);
+            setResourceProperty(resource, VIEW_STATUS_DETAIL_PROPERTY_ID, viewVersionInfo.getStatusDetail(), requestedIds);
+            setResourceProperty(resource, CLUSTER_CONFIG_PROPERTY_ID, viewVersionInfo.isClusterConfigurable(), requestedIds);
+            setResourceProperty(resource, SYSTEM_PROPERTY_ID, viewVersionInfo.isSystem(), requestedIds);
 
             resources.add(resource);
           }
@@ -158,6 +163,32 @@ public class ViewVersionResourceProvider extends AbstractResourceProvider {
     return resources;
   }
 
+  /**
+   * Returns response schema instance for view version REST endpoint: /views/{viewName}/versions
+   * @param viewDefinition   view entity {@link ViewEntity}
+   * @return {@link ViewVersionResponse}
+   */
+  public ViewVersionResponse getResponse(ViewEntity viewDefinition) {
+    String archive = viewDefinition.getArchive();
+    String buildNumber = viewDefinition.getBuild();
+    boolean clusterConfigurable = viewDefinition.isClusterConfigurable();
+    String description = viewDefinition.getDescription();
+    String label =  viewDefinition.getLabel();
+    String maskerClass = viewDefinition.getMask();
+    String maxAmbariVersion = viewDefinition.getConfiguration().getMaxAmbariVersion();
+    String minAmbariVersion = viewDefinition.getConfiguration().getMinAmbariVersion();
+    List<ParameterConfig> parameters = viewDefinition.getConfiguration().getParameters();
+    ViewDefinition.ViewStatus status = viewDefinition.getStatus();
+    String statusDetail = viewDefinition.getStatusDetail();
+    boolean system =  viewDefinition.isSystem();
+    String version =  viewDefinition.getVersion();
+    String viewName =  viewDefinition.getCommonName();
+    ViewVersionResponse.ViewVersionInfo viewVersionInfo = new ViewVersionResponse.ViewVersionInfo(archive, buildNumber,
+      clusterConfigurable, description, label, maskerClass, maxAmbariVersion, minAmbariVersion, parameters, status,
+      statusDetail, system, version, viewName);
+    return new ViewVersionResponse(viewVersionInfo);
+  }
+
   @Override
   public RequestStatus updateResources(Request request, Predicate predicate)
       throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalTypeEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalTypeEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalTypeEntity.java
index e95223a..f11178c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalTypeEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PrincipalTypeEntity.java
@@ -50,9 +50,15 @@ public class PrincipalTypeEntity {
   public static final int GROUP_PRINCIPAL_TYPE = 2;
   public static final int ROLE_PRINCIPAL_TYPE = 8;
 
-  public static final String USER_PRINCIPAL_TYPE_NAME  = "USER";
-  public static final String GROUP_PRINCIPAL_TYPE_NAME = "GROUP";
-  public static final String ROLE_PRINCIPAL_TYPE_NAME = "ROLE";
+  public static final String USER_PRINCIPAL_TYPE_NAME  = PrincipalType.USER.toString();
+  public static final String GROUP_PRINCIPAL_TYPE_NAME = PrincipalType.GROUP.toString();
+  public static final String ROLE_PRINCIPAL_TYPE_NAME = PrincipalType.ROLE.toString();
+
+  public enum PrincipalType {
+    USER,
+    GROUP,
+    ROLE;
+  }
 
   /**
    * The type id.

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/User.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/User.java b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/User.java
index 18509d3..50f39fc 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/User.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/User.java
@@ -28,10 +28,14 @@ import org.apache.ambari.server.orm.entities.PrivilegeEntity;
 import org.apache.ambari.server.orm.entities.UserEntity;
 import org.springframework.security.core.GrantedAuthority;
 
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
 
 /**
  * Describes user of web-services
  */
+@ApiModel
 public class User {
   final int userId;
   final String userName;
@@ -61,34 +65,42 @@ public class User {
     }
   }
 
+  @ApiModelProperty(hidden = true)
   public int getUserId() {
     return userId;
   }
 
+  @ApiModelProperty(name = "Users/user_name",required = true, access = "public", notes = "username containing only lowercase letters")
   public String getUserName() {
     return userName;
   }
 
+  @ApiModelProperty(name = "Users/ldap_user")
   public boolean isLdapUser() {
     return ldapUser;
   }
 
+  @ApiModelProperty(name = "Users/user_type")
   public UserType getUserType() {
     return userType;
   }
 
+  @ApiModelProperty(hidden = true)
   public Date getCreateTime() {
     return createTime;
   }
 
+  @ApiModelProperty(name = "Users/active")
   public boolean isActive() {
     return active;
   }
 
+  @ApiModelProperty(name = "Users/admin")
   public boolean isAdmin() {
     return admin;
   }
 
+  @ApiModelProperty(name = "Users/groups")
   public Collection<String> getGroups() {
     return groups;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
index 81c4734..afe556a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
@@ -50,8 +50,8 @@ import org.apache.ambari.server.api.resources.ResourceInstanceFactoryImpl;
 import org.apache.ambari.server.api.resources.SubResourceDefinition;
 import org.apache.ambari.server.api.resources.ViewExternalSubResourceDefinition;
 import org.apache.ambari.server.api.services.AmbariMetaInfo;
-import org.apache.ambari.server.api.services.ViewExternalSubResourceService;
-import org.apache.ambari.server.api.services.ViewSubResourceService;
+import org.apache.ambari.server.api.services.views.ViewExternalSubResourceService;
+import org.apache.ambari.server.api.services.views.ViewSubResourceService;
 import org.apache.ambari.server.configuration.ComponentSSLConfiguration;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.AmbariServer;

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutServiceTest.java
deleted file mode 100644
index adae956..0000000
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutServiceTest.java
+++ /dev/null
@@ -1,75 +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 static org.junit.Assert.assertEquals;
-
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.MultivaluedMap;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-
-import org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.controller.spi.Resource;
-import org.apache.ambari.server.orm.entities.WidgetLayoutEntity;
-import org.junit.Test;
-
-/**
- * Unit tests for ActiveWidgetLayoutService.
- */
-public class ActiveWidgetLayoutServiceTest {
-
-  @Test
-  public void testCreateResourceWithUppercaseUsername() {
-    // GIVEN
-    ActiveWidgetLayoutService activeWidgetLayoutService = new TestActiveWidgetLayoutService("MyUser");
-    // WHEN
-    Response response = activeWidgetLayoutService.getServices(null, null, null);
-    // THEN
-    assertEquals("myuser", ((WidgetLayoutEntity) response.getEntity()).getUserName());
-  }
-
-  private class TestActiveWidgetLayoutService extends ActiveWidgetLayoutService {
-    public TestActiveWidgetLayoutService(String username) {
-      super(username);
-    }
-
-    @Override
-    protected Response handleRequest(HttpHeaders headers, String body, UriInfo uriInfo,
-                                     Request.Type requestType, final ResourceInstance resource) {
-      return new Response() {
-        @Override
-        public Object getEntity() {
-          WidgetLayoutEntity entity = new WidgetLayoutEntity();
-          entity.setUserName(resource.getKeyValueMap().get(Resource.Type.User));
-          return entity;
-        }
-
-        @Override
-        public int getStatus() {
-          return 0;
-        }
-
-        @Override
-        public MultivaluedMap<String, Object> getMetadata() {
-          return null;
-        }
-      };
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupPrivilegeServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupPrivilegeServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupPrivilegeServiceTest.java
deleted file mode 100644
index 995dfaf..0000000
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupPrivilegeServiceTest.java
+++ /dev/null
@@ -1,111 +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 java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletResponse;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-
-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 org.apache.ambari.server.controller.spi.Resource.Type;
-import org.easymock.EasyMock;
-import org.junit.Test;
-
-import junit.framework.Assert;
-
-/**
- * Unit tests for GroupService.
- */
-public class GroupPrivilegeServiceTest extends BaseServiceTest {
-
-  public List<ServiceTestInvocation> getTestInvocations() throws Exception {
-    List<ServiceTestInvocation> listInvocations = new ArrayList<ServiceTestInvocation>();
-
-    GroupPrivilegeService groupPrivilegeService;
-    Method m;
-    Object[] args;
-
-    //getPrivilege
-    groupPrivilegeService = new TestGroupPrivilegeService();
-    m = groupPrivilegeService.getClass().getMethod("getPrivilege", HttpHeaders.class, UriInfo.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "id"};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.GET, groupPrivilegeService, m, args, null));
-
-    //getPrivileges
-    groupPrivilegeService = new TestGroupPrivilegeService();
-    m = groupPrivilegeService.getClass().getMethod("getPrivileges", HttpHeaders.class, UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.GET, groupPrivilegeService, m, args, null));
-
-    return listInvocations;
-  }
-
-  @Test
-  public void testDisabledMethods() {
-    final HttpHeaders headers = EasyMock.createNiceMock(HttpHeaders.class);
-    final UriInfo uriInfo = EasyMock.createNiceMock(UriInfo.class);
-    final GroupPrivilegeService service = new TestGroupPrivilegeService();
-
-    final List<Response> disabledMethods = new ArrayList<Response>();
-    disabledMethods.add(service.createPrivilege("test", headers, uriInfo));
-    disabledMethods.add(service.updatePrivilege("test", headers, uriInfo, "test"));
-    disabledMethods.add(service.updatePrivileges("test", headers, uriInfo));
-    disabledMethods.add(service.deletePrivilege(headers, uriInfo, "test"));
-    disabledMethods.add(service.deletePrivileges("test", headers, uriInfo));
-
-    for (Response response: disabledMethods) {
-      Assert.assertEquals(HttpServletResponse.SC_NOT_IMPLEMENTED, response.getStatus());
-    }
-  }
-
-  private class TestGroupPrivilegeService extends GroupPrivilegeService {
-
-    public TestGroupPrivilegeService() {
-      super("group");
-    }
-
-    @Override
-    protected ResourceInstance createResource(Type type, Map<Type, String> mapIds) {
-      return getTestResource();
-    }
-
-    @Override
-    RequestFactory getRequestFactory() {
-      return getTestRequestFactory();
-    }
-
-    @Override
-    protected RequestBodyParser getBodyParser() {
-      return getTestBodyParser();
-    }
-
-    @Override
-    protected ResultSerializer getResultSerializer() {
-      return getTestResultSerializer();
-    }
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupServiceTest.java
index b171ceb..7a4e87b 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/GroupServiceTest.java
@@ -27,6 +27,7 @@ import javax.ws.rs.core.HttpHeaders;
 import javax.ws.rs.core.UriInfo;
 
 import org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.api.services.groups.GroupService;
 import org.apache.ambari.server.api.services.parsers.RequestBodyParser;
 import org.apache.ambari.server.api.services.serializers.ResultSerializer;
 import org.apache.ambari.server.controller.spi.Resource.Type;

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/test/java/org/apache/ambari/server/api/services/MemberServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/MemberServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/MemberServiceTest.java
deleted file mode 100644
index 1e0137e..0000000
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/MemberServiceTest.java
+++ /dev/null
@@ -1,110 +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 java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.UriInfo;
-
-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 org.apache.ambari.server.controller.spi.Resource.Type;
-
-/**
- * Unit tests for GroupService.
- */
-public class MemberServiceTest extends BaseServiceTest {
-
-  public List<ServiceTestInvocation> getTestInvocations() throws Exception {
-    List<ServiceTestInvocation> listInvocations = new ArrayList<ServiceTestInvocation>();
-
-    MemberService memberService;
-    Method m;
-    Object[] args;
-
-    //createMember
-    memberService = new TestMemberService("engineering");
-    m = memberService.getClass().getMethod("createMember", String.class, HttpHeaders.class, UriInfo.class);
-    args = new Object[] {"body", getHttpHeaders(), getUriInfo()};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.POST, memberService, m, args, "body"));
-
-    //createMember
-    memberService = new TestMemberService("engineering");
-    m = memberService.getClass().getMethod("createMember", String.class, HttpHeaders.class, UriInfo.class, String.class);
-    args = new Object[] {"body", getHttpHeaders(), getUriInfo(), "joe"};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.POST, memberService, m, args, "body"));
-
-    //deleteMember
-    memberService = new TestMemberService("engineering");
-    m = memberService.getClass().getMethod("deleteMember", HttpHeaders.class, UriInfo.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "joe"};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.DELETE, memberService, m, args, null));
-
-    //getMembers
-    memberService = new TestMemberService("engineering");
-    m = memberService.getClass().getMethod("getMembers", HttpHeaders.class, UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.GET, memberService, m, args, null));
-
-    //getMember
-    memberService = new TestMemberService("engineering");
-    m = memberService.getClass().getMethod("getMember", HttpHeaders.class, UriInfo.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "joe"};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.GET, memberService, m, args, null));
-
-    //updateMembers
-    memberService = new TestMemberService("engineering");
-    m = memberService.getClass().getMethod("updateMembers", String.class, HttpHeaders.class, UriInfo.class);
-    args = new Object[] {"body", getHttpHeaders(), getUriInfo()};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.PUT, memberService, m, args, "body"));
-
-    return listInvocations;
-  }
-
-  private class TestMemberService extends MemberService {
-    public TestMemberService(String groupName) {
-      super(groupName);
-    }
-
-    @Override
-    protected ResourceInstance createResource(Type type, Map<Type, String> mapIds) {
-      return getTestResource();
-    }
-
-    @Override
-    RequestFactory getRequestFactory() {
-      return getTestRequestFactory();
-    }
-
-    @Override
-    protected RequestBodyParser getBodyParser() {
-      return getTestBodyParser();
-    }
-
-    @Override
-    protected ResultSerializer getResultSerializer() {
-      return getTestResultSerializer();
-    }
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserAuthorizationServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserAuthorizationServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserAuthorizationServiceTest.java
deleted file mode 100644
index 8a2f799..0000000
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserAuthorizationServiceTest.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.api.services;
-
-import static org.junit.Assert.assertEquals;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.UriInfo;
-
-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 org.apache.ambari.server.controller.spi.Resource;
-import org.junit.Test;
-
-
-/**
- * Unit tests for UserAuthorizationService.
- */
-public class UserAuthorizationServiceTest extends BaseServiceTest {
-
-  public List<ServiceTestInvocation> getTestInvocations() throws Exception {
-    List<ServiceTestInvocation> listInvocations = new ArrayList<ServiceTestInvocation>();
-
-    //getAuthorization
-    UserAuthorizationService service = new TestUserAuthorizationService("id");
-    Method m = service.getClass().getMethod("getAuthorization", HttpHeaders.class, UriInfo.class, String.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo(), "id"};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
-
-    //getAuthorizations
-    service = new TestUserAuthorizationService(null);
-    m = service.getClass().getMethod("getAuthorizations", HttpHeaders.class, UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
-
-    return listInvocations;
-  }
-
-  @Test
-  public void testCreateAuthorizationResourceWithUppercaseUsername() {
-    // GIVEN
-    UserAuthorizationService userAuthorizationService= new UserAuthorizationService("Jdoe");
-    // WHEN
-    ResourceInstance result = userAuthorizationService.createAuthorizationResource("id");
-    // THEN
-    assertEquals("jdoe", result.getKeyValueMap().get(Resource.Type.User));
-  }
-
-
-  private class TestUserAuthorizationService extends UserAuthorizationService {
-    private String id;
-
-    private TestUserAuthorizationService(String id) {
-      super("jdoe");
-      this.id = id;
-    }
-
-    @Override
-    protected ResourceInstance createAuthorizationResource(String id) {
-      assertEquals(this.id, id);
-      return getTestResource();
-    }
-
-    @Override
-    RequestFactory getRequestFactory() {
-      return getTestRequestFactory();
-    }
-
-    @Override
-    protected RequestBodyParser getBodyParser() {
-      return getTestBodyParser();
-    }
-
-    @Override
-    protected ResultSerializer getResultSerializer() {
-      return getTestResultSerializer();
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserPrivilegeServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserPrivilegeServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserPrivilegeServiceTest.java
deleted file mode 100644
index 7b0e06d..0000000
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/UserPrivilegeServiceTest.java
+++ /dev/null
@@ -1,124 +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 static org.junit.Assert.assertEquals;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletResponse;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-
-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 org.apache.ambari.server.controller.spi.Resource;
-import org.apache.ambari.server.controller.spi.Resource.Type;
-import org.easymock.EasyMock;
-import org.junit.Test;
-
-import junit.framework.Assert;
-
-/**
- * Unit tests for GroupService.
- */
-public class UserPrivilegeServiceTest extends BaseServiceTest {
-
-  public List<ServiceTestInvocation> getTestInvocations() throws Exception {
-    List<ServiceTestInvocation> listInvocations = new ArrayList<ServiceTestInvocation>();
-
-    UserPrivilegeService userPrivilegeService;
-    Method m;
-    Object[] args;
-
-    //getPrivilege
-    userPrivilegeService = new TestUserPrivilegeService();
-    m = userPrivilegeService.getClass().getMethod("getPrivilege", HttpHeaders.class, UriInfo.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "id"};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.GET, userPrivilegeService, m, args, null));
-
-    //getPrivileges
-    userPrivilegeService = new TestUserPrivilegeService();
-    m = userPrivilegeService.getClass().getMethod("getPrivileges", HttpHeaders.class, UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.GET, userPrivilegeService, m, args, null));
-
-    return listInvocations;
-  }
-
-  @Test
-  public void testDisabledMethods() {
-    final HttpHeaders headers = EasyMock.createNiceMock(HttpHeaders.class);
-    final UriInfo uriInfo = EasyMock.createNiceMock(UriInfo.class);
-    final UserPrivilegeService service = new TestUserPrivilegeService();
-
-    final List<Response> disabledMethods = new ArrayList<Response>();
-    disabledMethods.add(service.createPrivilege("test", headers, uriInfo));
-    disabledMethods.add(service.updatePrivilege("test", headers, uriInfo, "test"));
-    disabledMethods.add(service.updatePrivileges("test", headers, uriInfo));
-    disabledMethods.add(service.deletePrivilege(headers, uriInfo, "test"));
-    disabledMethods.add(service.deletePrivileges("test", headers, uriInfo));
-
-    for (Response response: disabledMethods) {
-      Assert.assertEquals(HttpServletResponse.SC_NOT_IMPLEMENTED, response.getStatus());
-    }
-  }
-
-  @Test
-  public void testCreatePrivilegeResourcesWithUppercaseUsername() {
-    // GIVEN
-    UserPrivilegeService userPrivilegeService = new UserPrivilegeService("User");
-    // WHEN
-    ResourceInstance result = userPrivilegeService.createPrivilegeResource("test");
-    // THEN
-    assertEquals( "user", result.getKeyValueMap().get(Resource.Type.User));
-  }
-
-  private class TestUserPrivilegeService extends UserPrivilegeService {
-
-    public TestUserPrivilegeService() {
-      super("user");
-    }
-
-    @Override
-    protected ResourceInstance createResource(Type type, Map<Type, String> mapIds) {
-      return getTestResource();
-    }
-
-    @Override
-    RequestFactory getRequestFactory() {
-      return getTestRequestFactory();
-    }
-
-    @Override
-    protected RequestBodyParser getBodyParser() {
-      return getTestBodyParser();
-    }
-
-    @Override
-    protected ResultSerializer getResultSerializer() {
-      return getTestResultSerializer();
-    }
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewDataMigrationServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewDataMigrationServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewDataMigrationServiceTest.java
deleted file mode 100644
index e1eb0de..0000000
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewDataMigrationServiceTest.java
+++ /dev/null
@@ -1,81 +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 static org.easymock.EasyMock.anyObject;
-import static org.easymock.EasyMock.createNiceMock;
-import static org.easymock.EasyMock.createStrictMock;
-import static org.easymock.EasyMock.eq;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.verify;
-
-import javax.ws.rs.WebApplicationException;
-
-import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
-import org.apache.ambari.server.view.ViewDataMigrationUtility;
-import org.apache.ambari.server.view.ViewRegistry;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ExpectedException;
-
-/**
- * ViewDataMigrationService tests.
- */
-public class ViewDataMigrationServiceTest {
-
-  private static String viewName = "MY_VIEW";
-  private static String instanceName = "INSTANCE1";
-  private static String version1 = "1.0.0";
-  private static String version2 = "2.0.0";
-
-  @Rule
-  public ExpectedException thrown = ExpectedException.none();
-
-  @Test
-  public void testServiceMigrateCallAdmin() throws Exception {
-    ViewRegistry viewRegistry = createNiceMock(ViewRegistry.class);
-    expect(viewRegistry.checkAdmin()).andReturn(true).anyTimes();
-    replay(viewRegistry);
-    ViewRegistry.initInstance(viewRegistry);
-
-    ViewDataMigrationService service = new ViewDataMigrationService(viewName, version1, instanceName);
-
-    ViewDataMigrationUtility migrationUtility = createStrictMock(ViewDataMigrationUtility.class);
-    migrationUtility.migrateData(anyObject(ViewInstanceEntity.class), anyObject(ViewInstanceEntity.class), eq(false));
-    replay(migrationUtility);
-    service.setViewDataMigrationUtility(migrationUtility);
-
-    service.migrateData(version2, instanceName);
-
-    verify(migrationUtility);
-  }
-
-  @Test
-  public void testServiceMigrateCallNotAdmin() throws Exception {
-    ViewRegistry viewRegistry = createNiceMock(ViewRegistry.class);
-    expect(viewRegistry.checkAdmin()).andReturn(false).anyTimes();
-    replay(viewRegistry);
-    ViewRegistry.initInstance(viewRegistry);
-
-    ViewDataMigrationService service = new ViewDataMigrationService(viewName, version1, instanceName);
-
-    thrown.expect(WebApplicationException.class);
-    service.migrateData(version2, instanceName);
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewExternalSubResourceServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewExternalSubResourceServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewExternalSubResourceServiceTest.java
deleted file mode 100644
index 155f91e..0000000
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewExternalSubResourceServiceTest.java
+++ /dev/null
@@ -1,50 +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.controller.spi.Resource;
-import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
-import org.apache.ambari.server.orm.entities.ViewInstanceEntityTest;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * ViewExternalSubResourceService tests.
- */
-public class ViewExternalSubResourceServiceTest {
-  @Test
-  public void testAddResourceService() throws Exception {
-    Resource.Type type = new Resource.Type("resource");
-
-    ViewInstanceEntity definition = ViewInstanceEntityTest.getViewInstanceEntity();
-    ViewExternalSubResourceService service = new ViewExternalSubResourceService(type, definition);
-
-    Object fooService = new Object();
-
-    service.addResourceService("foo", fooService);
-
-    Assert.assertEquals(fooService, service.getResource("foo"));
-
-    try {
-      service.getResource("bar");
-      Assert.fail("Expected IllegalArgumentException for unknown service name.");
-    } catch (IllegalArgumentException e) {
-      // expected
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewPermissionServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewPermissionServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewPermissionServiceTest.java
deleted file mode 100644
index 7f58fb2..0000000
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewPermissionServiceTest.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 static org.junit.Assert.assertEquals;
-
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.UriInfo;
-
-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;
-
-/**
- * Unit tests for ViewPermissionService.
- */
-public class ViewPermissionServiceTest extends BaseServiceTest {
-
-
-  public List<ServiceTestInvocation> getTestInvocations() throws Exception {
-    List<ServiceTestInvocation> listInvocations = new ArrayList<ServiceTestInvocation>();
-
-    //getPermission
-    ViewPermissionService permissionService = new TestViewPermissionService("MY_VIEW", "1.0", "permissionName");
-    Method m = permissionService.getClass().getMethod("getPermission", HttpHeaders.class, UriInfo.class, String.class);
-    Object[] args = new Object[] {getHttpHeaders(), getUriInfo(), "permissionName"};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.GET, permissionService, m, args, null));
-
-    //getPermissions
-    permissionService = new TestViewPermissionService("MY_VIEW", "1.0",null);
-    m = permissionService.getClass().getMethod("getPermissions", HttpHeaders.class, UriInfo.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo()};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.GET, permissionService, m, args, null));
-
-    //createPermission
-    permissionService = new TestViewPermissionService("MY_VIEW", "1.0","permissionName");
-    m = permissionService.getClass().getMethod("createPermission", String.class, HttpHeaders.class, UriInfo.class, String.class);
-    args = new Object[] {"body", getHttpHeaders(), getUriInfo(), "permissionName"};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.POST, permissionService, m, args, "body"));
-
-    //deletePermission
-    permissionService = new TestViewPermissionService("MY_VIEW", "1.0","permissionName");
-    m = permissionService.getClass().getMethod("deletePermission", HttpHeaders.class, UriInfo.class, String.class);
-    args = new Object[] {getHttpHeaders(), getUriInfo(), "permissionName"};
-    listInvocations.add(new ServiceTestInvocation(Request.Type.DELETE, permissionService, m, args, null));
-
-    return listInvocations;
-  }
-
-
-  private class TestViewPermissionService extends ViewPermissionService {
-    private String permissionId;
-
-    private TestViewPermissionService(String viewName, String version, String permissionId) {
-
-      super(viewName, version);
-      this.permissionId = permissionId;
-    }
-
-    @Override
-    protected ResourceInstance createPermissionResource(String viewName, String viewVersion, String permissionId) {
-      assertEquals(this.permissionId, permissionId);
-      return getTestResource();
-    }
-
-    @Override
-    RequestFactory getRequestFactory() {
-      return getTestRequestFactory();
-    }
-
-    @Override
-    protected RequestBodyParser getBodyParser() {
-      return getTestBodyParser();
-    }
-
-    @Override
-    protected ResultSerializer getResultSerializer() {
-      return getTestResultSerializer();
-    }
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewSubResourceServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewSubResourceServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewSubResourceServiceTest.java
index 9499466..fa179d6 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewSubResourceServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ViewSubResourceServiceTest.java
@@ -43,6 +43,7 @@ import javax.ws.rs.core.UriInfo;
 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 org.apache.ambari.server.api.services.views.ViewSubResourceService;
 import org.apache.ambari.server.api.util.TreeNode;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.orm.entities.ViewInstanceEntity;

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/test/java/org/apache/ambari/server/api/services/views/ViewDataMigrationServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/views/ViewDataMigrationServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/views/ViewDataMigrationServiceTest.java
new file mode 100644
index 0000000..35338a1
--- /dev/null
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/views/ViewDataMigrationServiceTest.java
@@ -0,0 +1,81 @@
+/**
+ * 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.views;
+
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.createNiceMock;
+import static org.easymock.EasyMock.createStrictMock;
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+
+import javax.ws.rs.WebApplicationException;
+
+import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
+import org.apache.ambari.server.view.ViewDataMigrationUtility;
+import org.apache.ambari.server.view.ViewRegistry;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ExpectedException;
+
+/**
+ * ViewDataMigrationService tests.
+ */
+public class ViewDataMigrationServiceTest {
+
+  private static String viewName = "MY_VIEW";
+  private static String instanceName = "INSTANCE1";
+  private static String version1 = "1.0.0";
+  private static String version2 = "2.0.0";
+
+  @Rule
+  public ExpectedException thrown = ExpectedException.none();
+
+  @Test
+  public void testServiceMigrateCallAdmin() throws Exception {
+    ViewRegistry viewRegistry = createNiceMock(ViewRegistry.class);
+    expect(viewRegistry.checkAdmin()).andReturn(true).anyTimes();
+    replay(viewRegistry);
+    ViewRegistry.initInstance(viewRegistry);
+
+    ViewDataMigrationService service = new ViewDataMigrationService();
+
+    ViewDataMigrationUtility migrationUtility = createStrictMock(ViewDataMigrationUtility.class);
+    migrationUtility.migrateData(anyObject(ViewInstanceEntity.class), anyObject(ViewInstanceEntity.class), eq(false));
+    replay(migrationUtility);
+    service.setViewDataMigrationUtility(migrationUtility);
+
+    service.migrateData(viewName,version1,instanceName,version2, instanceName);
+
+    verify(migrationUtility);
+  }
+
+  @Test
+  public void testServiceMigrateCallNotAdmin() throws Exception {
+    ViewRegistry viewRegistry = createNiceMock(ViewRegistry.class);
+    expect(viewRegistry.checkAdmin()).andReturn(false).anyTimes();
+    replay(viewRegistry);
+    ViewRegistry.initInstance(viewRegistry);
+
+    ViewDataMigrationService service = new ViewDataMigrationService();
+
+    thrown.expect(WebApplicationException.class);
+    service.migrateData(viewName,version1,instanceName,version2, instanceName);
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/test/java/org/apache/ambari/server/api/services/views/ViewExternalSubResourceServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/views/ViewExternalSubResourceServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/views/ViewExternalSubResourceServiceTest.java
new file mode 100644
index 0000000..35756a1
--- /dev/null
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/views/ViewExternalSubResourceServiceTest.java
@@ -0,0 +1,50 @@
+/**
+ * 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.views;
+
+import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
+import org.apache.ambari.server.orm.entities.ViewInstanceEntityTest;
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * ViewExternalSubResourceService tests.
+ */
+public class ViewExternalSubResourceServiceTest {
+  @Test
+  public void testAddResourceService() throws Exception {
+    Resource.Type type = new Resource.Type("resource");
+
+    ViewInstanceEntity definition = ViewInstanceEntityTest.getViewInstanceEntity();
+    ViewExternalSubResourceService service = new ViewExternalSubResourceService(type, definition);
+
+    Object fooService = new Object();
+
+    service.addResourceService("foo", fooService);
+
+    Assert.assertEquals(fooService, service.getResource("foo"));
+
+    try {
+      service.getResource("bar");
+      Assert.fail("Expected IllegalArgumentException for unknown service name.");
+    } catch (IllegalArgumentException e) {
+      // expected
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java
index ebe92e4..7a3fbef 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java
@@ -27,6 +27,7 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Set;
 
+import org.apache.ambari.server.controller.GroupPrivilegeResponse;
 import org.apache.ambari.server.controller.spi.Predicate;
 import org.apache.ambari.server.controller.spi.Request;
 import org.apache.ambari.server.controller.spi.Resource;
@@ -131,7 +132,8 @@ public class GroupPrivilegeResourceProviderTest extends AbstractPrivilegeResourc
 
     GroupPrivilegeResourceProvider.init(clusterDAO, groupDAO, viewInstanceDAO, users);
     GroupPrivilegeResourceProvider provider = new GroupPrivilegeResourceProvider();
-    Resource resource = provider.toResource(privilegeEntity, "group1", provider.getPropertyIds());
+    GroupPrivilegeResponse response = provider.getResponse(privilegeEntity, "group1");
+    Resource resource = provider.toResource(response, provider.getPropertyIds());
 
     Assert.assertEquals(ResourceType.AMBARI.name(), resource.getPropertyValue(GroupPrivilegeResourceProvider.PRIVILEGE_TYPE_PROPERTY_ID));
 
@@ -182,7 +184,8 @@ public class GroupPrivilegeResourceProviderTest extends AbstractPrivilegeResourc
 
     GroupPrivilegeResourceProvider.init(clusterDAO, groupDAO, viewInstanceDAO, users);
     GroupPrivilegeResourceProvider provider = new GroupPrivilegeResourceProvider();
-    Resource resource = provider.toResource(privilegeEntity, "group1", provider.getPropertyIds());
+    GroupPrivilegeResponse response = provider.getResponse(privilegeEntity, "group1");
+    Resource resource = provider.toResource(response, provider.getPropertyIds());
 
     Assert.assertEquals("TestCluster", resource.getPropertyValue(ClusterPrivilegeResourceProvider.PRIVILEGE_CLUSTER_NAME_PROPERTY_ID));
     Assert.assertEquals(ResourceType.CLUSTER.name(), resource.getPropertyValue(GroupPrivilegeResourceProvider.PRIVILEGE_TYPE_PROPERTY_ID));
@@ -240,7 +243,8 @@ public class GroupPrivilegeResourceProviderTest extends AbstractPrivilegeResourc
 
     GroupPrivilegeResourceProvider.init(clusterDAO, groupDAO, viewInstanceDAO, users);
     GroupPrivilegeResourceProvider provider = new GroupPrivilegeResourceProvider();
-    Resource resource = provider.toResource(privilegeEntity, "group1", provider.getPropertyIds());
+    GroupPrivilegeResponse response = provider.getResponse(privilegeEntity, "group1");
+    Resource resource = provider.toResource(response, provider.getPropertyIds());
 
     Assert.assertEquals("Test View", resource.getPropertyValue(ViewPrivilegeResourceProvider.PRIVILEGE_INSTANCE_NAME_PROPERTY_ID));
     Assert.assertEquals("TestView", resource.getPropertyValue(ViewPrivilegeResourceProvider.PRIVILEGE_VIEW_NAME_PROPERTY_ID));
@@ -299,7 +303,8 @@ public class GroupPrivilegeResourceProviderTest extends AbstractPrivilegeResourc
 
     GroupPrivilegeResourceProvider.init(clusterDAO, groupDAO, viewInstanceDAO, users);
     GroupPrivilegeResourceProvider provider = new GroupPrivilegeResourceProvider();
-    Resource resource = provider.toResource(privilegeEntity, "group1", provider.getPropertyIds());
+    GroupPrivilegeResponse response = provider.getResponse(privilegeEntity, "group1");
+    Resource resource = provider.toResource(response, provider.getPropertyIds());
 
     Assert.assertEquals("Test View", resource.getPropertyValue(ViewPrivilegeResourceProvider.PRIVILEGE_INSTANCE_NAME_PROPERTY_ID));
     Assert.assertEquals("TestView", resource.getPropertyValue(ViewPrivilegeResourceProvider.PRIVILEGE_VIEW_NAME_PROPERTY_ID));

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProviderTest.java
index 5092db5..793e096 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProviderTest.java
@@ -28,6 +28,7 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Set;
 
+import org.apache.ambari.server.controller.UserPrivilegeResponse;
 import org.apache.ambari.server.controller.spi.Predicate;
 import org.apache.ambari.server.controller.spi.Request;
 import org.apache.ambari.server.controller.spi.Resource;
@@ -142,7 +143,8 @@ public class UserPrivilegeResourceProviderTest extends AbstractPrivilegeResource
 
     UserPrivilegeResourceProvider.init(userDAO, clusterDAO, groupDAO, viewInstanceDAO, users);
     UserPrivilegeResourceProvider provider = new UserPrivilegeResourceProvider();
-    Resource resource = provider.toResource(privilegeEntity, "jdoe", provider.getPropertyIds());
+    UserPrivilegeResponse response = provider.getResponse(privilegeEntity, "jdoe");
+    Resource resource = provider.toResource(response, provider.getPropertyIds());
 
     Assert.assertEquals(ResourceType.AMBARI.name(), resource.getPropertyValue(UserPrivilegeResourceProvider.PRIVILEGE_TYPE_PROPERTY_ID));
 
@@ -195,7 +197,8 @@ public class UserPrivilegeResourceProviderTest extends AbstractPrivilegeResource
 
     UserPrivilegeResourceProvider.init(userDAO, clusterDAO, groupDAO, viewInstanceDAO, users);
     UserPrivilegeResourceProvider provider = new UserPrivilegeResourceProvider();
-    Resource resource = provider.toResource(privilegeEntity, "jdoe", provider.getPropertyIds());
+    UserPrivilegeResponse response = provider.getResponse(privilegeEntity, "jdoe");
+    Resource resource = provider.toResource(response, provider.getPropertyIds());
 
     Assert.assertEquals("TestCluster", resource.getPropertyValue(ClusterPrivilegeResourceProvider.PRIVILEGE_CLUSTER_NAME_PROPERTY_ID));
     Assert.assertEquals(ResourceType.CLUSTER.name(), resource.getPropertyValue(UserPrivilegeResourceProvider.PRIVILEGE_TYPE_PROPERTY_ID));
@@ -254,7 +257,8 @@ public class UserPrivilegeResourceProviderTest extends AbstractPrivilegeResource
 
     UserPrivilegeResourceProvider.init(userDAO, clusterDAO, groupDAO, viewInstanceDAO, users);
     UserPrivilegeResourceProvider provider = new UserPrivilegeResourceProvider();
-    Resource resource = provider.toResource(privilegeEntity, "jdoe", provider.getPropertyIds());
+    UserPrivilegeResponse response = provider.getResponse(privilegeEntity, "jdoe");
+    Resource resource = provider.toResource(response, provider.getPropertyIds());
 
     Assert.assertEquals("Test View", resource.getPropertyValue(ViewPrivilegeResourceProvider.PRIVILEGE_INSTANCE_NAME_PROPERTY_ID));
     Assert.assertEquals("TestView", resource.getPropertyValue(ViewPrivilegeResourceProvider.PRIVILEGE_VIEW_NAME_PROPERTY_ID));
@@ -315,7 +319,8 @@ public class UserPrivilegeResourceProviderTest extends AbstractPrivilegeResource
 
     UserPrivilegeResourceProvider.init(userDAO, clusterDAO, groupDAO, viewInstanceDAO, users);
     UserPrivilegeResourceProvider provider = new UserPrivilegeResourceProvider();
-    Resource resource = provider.toResource(privilegeEntity, "jdoe", provider.getPropertyIds());
+    UserPrivilegeResponse response = provider.getResponse(privilegeEntity, "jdoe");
+    Resource resource = provider.toResource(response, provider.getPropertyIds());
 
     Assert.assertEquals("Test View", resource.getPropertyValue(ViewPrivilegeResourceProvider.PRIVILEGE_INSTANCE_NAME_PROPERTY_ID));
     Assert.assertEquals("TestView", resource.getPropertyValue(ViewPrivilegeResourceProvider.PRIVILEGE_VIEW_NAME_PROPERTY_ID));


[45/49] ambari git commit: AMBARI-21063. Integrate RequestService with Swagger (Balazs Bence Sari via adoroszlai)

Posted by ad...@apache.org.
AMBARI-21063. Integrate RequestService with Swagger (Balazs Bence Sari via adoroszlai)


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

Branch: refs/heads/trunk
Commit: 017726319c77c4bc6cae86f1f1e42b1b6d4f1ce0
Parents: f2cad77
Author: Balazs Bence Sari <bs...@hortonworks.com>
Authored: Tue May 23 10:58:03 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Tue May 23 10:58:03 2017 +0200

----------------------------------------------------------------------
 .../server/api/services/RequestService.java     | 105 +++++++++++++++++--
 .../server/controller/RequestPostRequest.java   |  96 +++++++++++++++++
 .../server/controller/RequestPostResponse.java  |  43 ++++++++
 .../server/controller/RequestPutRequest.java    |  33 ++++++
 .../server/controller/RequestRequest.java       |   6 ++
 .../server/controller/RequestResponse.java      | 100 ++++++++++++++++++
 .../internal/RequestResourceFilter.java         |   3 +-
 .../internal/RequestResourceProvider.java       |  66 ++++++------
 8 files changed, 409 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/01772631/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
index 936b857..3532695 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RequestService.java
@@ -30,18 +30,35 @@ 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.MediaType;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 
 import org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.controller.RequestPostResponse;
+import org.apache.ambari.server.controller.RequestResponse;
 import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.http.HttpStatus;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 
 
 /**
  * Service responsible for request resource requests.
  */
 @Path("/requests/")
+@Api(value = "Requests", description = "Endpoint for request specific operations")
 public class RequestService extends BaseService {
+
+  private static final String REQUEST_POST_REQUEST_TYPE = "org.apache.ambari.server.controller.RequestPostRequest";
+  private static final String REQUEST_PUT_REQUEST_TYPE = "org.apache.ambari.server.controller.RequestPutRequest";
+
   /**
    * Parent cluster name.
    */
@@ -73,9 +90,23 @@ public class RequestService extends BaseService {
    */
   @GET
   @Path("{requestId}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get the details of a request",
+      nickname = "RequestService#getRequest",
+      response = RequestResponse.class)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION,
+          defaultValue = "Requests/*",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getRequest(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                             @PathParam("requestId") String requestId) {
+                             @ApiParam @PathParam("requestId") String requestId) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
         createRequestResource(m_clusterName, requestId));
@@ -91,7 +122,27 @@ public class RequestService extends BaseService {
    * @return request collection resource representation
    */
   @GET
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get all requests. A predicate can be given to filter results.",
+      nickname = "RequestService#getRequests",
+      response = RequestResponse.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION,
+          defaultValue = "Requests/id",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION,
+          defaultValue = "Requests/id.asc",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getRequests(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
     return handleRequest(headers, body, ui, Request.Type.GET,
         createRequestResource(m_clusterName, null));
@@ -101,7 +152,8 @@ public class RequestService extends BaseService {
    * Gets the stage sub-resource.
    */
   @Path("{requestId}/stages")
-  public StageService getStageHandler(@PathParam("requestId") String requestId) {
+  // TODO: find a way to handle this with Swagger (refactor or custom annotation?)
+  public StageService getStageHandler(@ApiParam @PathParam("requestId") String requestId) {
     return new StageService(m_clusterName, requestId);
   }
 
@@ -109,7 +161,8 @@ public class RequestService extends BaseService {
    * Gets the tasks sub-resource.
    */
   @Path("{requestId}/tasks")
-  public TaskService getTaskHandler(@PathParam("requestId") String requestId) {
+  // TODO: find a way to handle this with Swagger (refactor or custom annotation?)
+  public TaskService getTaskHandler(@ApiParam @PathParam("requestId") String requestId) {
     return new TaskService(m_clusterName, requestId, null);
   }
 
@@ -124,15 +177,31 @@ public class RequestService extends BaseService {
    */
   @PUT
   @Path("{requestId}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Updates a request, usually used to cancel running requests.",
+      notes = "Changes the state of an existing request. Usually used to cancel running requests.",
+      nickname = "RequestService#updateRequests"
+  )
+  @ApiImplicitParams({
+      @ApiImplicitParam(dataType = REQUEST_PUT_REQUEST_TYPE, paramType = PARAM_TYPE_BODY)
+  })
+  @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+      @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response updateRequests(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                                 @PathParam("requestId") String requestId) {
+                                 @ApiParam @PathParam("requestId") String requestId) {
     return handleRequest(headers, body, ui, Request.Type.PUT, createRequestResource(m_clusterName, requestId));
   }
 
   /**
    * Handles: POST /clusters/{clusterId}/requests or /requests
-   * Create multiple services.
+   * Create multiple requests.
    *
    * @param body        http body
    * @param headers     http headers
@@ -140,9 +209,25 @@ public class RequestService extends BaseService {
    * @return information regarding the created requests
    */
   @POST
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Creates one or more Requests",
+      nickname = "RequestService#createRequests"
+  )
+  @ApiImplicitParams({
+      @ApiImplicitParam(dataType = REQUEST_POST_REQUEST_TYPE, paramType = PARAM_TYPE_BODY, allowMultiple = true)
+  })
+  @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED,
+          response = RequestPostResponse.class),
+      @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_CONFLICT, message = MSG_RESOURCE_ALREADY_EXISTS),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response createRequests(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-
     return handleRequest(headers, body, ui, Request.Type.POST, createRequestResource(m_clusterName, null));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/01772631/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostRequest.java
new file mode 100644
index 0000000..fa7799e
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostRequest.java
@@ -0,0 +1,96 @@
+/**
+ * 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;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ambari.server.controller.internal.RequestResourceProvider;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Request schema for endpoint {@link org.apache.ambari.server.api.services.RequestService#createRequests(String,
+ *    javax.ws.rs.core.HttpHeaders, javax.ws.rs.core.UriInfo)}
+ *
+ * The interface is not actually implemented, it only carries swagger annotations.
+ */
+public interface RequestPostRequest extends ApiModel {
+
+  String NOTES_ACTION_OR_COMMAND = "Either action or command must be specified, but not both";
+
+  @ApiModelProperty(name = RequestResourceProvider.REQUEST_INFO)
+  RequestInfo getRequestInfo();
+
+  @ApiModelProperty(name = "Body")
+  Body getBody();
+
+  interface RequestInfo {
+    @ApiModelProperty(name = RequestResourceProvider.ACTION_ID, notes = NOTES_ACTION_OR_COMMAND)
+    String getAction();
+
+    @ApiModelProperty(name = RequestResourceProvider.COMMAND_ID, notes = NOTES_ACTION_OR_COMMAND)
+    String getCommand();
+
+    @ApiModelProperty(name = "operation_level",
+        notes = "Must be specified along with command.")
+    OperationLevel getOperationLevel();
+
+    @ApiModelProperty(name = "parameters")
+    Map<String, Object> getParameters();
+  }
+
+  interface RequestResourceFilter {
+    @ApiModelProperty(name = "service_name")
+    String getServiceName();
+
+    @ApiModelProperty(name = "component_name")
+    String getComponentName();
+
+    @ApiModelProperty(name = "hosts")
+    String getHosts();
+
+    @ApiModelProperty(name = "hosts_predicate")
+    String getHostsPredicate();
+  }
+
+  interface OperationLevel {
+    @ApiModelProperty(name = "level")
+    String getLevel();
+
+    @ApiModelProperty(name = "cluster_name")
+    String getClusterName();
+  }
+
+  interface Body {
+    @ApiModelProperty(name = RequestResourceProvider.REQUESTS)
+    Request getRequest();
+  }
+
+  interface Request {
+    @ApiModelProperty(name = "resource_filters")
+    List<RequestResourceFilter> getResourceFilters();
+
+    @ApiModelProperty(name = "cluster_name")
+    String getClusterName();
+
+    @ApiModelProperty(name = "exclusive")
+    boolean isExclusive();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/01772631/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostResponse.java
new file mode 100644
index 0000000..da2731a
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPostResponse.java
@@ -0,0 +1,43 @@
+/**
+ * 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;
+
+import org.apache.ambari.server.controller.internal.RequestResourceProvider;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response schema for endpoint {@link org.apache.ambari.server.api.services.RequestService#createRequests(String,
+ *    javax.ws.rs.core.HttpHeaders, javax.ws.rs.core.UriInfo)}
+ *
+ * The interface is not actually implemented, it only carries swagger annotations.
+ */
+public interface RequestPostResponse extends ApiModel {
+
+  @ApiModelProperty(name = RequestResourceProvider.REQUESTS)
+  ShortRequestInfo getShortRequestInfo();
+
+  interface ShortRequestInfo {
+    @ApiModelProperty(name = "id")
+    long getId();
+
+    @ApiModelProperty(name = "status")
+    String getStatus();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/01772631/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPutRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPutRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPutRequest.java
new file mode 100644
index 0000000..232b233
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestPutRequest.java
@@ -0,0 +1,33 @@
+/**
+ * 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;
+
+import org.apache.ambari.server.controller.internal.RequestResourceProvider;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Request schema for endpoint {@link org.apache.ambari.server.api.services.RequestService#updateRequests(String,
+ *    javax.ws.rs.core.HttpHeaders, javax.ws.rs.core.UriInfo, String)}
+ *
+ * The interface is not actually implemented, it only carries swagger annotations.
+ */
+public interface RequestPutRequest extends ApiModel {
+  @ApiModelProperty(name = RequestResourceProvider.REQUESTS)
+  RequestRequest getRequestRequest();
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/01772631/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
index db9268b..5dfc148 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
@@ -19,6 +19,8 @@ package org.apache.ambari.server.controller;
 
 import org.apache.ambari.server.actionmanager.HostRoleStatus;
 
+import io.swagger.annotations.ApiModelProperty;
+
 /**
  * Encapsulates all data about update request that came to RequestResourceProvider
  */
@@ -38,10 +40,12 @@ public class RequestRequest {
   private String abortReason;
 
 
+  @ApiModelProperty(name = "request_status", notes = "Only valid value is ABORTED.")
   public HostRoleStatus getStatus() {
     return status;
   }
 
+  @ApiModelProperty(name = "cluster_name")
   public String getClusterName() {
     return clusterName;
   }
@@ -50,6 +54,7 @@ public class RequestRequest {
     this.clusterName = clusterName;
   }
 
+  @ApiModelProperty(name = "id")
   public long getRequestId() {
     return requestId;
   }
@@ -62,6 +67,7 @@ public class RequestRequest {
     this.status = status;
   }
 
+  @ApiModelProperty(name = "abort_reason")
   public String getAbortReason() {
     return abortReason;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/01772631/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestResponse.java
new file mode 100644
index 0000000..a6db34f
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestResponse.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.controller;
+
+
+import java.util.List;
+
+import org.apache.ambari.server.controller.internal.RequestResourceProvider;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response schema for endpoint {@link org.apache.ambari.server.api.services.RequestService#getRequest(String,
+ *    javax.ws.rs.core.HttpHeaders, javax.ws.rs.core.UriInfo, String)}
+ *
+ * The interface is not actually implemented, it only carries swagger annotations.
+ */
+public interface RequestResponse extends ApiModel {
+
+  @ApiModelProperty(name = RequestResourceProvider.REQUESTS)
+  RequestStatusInfo getRequestStatusInfo();
+
+  interface RequestStatusInfo {
+    @ApiModelProperty(name = "id")
+    String getRequestId();
+
+    @ApiModelProperty(name = "request_status")
+    String getStatus();
+
+    @ApiModelProperty(name = "aborted_task_count")
+    int getAbortedTaskCount();
+
+    @ApiModelProperty(name = "cluster_name")
+    String getClusterName();
+
+    @ApiModelProperty(name = "completed_task_count")
+    String getCompletedTaskCount();
+
+    @ApiModelProperty(name = "create_time")
+    long getCreateTime();
+
+    @ApiModelProperty(name = "start_time")
+    String getStartTime();
+
+    @ApiModelProperty(name = "end_time")
+    String getEndTime();
+
+    @ApiModelProperty(name = "exclusive")
+    boolean isExclusive();
+
+    @ApiModelProperty(name = "failed_task_count")
+    int getFailedTaskCount();
+
+    @ApiModelProperty(name = "inputs")
+    String getInputs();
+
+    @ApiModelProperty(name = "operation_level")
+    String getOperationLevel();
+
+    @ApiModelProperty(name = "progress_percent")
+    double getProgressPercent();
+
+    @ApiModelProperty(name = "queued_task_count")
+    int getQueuedTaskCount();
+
+    @ApiModelProperty(name = "request_context")
+    String getRequestContext();
+
+    @ApiModelProperty(name = "request_schedule")
+    String getRequestSchedule();
+
+    @ApiModelProperty(name = "request_schedule_id")
+    long getRequestScheduleId();
+
+    @ApiModelProperty(name = "resource_filters")
+    List<RequestPostRequest.RequestResourceFilter> getResourceFilters();
+
+    @ApiModelProperty(name = "task_count")
+    int getTaskCount();
+
+    @ApiModelProperty(name = "type")
+    String getType();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/01772631/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceFilter.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceFilter.java
index 4028e35..2c68a6c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceFilter.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceFilter.java
@@ -20,10 +20,11 @@ package org.apache.ambari.server.controller.internal;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.ambari.server.controller.ApiModel;
 import org.codehaus.jackson.annotate.JsonProperty;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
-public class RequestResourceFilter {
+public class RequestResourceFilter implements ApiModel {
   private String serviceName;
   private String componentName;
   private final List<String> hostNames = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/ambari/blob/01772631/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
index 9704b33..1fc4bd5 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
@@ -91,38 +91,40 @@ public class RequestResourceProvider extends AbstractControllerResourceProvider
 
   // ----- Property ID constants ---------------------------------------------
   // Requests
-  public static final String REQUEST_CLUSTER_NAME_PROPERTY_ID = "Requests/cluster_name";
-  public static final String REQUEST_CLUSTER_ID_PROPERTY_ID = "Requests/cluster_id";
-  public static final String REQUEST_ID_PROPERTY_ID = "Requests/id";
-  protected static final String REQUEST_STATUS_PROPERTY_ID = "Requests/request_status";
-  protected static final String REQUEST_ABORT_REASON_PROPERTY_ID = "Requests/abort_reason";
-  protected static final String REQUEST_CONTEXT_ID = "Requests/request_context";
-  public static final String REQUEST_SOURCE_SCHEDULE = "Requests/request_schedule";
-  public static final String REQUEST_SOURCE_SCHEDULE_ID = "Requests/request_schedule/schedule_id";
-  public static final String REQUEST_SOURCE_SCHEDULE_HREF = "Requests/request_schedule/href";
-  protected static final String REQUEST_TYPE_ID = "Requests/type";
-  protected static final String REQUEST_INPUTS_ID = "Requests/inputs";
-  protected static final String REQUEST_RESOURCE_FILTER_ID = "Requests/resource_filters";
-  protected static final String REQUEST_OPERATION_LEVEL_ID = "Requests/operation_level";
-  protected static final String REQUEST_CREATE_TIME_ID = "Requests/create_time";
-  protected static final String REQUEST_START_TIME_ID = "Requests/start_time";
-  protected static final String REQUEST_END_TIME_ID = "Requests/end_time";
-  protected static final String REQUEST_EXCLUSIVE_ID = "Requests/exclusive";
-  protected static final String REQUEST_TASK_CNT_ID = "Requests/task_count";
-  protected static final String REQUEST_FAILED_TASK_CNT_ID = "Requests/failed_task_count";
-  protected static final String REQUEST_ABORTED_TASK_CNT_ID = "Requests/aborted_task_count";
-  protected static final String REQUEST_TIMED_OUT_TASK_CNT_ID = "Requests/timed_out_task_count";
-  protected static final String REQUEST_COMPLETED_TASK_CNT_ID = "Requests/completed_task_count";
-  protected static final String REQUEST_QUEUED_TASK_CNT_ID = "Requests/queued_task_count";
-  protected static final String REQUEST_PROGRESS_PERCENT_ID = "Requests/progress_percent";
-  protected static final String COMMAND_ID = "command";
-  protected static final String SERVICE_ID = "service_name";
-  protected static final String COMPONENT_ID = "component_name";
-  protected static final String HOSTS_ID = "hosts"; // This is actually a list of hosts
-  protected static final String HOSTS_PREDICATE = "hosts_predicate";
-  protected static final String ACTION_ID = "action";
-  protected static final String INPUTS_ID = "parameters";
-  protected static final String EXLUSIVE_ID = "exclusive";
+  public static final String REQUESTS = "Requests";
+  public static final String REQUEST_INFO = "RequestInfo";
+  public static final String REQUEST_CLUSTER_NAME_PROPERTY_ID = REQUESTS + "/cluster_name";
+  public static final String REQUEST_CLUSTER_ID_PROPERTY_ID = REQUESTS + "/cluster_id";
+  public static final String REQUEST_ID_PROPERTY_ID = REQUESTS + "/id";
+  public static final String REQUEST_STATUS_PROPERTY_ID = REQUESTS + "/request_status";
+  public static final String REQUEST_ABORT_REASON_PROPERTY_ID = REQUESTS + "/abort_reason";
+  public static final String REQUEST_CONTEXT_ID = REQUESTS + "/request_context";
+  public static final String REQUEST_SOURCE_SCHEDULE = REQUESTS + "/request_schedule";
+  public static final String REQUEST_SOURCE_SCHEDULE_ID = REQUESTS + "/request_schedule/schedule_id";
+  public static final String REQUEST_SOURCE_SCHEDULE_HREF = REQUESTS + "/request_schedule/href";
+  public static final String REQUEST_TYPE_ID = REQUESTS + "/type";
+  public static final String REQUEST_INPUTS_ID = REQUESTS + "/inputs";
+  public static final String REQUEST_RESOURCE_FILTER_ID = REQUESTS + "/resource_filters";
+  public static final String REQUEST_OPERATION_LEVEL_ID = REQUESTS + "/operation_level";
+  public static final String REQUEST_CREATE_TIME_ID = REQUESTS + "/create_time";
+  public static final String REQUEST_START_TIME_ID = REQUESTS + "/start_time";
+  public static final String REQUEST_END_TIME_ID = REQUESTS + "/end_time";
+  public static final String REQUEST_EXCLUSIVE_ID = REQUESTS + "/exclusive";
+  public static final String REQUEST_TASK_CNT_ID = REQUESTS + "/task_count";
+  public static final String REQUEST_FAILED_TASK_CNT_ID = REQUESTS + "/failed_task_count";
+  public static final String REQUEST_ABORTED_TASK_CNT_ID = REQUESTS + "/aborted_task_count";
+  public static final String REQUEST_TIMED_OUT_TASK_CNT_ID = REQUESTS + "/timed_out_task_count";
+  public static final String REQUEST_COMPLETED_TASK_CNT_ID = REQUESTS + "/completed_task_count";
+  public static final String REQUEST_QUEUED_TASK_CNT_ID = REQUESTS + "/queued_task_count";
+  public static final String REQUEST_PROGRESS_PERCENT_ID = REQUESTS + "/progress_percent";
+  public static final String COMMAND_ID = "command";
+  public static final String SERVICE_ID = "service_name";
+  public static final String COMPONENT_ID = "component_name";
+  public static final String HOSTS_ID = "hosts"; // This is actually a list of hosts
+  public static final String HOSTS_PREDICATE = "hosts_predicate";
+  public static final String ACTION_ID = "action";
+  public static final String INPUTS_ID = "parameters";
+  public static final String EXLUSIVE_ID = "exclusive";
   private static Set<String> pkPropertyIds =
     new HashSet<>(Arrays.asList(new String[]{
       REQUEST_ID_PROPERTY_ID}));


[42/49] ambari git commit: AMBARI-20994. Integrate RootServiceService with Swagger, addendum (adoroszlai)

Posted by ad...@apache.org.
AMBARI-20994. Integrate RootServiceService with Swagger, addendum (adoroszlai)


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

Branch: refs/heads/trunk
Commit: 9763993c75e4b50aeb82da24657c082f8bc01922
Parents: 950298b
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Wed May 17 16:13:18 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Wed May 17 19:27:16 2017 +0200

----------------------------------------------------------------------
 .../ambari/server/controller/RootServiceResponseFactory.java  | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9763993c/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java
index 714fbed..294bcc9 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java
@@ -199,9 +199,8 @@ public class RootServiceResponseFactory extends
     Set<RootServiceHostComponentResponse> response = new HashSet<>();
 
     String serviceName = request.getServiceName();
-    String componentName = request.getComponentName();
     Set<RootServiceComponentResponse> rootServiceComponents =
-        getRootServiceComponents(new RootServiceComponentRequest(serviceName, componentName));
+        getRootServiceComponents(new RootServiceComponentRequest(serviceName, request.getComponentName()));
 
     //Cartesian product with hosts and components
     for (RootServiceComponentResponse component : rootServiceComponents) {
@@ -226,8 +225,8 @@ public class RootServiceResponseFactory extends
         } else {
           state = host.getHostState().toString();
         }
-        String componentVersion = getComponentVersion(componentName, host);
-        response.add(new RootServiceHostComponentResponse(serviceName, host.getHostname(), componentName, state, componentVersion, component.getProperties()));
+        String componentVersion = getComponentVersion(component.getComponentName(), host);
+        response.add(new RootServiceHostComponentResponse(serviceName, host.getHostname(), component.getComponentName(), state, componentVersion, component.getProperties()));
       }
     }
     


[35/49] ambari git commit: AMBARI-20970. Integrate StackService resource with swagger (Balazs Bence Sari via adoroszlai)

Posted by ad...@apache.org.
AMBARI-20970. Integrate StackService resource with swagger (Balazs Bence Sari via adoroszlai)


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

Branch: refs/heads/trunk
Commit: 54983ee3b8980e3f1e35a7859d4e759eb17fac87
Parents: 0e13b01
Author: Balazs Bence Sari <bs...@hortonworks.com>
Authored: Wed May 10 17:14:08 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Wed May 10 17:14:08 2017 +0200

----------------------------------------------------------------------
 .../ambari/server/api/services/BaseService.java |  25 +-
 .../ambari/server/api/services/HostService.java |  96 +--
 .../server/api/services/StacksService.java      | 730 ++++++++++++++++---
 .../server/api/services/users/UserService.java  |   2 +-
 .../api/services/views/ViewInstanceService.java |   2 +-
 .../controller/ComponentDependencyResponse.java |  64 ++
 .../controller/ExtensionLinkResponse.java       | 137 ++--
 .../server/controller/QuickLinksResponse.java   |  56 ++
 .../controller/StackArtifactResponse.java       |  52 ++
 .../StackConfigurationDependencyResponse.java   |  17 +
 .../controller/StackConfigurationResponse.java  |  26 +-
 .../ambari/server/controller/StackResponse.java |  12 +
 .../StackServiceArtifactResponse.java           |  53 ++
 .../StackServiceComponentResponse.java          |  27 +
 .../server/controller/StackServiceResponse.java |  31 +-
 .../server/controller/StackVersionResponse.java |  59 +-
 .../ambari/server/controller/ThemeResponse.java |  56 ++
 .../server/controller/ViewInstanceResponse.java |   2 +-
 .../state/QuickLinksConfigurationInfo.java      |   8 +-
 .../apache/ambari/server/state/StackInfo.java   |   2 +-
 .../server/state/ValueAttributesInfo.java       |  87 ++-
 .../ambari/server/state/ValueEntryInfo.java     |   8 +-
 .../server/state/theme/ConfigCondition.java     |  13 +-
 .../server/state/theme/ConfigPlacement.java     |  25 +-
 .../ambari/server/state/theme/Layout.java       |   5 +
 .../ambari/server/state/theme/Section.java      |  22 +-
 .../ambari/server/state/theme/Subsection.java   |  13 +-
 .../apache/ambari/server/state/theme/Tab.java   |  12 +-
 .../ambari/server/state/theme/TabLayout.java    |   8 +-
 .../apache/ambari/server/state/theme/Theme.java |   9 +-
 .../server/state/theme/ThemeConfiguration.java  |  10 +-
 .../apache/ambari/server/state/theme/Unit.java  |   7 +-
 .../ambari/server/state/theme/Widget.java       |  12 +-
 .../ambari/server/state/theme/WidgetEntry.java  |   9 +-
 34 files changed, 1397 insertions(+), 300 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
index 76d2b70..0b2afd1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
@@ -49,14 +49,15 @@ import org.slf4j.LoggerFactory;
 public abstract class BaseService {
   public final static MediaType MEDIA_TYPE_TEXT_CSV_TYPE = new MediaType("text", "csv");
 
-  static final String SUCCESSFUL_OPERATION = "Successful operation";
-  static final String REQUEST_ACCEPTED = "Request is accepted, but not completely processed yet";
-  static final String INVALID_ARGUMENTS = "Invalid arguments";
-  static final String CLUSTER_NOT_FOUND = "Cluster not found";
-  static final String CLUSTER_OR_HOST_NOT_FOUND = "Cluster or host not found";
-  static final String NOT_AUTHENTICATED = "Not authenticated";
-  static final String PERMISSION_DENIED = "Not permitted to perform the operation";
-  static final String SERVER_ERROR = "Internal server error";
+  static final String MSG_SUCCESSFUL_OPERATION = "Successful operation";
+  static final String MSG_REQUEST_ACCEPTED = "Request is accepted, but not completely processed yet";
+  static final String MSG_INVALID_ARGUMENTS = "Invalid arguments";
+  static final String MSG_CLUSTER_NOT_FOUND = "Cluster not found";
+  static final String MSG_CLUSTER_OR_HOST_NOT_FOUND = "Cluster or host not found";
+  static final String MSG_NOT_AUTHENTICATED = "Not authenticated";
+  static final String MSG_PERMISSION_DENIED = "Not permitted to perform the operation";
+  static final String MSG_SERVER_ERROR = "Internal server error";
+  static final String MSG_RESOURCE_NOT_FOUND = "The requested resource doesn't exist.";
 
   static final String QUERY_FIELDS = "fields";
   static final String QUERY_FILTER_DESCRIPTION = "Filter fields in the response (identifier fields are mandatory)";
@@ -67,7 +68,6 @@ public abstract class BaseService {
   static final String DEFAULT_PAGE_SIZE = "10";
   static final String QUERY_FROM = "from";
   static final String QUERY_FROM_DESCRIPTION = "The starting page resource (inclusive).  \"start\" is also accepted.";
-  static final String QUERY_FROM_TYPE = "integer";
   static final String QUERY_FROM_VALUES = "range[0, infinity]";
   static final String DEFAULT_FROM = "0";
   static final String QUERY_TO = "to";
@@ -75,6 +75,13 @@ public abstract class BaseService {
   static final String QUERY_TO_TYPE = "integer";
   static final String QUERY_TO_VALUES = "range[1, infinity]";
 
+  static final String RESPONSE_CONTAINER_LIST = "List";
+
+  static final String DATA_TYPE_INT = "integer";
+  static final String DATA_TYPE_STRING = "string";
+
+  static final String PARAM_TYPE_QUERY = "query";
+
   /**
    * Logger instance.
    */

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
index 7b5f9cf..e50d70f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
@@ -95,11 +95,11 @@ public class HostService extends BaseService {
     @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = "string", paramType = "query"),
   })
   @ApiResponses({
-    @ApiResponse(code = HttpStatus.SC_OK, message = SUCCESSFUL_OPERATION),
-    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = CLUSTER_OR_HOST_NOT_FOUND),
-    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = NOT_AUTHENTICATED),
-    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = PERMISSION_DENIED),
-    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = SERVER_ERROR),
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_CLUSTER_OR_HOST_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
   })
   public Response getHost(String body, @Context HttpHeaders headers, @Context UriInfo ui,
     @ApiParam(value = "host name", required = true) @PathParam("hostName") String hostName
@@ -123,15 +123,15 @@ public class HostService extends BaseService {
     @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, defaultValue = "Hosts/*", dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION, defaultValue = "Hosts/host_name.asc", dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = "integer", paramType = "query"),
-    @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, allowableValues = QUERY_FROM_VALUES, defaultValue = DEFAULT_FROM, dataType = QUERY_FROM_TYPE, paramType = "query"),
+    @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, allowableValues = QUERY_FROM_VALUES, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_INT, paramType = "query"),
     @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, allowableValues = QUERY_TO_VALUES, dataType = QUERY_TO_TYPE, paramType = "query"),
   })
   @ApiResponses({
-    @ApiResponse(code = HttpStatus.SC_OK, message = SUCCESSFUL_OPERATION),
-    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = CLUSTER_NOT_FOUND),
-    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = NOT_AUTHENTICATED),
-    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = PERMISSION_DENIED),
-    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = SERVER_ERROR),
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_CLUSTER_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
   })
   public Response getHosts(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
     return handleRequest(headers, body, ui, Request.Type.GET,
@@ -156,14 +156,14 @@ public class HostService extends BaseService {
     @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = "body", allowMultiple = true)
   })
   @ApiResponses({
-    @ApiResponse(code = HttpStatus.SC_CREATED, message = SUCCESSFUL_OPERATION),
-    @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = REQUEST_ACCEPTED),
+    @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
     @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = UNKNOWN_HOSTS),
-    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = CLUSTER_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_CLUSTER_NOT_FOUND),
     @ApiResponse(code = HttpStatus.SC_CONFLICT, message = HOST_ALREADY_EXISTS),
-    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = NOT_AUTHENTICATED),
-    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = PERMISSION_DENIED),
-    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = SERVER_ERROR),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
   })
   public Response createHosts(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
     return handleRequest(headers, body, ui, Request.Type.POST,
@@ -189,14 +189,14 @@ public class HostService extends BaseService {
     @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = "body")
   })
   @ApiResponses({
-    @ApiResponse(code = HttpStatus.SC_CREATED, message = SUCCESSFUL_OPERATION),
-    @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = REQUEST_ACCEPTED),
-    @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = INVALID_ARGUMENTS),
-    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = CLUSTER_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+    @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_CLUSTER_NOT_FOUND),
     @ApiResponse(code = HttpStatus.SC_CONFLICT, message = HOST_ALREADY_EXISTS),
-    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = NOT_AUTHENTICATED),
-    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = PERMISSION_DENIED),
-    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = SERVER_ERROR),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
   })
   public Response createHost(String body, @Context HttpHeaders headers, @Context UriInfo ui,
     @ApiParam(value = "host name", required = true) @PathParam("hostName") String hostName
@@ -224,13 +224,13 @@ public class HostService extends BaseService {
     @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = "body")
   })
   @ApiResponses({
-    @ApiResponse(code = HttpStatus.SC_OK, message = SUCCESSFUL_OPERATION),
-    @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = REQUEST_ACCEPTED),
-    @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = INVALID_ARGUMENTS),
-    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = CLUSTER_OR_HOST_NOT_FOUND),
-    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = NOT_AUTHENTICATED),
-    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = PERMISSION_DENIED),
-    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = SERVER_ERROR),
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+    @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_CLUSTER_OR_HOST_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
   })
   public Response updateHost(String body, @Context HttpHeaders headers, @Context UriInfo ui,
      @ApiParam(value = "host name", required = true) @PathParam("hostName") String hostName
@@ -256,13 +256,13 @@ public class HostService extends BaseService {
     @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = "body", allowMultiple = true)
   })
   @ApiResponses({
-    @ApiResponse(code = HttpStatus.SC_OK, message = SUCCESSFUL_OPERATION),
-    @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = REQUEST_ACCEPTED),
-    @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = INVALID_ARGUMENTS),
-    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = CLUSTER_OR_HOST_NOT_FOUND),
-    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = NOT_AUTHENTICATED),
-    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = PERMISSION_DENIED),
-    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = SERVER_ERROR),
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+    @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_CLUSTER_OR_HOST_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
   })
   public Response updateHosts(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
     return handleRequest(headers, body, ui, Request.Type.PUT,
@@ -284,11 +284,11 @@ public class HostService extends BaseService {
   @Produces("text/plain")
   @ApiOperation(value = "Deletes a host")
   @ApiResponses({
-    @ApiResponse(code = HttpStatus.SC_OK, message = SUCCESSFUL_OPERATION),
-    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = CLUSTER_OR_HOST_NOT_FOUND),
-    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = NOT_AUTHENTICATED),
-    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = PERMISSION_DENIED),
-    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = SERVER_ERROR),
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_CLUSTER_OR_HOST_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
   })
   public Response deleteHost(@Context HttpHeaders headers, @Context UriInfo ui,
     @ApiParam(value = "host name", required = true) @PathParam("hostName") String hostName
@@ -304,11 +304,11 @@ public class HostService extends BaseService {
     @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = "body", allowMultiple = true)
   })
   @ApiResponses({
-    @ApiResponse(code = HttpStatus.SC_OK, message = SUCCESSFUL_OPERATION),
-    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = CLUSTER_OR_HOST_NOT_FOUND),
-    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = NOT_AUTHENTICATED),
-    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = PERMISSION_DENIED),
-    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = SERVER_ERROR),
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_CLUSTER_OR_HOST_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
   })
   public Response deleteHosts(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
     return handleRequest(headers, body, ui, Request.Type.DELETE,

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
index 86bacf1..465cacd 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java
@@ -28,32 +28,79 @@ 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.MediaType;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 
 import org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.controller.ComponentDependencyResponse;
+import org.apache.ambari.server.controller.ExtensionLinkResponse;
+import org.apache.ambari.server.controller.QuickLinksResponse;
+import org.apache.ambari.server.controller.StackArtifactResponse;
+import org.apache.ambari.server.controller.StackConfigurationDependencyResponse;
+import org.apache.ambari.server.controller.StackConfigurationResponse;
+import org.apache.ambari.server.controller.StackResponse;
+import org.apache.ambari.server.controller.StackServiceArtifactResponse;
+import org.apache.ambari.server.controller.StackServiceComponentResponse;
+import org.apache.ambari.server.controller.StackServiceResponse;
+import org.apache.ambari.server.controller.StackVersionResponse;
+import org.apache.ambari.server.controller.ThemeResponse;
 import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.http.HttpStatus;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
 
-/**
- * Service for stacks management.
- */
 @Path("/stacks/")
+@Api(value = "Stacks", description = "Endpoint for stack specific operations")
 public class StacksService extends BaseService {
 
   @GET
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get all stacks",
+      nickname = "StacksService#getStacks",
+      notes = "Returns all stacks.",
+      response = StackResponse.StackResponseSwagger.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter stack details", defaultValue = "Stacks/stack_name", dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_SORT, value = "Sort stack privileges (asc | desc)", defaultValue = "Stacks/stack_name.asc", dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStacks(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackResource(null));
   }
 
   @GET
   @Path("{stackName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get a stack", nickname = "StacksService#getStack", notes = "Returns stack details.",
+      response = StackResponse.StackResponseSwagger.class, responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter stack details",
+          defaultValue = "Stacks/*", dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStack(String body, @Context HttpHeaders headers,
                            @Context UriInfo ui,
-                           @PathParam("stackName") String stackName) {
+                           @ApiParam @PathParam("stackName") String stackName) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackResource(stackName));
@@ -61,10 +108,32 @@ public class StacksService extends BaseService {
 
   @GET
   @Path("{stackName}/versions")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get all versions for a stacks",
+      nickname = "StacksService#getStackVersions",
+      notes = "Returns all versions for a stack.",
+      response = StackVersionResponse.StackVersionResponseSwagger.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter stack version details",
+          defaultValue = "Versions/stack_name,Versions/stack_version",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_SORT, value = "Sort stack privileges (asc | desc)",
+          defaultValue = "Versions/stack_name.asc,Versions/stack_version.asc",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStackVersions(String body,
                                    @Context HttpHeaders headers,
-                                   @Context UriInfo ui, @PathParam("stackName") String stackName) {
+                                   @Context UriInfo ui,
+                                   @ApiParam @PathParam("stackName") String stackName) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackVersionResource(stackName, null));
@@ -72,11 +141,25 @@ public class StacksService extends BaseService {
 
   @GET
   @Path("{stackName}/versions/{stackVersion}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get details for a stack version",
+      nickname = "StacksService#getStackVersion",
+      notes = "Returns the details for a stack version.",
+      response = StackVersionResponse.StackVersionResponseSwagger.class)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter stack version details",
+          defaultValue = "Versions/*", dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStackVersion(String body,
                                   @Context HttpHeaders headers,
-                                  @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                  @PathParam("stackVersion") String stackVersion) {
+                                  @Context UriInfo ui,
+                                  @ApiParam @PathParam("stackName") String stackName,
+                                  @ApiParam @PathParam("stackVersion") String stackVersion) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackVersionResource(stackName, stackVersion));
@@ -84,22 +167,78 @@ public class StacksService extends BaseService {
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/links")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get extension links for a stack version",
+      nickname = "StacksService#getStackVersionLinks",
+      notes = "Returns the extension links for a stack version.",
+      response = ExtensionLinkResponse.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter extension link attributes",
+          defaultValue = "ExtensionLink/link_id," +
+              "ExtensionLink/stack_name," +
+              "ExtensionLink/stack_version," +
+              "ExtensionLink/extension_name," +
+              "ExtensionLink/extension_version", dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_SORT, value = "Sort extension links (asc | desc)",
+          defaultValue = "ExtensionLink/link_id.asc," +
+              "ExtensionLink/stack_name.asc," +
+              "ExtensionLink/stack_version.asc," +
+              "ExtensionLink/extension_name.asc," +
+              "ExtensionLink/extension_version.asc",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStackVersionLinks(String body,
                                   @Context HttpHeaders headers,
-                                  @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                  @PathParam("stackVersion") String stackVersion) {
-
+                                  @Context UriInfo ui,
+                                  @ApiParam @PathParam("stackName") String stackName,
+                                  @ApiParam @PathParam("stackVersion") String stackVersion) {
     return handleRequest(headers, body, ui, Request.Type.GET,
         createExtensionLinkResource(stackName, stackVersion, null, null));
   }
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/configurations")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get all configurations for a stack version",
+      nickname = "StacksService#getStackLevelConfigurations",
+      notes = "Returns all configurations for a stack version.",
+      response = StackConfigurationResponse.StackConfigurationResponseSwagger.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "StackLevelConfigurations/stack_name," +
+            "StackLevelConfigurations/stack_version," +
+            "StackLevelConfigurations/property_name",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_SORT, value = "Sort configuration (asc | desc)",
+          defaultValue = "StackLevelConfigurations/stack_name.asc," +
+              "StackLevelConfigurations/stack_version.asc," +
+              "StackLevelConfigurations/property_name.asc ",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStackLevelConfigurations(String body, @Context HttpHeaders headers,
-                                   @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                   @PathParam("stackVersion") String stackVersion) {
+                                   @Context UriInfo ui,
+                                   @ApiParam @PathParam("stackName") String stackName,
+                                   @ApiParam @PathParam("stackVersion") String stackVersion) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackLevelConfigurationsResource(stackName, stackVersion, null));
@@ -107,24 +246,64 @@ public class StacksService extends BaseService {
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/configurations/{propertyName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get configuration details for a given property",
+      nickname = "StacksService#getStackLevelConfiguration",
+      notes = "Returns the configuration details for a given property.",
+      response = StackConfigurationResponse.StackConfigurationResponseSwagger.class)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "StackLevelConfigurations/*",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStackLevelConfiguration(String body, @Context HttpHeaders headers,
-                                        @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                        @PathParam("stackVersion") String stackVersion,
-                                        @PathParam("serviceName") String serviceName,
-                                        @PathParam("propertyName") String propertyName) {
+                                        @Context UriInfo ui,
+                                        @ApiParam @PathParam("stackName") String stackName,
+                                        @ApiParam @PathParam("stackVersion") String stackVersion,
+                                        @ApiParam @PathParam("serviceName") String serviceName,
+                                        @ApiParam @PathParam("propertyName") String propertyName) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackLevelConfigurationsResource(stackName, stackVersion, propertyName));
   }
 
-
   @GET
   @Path("{stackName}/versions/{stackVersion}/services")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get all services for a stack version",
+      nickname = "StacksService#getStackServices",
+      notes = "Returns all services for a stack version.",
+      response = StackServiceResponse.StackServiceResponseSwagger.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "StackServices/stack_name," +
+              "StackServices/stack_version," +
+              "StackServices/service_name",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_SORT, value = "Sort stack services (asc | desc)",
+          defaultValue = "StackServices/stack_name.asc," +
+              "StackServices/stack_version.asc," +
+              "StackServices/service_name.asc",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStackServices(String body, @Context HttpHeaders headers,
-                                   @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                   @PathParam("stackVersion") String stackVersion) {
+                                   @Context UriInfo ui,
+                                   @ApiParam @PathParam("stackName") String stackName,
+                                   @ApiParam @PathParam("stackVersion") String stackVersion) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackServiceResource(stackName, stackVersion, null));
@@ -132,11 +311,26 @@ public class StacksService extends BaseService {
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get stack service details",
+      nickname = "StacksService#getStackService",
+      notes = "Returns the details of a stack service.",
+      response = StackServiceResponse.StackServiceResponseSwagger.class)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "StackServices/*",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStackService(String body, @Context HttpHeaders headers,
-                                  @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                  @PathParam("stackVersion") String stackVersion,
-                                  @PathParam("serviceName") String serviceName) {
+                                  @Context UriInfo ui,
+                                  @ApiParam @PathParam("stackName") String stackName,
+                                  @ApiParam @PathParam("stackVersion") String stackVersion,
+                                  @ApiParam @PathParam("serviceName") String serviceName) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackServiceResource(stackName, stackVersion, serviceName));
@@ -144,10 +338,28 @@ public class StacksService extends BaseService {
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/artifacts")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get all stack artifacts",
+      nickname = "StacksService#getStackArtifacts",
+      notes = "Returns all stack artifacts (e.g: kerberos descriptor, metrics descriptor)",
+      response = StackArtifactResponse.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "Artifacts/artifact_name," +
+              "Artifacts/stack_name," +
+              "Artifacts/stack_version",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStackArtifacts(String body, @Context HttpHeaders headers,
-                                              @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                              @PathParam("stackVersion") String stackVersion) {
+                                              @Context UriInfo ui,
+                                              @ApiParam @PathParam("stackName") String stackName,
+                                              @ApiParam @PathParam("stackVersion") String stackVersion) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackArtifactsResource(stackName, stackVersion, null));
@@ -155,23 +367,62 @@ public class StacksService extends BaseService {
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/artifacts/{artifactName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get stack artifact details",
+      nickname = "StacksService#getStackArtifact",
+      notes = "Returns the details of a stack artifact",
+      response = StackArtifactResponse.class)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "Artifacts/*",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStackArtifact(String body, @Context HttpHeaders headers,
                                    @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                   @PathParam("stackVersion") String stackVersion,
-                                   @PathParam("artifactName") String artifactName) {
-
+                                   @ApiParam @PathParam("stackVersion") String stackVersion,
+                                   @ApiParam @PathParam("artifactName") String artifactName) {
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackArtifactsResource(stackName, stackVersion, artifactName));
   }
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/artifacts")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get all artifacts for a stack service",
+      nickname = "StacksService#getStackServiceArtifacts",
+      notes = "Returns all stack service artifacts",
+      response = StackServiceArtifactResponse.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "Artifacts/artifact_name," +
+              "Artifacts/stack_name," +
+              "Artifacts/stack_version",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_SORT, value = "Sort service artifacts (asc | desc)",
+          defaultValue = "Artifacts/artifact_name.asc," +
+              "Artifacts/stack_name.asc," +
+              "Artifacts/stack_version.asc",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStackServiceArtifacts(String body, @Context HttpHeaders headers,
-                                  @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                  @PathParam("stackVersion") String stackVersion,
-                                  @PathParam("serviceName") String serviceName) {
+                                  @Context UriInfo ui,
+                                  @ApiParam @PathParam("stackName") String stackName,
+                                  @ApiParam @PathParam("stackVersion") String stackVersion,
+                                  @ApiParam @PathParam("serviceName") String serviceName) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackServiceArtifactsResource(stackName, stackVersion, serviceName, null));
@@ -179,11 +430,39 @@ public class StacksService extends BaseService {
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/themes")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get all themes for a stack service",
+      nickname = "StacksService#getStackServiceThemes",
+      notes = "Returns all stack themes",
+      response = ThemeResponse.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "ThemeInfo/file_name," +
+              "ThemeInfo/service_name," +
+              "ThemeInfo/stack_name," +
+              "ThemeInfo/stack_version",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_SORT, value = "Sort service artifacts (asc | desc)",
+          defaultValue = "ThemeInfo/file_name.asc," +
+              "ThemeInfo/service_name.asc," +
+              "ThemeInfo/stack_name.asc," +
+              "ThemeInfo/stack_version.asc",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStackServiceThemes(String body, @Context HttpHeaders headers,
-                                           @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                           @PathParam("stackVersion") String stackVersion,
-                                           @PathParam("serviceName") String serviceName) {
+                                           @Context UriInfo ui,
+                                           @ApiParam @PathParam("stackName") String stackName,
+                                           @ApiParam @PathParam("stackVersion") String stackVersion,
+                                           @ApiParam @PathParam("serviceName") String serviceName) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
       createStackServiceThemesResource(stackName, stackVersion, serviceName, null));
@@ -191,12 +470,27 @@ public class StacksService extends BaseService {
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/themes/{themeName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get theme details for a stack service",
+      nickname = "StacksService#getStackServiceTheme",
+      notes = "Returns stack service theme details.",
+      response = ThemeResponse.class)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "ThemeInfo/*",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStackServiceTheme(String body, @Context HttpHeaders headers,
-                                           @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                           @PathParam("stackVersion") String stackVersion,
-                                           @PathParam("serviceName") String serviceName,
-                                           @PathParam("themeName") String themeName) {
+                                           @Context UriInfo ui,
+                                           @ApiParam @PathParam("stackName") String stackName,
+                                           @ApiParam @PathParam("stackVersion") String stackVersion,
+                                           @ApiParam @PathParam("serviceName") String serviceName,
+                                           @ApiParam @PathParam("themeName") String themeName) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
       createStackServiceThemesResource(stackName, stackVersion, serviceName, themeName));
@@ -204,11 +498,39 @@ public class StacksService extends BaseService {
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/quicklinks")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get all quicklinks configurations for a stack service",
+      nickname = "StacksService#getStackServiceQuickLinksConfigurations",
+      notes = "Returns all quicklinks configurations for a stack service.",
+      response = QuickLinksResponse.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "QuickLinkInfo/file_name," +
+              "QuickLinkInfo/service_name," +
+              "QuickLinkInfo/stack_name," +
+              "QuickLinkInfo/stack_version",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_SORT, value = "Sort quick links (asc | desc)",
+          defaultValue = "QuickLinkInfo/file_name.asc," +
+              "QuickLinkInfo/service_name.asc," +
+              "QuickLinkInfo/stack_name.asc," +
+              "QuickLinkInfo/stack_version.asc",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStackServiceQuickLinksConfigurations(String body, @Context HttpHeaders headers,
-                                           @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                           @PathParam("stackVersion") String stackVersion,
-                                           @PathParam("serviceName") String serviceName) {
+                                           @Context UriInfo ui,
+                                           @ApiParam @PathParam("stackName") String stackName,
+                                           @ApiParam @PathParam("stackVersion") String stackVersion,
+                                           @ApiParam @PathParam("serviceName") String serviceName) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
       createStackServiceQuickLinksResource(stackName, stackVersion, serviceName, null));
@@ -216,12 +538,28 @@ public class StacksService extends BaseService {
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/quicklinks/{quickLinksConfigurationName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get quicklinks configuration details",
+      nickname = "StacksService#getStackServiceQuickLinksConfiguration",
+      notes = "Returns the details of a quicklinks configuration.",
+      response = QuickLinksResponse.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "QuickLinkInfo/*",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStackServiceQuickLinksConfiguration(String body, @Context HttpHeaders headers,
-                                           @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                           @PathParam("stackVersion") String stackVersion,
-                                           @PathParam("serviceName") String serviceName,
-                                           @PathParam("quickLinksConfigurationName") String quickLinksConfigurationName) {
+                                           @Context UriInfo ui,
+                                           @ApiParam @PathParam("stackName") String stackName,
+                                           @ApiParam @PathParam("stackVersion") String stackVersion,
+                                           @ApiParam @PathParam("serviceName") String serviceName,
+                                           @ApiParam @PathParam("quickLinksConfigurationName") String quickLinksConfigurationName) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
       createStackServiceQuickLinksResource(stackName, stackVersion, serviceName, quickLinksConfigurationName));
@@ -229,12 +567,28 @@ public class StacksService extends BaseService {
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/artifacts/{artifactName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get stack service artifact details",
+      nickname = "StacksService#getStackServiceArtifact",
+      notes = "Returns the details of a stack service artifact.",
+      response = StackArtifactResponse.class
+  )
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "Artifacts/*",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStackServiceArtifact(String body, @Context HttpHeaders headers,
-                                           @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                           @PathParam("stackVersion") String stackVersion,
-                                           @PathParam("serviceName") String serviceName,
-                                           @PathParam("artifactName") String artifactName) {
+                                           @Context UriInfo ui,
+                                           @ApiParam @PathParam("stackName") String stackName,
+                                           @ApiParam @PathParam("stackVersion") String stackVersion,
+                                           @ApiParam @PathParam("serviceName") String serviceName,
+                                           @ApiParam @PathParam("artifactName") String artifactName) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackServiceArtifactsResource(stackName, stackVersion, serviceName, artifactName));
@@ -242,12 +596,40 @@ public class StacksService extends BaseService {
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/configurations")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get all configurations for a stack service",
+      nickname = "StacksService#getStackConfigurations",
+      notes = "Returns all configurations for a stack service.",
+      response = StackConfigurationResponse.StackConfigurationResponseSwagger.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "StackConfigurations/property_name," +
+              "StackConfigurations/service_name," +
+              "StackConfigurations/stack_name" +
+              "StackConfigurations/stack_version",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_SORT, value = "Sort service configurations (asc | desc)",
+          defaultValue = "StackConfigurations/property_name.asc," +
+              "StackConfigurations/service_name.asc," +
+              "StackConfigurations/stack_name.asc" +
+              "StackConfigurations/stack_version.asc",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStackConfigurations(String body,
                                          @Context HttpHeaders headers,
-                                         @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                         @PathParam("stackVersion") String stackVersion,
-                                         @PathParam("serviceName") String serviceName) {
+                                         @Context UriInfo ui,
+                                         @ApiParam @PathParam("stackName") String stackName,
+                                         @ApiParam @PathParam("stackVersion") String stackVersion,
+                                         @ApiParam @PathParam("serviceName") String serviceName) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackConfigurationResource(stackName, stackVersion, serviceName, null));
@@ -256,25 +638,69 @@ public class StacksService extends BaseService {
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/configurations/{propertyName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get stack service configuration details",
+      nickname = "StacksService#getStackConfiguration",
+      notes = "Returns the details of a stack service configuration.",
+      response = StackConfigurationResponse.StackConfigurationResponseSwagger.class)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "StackConfigurations/*",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStackConfiguration(String body, @Context HttpHeaders headers,
-                                        @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                        @PathParam("stackVersion") String stackVersion,
-                                        @PathParam("serviceName") String serviceName,
-                                        @PathParam("propertyName") String propertyName) {
-
+                                        @Context UriInfo ui,
+                                        @ApiParam @PathParam("stackName") String stackName,
+                                        @ApiParam @PathParam("stackVersion") String stackVersion,
+                                        @ApiParam @PathParam("serviceName") String serviceName,
+                                        @ApiParam @PathParam("propertyName") String propertyName) {
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackConfigurationResource(stackName, stackVersion, serviceName, propertyName));
   }
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/configurations/{propertyName}/dependencies")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get all dependencies for a stack service configuration",
+      nickname = "StacksService#getStackConfigurationDependencies",
+      notes = "Returns all dependencies for a stack service configuration.",
+      response = StackConfigurationDependencyResponse.StackConfigurationDependencyResponseSwagger.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "StackConfigurationDependency/stack_name," +
+              "StackConfigurationDependency/stack_version," +
+              "StackConfigurationDependency/service_name," +
+              "StackConfigurationDependency/property_name," +
+              "StackConfigurationDependency/dependency_name",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_SORT, value = "Sort configuration dependencies (asc | desc)",
+          defaultValue = "StackConfigurationDependency/stack_name.asc," +
+              "StackConfigurationDependency/stack_version.asc," +
+              "StackConfigurationDependency/service_name.asc," +
+              "StackConfigurationDependency/property_name.asc," +
+              "StackConfigurationDependency/dependency_name.asc",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getStackConfigurationDependencies(String body, @Context HttpHeaders headers,
-                                        @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                        @PathParam("stackVersion") String stackVersion,
-                                        @PathParam("serviceName") String serviceName,
-                                        @PathParam("propertyName") String propertyName) {
+                                        @Context UriInfo ui,
+                                        @ApiParam @PathParam("stackName") String stackName,
+                                        @ApiParam @PathParam("stackVersion") String stackVersion,
+                                        @ApiParam @PathParam("serviceName") String serviceName,
+                                        @ApiParam @PathParam("propertyName") String propertyName) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackConfigurationDependencyResource(stackName, stackVersion, serviceName, propertyName));
@@ -282,12 +708,40 @@ public class StacksService extends BaseService {
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/components")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get all components for a stack service",
+      nickname = "StacksService#getServiceComponents",
+      notes = "Returns all components for a stack service.",
+      response = StackServiceComponentResponse.StackServiceComponentResponseSwagger.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "StackServiceComponents/component_name," +
+              "StackServiceComponents/service_name," +
+              "StackServiceComponents/stack_name," +
+              "StackServiceComponents/stack_version",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_SORT, value = "Sort service components (asc | desc)",
+          defaultValue = "StackServiceComponents/component_name.asc," +
+              "StackServiceComponents/service_name.asc," +
+              "StackServiceComponents/stack_name.asc," +
+              "StackServiceComponents/stack_version.asc",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getServiceComponents(String body,
                                        @Context HttpHeaders headers,
-                                       @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                       @PathParam("stackVersion") String stackVersion,
-                                       @PathParam("serviceName") String serviceName) {
+                                       @Context UriInfo ui,
+                                       @ApiParam @PathParam("stackName") String stackName,
+                                       @ApiParam @PathParam("stackVersion") String stackVersion,
+                                       @ApiParam @PathParam("serviceName") String serviceName) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackServiceComponentResource(stackName, stackVersion, serviceName, null));
@@ -295,12 +749,42 @@ public class StacksService extends BaseService {
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/components/{componentName}/dependencies")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get all dependencies for a stack service component",
+      nickname = "StacksService#getServiceComponentDependencies",
+      notes = "Returns all dependencies for a stack service component.",
+      response = ComponentDependencyResponse.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "Dependencies/stack_name," +
+              "Dependencies/stack_version," +
+              "Dependencies/dependent_service_name," +
+              "Dependencies/dependent_component_name," +
+              "Dependencies/component_name",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_SORT, value = "Sort component dependencies (asc | desc)",
+          defaultValue = "Dependencies/stack_name.asc," +
+              "Dependencies/stack_version.asc," +
+              "Dependencies/dependent_service_name.asc," +
+              "Dependencies/dependent_component_name.asc," +
+              "Dependencies/component_name.asc",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getServiceComponentDependencies(String body, @Context HttpHeaders headers,
-                                                  @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                                  @PathParam("stackVersion") String stackVersion,
-                                                  @PathParam("serviceName") String serviceName,
-                                                  @PathParam("componentName") String componentName) {
+                                                  @Context UriInfo ui,
+                                                  @ApiParam @PathParam("stackName") String stackName,
+                                                  @ApiParam @PathParam("stackVersion") String stackVersion,
+                                                  @ApiParam @PathParam("serviceName") String serviceName,
+                                                  @ApiParam @PathParam("componentName") String componentName) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackServiceComponentDependencyResource(stackName, stackVersion, serviceName, componentName, null));
@@ -308,13 +792,29 @@ public class StacksService extends BaseService {
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/components/{componentName}/dependencies/{dependencyName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get a stack service component dependency",
+      nickname = "StacksService#getServiceComponentDependency",
+      notes = "Returns a stack service component dependency.",
+      response = ComponentDependencyResponse.class
+  )
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "Dependencies/*",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getServiceComponentDependency(String body, @Context HttpHeaders headers,
-                                      @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                      @PathParam("stackVersion") String stackVersion,
-                                      @PathParam("serviceName") String serviceName,
-                                      @PathParam("componentName") String componentName,
-                                      @PathParam("dependencyName") String dependencyName) {
+                                      @Context UriInfo ui,
+                                      @ApiParam @PathParam("stackName") String stackName,
+                                      @ApiParam @PathParam("stackVersion") String stackVersion,
+                                      @ApiParam @PathParam("serviceName") String serviceName,
+                                      @ApiParam @PathParam("componentName") String componentName,
+                                      @ApiParam @PathParam("dependencyName") String dependencyName) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackServiceComponentDependencyResource(stackName, stackVersion, serviceName, componentName, dependencyName));
@@ -322,12 +822,27 @@ public class StacksService extends BaseService {
 
   @GET
   @Path("{stackName}/versions/{stackVersion}/services/{serviceName}/components/{componentName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get details for a stack service component",
+      nickname = "StacksService#getServiceComponent",
+      notes = "Returns details for a stack service component.",
+      response = StackServiceComponentResponse.StackServiceComponentResponseSwagger.class)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = "Filter returned attributes",
+          defaultValue = "StackServiceComponents/*",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getServiceComponent(String body, @Context HttpHeaders headers,
-                                      @Context UriInfo ui, @PathParam("stackName") String stackName,
-                                      @PathParam("stackVersion") String stackVersion,
-                                      @PathParam("serviceName") String serviceName,
-                                      @PathParam("componentName") String componentName) {
+                                      @Context UriInfo ui,
+                                      @ApiParam @PathParam("stackName") String stackName,
+                                      @ApiParam @PathParam("stackVersion") String stackVersion,
+                                      @ApiParam @PathParam("serviceName") String serviceName,
+                                      @ApiParam @PathParam("componentName") String componentName) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
         createStackServiceComponentResource(stackName, stackVersion, serviceName, componentName));
@@ -340,8 +855,10 @@ public class StacksService extends BaseService {
    * @param stackVersion stack version
    * @return operating system service
    */
+  // TODO: find a way to handle this with Swagger (refactor or custom annotation?)
   @Path("{stackName}/versions/{stackVersion}/operating_systems")
-  public OperatingSystemService getOperatingSystemsHandler(@PathParam("stackName") String stackName, @PathParam("stackVersion") String stackVersion) {
+  public OperatingSystemService getOperatingSystemsHandler(@ApiParam @PathParam("stackName") String stackName,
+                                                           @ApiParam @PathParam("stackVersion") String stackVersion) {
     final Map<Resource.Type, String> stackProperties = new HashMap<>();
     stackProperties.put(Resource.Type.Stack, stackName);
     stackProperties.put(Resource.Type.StackVersion, stackVersion);
@@ -355,8 +872,10 @@ public class StacksService extends BaseService {
    * @param stackVersion stack version
    * @return repository version service
    */
+  // TODO: find a way to handle this with Swagger (refactor or custom annotation?)
   @Path("{stackName}/versions/{stackVersion}/repository_versions")
-  public RepositoryVersionService getRepositoryVersionHandler(@PathParam("stackName") String stackName, @PathParam("stackVersion") String stackVersion) {
+  public RepositoryVersionService getRepositoryVersionHandler(@ApiParam @PathParam("stackName") String stackName,
+                                                              @ApiParam @PathParam("stackVersion") String stackVersion) {
     final Map<Resource.Type, String> stackProperties = new HashMap<>();
     stackProperties.put(Resource.Type.Stack, stackName);
     stackProperties.put(Resource.Type.StackVersion, stackVersion);
@@ -370,10 +889,11 @@ public class StacksService extends BaseService {
    * @param stackVersion stack version
    * @return repository version service
    */
+  // TODO: find a way to handle this with Swagger (refactor or custom annotation?)
   @Path("{stackName}/versions/{stackVersion}/compatible_repository_versions")
   public CompatibleRepositoryVersionService getCompatibleRepositoryVersionHandler(
-      @PathParam("stackName") String stackName,
-      @PathParam("stackVersion") String stackVersion) {
+      @ApiParam @PathParam("stackName") String stackName,
+      @ApiParam @PathParam("stackVersion") String stackVersion) {
     final Map<Resource.Type, String> stackProperties = new HashMap<>();
     stackProperties.put(Resource.Type.Stack, stackName);
     stackProperties.put(Resource.Type.StackVersion, stackVersion);

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java
index 47515c9..81f8ab8 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java
@@ -61,7 +61,7 @@ public class UserService extends BaseService {
   @ApiOperation(value = "Get all users", nickname = "UserService#getUsers", notes = "Returns details of all users.", response = UserResponse.class, responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter user details", defaultValue = "Users/*", dataType = "string", paramType = "query"),
-    @ApiImplicitParam(name = "sortBy", value = "Sort users (asc | desc)", defaultValue = "Users/user_name.desc", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "sortBy", value = "Sort users (asc | desc)", defaultValue = "Users/user_name.asc", dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
     @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
index 8e87e6f..08e0e9f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
@@ -139,7 +139,7 @@ public class ViewInstanceService extends BaseService {
   @Produces("text/plain")
   @ApiOperation(value = "Create view instance", nickname = "ViewInstanceService#createService", notes = "Creates view instance resource.")
   @ApiImplicitParams({
-    @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.ViewInstanceRequest", paramType = "body")
+      @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.ViewInstanceRequest", paramType = "body")
   })
   @ApiResponses(value = {
     @ApiResponse(code = 200, message = "Successful operation"),

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/controller/ComponentDependencyResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ComponentDependencyResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ComponentDependencyResponse.java
new file mode 100644
index 0000000..0795919
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ComponentDependencyResponse.java
@@ -0,0 +1,64 @@
+/**
+ * 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;
+
+import java.util.List;
+
+import org.apache.ambari.server.state.DependencyConditionInfo;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response schema for endpoint {@link org.apache.ambari.server.api.services.StacksService#getServiceComponentDependency(
+ *        String, javax.ws.rs.core.HttpHeaders, javax.ws.rs.core.UriInfo, String, String, String, String, String)}
+
+ * The interface is not actually implemented, it only carries swagger annotations.
+ */
+public interface ComponentDependencyResponse extends ApiModel{
+
+  @ApiModelProperty(name = "Dependencies")
+  public ComponentDependencyResponseInfo getDependencyResponseInfo();
+
+  public interface ComponentDependencyResponseInfo {
+    @ApiModelProperty(name = "component_name")
+    public String getComponentName();
+
+    @ApiModelProperty(name = "conditions")
+    public List<DependencyConditionInfo> getDependencyConditions();
+
+    @ApiModelProperty(name = "dependent_component_name")
+    public String getDependentComponentName();
+
+    @ApiModelProperty(name = "dependent_service_name")
+    public String getDependentServiceName();
+
+    @ApiModelProperty(name = "scope")
+    public String getScope();
+
+    @ApiModelProperty(name = "service_name")
+    public String getServiceName();
+
+    @ApiModelProperty(name = "stack_name")
+    public String getStackName();
+
+    @ApiModelProperty(name = "stack_version")
+    public String getStackVersion();
+  }
+
+}


[41/49] ambari git commit: AMBARI-20951. Integrate HostService with Swagger, addendum (adoroszlai)

Posted by ad...@apache.org.
AMBARI-20951. Integrate HostService with Swagger, addendum (adoroszlai)


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

Branch: refs/heads/trunk
Commit: 950298bcd67114c6b4f0f81e2b6aea2155b358e8
Parents: 275525b
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Wed May 17 15:14:59 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Wed May 17 15:14:59 2017 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/ambari/server/state/host/HostImpl.java | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/950298bc/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java
index 4624ea8..c774fc1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java
@@ -938,6 +938,7 @@ public class HostImpl implements Host {
   public HostResponse convertToResponse() {
     HostResponse r = new HostResponse(getHostName());
 
+    r.setAgentVersion(getAgentVersion());
     r.setPhCpuCount(getPhCpuCount());
     r.setCpuCount(getCpuCount());
     r.setDisksInfo(getDisksInfo());


[21/49] ambari git commit: AMBARI-20498. Ambari logo and title should not get hidden when user scrolls down the page. (Oleg via Jaimin)

Posted by ad...@apache.org.
AMBARI-20498. Ambari logo and title should not get hidden when user scrolls down the page. (Oleg via Jaimin)


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

Branch: refs/heads/trunk
Commit: 76eabf2ddc4548cde07696e850ba45a9a5df739b
Parents: 0a4e416
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Mon Mar 20 17:54:50 2017 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Mon Mar 20 17:54:50 2017 -0700

----------------------------------------------------------------------
 ambari-web/api-docs/css/api-explorer.css | 7 ++-----
 ambari-web/api-docs/css/index.css        | 1 -
 ambari-web/api-docs/css/standalone.css   | 1 -
 ambari-web/api-docs/index.html           | 4 ++--
 ambari-web/api-docs/swagger-ui.js        | 2 +-
 5 files changed, 5 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/76eabf2d/ambari-web/api-docs/css/api-explorer.css
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/css/api-explorer.css b/ambari-web/api-docs/css/api-explorer.css
index ef3abd4..65c51db 100644
--- a/ambari-web/api-docs/css/api-explorer.css
+++ b/ambari-web/api-docs/css/api-explorer.css
@@ -67,6 +67,7 @@
 }
 
 .swagger-section .operation {
+    padding-top: 55px;
     margin: 0
 }
 
@@ -1078,7 +1079,7 @@
 
 .swagger-section .sticky-nav.fixed {
     position: fixed;
-    top: 0;
+    top: 55px;
     left: 0;
     width: 100%;
     z-index: 600
@@ -1497,10 +1498,6 @@ body {
     padding: 0 20px
 }
 
-.swagger-section .endpoint {
-    margin: 0 0 100px
-}
-
 @media (min-width: 992px) {
     .swagger-section .endpoint + .endpoint, .swagger-section .endpoint:first-child {
         border-top: 1px solid rgba(0, 0, 0, .08)

http://git-wip-us.apache.org/repos/asf/ambari/blob/76eabf2d/ambari-web/api-docs/css/index.css
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/css/index.css b/ambari-web/api-docs/css/index.css
index 1de91e3..8ec3bbc 100644
--- a/ambari-web/api-docs/css/index.css
+++ b/ambari-web/api-docs/css/index.css
@@ -15445,7 +15445,6 @@ header.site-header.site-header .navbar-header {
     }
 }
 header.site-header.site-header nav {
-    background: none;
     border: 0;
     margin: 0;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/76eabf2d/ambari-web/api-docs/css/standalone.css
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/css/standalone.css b/ambari-web/api-docs/css/standalone.css
index 1e5cd69..89d0d61 100644
--- a/ambari-web/api-docs/css/standalone.css
+++ b/ambari-web/api-docs/css/standalone.css
@@ -17,7 +17,6 @@ header.site-header li * {
     -webkit-backface-visibility: hidden !important;
 }
 header.site-header nav {
-    background: none;
     border: 0;
     margin: 0;
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/76eabf2d/ambari-web/api-docs/index.html
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/index.html b/ambari-web/api-docs/index.html
index 90728cd..baa3381 100644
--- a/ambari-web/api-docs/index.html
+++ b/ambari-web/api-docs/index.html
@@ -139,7 +139,7 @@
         function i(n) {
           n.hasClass("fixed") || (navOffset = n.offset().top);
           e();
-          $(window).scrollTop() > navOffset ? $(".modal.in").length || n.addClass("fixed") : n.removeClass("fixed")
+          //$(window).scrollTop() > navOffset ? $(".modal.in").length || n.addClass("fixed") : n.removeClass("fixed")
         }
 
         function r(e) {
@@ -209,7 +209,7 @@
 
 <body class="page-docs" style="zoom: 1;">
 <header class="site-header">
-  <nav role="navigation" class="navbar navbar-default">
+  <nav role="navigation" class="navbar navbar-default navbar-fixed-top">
     <div class="container">
       <div class="navbar-header">
         <button type="button" data-toggle="collapse" data-target="#navbar-collapse" class="navbar-toggle"><span

http://git-wip-us.apache.org/repos/asf/ambari/blob/76eabf2d/ambari-web/api-docs/swagger-ui.js
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/swagger-ui.js b/ambari-web/api-docs/swagger-ui.js
index c644c64..5fbc844 100644
--- a/ambari-web/api-docs/swagger-ui.js
+++ b/ambari-web/api-docs/swagger-ui.js
@@ -176,7 +176,7 @@ this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(dept
     + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1), depth0))
     + "\n";
 },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
-  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div id=\"swagger_sidebar\">\n    <div class=\"sticky-nav-placeholder\">\n        <div class=\"sticky-nav\">\n            <div class=\"mobile-nav\">\n                <span class=\"select-label\">API Reference: </span><span data-selected-value></span>\n            </div>\n\n            <div class=\"token-generator hide\">\n                <span data-close class=\"icon-budicon-471\"></span>\n                <label for=\"input-api-token\">Url</label>\n                <input type=\"text\" autocorrect=\"off\" class=\"ui-form-control\" id=\"input_baseUrl\"\n                       placeholder=\"http://example.com/api\">\n\n                <div class=\"scope-selector\">\n                    <label for=\"scopes\">Token</label>\n\n                    <div class=\"area controls\">\n                        <input type=\"text\" autocorrect=\"off\" class=\"ui-form-
 control\" id=\"input_apiKey\"\n                               placeholder=\"Enter api key or token\">\n                    </div>\n\n                    <div class=\"area cta\">\n                        <div data-add-scope id=\"explore\" class=\"btn\"><span class=\"icon-budicon-519\"></span>\n                        </div>\n                    </div>\n                </div>\n\n            </div>\n            <div data-navigator>\n                <div data-resource=\"\" label=\"Tools\">\n                    <div class=\"item\" data-tg-switch=\"\">Swagger resource <span class=\"status\"></span></div>\n                </div>\n                <div id=\"resources_nav\">\n                </div>\n            </div>\n\n            <p class=\"changes-disclaimer\">\n                <span class='info' id='api_info'>\n";
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div id=\"swagger_sidebar\">\n    <div class=\"sticky-nav-placeholder\">\n        <div class=\"sticky-nav fixed\">\n            <div class=\"mobile-nav\">\n                <span class=\"select-label\">API Reference: </span><span data-selected-value></span>\n            </div>\n\n            <div class=\"token-generator hide\">\n                <span data-close class=\"icon-budicon-471\"></span>\n                <label for=\"input-api-token\">Url</label>\n                <input type=\"text\" autocorrect=\"off\" class=\"ui-form-control\" id=\"input_baseUrl\"\n                       placeholder=\"http://example.com/api\">\n\n                <div class=\"scope-selector\">\n                    <label for=\"scopes\">Token</label>\n\n                    <div class=\"area controls\">\n                        <input type=\"text\" autocorrect=\"off\" class=\"ui
 -form-control\" id=\"input_apiKey\"\n                               placeholder=\"Enter api key or token\">\n                    </div>\n\n                    <div class=\"area cta\">\n                        <div data-add-scope id=\"explore\" class=\"btn\"><span class=\"icon-budicon-519\"></span>\n                        </div>\n                    </div>\n                </div>\n\n            </div>\n            <div data-navigator>\n                <div data-resource=\"\" label=\"Tools\">\n                    <div class=\"item\" data-tg-switch=\"\">Swagger resource <span class=\"status\"></span></div>\n                </div>\n                <div id=\"resources_nav\">\n                </div>\n            </div>\n\n            <p class=\"changes-disclaimer\">\n                <span class='info' id='api_info'>\n";
   stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.info : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
   if (stack1 != null) { buffer += stack1; }
   buffer += "\n                </span>\n\n                <span class='info' id='api_info'>\n";


[39/49] ambari git commit: AMBARI-21035. Integrate ClusterService with Swagger (adoroszlai)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
index d613a2e..7e4c4c2 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
@@ -1,4 +1,4 @@
-/**
+/*
  * 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
@@ -636,45 +636,29 @@ public class AmbariManagementControllerTest {
     // TODO implement after configs integration
   }
 
-  @Test
-  public void testCreateClusterWithInvalidRequest() {
+  @Test(expected = IllegalArgumentException.class)
+  public void testCreateClusterWithInvalidRequest1() throws Exception {
     ClusterRequest r = new ClusterRequest(null, null, null, null);
-    r.toString();
-
-    try {
-      controller.createCluster(r);
-      fail("Expected create cluster for invalid request");
-    } catch (Exception e) {
-      // Expected
-    }
-
-    r.setClusterId(1L);
-    try {
-      controller.createCluster(r);
-      fail("Expected create cluster for invalid request");
-    } catch (Exception e) {
-      // Expected
-    }
-    r.setClusterId(null);
+    controller.createCluster(r);
+  }
 
-    r.setClusterName(getUniqueName());
-    try {
-      controller.createCluster(r);
-     fail("Expected create cluster for invalid request - no stack version");
-    } catch (Exception e) {
-      // Expected
-    }
+  @Test(expected = IllegalArgumentException.class)
+  public void testCreateClusterWithInvalidRequest2() throws Exception {
+    ClusterRequest r = new ClusterRequest(1L, null, null, null);
+    controller.createCluster(r);
+  }
 
-    r.setStackVersion("HDP-1.2.0");
-    r.setProvisioningState(State.INSTALLING.name());
-    try {
-      controller.createCluster(r);
-      controller.updateClusters(Collections.singleton(r), null);
+  @Test(expected = IllegalArgumentException.class)
+  public void testCreateClusterWithInvalidRequest3() throws Exception {
+    ClusterRequest r = new ClusterRequest(null, getUniqueName(), null, null);
+    controller.createCluster(r);
+  }
 
-     fail("Expected create cluster for invalid request - invalid provisioning state");
-    } catch (Exception e) {
-      // Expected
-    }
+  @Test(expected = IllegalArgumentException.class)
+  public void testCreateClusterWithInvalidRequest4() throws Exception {
+    ClusterRequest r = new ClusterRequest(null, null, State.INSTALLING.name(), null, "HDP-1.2.0", null);
+    controller.createCluster(r);
+    controller.updateClusters(Collections.singleton(r), null);
   }
 
   @Test
@@ -2219,7 +2203,7 @@ public class AmbariManagementControllerTest {
     boolean found = false;
     for (ClusterResponse cr : resp) {
       if (cr.getClusterName().equals(cluster1)) {
-        Assert.assertEquals(c1.getClusterId(), cr.getClusterId().longValue());
+        Assert.assertEquals(c1.getClusterId(), cr.getClusterId());
         Assert.assertEquals(c1.getDesiredStackVersion().getStackId(), cr.getDesiredStackVersion());
         found = true;
         break;
@@ -2241,19 +2225,15 @@ public class AmbariManagementControllerTest {
     clusters.addCluster(cluster3, new StackId("HDP-1.2.0"));
     clusters.addCluster(cluster4, new StackId("HDP-0.1"));
 
-    Cluster c1 = clusters.getCluster(cluster1);
-    Cluster c2 = clusters.getCluster(cluster2);
-    Cluster c3 = clusters.getCluster(cluster3);
-    Cluster c4 = clusters.getCluster(cluster4);
-
     ClusterRequest r = new ClusterRequest(null, null, null, null);
     Set<ClusterResponse> resp = controller.getClusters(Collections.singleton(r));
+    Assert.assertTrue(resp.size() >= 4);
 
     r = new ClusterRequest(null, cluster1, null, null);
     resp = controller.getClusters(Collections.singleton(r));
     Assert.assertEquals(1, resp.size());
-    Assert.assertEquals(c1.getClusterId(),
-        resp.iterator().next().getClusterId().longValue());
+    Cluster c1 = clusters.getCluster(cluster1);
+    Assert.assertEquals(c1.getClusterId(), resp.iterator().next().getClusterId());
 
     r = new ClusterRequest(null, null, "HDP-0.1", null);
     resp = controller.getClusters(Collections.singleton(r));
@@ -9297,13 +9277,13 @@ public class AmbariManagementControllerTest {
     ClusterRequest cr = new ClusterRequest(null, CLUSTER_NAME, STACK_ID, null);
     amc.createCluster(cr);
 
-    Long CLUSTER_ID = clusters.getCluster(CLUSTER_NAME).getClusterId();
+    long clusterId = clusters.getCluster(CLUSTER_NAME).getClusterId();
 
     ConfigurationRequest configRequest = new ConfigurationRequest(CLUSTER_NAME, "global", "version1",
         new HashMap<String, String>() {{ put("a", "b"); }}, null);
-    cr.setDesiredConfig(Collections.singletonList(configRequest));
-    cr.setClusterId(CLUSTER_ID);
-    amc.updateClusters(Collections.singleton(cr), new HashMap<String, String>());
+    ClusterRequest ur = new ClusterRequest(clusterId, CLUSTER_NAME, STACK_ID, null);
+    ur.setDesiredConfig(Collections.singletonList(configRequest));
+    amc.updateClusters(Collections.singleton(ur), new HashMap<String, String>());
 
     // add some hosts
     Set<HostRequest> hrs = new HashSet<>();
@@ -9348,8 +9328,8 @@ public class AmbariManagementControllerTest {
     // change mind, delete the cluster
     amc.deleteCluster(cr);
 
-      assertNotNull(clusters.getHost(HOST1));
-      assertNotNull(clusters.getHost(HOST2));
+    assertNotNull(clusters.getHost(HOST1));
+    assertNotNull(clusters.getHost(HOST2));
 
     HostDAO dao = injector.getInstance(HostDAO.class);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/test/java/org/apache/ambari/server/controller/ClusterRequestTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/ClusterRequestTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/ClusterRequestTest.java
index 084e36b..0d5dd19 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/ClusterRequestTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/ClusterRequestTest.java
@@ -50,22 +50,6 @@ public class ClusterRequestTest {
     Assert.assertEquals(stackVersion.getStackId(),
         r1.getStackVersion());
     Assert.assertArrayEquals(hostNames.toArray(), r1.getHostNames().toArray());
-
-    r1.setClusterId(++clusterId);
-    r1.setHostNames(hostNames);
-    r1.setClusterName("foo1");
-    r1.setStackVersion("HDP-1.2.0");
-    r1.setProvisioningState(State.INSTALLED.name());
-    r1.setSecurityType(SecurityType.KERBEROS);
-
-    hostNames.add("h2");
-
-    Assert.assertEquals(clusterId, r1.getClusterId());
-    Assert.assertEquals("foo1", r1.getClusterName());
-    Assert.assertEquals(State.INSTALLED.name(), r1.getProvisioningState());
-    Assert.assertEquals(SecurityType.KERBEROS, r1.getSecurityType());
-    Assert.assertEquals("HDP-1.2.0", r1.getStackVersion());
-    Assert.assertArrayEquals(hostNames.toArray(), r1.getHostNames().toArray());
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/test/java/org/apache/ambari/server/controller/ClusterResponseTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/ClusterResponseTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/ClusterResponseTest.java
index cfb2611..c3f8f18 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/ClusterResponseTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/ClusterResponseTest.java
@@ -30,7 +30,7 @@ public class ClusterResponseTest {
 
   @Test
   public void testBasicGetAndSet() {
-    Long clusterId = new Long(10);
+    long clusterId = 10L;
     String clusterName = "foo";
     State provisioningState = State.INSTALLED;
     SecurityType securityType = SecurityType.KERBEROS;
@@ -43,17 +43,16 @@ public class ClusterResponseTest {
     
     Assert.assertEquals(clusterId, r1.getClusterId());
     Assert.assertEquals(clusterName, r1.getClusterName());
-    Assert.assertEquals(provisioningState.name(), r1.getProvisioningState());
-    Assert.assertEquals(securityType.name(), r1.getSecurityType());
-    Assert.assertArrayEquals(hostNames.toArray(), r1.getHostNames().toArray());
-    Assert.assertEquals(Integer.valueOf(1), r1.getTotalHosts());
+    Assert.assertEquals(provisioningState, r1.getProvisioningState());
+    Assert.assertEquals(securityType, r1.getSecurityType());
+    Assert.assertEquals(1, r1.getTotalHosts());
     Assert.assertEquals("bar", r1.getDesiredStackVersion());
   }
 
   @Test
   public void testToString() {
     ClusterResponse r =
-      new ClusterResponse(null, null, null, null, null, null, null, null);
+      new ClusterResponse(0, null, null, null, null, 0, null, null);
     r.toString();
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java
index 49127d8..4a786b7 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterResourceProviderTest.java
@@ -333,17 +333,17 @@ public class ClusterResourceProviderTest {
     Clusters clusters = createMock(Clusters.class);
 
     Set<ClusterResponse> allResponse = new HashSet<>();
-    allResponse.add(new ClusterResponse(100L, "Cluster100", State.INSTALLED, SecurityType.NONE, null, null, null, null));
-    allResponse.add(new ClusterResponse(101L, "Cluster101", State.INSTALLED, SecurityType.NONE, null, null, null, null));
-    allResponse.add(new ClusterResponse(102L, "Cluster102", State.INSTALLED, SecurityType.NONE, null, null, null, null));
-    allResponse.add(new ClusterResponse(103L, "Cluster103", State.INSTALLED, SecurityType.NONE, null, null, null, null));
-    allResponse.add(new ClusterResponse(104L, "Cluster104", State.INSTALLED, SecurityType.NONE, null, null, null, null));
+    allResponse.add(new ClusterResponse(100L, "Cluster100", State.INSTALLED, SecurityType.NONE, null, 0, null, null));
+    allResponse.add(new ClusterResponse(101L, "Cluster101", State.INSTALLED, SecurityType.NONE, null, 0, null, null));
+    allResponse.add(new ClusterResponse(102L, "Cluster102", State.INSTALLED, SecurityType.NONE, null, 0, null, null));
+    allResponse.add(new ClusterResponse(103L, "Cluster103", State.INSTALLED, SecurityType.NONE, null, 0, null, null));
+    allResponse.add(new ClusterResponse(104L, "Cluster104", State.INSTALLED, SecurityType.NONE, null, 0, null, null));
 
     Set<ClusterResponse> nameResponse = new HashSet<>();
-    nameResponse.add(new ClusterResponse(102L, "Cluster102", State.INSTALLED, SecurityType.NONE, null, null, null, null));
+    nameResponse.add(new ClusterResponse(102L, "Cluster102", State.INSTALLED, SecurityType.NONE, null, 0, null, null));
 
     Set<ClusterResponse> idResponse = new HashSet<>();
-    idResponse.add(new ClusterResponse(103L, "Cluster103", State.INSTALLED, SecurityType.NONE, null, null, null, null));
+    idResponse.add(new ClusterResponse(103L, "Cluster103", State.INSTALLED, SecurityType.NONE, null, 0, null, null));
 
     // set expectations
     Capture<Set<ClusterRequest>> captureClusterRequests = EasyMock.newCapture();
@@ -456,7 +456,7 @@ public class ClusterResourceProviderTest {
     Map<String, Object> properties = new LinkedHashMap<>();
 
     properties.put(ClusterResourceProvider.CLUSTER_NAME_PROPERTY_ID, clusterName);
-    properties.put(ClusterResourceProvider.BLUEPRINT_PROPERTY_ID, blueprintName);
+    properties.put(ClusterResourceProvider.BLUEPRINT, blueprintName);
     propertySet.add(properties);
 
     Collection<Map<String, Object>> hostGroups = new ArrayList<>();
@@ -594,7 +594,7 @@ public class ClusterResourceProviderTest {
     RequestStatusResponse response = createNiceMock(RequestStatusResponse.class);
 
     Set<ClusterResponse> nameResponse = new HashSet<>();
-    nameResponse.add(new ClusterResponse(102L, "Cluster102", State.INIT, SecurityType.NONE, null, null, null, null));
+    nameResponse.add(new ClusterResponse(102L, "Cluster102", State.INIT, SecurityType.NONE, null, 0, null, null));
 
     Map<String, String> mapRequestProps = new HashMap<>();
     mapRequestProps.put("context", "Called from a test");
@@ -662,7 +662,7 @@ public class ClusterResourceProviderTest {
     RequestStatusResponse response = createNiceMock(RequestStatusResponse.class);
 
     Set<ClusterResponse> nameResponse = new HashSet<>();
-    nameResponse.add(new ClusterResponse(100L, "Cluster100", State.INSTALLED, SecurityType.NONE, null, null, null, null));
+    nameResponse.add(new ClusterResponse(100L, "Cluster100", State.INSTALLED, SecurityType.NONE, null, 0, null, null));
 
     Map<String, String> mapRequestProps = new HashMap<>();
     mapRequestProps.put("context", "Called from a test");

http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequestTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequestTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequestTest.java
index 73a80f6..055e1b5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequestTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequestTest.java
@@ -498,7 +498,7 @@ public class ProvisionClusterRequestTest {
     Map<String, Object> properties = new LinkedHashMap<>();
 
     properties.put(ClusterResourceProvider.CLUSTER_NAME_PROPERTY_ID, clusterName);
-    properties.put(ClusterResourceProvider.BLUEPRINT_PROPERTY_ID, blueprintName);
+    properties.put(ClusterResourceProvider.BLUEPRINT, blueprintName);
 
     Collection<Map<String, Object>> hostGroups = new ArrayList<>();
     properties.put("host_groups", hostGroups);
@@ -553,7 +553,7 @@ public class ProvisionClusterRequestTest {
     Map<String, Object> properties = new LinkedHashMap<>();
 
     properties.put(ClusterResourceProvider.CLUSTER_NAME_PROPERTY_ID, clusterName);
-    properties.put(ClusterResourceProvider.BLUEPRINT_PROPERTY_ID, blueprintName);
+    properties.put(ClusterResourceProvider.BLUEPRINT, blueprintName);
 
     Collection<Map<String, Object>> hostGroups = new ArrayList<>();
     properties.put("host_groups", hostGroups);
@@ -592,7 +592,7 @@ public class ProvisionClusterRequestTest {
     Map<String, Object> properties = new LinkedHashMap<>();
 
     properties.put(ClusterResourceProvider.CLUSTER_NAME_PROPERTY_ID, clusterName);
-    properties.put(ClusterResourceProvider.BLUEPRINT_PROPERTY_ID, blueprintName);
+    properties.put(ClusterResourceProvider.BLUEPRINT, blueprintName);
 
     Collection<Map<String, Object>> hostGroups = new ArrayList<>();
     properties.put("host_groups", hostGroups);

http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
index 345c463..aecc031 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
@@ -1048,9 +1048,9 @@ public class ClusterTest {
     createDefaultCluster();
 
     ClusterResponse r = c1.convertToResponse();
-    Assert.assertEquals(c1.getClusterId(), r.getClusterId().longValue());
+    Assert.assertEquals(c1.getClusterId(), r.getClusterId());
     Assert.assertEquals(c1.getClusterName(), r.getClusterName());
-    Assert.assertEquals(Integer.valueOf(2), r.getTotalHosts());
+    Assert.assertEquals(2, r.getTotalHosts());
     Assert.assertEquals(0, r.getClusterHealthReport().getAlertStatusHosts());
     Assert.assertEquals(0, r.getClusterHealthReport().getHealthyStatusHosts());
     Assert.assertEquals(0, r.getClusterHealthReport().getUnhealthyStatusHosts());
@@ -1079,7 +1079,7 @@ public class ClusterTest {
 
     r = c1.convertToResponse();
 
-    Assert.assertEquals(Integer.valueOf(3), r.getTotalHosts());
+    Assert.assertEquals(3, r.getTotalHosts());
     Assert.assertEquals(0, r.getClusterHealthReport().getAlertStatusHosts());
     Assert.assertEquals(1, r.getClusterHealthReport().getHealthyStatusHosts());
     Assert.assertEquals(0, r.getClusterHealthReport().getUnhealthyStatusHosts());


[37/49] ambari git commit: AMBARI-21009. Integrate ActionService resource with Swagger (Balazs Bence Sari via adoroszlai)

Posted by ad...@apache.org.
AMBARI-21009. Integrate ActionService resource with Swagger (Balazs Bence Sari via adoroszlai)


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

Branch: refs/heads/trunk
Commit: 580067f9965060a80ed99fb9f803ff5aae504fc0
Parents: fea1aae
Author: Balazs Bence Sari <bs...@hortonworks.com>
Authored: Tue May 16 09:11:01 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Tue May 16 09:11:01 2017 +0200

----------------------------------------------------------------------
 .../server/api/services/ActionService.java      | 98 ++++++++++++++++++--
 .../ambari/server/api/services/BaseService.java |  1 +
 .../ambari/server/controller/ActionRequest.java | 19 ++++
 .../server/controller/ActionRequestSwagger.java | 31 +++++++
 .../server/controller/ActionResponse.java       | 20 +++-
 5 files changed, 159 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/580067f9/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActionService.java
index 0290151..cd74867 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActionService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActionService.java
@@ -29,19 +29,32 @@ 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.MediaType;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 
 import org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.controller.ActionResponse;
 import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.http.HttpStatus;
 
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 
 /**
  * Service responsible for action definition resource requests.
  */
 @Path("/actions/")
+@Api(value = "Actions", description = "Endpoint for action definition specific operations")
 public class ActionService extends BaseService {
 
+  private static final String ACTION_REQUEST_TYPE = "org.apache.ambari.server.controller.ActionRequestSwagger";
+
   /**
    * Handles: GET /actions/{actionName}
    * Get a specific action definition.
@@ -53,9 +66,23 @@ public class ActionService extends BaseService {
    */
   @GET
   @Path("{actionName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get the details of an action definition",
+      nickname = "ActionService#getActionDefinition",
+      response = ActionResponse.ActionResponseSwagger.class)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION,
+          defaultValue = "Actions/*",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getActionDefinition(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                             @PathParam("actionName") String actionName) {
+                             @ApiParam(required = true) @PathParam("actionName") String actionName) {
 
     return handleRequest(headers, body, ui, Request.Type.GET, createActionDefinitionResource(actionName));
   }
@@ -69,7 +96,27 @@ public class ActionService extends BaseService {
    * @return action definition collection resource representation
    */
   @GET
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get all action definitions",
+      nickname = "ActionService#getActionDefinitions",
+      response = ActionResponse.ActionResponseSwagger.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION,
+          defaultValue = "Actions/action_name",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION,
+          defaultValue = "Actions/action_name.asc",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getActionDefinitions(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
     return handleRequest(headers, body, ui, Request.Type.GET, createActionDefinitionResource(null));
   }
@@ -85,9 +132,21 @@ public class ActionService extends BaseService {
    */
    @POST
    @Path("{actionName}")
-   @Produces("text/plain")
+   @Produces(MediaType.TEXT_PLAIN)
+   @ApiOperation(value = "Creates an action definition - Currently Not Supported",
+       nickname = "ActionService#createActionDefinition"
+   )
+   @ApiImplicitParams({
+       @ApiImplicitParam(dataType = ACTION_REQUEST_TYPE, paramType = "body", allowMultiple = false)
+   })
+   @ApiResponses({
+       @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_REQUEST),
+       @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+       @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+       @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+   })
    public Response createActionDefinition(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                                 @PathParam("actionName") String actionName) {
+                                 @ApiParam(required = true) @PathParam("actionName") String actionName) {
 
     return handleRequest(headers, body, ui, Request.Type.POST, createActionDefinitionResource(actionName));
   }
@@ -103,9 +162,21 @@ public class ActionService extends BaseService {
    */
   @PUT
   @Path("{actionName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Updates an action definition - Currently Not Supported",
+      nickname = "ActionService#updateActionDefinition"
+  )
+  @ApiImplicitParams({
+      @ApiImplicitParam(dataType = ACTION_REQUEST_TYPE, paramType = "body")
+  })
+  @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_REQUEST),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response updateActionDefinition(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("actionName") String actionName) {
+                                @ApiParam(required = true) @PathParam("actionName") String actionName) {
 
     return handleRequest(headers, body, ui, Request.Type.PUT, createActionDefinitionResource(actionName));
   }
@@ -121,9 +192,18 @@ public class ActionService extends BaseService {
    */
   @DELETE
   @Path("{actionName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Deletes an action definition - Currently Not Supported",
+      nickname = "ActionService#deleteActionDefinition"
+  )
+  @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response deleteActionDefinition(@Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("actionName") String actionName) {
+                                @ApiParam(required = true) @PathParam("actionName") String actionName) {
     return handleRequest(headers, null, ui, Request.Type.DELETE, createActionDefinitionResource(actionName));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/580067f9/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
index 964fb59..2808911 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
@@ -52,6 +52,7 @@ public abstract class BaseService {
   static final String MSG_SUCCESSFUL_OPERATION = "Successful operation";
   static final String MSG_REQUEST_ACCEPTED = "Request is accepted, but not completely processed yet";
   static final String MSG_INVALID_ARGUMENTS = "Invalid arguments";
+  static final String MSG_INVALID_REQUEST = "Invalid request";
   static final String MSG_CLUSTER_NOT_FOUND = "Cluster not found";
   static final String MSG_CLUSTER_OR_HOST_NOT_FOUND = "Cluster or host not found";
   static final String MSG_NOT_AUTHENTICATED = "Not authenticated";

http://git-wip-us.apache.org/repos/asf/ambari/blob/580067f9/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionRequest.java
index 7a4fd36..499f28c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionRequest.java
@@ -18,11 +18,22 @@
 
 package org.apache.ambari.server.controller;
 
+import io.swagger.annotations.ApiModelProperty;
+
 /**
  * Used to perform CRUD operations of Action
  */
 public class ActionRequest {
 
+  static final String ACTION_NAME = "action_name";
+  static final String ACTION_TYPE = "action_type";
+  static final String INPUTS = "inputs";
+  static final String TARGET_SERVICE = "target_service";
+  static final String TARGET_COMPONENT = "target_component";
+  static final String DESCRIPTION = "description";
+  static final String TARGET_TYPE = "target_type";
+  static final String DEFAULT_TIMEOUT = "default_timeout";
+
   private String actionName;  //CRUD
   private String actionType;  //C
   private String inputs;  //C
@@ -55,6 +66,7 @@ public class ActionRequest {
     return new ActionRequest(null, null, null, null, null, null, null, null);
   }
 
+  @ApiModelProperty(name = ACTION_NAME)
   public String getActionName() {
     return actionName;
   }
@@ -63,6 +75,7 @@ public class ActionRequest {
     this.actionName = actionName;
   }
 
+  @ApiModelProperty(name = ACTION_TYPE)
   public String getActionType() {
     return actionType;
   }
@@ -71,6 +84,7 @@ public class ActionRequest {
     this.actionType = actionType;
   }
 
+  @ApiModelProperty(name = INPUTS)
   public String getInputs() {
     return inputs;
   }
@@ -79,6 +93,7 @@ public class ActionRequest {
     this.inputs = inputs;
   }
 
+  @ApiModelProperty(name = TARGET_SERVICE)
   public String getTargetService() {
     return targetService;
   }
@@ -87,6 +102,7 @@ public class ActionRequest {
     this.targetService = targetService;
   }
 
+  @ApiModelProperty(name = TARGET_COMPONENT)
   public String getTargetComponent() {
     return targetComponent;
   }
@@ -95,6 +111,7 @@ public class ActionRequest {
     this.targetComponent = targetComponent;
   }
 
+  @ApiModelProperty(name = DESCRIPTION)
   public String getDescription() {
     return description;
   }
@@ -103,6 +120,7 @@ public class ActionRequest {
     this.description = description;
   }
 
+  @ApiModelProperty(name = TARGET_TYPE)
   public String getTargetType() {
     return targetType;
   }
@@ -111,6 +129,7 @@ public class ActionRequest {
     this.targetType = targetType;
   }
 
+  @ApiModelProperty(name = DEFAULT_TIMEOUT)
   public String getDefaultTimeout() {
     return defaultTimeout;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/580067f9/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionRequestSwagger.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionRequestSwagger.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionRequestSwagger.java
new file mode 100644
index 0000000..65b96fd
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionRequestSwagger.java
@@ -0,0 +1,31 @@
+/**
+ * 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;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Request schema for endpoint {@link org.apache.ambari.server.api.services.ActionService#createActionDefinition(String,
+ *    javax.ws.rs.core.HttpHeaders, javax.ws.rs.core.UriInfo, String)}
+ *
+ * The interface is not actually implemented, it only carries swagger annotations.
+ */
+public interface ActionRequestSwagger {
+  @ApiModelProperty(name = "Actions")
+  public ActionRequest getActionRequest();
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/580067f9/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionResponse.java
index e7edafb..3373d6d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ActionResponse.java
@@ -18,6 +18,8 @@
 
 package org.apache.ambari.server.controller;
 
+import io.swagger.annotations.ApiModelProperty;
+
 /**
  * Used to respond to GET requests for actions
  */
@@ -45,6 +47,7 @@ public class ActionResponse {
     setDefaultTimeout(defaultTimeout);
   }
 
+  @ApiModelProperty(name = ActionRequest.ACTION_NAME)
   public String getActionName() {
     return actionName;
   }
@@ -53,6 +56,7 @@ public class ActionResponse {
     this.actionName = actionName;
   }
 
+  @ApiModelProperty(name = ActionRequest.ACTION_TYPE)
   public String getActionType() {
     return actionType;
   }
@@ -61,6 +65,7 @@ public class ActionResponse {
     this.actionType = actionType;
   }
 
+  @ApiModelProperty(name = ActionRequest.INPUTS)
   public String getInputs() {
     return inputs;
   }
@@ -69,6 +74,7 @@ public class ActionResponse {
     this.inputs = inputs;
   }
 
+  @ApiModelProperty(name = ActionRequest.TARGET_SERVICE)
   public String getTargetService() {
     return targetService;
   }
@@ -77,6 +83,7 @@ public class ActionResponse {
     this.targetService = targetService;
   }
 
+  @ApiModelProperty(name = ActionRequest.TARGET_COMPONENT)
   public String getTargetComponent() {
     return targetComponent;
   }
@@ -84,7 +91,8 @@ public class ActionResponse {
   public void setTargetComponent(String targetComponent) {
     this.targetComponent = targetComponent;
   }
-  
+
+  @ApiModelProperty(name = ActionRequest.DESCRIPTION)
   public String getDescription() {
     return description;
   }
@@ -93,6 +101,7 @@ public class ActionResponse {
     this.description = description;
   }
 
+  @ApiModelProperty(name = ActionRequest.TARGET_TYPE)
   public String getTargetType() {
     return targetType;
   }
@@ -101,6 +110,7 @@ public class ActionResponse {
     this.targetType = targetType;
   }
 
+  @ApiModelProperty(name = ActionRequest.DEFAULT_TIMEOUT)
   public String getDefaultTimeout() {
     return defaultTimeout;
   }
@@ -172,4 +182,12 @@ public class ActionResponse {
     result = result + (defaultTimeout != null ? defaultTimeout.hashCode() : 0);
     return result;
   }
+
+  /**
+   * Interface to help correct Swagger documentation generation
+   */
+  public interface ActionResponseSwagger {
+    @ApiModelProperty(name = "Actions")
+    ActionResponse getActionResponse();
+  }
 }


[46/49] ambari git commit: AMBARI-21029. Integrate SettingService with Swagger (adoroszlai)

Posted by ad...@apache.org.
AMBARI-21029. Integrate SettingService with Swagger (adoroszlai)


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

Branch: refs/heads/trunk
Commit: 51fc3cf77302c7bc04ffb9fdbd53f053b053514f
Parents: 0177263
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Tue May 23 11:35:31 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Tue May 23 11:35:31 2017 +0200

----------------------------------------------------------------------
 .../api/services/SettingRequestSwagger.java     |  30 +++++
 .../server/api/services/SettingService.java     | 126 ++++++++++++++++---
 .../server/controller/SettingRequest.java       |  69 ++++++++++
 .../server/controller/SettingResponse.java      |  90 +++++++++++++
 .../internal/SettingResourceProvider.java       |  64 ++++++----
 .../server/api/services/SettingServiceTest.java |   2 +-
 6 files changed, 337 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/51fc3cf7/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingRequestSwagger.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingRequestSwagger.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingRequestSwagger.java
new file mode 100644
index 0000000..4e854a4
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/SettingRequestSwagger.java
@@ -0,0 +1,30 @@
+/*
+ * 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.controller.ApiModel;
+import org.apache.ambari.server.controller.SettingRequest;
+import org.apache.ambari.server.controller.internal.SettingResourceProvider;
+
+import io.swagger.annotations.ApiModelProperty;
+
+@SuppressWarnings("unused") // for Swagger
+public interface SettingRequestSwagger extends ApiModel {
+  @ApiModelProperty(name = SettingResourceProvider.RESPONSE_KEY)
+  SettingRequest getSettingRequest();
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/51fc3cf7/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
index e186be2..b8da678 100644
--- 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
@@ -1,4 +1,4 @@
-/**
+/*
  * 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
@@ -29,18 +29,35 @@ 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.MediaType;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 
 import org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.controller.SettingResponse.SettingResponseWrapper;
+import org.apache.ambari.server.controller.internal.SettingResourceProvider;
 import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.http.HttpStatus;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 
 /**
  * Service responsible for setting resource requests.
  */
-@Path("/settings/")
+@Path("/settings")
+@Api(value = "/settings", description = "Endpoint for settings-specific operations")
 public class SettingService extends BaseService {
 
+  private static final String DEFAULT_FIELDS_GET_SETTINGS = SettingResourceProvider.SETTING_NAME_PROPERTY_ID;
+  private static final String DEFAULT_FIELDS_GET_SETTING = SettingResourceProvider.ALL_PROPERTIES;
+  private static final String SETTING_REQUEST_TYPE = "org.apache.ambari.server.api.services.SettingRequestSwagger";
+
   /**
    * Construct a SettingService.
    */
@@ -58,9 +75,26 @@ public class SettingService extends BaseService {
    * @return setting collection resource representation
    */
   @GET
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Returns all settings",
+    response = SettingResponseWrapper.class, responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY,
+      defaultValue =  DEFAULT_FIELDS_GET_SETTINGS),
+    @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, allowableValues = QUERY_FROM_VALUES, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, allowableValues = QUERY_TO_VALUES, dataType = QUERY_TO_TYPE, paramType = PARAM_TYPE_QUERY),
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response getSettings(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, body, ui, Request.Type.GET, createSettingResource(null));
+    ResourceInstance resource = createSettingResource(null);
+    return handleRequest(headers, body, ui, Request.Type.GET, resource);
   }
 
   /**
@@ -75,14 +109,33 @@ public class SettingService extends BaseService {
    */
   @GET
   @Path("{settingName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Returns a specific setting",
+    response = SettingResponseWrapper.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY,
+      defaultValue = DEFAULT_FIELDS_GET_SETTING),
+    @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, allowableValues = QUERY_FROM_VALUES, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, allowableValues = QUERY_TO_VALUES, dataType = QUERY_TO_TYPE, paramType = PARAM_TYPE_QUERY),
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   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));
+    @ApiParam(value = "setting name", required = true) @PathParam("settingName") String settingName
+  ) {
+    ResourceInstance resource = createSettingResource(settingName);
+    return handleRequest(headers, body, ui, Request.Type.GET, resource);
   }
 
   /**
-   * Handles: POST /settings/{settingName}
+   * Handles: POST /settings
    * Create a specific setting.
    *
    * @param headers      http headers
@@ -91,9 +144,24 @@ public class SettingService extends BaseService {
    * @return information regarding the created setting
    */
    @POST
-   @Produces("text/plain")
+   @Produces(MediaType.TEXT_PLAIN)
+   @ApiOperation(value = "Creates a setting")
+   @ApiImplicitParams({
+     @ApiImplicitParam(dataType = SETTING_REQUEST_TYPE, paramType = PARAM_TYPE_BODY, required = true)
+   })
+   @ApiResponses({
+     @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION),
+     @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+     @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+     @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_CLUSTER_NOT_FOUND),
+     @ApiResponse(code = HttpStatus.SC_CONFLICT, message = MSG_RESOURCE_ALREADY_EXISTS),
+     @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+     @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+     @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+   })
    public Response createSetting(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-     return handleRequest(headers, body, ui, Request.Type.POST, createSettingResource(null));
+     ResourceInstance resource = createSettingResource(null);
+     return handleRequest(headers, body, ui, Request.Type.POST, resource);
   }
 
   /**
@@ -108,10 +176,23 @@ public class SettingService extends BaseService {
    */
   @PUT
   @Path("{settingName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Updates a setting")
+  @ApiImplicitParams({
+    @ApiImplicitParam(dataType = SETTING_REQUEST_TYPE, paramType = PARAM_TYPE_BODY, required = true)
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   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));
+    @ApiParam(value = "setting name", required = true) @PathParam("settingName") String settingName
+  ) {
+    ResourceInstance resource = createSettingResource(settingName);
+    return handleRequest(headers, body, ui, Request.Type.PUT, resource);
   }
 
   /**
@@ -126,10 +207,20 @@ public class SettingService extends BaseService {
    */
   @DELETE
   @Path("{settingName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Deletes a setting")
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response deleteSetting(@Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("settingName") String settingName) {
-    return handleRequest(headers, null, ui, Request.Type.DELETE, createSettingResource(settingName));
+    @ApiParam(value = "setting name", required = true) @PathParam("settingName") String settingName
+  ) {
+    ResourceInstance resource = createSettingResource(settingName);
+    return handleRequest(headers, null, ui, Request.Type.DELETE, resource);
   }
 
   // ----- helper methods ----------------------------------------------------
@@ -141,8 +232,9 @@ public class SettingService extends BaseService {
    *
    * @return a setting resource instance
    */
-  ResourceInstance createSettingResource(String settingName) {
+  protected 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/51fc3cf7/ambari-server/src/main/java/org/apache/ambari/server/controller/SettingRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/SettingRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/SettingRequest.java
new file mode 100644
index 0000000..4331ba3
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/SettingRequest.java
@@ -0,0 +1,69 @@
+/*
+ * 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;
+
+import java.util.Objects;
+
+import org.apache.ambari.server.controller.internal.SettingResourceProvider;
+
+import io.swagger.annotations.ApiModelProperty;
+
+public class SettingRequest {
+
+  private final String name;
+  private final String settingType;
+  private final String content;
+
+  public SettingRequest(String name, String settingType, String content) {
+    this.name = name;
+    this.settingType = settingType;
+    this.content = content;
+  }
+
+  @ApiModelProperty(name = SettingResourceProvider.NAME)
+  public String getName() {
+    return name;
+  }
+
+  @ApiModelProperty(name = SettingResourceProvider.SETTING_TYPE)
+  public String getSettingType() {
+    return settingType;
+  }
+
+  @ApiModelProperty(name = SettingResourceProvider.CONTENT)
+  public String getContent() {
+    return content;
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (this == o) return true;
+    if (o == null || getClass() != o.getClass()) return false;
+
+    SettingRequest other = (SettingRequest) o;
+    return Objects.equals(name, other.name) &&
+      Objects.equals(settingType, other.settingType) &&
+      Objects.equals(content, other.content);
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(name, settingType, content);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/51fc3cf7/ambari-server/src/main/java/org/apache/ambari/server/controller/SettingResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/SettingResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/SettingResponse.java
new file mode 100644
index 0000000..cd51184
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/SettingResponse.java
@@ -0,0 +1,90 @@
+/*
+ * 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;
+
+import java.util.Objects;
+
+import org.apache.ambari.server.controller.internal.SettingResourceProvider;
+
+import io.swagger.annotations.ApiModelProperty;
+
+public class SettingResponse {
+
+  private final String name;
+  private final String settingType;
+  private final String content;
+  private final String updatedBy;
+  private final long updateTimestamp;
+
+  public SettingResponse(String name, String settingType, String content, String updatedBy, long updateTimestamp) {
+    this.name = name;
+    this.settingType = settingType;
+    this.content = content;
+    this.updatedBy = updatedBy;
+    this.updateTimestamp = updateTimestamp;
+  }
+
+  @ApiModelProperty(name = SettingResourceProvider.NAME)
+  public String getName() {
+    return name;
+  }
+
+  @ApiModelProperty(name = SettingResourceProvider.SETTING_TYPE)
+  public String getSettingType() {
+    return settingType;
+  }
+
+  @ApiModelProperty(name = SettingResourceProvider.CONTENT)
+  public String getContent() {
+    return content;
+  }
+
+  @ApiModelProperty(name = SettingResourceProvider.UPDATED_BY)
+  public String getUpdatedBy() {
+    return updatedBy;
+  }
+
+  @ApiModelProperty(name = SettingResourceProvider.UPDATE_TIMESTAMP)
+  public long getUpdateTimestamp() {
+    return updateTimestamp;
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (this == o) return true;
+    if (o == null || getClass() != o.getClass()) return false;
+
+    SettingResponse other = (SettingResponse) o;
+    return Objects.equals(name, other.name) &&
+      Objects.equals(settingType, other.settingType) &&
+      Objects.equals(content, other.content) &&
+      Objects.equals(updatedBy, other.updatedBy) &&
+      updateTimestamp == other.updateTimestamp;
+  }
+
+  @Override
+  public int hashCode() {
+    return Objects.hash(name, settingType, content, updatedBy, updateTimestamp);
+  }
+
+  public interface SettingResponseWrapper extends ApiModel {
+    @ApiModelProperty(name = SettingResourceProvider.RESPONSE_KEY)
+    @SuppressWarnings("unused")
+    SettingResponse getSettingResponse();
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/51fc3cf7/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
index e50490e..5235ef4 100644
--- 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
@@ -1,4 +1,4 @@
-/**
+/*
  * 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
@@ -29,6 +29,7 @@ import java.util.Set;
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.DuplicateResourceException;
 import org.apache.ambari.server.StaticallyInject;
+import org.apache.ambari.server.controller.SettingResponse;
 import org.apache.ambari.server.controller.spi.NoSuchParentResourceException;
 import org.apache.ambari.server.controller.spi.NoSuchResourceException;
 import org.apache.ambari.server.controller.spi.Predicate;
@@ -46,6 +47,7 @@ import org.apache.ambari.server.security.authorization.RoleAuthorization;
 import org.apache.commons.lang.ObjectUtils;
 import org.apache.commons.lang.StringUtils;
 
+import com.google.common.collect.ImmutableSet;
 import com.google.inject.Inject;
 
 /**
@@ -54,14 +56,20 @@ import com.google.inject.Inject;
 @StaticallyInject
 public class SettingResourceProvider extends AbstractAuthorizedResourceProvider {
 
-  private static final String SETTINGS = "Settings";
+  public static final String RESPONSE_KEY = "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");
+  public static final String NAME = "name";
+  public static final String SETTING_TYPE = "setting_type";
+  public static final String CONTENT = "content";
+  public static final String UPDATED_BY = "updated_by";
+  public static final String UPDATE_TIMESTAMP = "update_timestamp";
+  public static final String SETTING_NAME_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + NAME;
+  public static final String SETTING_SETTING_TYPE_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + SETTING_TYPE;
+  public static final String SETTING_CONTENT_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + CONTENT;
+  public static final String SETTING_UPDATED_BY_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + UPDATED_BY;
+  public static final String SETTING_UPDATE_TIMESTAMP_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + UPDATE_TIMESTAMP;
+  public static final String ALL_PROPERTIES = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "*";
 
   /**
    * The property ids for setting resource.
@@ -73,7 +81,11 @@ public class SettingResourceProvider extends AbstractAuthorizedResourceProvider
    */
   private static final Map<Resource.Type, String> keyPropertyIds = new HashMap<>();
 
-  private static final Set<String> requiredProperties = new HashSet<>();
+  private static final Set<String> REQUIRED_PROPERTIES = ImmutableSet.of(
+    SETTING_NAME_PROPERTY_ID,
+    SETTING_SETTING_TYPE_PROPERTY_ID,
+    SETTING_CONTENT_PROPERTY_ID
+  );
 
   @Inject
   private static SettingDAO dao;
@@ -88,10 +100,6 @@ public class SettingResourceProvider extends AbstractAuthorizedResourceProvider
     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() {
@@ -113,9 +121,9 @@ public class SettingResourceProvider extends AbstractAuthorizedResourceProvider
     Set<Resource> associatedResources = new HashSet<>();
 
     for (Map<String, Object> properties : request.getProperties()) {
-      SettingEntity settingEntity = createResources(newCreateCommand(request, properties));
+      SettingResponse setting = createResources(newCreateCommand(request, properties));
       Resource resource = new ResourceImpl(Resource.Type.Setting);
-      resource.setProperty(SETTING_NAME_PROPERTY_ID, settingEntity.getName());
+      resource.setProperty(SETTING_NAME_PROPERTY_ID, setting.getName());
       associatedResources.add(resource);
     }
 
@@ -145,7 +153,7 @@ public class SettingResourceProvider extends AbstractAuthorizedResourceProvider
     Set<String> requestedIds = getRequestPropertyIds(request, predicate);
     Set<Resource> resources = new HashSet<>();
     for(SettingEntity entity : entities) {
-      resources.add(toResource(entity, requestedIds));
+      resources.add(toResource(toResponse(entity), requestedIds));
     }
     return resources;
   }
@@ -169,10 +177,10 @@ public class SettingResourceProvider extends AbstractAuthorizedResourceProvider
   }
 
 
-  private Command<SettingEntity> newCreateCommand(final Request request, final Map<String, Object> properties) {
-    return new Command<SettingEntity>() {
+  private Command<SettingResponse> newCreateCommand(final Request request, final Map<String, Object> properties) {
+    return new Command<SettingResponse>() {
       @Override
-      public SettingEntity invoke() throws AmbariException, AuthorizationException {
+      public SettingResponse invoke() throws AmbariException, AuthorizationException {
         SettingEntity entity = toEntity(properties);
         if (dao.findByName(entity.getName()) != null) {
           throw new DuplicateResourceException(
@@ -180,7 +188,7 @@ public class SettingResourceProvider extends AbstractAuthorizedResourceProvider
         }
         dao.create(entity);
         notifyCreate(Resource.Type.Setting, request);
-        return entity;
+        return toResponse(entity);
       }
     };
   }
@@ -224,18 +232,18 @@ public class SettingResourceProvider extends AbstractAuthorizedResourceProvider
     entity.setUpdateTimestamp(System.currentTimeMillis());
   }
 
-  private Resource toResource(final SettingEntity settingEntity, final Set<String> requestedIds) {
+  private Resource toResource(final SettingResponse setting, 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);
+    setResourceProperty(resource, SETTING_NAME_PROPERTY_ID, setting.getName(), requestedIds);
+    setResourceProperty(resource, SETTING_SETTING_TYPE_PROPERTY_ID, setting.getSettingType(), requestedIds);
+    setResourceProperty(resource, SETTING_CONTENT_PROPERTY_ID, setting.getContent(), requestedIds);
+    setResourceProperty(resource, SETTING_UPDATED_BY_PROPERTY_ID, setting.getUpdatedBy(), requestedIds);
+    setResourceProperty(resource, SETTING_UPDATE_TIMESTAMP_PROPERTY_ID, setting.getUpdateTimestamp(), requestedIds);
     return resource;
   }
 
   private SettingEntity toEntity(final Map<String, Object> properties) throws AmbariException {
-    for (String propertyName: requiredProperties) {
+    for (String propertyName: REQUIRED_PROPERTIES) {
       if (properties.get(propertyName) == null) {
         throw new AmbariException(String.format("Property %s should be provided", propertyName));
       }
@@ -249,4 +257,8 @@ public class SettingResourceProvider extends AbstractAuthorizedResourceProvider
     entity.setUpdateTimestamp(System.currentTimeMillis());
     return entity;
   }
+
+  private static SettingResponse toResponse(SettingEntity entity) {
+    return new SettingResponse(entity.getName(), entity.getSettingType(), entity.getContent(), entity.getUpdatedBy(), entity.getUpdateTimestamp());
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/51fc3cf7/ambari-server/src/test/java/org/apache/ambari/server/api/services/SettingServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/SettingServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/SettingServiceTest.java
index 1bc75ff..3af8751 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/SettingServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/SettingServiceTest.java
@@ -79,7 +79,7 @@ public class SettingServiceTest extends BaseServiceTest {
     }
 
     @Override
-    ResourceInstance createSettingResource(String settingName) {
+    protected ResourceInstance createSettingResource(String settingName) {
       assertEquals(this.settingName, settingName);
       return getTestResource();
     }


[19/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Posted by ad...@apache.org.
AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)


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

Branch: refs/heads/trunk
Commit: fb86fb3bafa1479651836db3197f1b2023b08a2f
Parents: 785d7da
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Mon Mar 20 14:26:55 2017 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Mon Mar 20 14:26:55 2017 -0700

----------------------------------------------------------------------
 LICENSE.txt                                     |    17 +
 .../docs/api/asciidoc/definitions.adoc          |   321 +
 ambari-server/docs/api/asciidoc/overview.adoc   |    23 +
 ambari-server/docs/api/asciidoc/paths.adoc      |  1264 +
 ambari-server/pom.xml                           |    81 +
 .../api/services/ActiveWidgetLayoutService.java |    76 -
 .../api/services/GroupPrivilegeService.java     |    77 -
 .../server/api/services/GroupService.java       |   155 -
 .../server/api/services/MemberService.java      |   163 -
 .../api/services/UserAuthorizationService.java  |   103 -
 .../api/services/UserPrivilegeService.java      |    79 -
 .../ambari/server/api/services/UserService.java |   175 -
 .../api/services/ViewDataMigrationService.java  |   122 -
 .../ViewExternalSubResourceService.java         |   146 -
 .../api/services/ViewInstanceService.java       |   282 -
 .../api/services/ViewPermissionService.java     |   186 -
 .../api/services/ViewPrivilegeService.java      |    55 -
 .../ambari/server/api/services/ViewService.java |   162 -
 .../api/services/ViewSubResourceService.java    |   134 -
 .../server/api/services/ViewVersionService.java |   199 -
 .../services/groups/GroupPrivilegeService.java  |   113 +
 .../api/services/groups/GroupService.java       |   177 +
 .../api/services/groups/MemberService.java      |   200 +
 .../users/ActiveWidgetLayoutService.java        |   111 +
 .../users/UserAuthorizationService.java         |   120 +
 .../services/users/UserPrivilegeService.java    |   113 +
 .../server/api/services/users/UserService.java  |   193 +
 .../views/ViewDataMigrationService.java         |   113 +
 .../views/ViewExternalSubResourceService.java   |   148 +
 .../api/services/views/ViewInstanceService.java |   313 +
 .../services/views/ViewPermissionService.java   |   208 +
 .../services/views/ViewPrivilegeService.java    |   268 +
 .../server/api/services/views/ViewService.java  |   181 +
 .../services/views/ViewSubResourceService.java  |   136 +
 .../api/services/views/ViewVersionService.java  |   208 +
 .../controller/ActiveWidgetLayoutRequest.java   |    66 +
 .../controller/ActiveWidgetLayoutResponse.java  |   142 +
 .../ambari/server/controller/ApiModel.java      |    28 +
 .../controller/GroupPrivilegeResponse.java      |    61 +
 .../ambari/server/controller/GroupRequest.java  |     5 +-
 .../ambari/server/controller/GroupResponse.java |     7 +-
 .../ambari/server/controller/MemberRequest.java |     4 +
 .../server/controller/MemberResponse.java       |     6 +-
 .../server/controller/PrivilegeResponse.java    |   175 +
 .../controller/UserAuthorizationResponse.java   |   153 +
 .../controller/UserPrivilegeResponse.java       |    61 +
 .../ambari/server/controller/UserRequest.java   |    17 +-
 .../ambari/server/controller/UserResponse.java  |    48 +-
 .../server/controller/ViewInstanceRequest.java  |   209 +
 .../server/controller/ViewInstanceResponse.java |   198 +
 .../controller/ViewPermissionResponse.java      |   122 +
 .../server/controller/ViewPrivilegeRequest.java |    79 +
 .../controller/ViewPrivilegeResponse.java       |    55 +
 .../ambari/server/controller/ViewResponse.java  |    82 +
 .../server/controller/ViewVersionResponse.java  |   234 +
 .../ActiveWidgetLayoutResourceProvider.java     |    59 +-
 .../GroupPrivilegeResourceProvider.java         |    80 +-
 .../UserAuthorizationResourceProvider.java      |    64 +-
 .../internal/UserPrivilegeResourceProvider.java |    82 +-
 .../ViewPermissionResourceProvider.java         |    44 +-
 .../internal/ViewVersionResourceProvider.java   |    61 +-
 .../orm/entities/PrincipalTypeEntity.java       |    12 +-
 .../server/security/authorization/User.java     |    12 +
 .../apache/ambari/server/view/ViewRegistry.java |     4 +-
 .../services/ActiveWidgetLayoutServiceTest.java |    75 -
 .../api/services/GroupPrivilegeServiceTest.java |   111 -
 .../server/api/services/GroupServiceTest.java   |     1 +
 .../server/api/services/MemberServiceTest.java  |   110 -
 .../services/UserAuthorizationServiceTest.java  |   100 -
 .../api/services/UserPrivilegeServiceTest.java  |   124 -
 .../services/ViewDataMigrationServiceTest.java  |    81 -
 .../ViewExternalSubResourceServiceTest.java     |    50 -
 .../api/services/ViewPermissionServiceTest.java |   101 -
 .../services/ViewSubResourceServiceTest.java    |     1 +
 .../views/ViewDataMigrationServiceTest.java     |    81 +
 .../ViewExternalSubResourceServiceTest.java     |    50 +
 .../GroupPrivilegeResourceProviderTest.java     |    13 +-
 .../UserPrivilegeResourceProviderTest.java      |    13 +-
 ambari-web/api-docs/css/api-explorer.css        |  2426 ++
 ambari-web/api-docs/css/index.css               | 17432 +++++++++++++
 ambari-web/api-docs/css/print.css               |  1167 +
 ambari-web/api-docs/css/reset.css               |   125 +
 ambari-web/api-docs/css/screen.css              |     9 +
 ambari-web/api-docs/css/standalone.css          |   294 +
 ambari-web/api-docs/css/typography.css          |    26 +
 .../api-docs/fonts/droid-sans-v6-latin-700.eot  |   Bin 0 -> 22922 bytes
 .../api-docs/fonts/droid-sans-v6-latin-700.svg  |   411 +
 .../api-docs/fonts/droid-sans-v6-latin-700.ttf  |   Bin 0 -> 40513 bytes
 .../api-docs/fonts/droid-sans-v6-latin-700.woff |   Bin 0 -> 25992 bytes
 .../fonts/droid-sans-v6-latin-700.woff2         |   Bin 0 -> 11480 bytes
 .../fonts/droid-sans-v6-latin-regular.eot       |   Bin 0 -> 22008 bytes
 .../fonts/droid-sans-v6-latin-regular.svg       |   403 +
 .../fonts/droid-sans-v6-latin-regular.ttf       |   Bin 0 -> 39069 bytes
 .../fonts/droid-sans-v6-latin-regular.woff      |   Bin 0 -> 24868 bytes
 .../fonts/droid-sans-v6-latin-regular.woff2     |   Bin 0 -> 11304 bytes
 ambari-web/api-docs/images/Swagger_explorer.png |   Bin 0 -> 108087 bytes
 .../api-docs/images/Swagger_explorer_min.png    |   Bin 0 -> 46646 bytes
 ambari-web/api-docs/images/explorer_icons.png   |   Bin 0 -> 5763 bytes
 ambari-web/api-docs/images/favicon-16x16.png    |   Bin 0 -> 645 bytes
 ambari-web/api-docs/images/favicon-32x32.png    |   Bin 0 -> 1654 bytes
 ambari-web/api-docs/images/favicon.ico          |   Bin 0 -> 5430 bytes
 .../api-docs/images/json_editor_integration.png |   Bin 0 -> 63019 bytes
 ambari-web/api-docs/images/logo_small.png       |   Bin 0 -> 770 bytes
 ambari-web/api-docs/images/pet_store_api.png    |   Bin 0 -> 824 bytes
 ambari-web/api-docs/images/senodio.png          |   Bin 0 -> 22838 bytes
 ambari-web/api-docs/images/throbber.gif         |   Bin 0 -> 9257 bytes
 ambari-web/api-docs/images/wordnik_api.png      |   Bin 0 -> 980 bytes
 ambari-web/api-docs/index.html                  |   241 +
 ambari-web/api-docs/lib/backbone-min.js         |    15 +
 ambari-web/api-docs/lib/bootstrap.min.js        |     6 +
 ambari-web/api-docs/lib/handlebars-2.0.0.js     |    28 +
 ambari-web/api-docs/lib/highlight.7.3.pack.js   |     1 +
 ambari-web/api-docs/lib/jquery-1.8.0.min.js     |     2 +
 ambari-web/api-docs/lib/jquery.ba-bbq.min.js    |    18 +
 ambari-web/api-docs/lib/jquery.slideto.min.js   |     1 +
 ambari-web/api-docs/lib/jquery.wiggle.min.js    |     8 +
 ambari-web/api-docs/lib/jsoneditor.js           |  7287 ++++++
 ambari-web/api-docs/lib/marked.js               |  1272 +
 ambari-web/api-docs/lib/swagger-oauth.js        |   286 +
 ambari-web/api-docs/lib/underscore-min.js       |     6 +
 ambari-web/api-docs/lib/underscore-min.map      |     1 +
 ambari-web/api-docs/o2c.html                    |    20 +
 ambari-web/api-docs/swagger-ui.js               | 22644 +++++++++++++++++
 ambari-web/api-docs/swagger-ui.min.js           |    12 +
 ambari-web/brunch-config.js                     |     3 +-
 ambari-web/pom.xml                              |     1 +
 126 files changed, 60634 insertions(+), 3014 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/LICENSE.txt
----------------------------------------------------------------------
diff --git a/LICENSE.txt b/LICENSE.txt
index f05016f..4079cc0 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -836,6 +836,23 @@ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
+For swagger-ui (ambari-web/api-docs/*):
+Home:   https://github.com/jensoleg/swagger-ui
+License:  Apache License, Version 2.0
+
+Copyright 2015 Reverb Technologies, Inc.
+
+Licensed 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 [apache.org/licenses/LICENSE-2.0](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.
+
+
 For simplejson (ambari-common/src/main/python/ambari_simplejson)
 
 simplejson is dual-licensed software. It is available under the terms

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/docs/api/asciidoc/definitions.adoc
----------------------------------------------------------------------
diff --git a/ambari-server/docs/api/asciidoc/definitions.adoc b/ambari-server/docs/api/asciidoc/definitions.adoc
new file mode 100644
index 0000000..76beb8c
--- /dev/null
+++ b/ambari-server/docs/api/asciidoc/definitions.adoc
@@ -0,0 +1,321 @@
+== Definitions
+=== ActiveWidgetLayoutRequest
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|WidgetLayouts||false|<<WidgetLayoutIdWrapper>> array|
+|===
+
+=== ActiveWidgetLayoutResponse
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|WidgetLayoutInfo/cluster_name||false|string|
+|WidgetLayoutInfo/display_name||false|string|
+|WidgetLayoutInfo/layout_name||false|string|
+|WidgetLayoutInfo/scope||false|string|
+|WidgetLayoutInfo/section_name||false|string|
+|WidgetLayoutInfo/user_name||false|string|
+|WidgetLayoutInfo/widgets||false|object array|
+|===
+
+=== GroupPrivilegeResponse
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|PrivilegeInfo/permission_label||false|string|
+|PrivilegeInfo/privilege_id||false|integer (int32)|
+|PrivilegeInfo/permission_name||false|string|
+|PrivilegeInfo/principal_type||false|enum (USER, GROUP, ROLE)|
+|PrivilegeInfo/principal_name||false|string|
+|PrivilegeInfo/type||false|enum (AMBARI, CLUSTER, VIEW)|
+|PrivilegeInfo/cluster_name||false|string|
+|PrivilegeInfo/view_name||false|string|
+|PrivilegeInfo/version||false|string|
+|PrivilegeInfo/instance_name||false|string|
+|PrivilegeInfo/group_name||true|string|
+|===
+
+=== GroupRequest
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|Groups/group_name||true|string|
+|===
+
+=== GroupResponse
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|Groups/group_name||false|string|
+|Groups/ldap_group||false|boolean|false
+|Groups/group_type||false|enum (LOCAL, LDAP, JWT, PAM)|
+|===
+
+=== MemberRequest
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|MemberInfo/group_name||true|string|
+|MemberInfo/user_name||true|string|
+|===
+
+=== MemberResponse
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|MemberInfo/group_name||false|string|
+|MemberInfo/user_name||false|string|
+|===
+
+=== ParameterConfig
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|name||false|string|
+|description||false|string|
+|label||false|string|
+|placeholder||false|string|
+|defaultValue||false|string|
+|clusterConfig||false|string|
+|required||false|boolean|false
+|masked||false|boolean|false
+|===
+
+=== PrivilegeResponse
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|PrivilegeInfo/permission_label||false|string|
+|PrivilegeInfo/privilege_id||false|integer (int32)|
+|PrivilegeInfo/permission_name||false|string|
+|PrivilegeInfo/principal_type||false|enum (USER, GROUP, ROLE)|
+|PrivilegeInfo/principal_name||false|string|
+|PrivilegeInfo/type||false|enum (AMBARI, CLUSTER, VIEW)|
+|PrivilegeInfo/cluster_name||false|string|
+|PrivilegeInfo/view_name||false|string|
+|PrivilegeInfo/version||false|string|
+|PrivilegeInfo/instance_name||false|string|
+|===
+
+=== UserAuthorizationResponse
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|AuthorizationInfo/authorization_id||false|string|
+|AuthorizationInfo/authorization_name||false|string|
+|AuthorizationInfo/resource_type||false|string|
+|AuthorizationInfo/user_name||true|string|
+|AuthorizationInfo/cluster_name||false|string|
+|AuthorizationInfo/view_name||false|string|
+|AuthorizationInfo/view_version||false|string|
+|AuthorizationInfo/view_instance_name||false|string|
+|===
+
+=== UserPrivilegeResponse
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|PrivilegeInfo/permission_label||false|string|
+|PrivilegeInfo/privilege_id||false|integer (int32)|
+|PrivilegeInfo/permission_name||false|string|
+|PrivilegeInfo/principal_type||false|enum (USER, GROUP, ROLE)|
+|PrivilegeInfo/principal_name||false|string|
+|PrivilegeInfo/type||false|enum (AMBARI, CLUSTER, VIEW)|
+|PrivilegeInfo/cluster_name||false|string|
+|PrivilegeInfo/view_name||false|string|
+|PrivilegeInfo/version||false|string|
+|PrivilegeInfo/instance_name||false|string|
+|PrivilegeInfo/user_name||true|string|
+|===
+
+=== UserRequest
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|Users/password||false|string|
+|Users/old_password||false|string|
+|Users/active||false|boolean|false
+|Users/admin||false|boolean|false
+|===
+
+=== UserResponse
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|Users/user_type||false|enum (LOCAL, LDAP, JWT, PAM)|
+|Users/groups||false|string array|
+|Users/user_name||true|string|
+|Users/active||false|boolean|false
+|Users/admin||false|boolean|false
+|Users/ldap_user||false|boolean|false
+|===
+
+=== ValidationResult
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|detail||false|string|
+|valid||false|boolean|false
+|===
+
+=== ViewInfo
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|view_name||false|string|
+|===
+
+=== ViewInstanceRequest
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|ViewInstanceInfo||false|<<ViewInstanceRequestInfo>>|
+|===
+
+=== ViewInstanceRequestInfo
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|label||false|string|
+|description||false|string|
+|visible||false|boolean|false
+|icon_path||false|string|
+|icon64_path||false|string|
+|properties||false|object|
+|instance_data||false|object|
+|cluster_handle||false|integer (int32)|
+|cluster_type||false|enum (LOCAL_AMBARI, REMOTE_AMBARI, NONE)|
+|===
+
+=== ViewInstanceResponse
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|ViewInstanceInfo||false|<<ViewInstanceResponseInfo>>|
+|===
+
+=== ViewInstanceResponseInfo
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|view_name||false|string|
+|version||false|string|
+|instance_name||false|string|
+|label||false|string|
+|description||false|string|
+|visible||false|boolean|false
+|icon_path||false|string|
+|icon64_path||false|string|
+|properties||false|object|
+|instance_data||false|object|
+|cluster_handle||false|integer (int32)|
+|cluster_type||false|enum (LOCAL_AMBARI, REMOTE_AMBARI, NONE)|
+|context_path||false|string|
+|static||false|boolean|false
+|short_url||false|string|
+|short_url_name||false|string|
+|validation_result||false|<<ValidationResult>>|
+|property_validation_results||false|object|
+|===
+
+=== ViewPermissionInfo
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|view_name||false|string|
+|version||false|string|
+|permission_id||false|integer (int32)|
+|permission_name||false|string|
+|resource_name||false|string|
+|===
+
+=== ViewPermissionResponse
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|ViewPermissionInfo||false|<<ViewPermissionInfo>>|
+|===
+
+=== ViewPrivilegeRequest
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|PrivilegeInfo/permission_name||false|string|
+|PrivilegeInfo/principal_type||false|enum (USER, GROUP, ROLE)|
+|PrivilegeInfo/principal_name||false|string|
+|===
+
+=== ViewPrivilegeResponse
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|PrivilegeInfo/permission_label||false|string|
+|PrivilegeInfo/privilege_id||false|integer (int32)|
+|PrivilegeInfo/permission_name||false|string|
+|PrivilegeInfo/principal_type||false|enum (USER, GROUP, ROLE)|
+|PrivilegeInfo/principal_name||false|string|
+|PrivilegeInfo/view_name||false|string|
+|PrivilegeInfo/version||false|string|
+|PrivilegeInfo/instance_name||false|string|
+|===
+
+=== ViewResponse
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|ViewInfo||false|<<ViewInfo>>|
+|===
+
+=== ViewVersionInfo
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|archive||false|string|
+|build_number||false|string|
+|cluster_configurable||false|boolean|false
+|description||false|string|
+|label||false|string|
+|masker_class||false|string|
+|max_ambari_version||false|string|
+|min_ambari_version||false|string|
+|parameters||false|<<ParameterConfig>> array|
+|status||false|enum (PENDING, DEPLOYING, DEPLOYED, ERROR)|
+|status_detail||false|string|
+|system||false|boolean|false
+|version||false|string|
+|view_name||false|string|
+|===
+
+=== ViewVersionResponse
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|ViewVersionInfo||false|<<ViewVersionInfo>>|
+|===
+
+=== WidgetLayoutIdWrapper
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|id||false|integer (int64)|
+|===
+
+=== WidgetResponse
+[options="header"]
+|===
+|Name|Description|Required|Schema|Default
+|id||false|integer (int64)|
+|widgetName||false|string|
+|widgetType||false|string|
+|metrics||false|string|
+|timeCreated||false|integer (int64)|
+|author||false|string|
+|description||false|string|
+|displayName||false|string|
+|scope||false|string|
+|widgetValues||false|string|
+|properties||false|string|
+|clusterName||false|string|
+|===
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/docs/api/asciidoc/overview.adoc
----------------------------------------------------------------------
diff --git a/ambari-server/docs/api/asciidoc/overview.adoc b/ambari-server/docs/api/asciidoc/overview.adoc
new file mode 100644
index 0000000..e9e5649
--- /dev/null
+++ b/ambari-server/docs/api/asciidoc/overview.adoc
@@ -0,0 +1,23 @@
+= Swagger spec for Ambari REST API
+
+== Overview
+Ambari REST APIs has inherent support for querying, sorting and pagination
+
+=== Version information
+Version: v1
+
+=== License information
+License: Apache License, Version 2.0
+License URL: http://www.apache.org/licenses/LICENSE-2.0
+
+=== URI scheme
+BasePath: /api/v1
+Schemes: HTTP, HTTPS
+
+=== Tags
+
+* Groups: Endpoint for group specific operations
+* Users: Endpoint for user specific operations
+* Views
+
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/docs/api/asciidoc/paths.adoc
----------------------------------------------------------------------
diff --git a/ambari-server/docs/api/asciidoc/paths.adoc b/ambari-server/docs/api/asciidoc/paths.adoc
new file mode 100644
index 0000000..d756051
--- /dev/null
+++ b/ambari-server/docs/api/asciidoc/paths.adoc
@@ -0,0 +1,1264 @@
+== Paths
+=== Create new group
+----
+POST /groups
+----
+
+==== Description
+:hardbreaks:
+Creates group resource.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|BodyParameter|body|input parameters in json form|true|<<GroupRequest>>|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|successful operation|No Content
+|500|Server Error|No Content
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Groups
+
+=== Get all groups
+----
+GET /groups
+----
+
+==== Description
+:hardbreaks:
+Returns details of all groups.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|QueryParameter|fields|Filter group details|false|string|Groups/*
+|QueryParameter|sortBy|Sort groups (asc | desc)|false|string|Groups/group_name.asc
+|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
+|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
+|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful retrieval of all group entries|<<GroupResponse>> array
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Groups
+
+=== Get group
+----
+GET /groups/{groupName}
+----
+
+==== Description
+:hardbreaks:
+Returns group details.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|groupName|group name|true|string|
+|QueryParameter|fields|Filter group details|false|string|Groups
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful retrieval of group resource|<<GroupResponse>>
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Groups
+
+=== Delete group
+----
+DELETE /groups/{groupName}
+----
+
+==== Description
+:hardbreaks:
+Delete group resource.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|groupName|group name|true|string|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|No Content
+|500|Server Error|No Content
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Groups
+
+=== Get all group members
+----
+GET /groups/{groupName}/members
+----
+
+==== Description
+:hardbreaks:
+Returns details of all members.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|groupName|group name|true|string|
+|QueryParameter|fields|Filter member details|false|string|MemberInfo/*
+|QueryParameter|sortBy|Sort members (asc | desc)|false|string|MemberInfo/user_name.asc
+|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
+|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
+|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|<<MemberResponse>> array
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Groups
+
+=== Update group members
+----
+PUT /groups/{groupName}/members
+----
+
+==== Description
+:hardbreaks:
+Updates group member resources.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|groupName|group name|true|string|
+|BodyParameter|body|input parameters in json form|true|<<MemberRequest>>|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|No Content
+|500|Server Error|No Content
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Groups
+
+=== Get group member
+----
+GET /groups/{groupName}/members/{userName}
+----
+
+==== Description
+:hardbreaks:
+Returns member details.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|groupName|group name|true|string|
+|PathParameter|userName|user name|true|string|
+|QueryParameter|fields|Filter member details|false|string|MemberInfo
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|<<MemberResponse>>
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Groups
+
+=== Delete group member
+----
+DELETE /groups/{groupName}/members/{userName}
+----
+
+==== Description
+:hardbreaks:
+Delete member resource.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|groupName|group name|true|string|
+|PathParameter|userName|user name|true|string|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|No Content
+|500|Server Error|No Content
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Groups
+
+=== Get all privileges
+----
+GET /groups/{groupName}/privileges
+----
+
+==== Description
+:hardbreaks:
+Returns all privileges for group.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|groupName|group name|true|string|
+|QueryParameter|fields|Filter user privileges|false|string|PrivilegeInfo/*
+|QueryParameter|sortBy|Sort user privileges (asc | desc)|false|string|PrivilegeInfo/user_name.asc
+|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
+|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
+|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|successful operation|<<GroupPrivilegeResponse>> array
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Groups
+
+=== Get group privilege
+----
+GET /groups/{groupName}/privileges/{privilegeId}
+----
+
+==== Description
+:hardbreaks:
+Returns group privilege details.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|userName|user name|true|string|
+|PathParameter|privilegeId|privilege id|true|string|
+|QueryParameter|fields|Filter group privilege details|false|string|PrivilegeInfo/*
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|<<PrivilegeResponse>>
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Groups
+
+=== Get all users
+----
+GET /users
+----
+
+==== Description
+:hardbreaks:
+Returns details of all users.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|QueryParameter|fields|Filter user details|false|string|Users/*
+|QueryParameter|sortBy|Sort users (asc | desc)|false|string|Users/user_name.desc
+|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
+|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
+|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|<<UserResponse>> array
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Users
+
+=== Create new user
+----
+POST /users/{userName}
+----
+
+==== Description
+:hardbreaks:
+Creates user resource.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|userName|user name|true|string|
+|BodyParameter|body|input parameters in json form|true|<<UserRequest>>|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|No Content
+|500|Server Error|No Content
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Users
+
+=== Get single user
+----
+GET /users/{userName}
+----
+
+==== Description
+:hardbreaks:
+Returns user details.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|userName|user name|true|string|admin
+|QueryParameter|fields|Filter user details|false|string|Users
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|<<UserResponse>>
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Users
+
+=== Delete single user
+----
+DELETE /users/{userName}
+----
+
+==== Description
+:hardbreaks:
+Delete user resource.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|userName|user name|true|string|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|No Content
+|500|Server Error|No Content
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Users
+
+=== Update user detail
+----
+PUT /users/{userName}
+----
+
+==== Description
+:hardbreaks:
+Updates user resource.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|userName|user name|true|string|
+|BodyParameter|body|input parameters in json form|true|<<UserRequest>>|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|No Content
+|500|Server Error|No Content
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Users
+
+=== Get user widget layouts
+----
+GET /users/{userName}/activeWidgetLayouts
+----
+
+==== Description
+:hardbreaks:
+Returns all active widget layouts for user.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|userName|user name|true|string|
+|QueryParameter|fields|Filter user layout details|false|string|WidgetLayoutInfo/*
+|QueryParameter|sortBy|Sort layouts (asc | desc)|false|string|WidgetLayoutInfo/user_name.asc
+|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
+|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
+|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|successful operation|<<ActiveWidgetLayoutResponse>> array
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Users
+
+=== Update user widget layouts
+----
+PUT /users/{userName}/activeWidgetLayouts
+----
+
+==== Description
+:hardbreaks:
+Updates user widget layout.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|userName|user name|true|string|
+|BodyParameter|body|input parameters in json form|true|<<ActiveWidgetLayoutRequest>>|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|No Content
+|500|Server Error|No Content
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Users
+
+=== Get all authorizations
+----
+GET /users/{userName}/authorizations
+----
+
+==== Description
+:hardbreaks:
+Returns all authorization for user.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|userName|user name|true|string|
+|QueryParameter|fields|Filter user authorization details|false|string|AuthorizationInfo/*
+|QueryParameter|sortBy|Sort user authorizations (asc | desc)|false|string|AuthorizationInfo/user_name.asc
+|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
+|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
+|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|successful operation|<<UserAuthorizationResponse>> array
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Users
+
+=== Get user authorization
+----
+GET /users/{userName}/authorizations/{authorization_id}
+----
+
+==== Description
+:hardbreaks:
+Returns user authorization details.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|userName|user name|true|string|
+|PathParameter|authorization_id|Authorization Id|true|string|
+|QueryParameter|fields|Filter user authorization details|false|string|AuthorizationInfo/*
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|<<UserAuthorizationResponse>>
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Users
+
+=== Get all privileges
+----
+GET /users/{userName}/privileges
+----
+
+==== Description
+:hardbreaks:
+Returns all privileges for user.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|userName|user name|true|string|admin
+|QueryParameter|fields|Filter user privileges|false|string|PrivilegeInfo/*
+|QueryParameter|sortBy|Sort user privileges (asc | desc)|false|string|PrivilegeInfo/user_name.asc
+|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
+|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
+|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|successful operation|<<UserPrivilegeResponse>> array
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Users
+
+=== Get user privilege
+----
+GET /users/{userName}/privileges/{privilegeId}
+----
+
+==== Description
+:hardbreaks:
+Returns user privilege details.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|userName|user name|true|string|
+|PathParameter|privilegeId|privilege id|true|string|
+|QueryParameter|fields|Filter user privilege details|false|string|PrivilegeInfo/*
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|<<UserPrivilegeResponse>>
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Users
+
+=== Get all views
+----
+GET /views
+----
+
+==== Description
+:hardbreaks:
+Returns details of all views.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|QueryParameter|fields|Filter view details|false|string|ViewInfo/*
+|QueryParameter|sortBy|Sort users (asc | desc)|false|string|ViewInfo/view_name.asc
+|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
+|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
+|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|<<ViewResponse>> array
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Views
+
+=== Get single view
+----
+GET /views/{viewName}
+----
+
+==== Description
+:hardbreaks:
+Returns view details.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|viewName|view name|true|string|
+|QueryParameter|fields|Filter view details|false|string|ViewInfo
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|<<ViewResponse>>
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Views
+
+=== Get all versions for a view
+----
+GET /views/{viewName}/versions
+----
+
+==== Description
+:hardbreaks:
+Returns details of all versions for a view.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|viewName|view name|true|string|
+|QueryParameter|fields|Filter view version details|false|string|ViewVersionInfo/*
+|QueryParameter|sortBy|Sort users (asc | desc)|false|string|ViewVersionInfo/version.desc
+|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
+|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
+|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|<<ViewVersionResponse>> array
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Views
+
+=== Get single view version
+----
+GET /views/{viewName}/versions/{version}
+----
+
+==== Description
+:hardbreaks:
+Returns view details.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|viewName|view name|true|string|
+|PathParameter|version||true|string|
+|QueryParameter|fields|Filter view details|false|string|ViewVersionInfo
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|<<ViewVersionResponse>>
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Views
+
+=== Get all view instances
+----
+GET /views/{viewName}/versions/{version}/instances
+----
+
+==== Description
+:hardbreaks:
+Returns all instances for a view version.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|viewName||true|string|
+|PathParameter|version||true|string|
+|QueryParameter|fields|Filter view instance details|false|string|ViewInstanceInfo/*
+|QueryParameter|sortBy|Sort users (asc | desc)|false|string|ViewInstanceInfo/instance_name.desc
+|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
+|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
+|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|<<ViewInstanceResponse>> array
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Views
+
+=== Create view instance
+----
+POST /views/{viewName}/versions/{version}/instances/{instanceName}
+----
+
+==== Description
+:hardbreaks:
+Creates view instance resource.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|viewName|view name|true|string|
+|PathParameter|version||true|string|
+|PathParameter|instanceName|instance name|true|string|
+|BodyParameter|body|input parameters in json form|true|<<ViewInstanceRequest>>|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|No Content
+|500|Server Error|No Content
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Views
+
+=== Get single view instance
+----
+GET /views/{viewName}/versions/{version}/instances/{instanceName}
+----
+
+==== Description
+:hardbreaks:
+Returns view instance details.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|viewName|view name|true|string|
+|PathParameter|version||true|string|
+|PathParameter|instanceName|instance name|true|string|
+|QueryParameter|fields|Filter view instance details|false|string|ViewInstanceInfo
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|<<ViewInstanceResponse>>
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Views
+
+=== Delete view instance
+----
+DELETE /views/{viewName}/versions/{version}/instances/{instanceName}
+----
+
+==== Description
+:hardbreaks:
+Delete view resource.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|viewName|view name|true|string|
+|PathParameter|version||true|string|
+|PathParameter|instanceName|instance name|true|string|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|No Content
+|500|Server Error|No Content
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Views
+
+=== Update view instance detail
+----
+PUT /views/{viewName}/versions/{version}/instances/{instanceName}
+----
+
+==== Description
+:hardbreaks:
+Updates view instance resource.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|viewName|view name|true|string|
+|PathParameter|version||true|string|
+|PathParameter|instanceName|instance name|true|string|
+|BodyParameter|body|input parameters in json form|true|<<ViewInstanceRequest>>|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|No Content
+|500|Server Error|No Content
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Views
+
+=== Migrate view instance data
+----
+PUT /views/{viewName}/versions/{version}/instances/{instanceName}/migrate/{originVersion}/{originInstanceName}
+----
+
+==== Description
+:hardbreaks:
+Migrates view instance persistence data from origin view instance specified in the path params.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|viewName|view name|true|string|
+|PathParameter|viewVersion|view version|true|string|
+|PathParameter|instanceName|instance name|true|string|
+|PathParameter|originVersion|origin version|true|string|
+|PathParameter|originInstanceName|origin instance name|true|string|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|No Content
+|500|Server Error|No Content
+|===
+
+==== Tags
+
+* Views
+
+=== Create view instance privilege
+----
+POST /views/{viewName}/versions/{version}/instances/{instanceName}/privileges
+----
+
+==== Description
+:hardbreaks:
+Create privilege resource for view instance.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|viewName|view name|true|string|
+|PathParameter|version|view version|true|string|
+|PathParameter|instanceName|instance name|true|string|
+|BodyParameter|body|input parameters in json form|true|<<ViewPrivilegeRequest>>|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|No Content
+|500|Server Error|No Content
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Views
+
+=== Get all view instance privileges
+----
+GET /views/{viewName}/versions/{version}/instances/{instanceName}/privileges
+----
+
+==== Description
+:hardbreaks:
+Returns all privileges for the resource.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|viewName|view name|true|string|
+|PathParameter|version|view version|true|string|
+|PathParameter|instanceName|instance name|true|string|
+|QueryParameter|fields|Filter privileges|false|string|PrivilegeInfo/*
+|QueryParameter|sortBy|Sort privileges (asc | desc)|false|string|PrivilegeInfo/user_name.asc
+|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
+|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
+|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|successful operation|<<ViewPrivilegeResponse>> array
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Views
+
+=== Get single view instance privilege
+----
+GET /views/{viewName}/versions/{version}/instances/{instanceName}/privileges/{privilegeId}
+----
+
+==== Description
+:hardbreaks:
+Returns privilege details.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|viewName|view name|true|string|
+|PathParameter|version|view version|true|string|
+|PathParameter|instanceName|instance name|true|string|
+|PathParameter|privilegeId|privilege id|true|string|
+|QueryParameter|fields|Filter privilege details|false|string|PrivilegeInfo
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|<<ViewPrivilegeResponse>>
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Views
+
+=== Delete view instance privilege
+----
+DELETE /views/{viewName}/versions/{version}/instances/{instanceName}/privileges/{privilegeId}
+----
+
+==== Description
+:hardbreaks:
+Delete view instance privilege resource.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|viewName|view name|true|string|
+|PathParameter|version|view version|true|string|
+|PathParameter|instanceName|instance name|true|string|
+|PathParameter|privilegeId|privilege id|true|string|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|No Content
+|500|Server Error|No Content
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Views
+
+=== Get all permissions for a view
+----
+GET /views/{viewName}/versions/{version}/permissions
+----
+
+==== Description
+:hardbreaks:
+Returns all permission details for the version of a view.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|viewName|view name|true|string|
+|PathParameter|version|view version|true|string|
+|QueryParameter|fields|Filter privileges|false|string|PermissionInfo/*
+|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
+|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
+|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|<<ViewPermissionResponse>> array
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Views
+
+=== Get single view permission
+----
+GET /views/{viewName}/versions/{version}/permissions/{permissionId}
+----
+
+==== Description
+:hardbreaks:
+Returns permission details for a single version of a view.
+
+==== Parameters
+[options="header"]
+|===
+|Type|Name|Description|Required|Schema|Default
+|PathParameter|viewName|view name|true|string|
+|PathParameter|version|view version|true|string|
+|PathParameter|permissionId|permission id|true|string|
+|QueryParameter|fields|Filter view permission details|false|string|PermissionInfo
+|===
+
+==== Responses
+[options="header"]
+|===
+|HTTP Code|Description|Schema
+|200|Successful operation|<<ViewPermissionResponse>>
+|===
+
+==== Produces
+
+* text/plain
+
+==== Tags
+
+* Views
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index f0c73e4..c8a5997 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -46,6 +46,7 @@
     <tarballResourcesFolder>src/main/resources</tarballResourcesFolder>
     <skipPythonTests>false</skipPythonTests>
     <hadoop.version>2.7.2</hadoop.version>
+    <swagger.version>1.5.10</swagger.version>
     <empty.dir>src/main/package</empty.dir> <!-- any directory in project with not very big amount of files (not to waste-load them) -->
     <el.log>ALL</el.log> <!-- log level for EclipseLink eclipselink-staticweave-maven-plugin -->
     <xlint>none</xlint> <!-- passed to Java compiler -Xlint: flag -->
@@ -308,6 +309,7 @@
             <exclude>src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/balancer-emulator/balancer-err.log</exclude>
             <exclude>src/main/resources/stacks/PHD/3.0.0.0/services/HDFS/package/scripts/balancer-emulator/balancer.log</exclude>
             <exclude>src/main/resources/stacks/PHD/3.0.0.0/services/HDFS/package/scripts/balancer-emulator/balancer-err.log</exclude>
+            <exclude>docs/api/asciidoc/**</exclude>
             <exclude>**/SMARTSENSE/**</exclude>
             <exclude>conf/unix/ca.config</exclude>
             <exclude>conf/unix/krb5JAASLogin.conf</exclude>
@@ -352,6 +354,58 @@
         </executions>
       </plugin>
       <plugin>
+        <groupId>com.github.kongchen</groupId>
+        <artifactId>swagger-maven-plugin</artifactId>
+        <version>3.1.4</version>
+        <configuration>
+          <apiSources>
+            <apiSource>
+              <springmvc>false</springmvc>
+              <locations>org.apache.ambari.server.api.services</locations>
+              <schemes>http,https</schemes>
+              <basePath>/api/v1</basePath>
+              <info>
+                <title>Swagger spec for Ambari REST API</title>
+                <version>v1</version>
+                <description>Ambari REST APIs has inherent support for querying, sorting and pagination</description>
+                <license>
+                  <url>http://www.apache.org/licenses/LICENSE-2.0</url>
+                  <name>Apache License, Version 2.0</name>
+                </license>
+              </info>
+              <swaggerDirectory>${ambari-web-dir}/api-docs</swaggerDirectory>
+            </apiSource>
+          </apiSources>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>compile</phase>
+            <goals>
+              <goal>generate</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>io.github.robwin</groupId>
+        <artifactId>swagger2markup-maven-plugin</artifactId>
+        <version>0.9.3</version>
+        <configuration>
+          <inputDirectory>${ambari-web-dir}/api-docs</inputDirectory>
+          <swaggerFile>swagger.json</swaggerFile>
+          <outputDirectory>docs/api/asciidoc</outputDirectory>
+          <markupLanguage>asciidoc</markupLanguage>
+        </configuration>
+        <executions>
+          <execution>
+            <phase>process-classes</phase>
+            <goals>
+              <goal>process-swagger</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
         <artifactId>eclipselink-staticweave-maven-plugin</artifactId>
         <groupId>au.com.alderaan</groupId>
         <version>1.0.4</version>
@@ -1310,6 +1364,33 @@
       <artifactId>jackson-jaxrs</artifactId>
     </dependency>
     <dependency>
+      <groupId>io.swagger</groupId>
+      <artifactId>swagger-annotations</artifactId>
+      <version>${swagger.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>io.swagger</groupId>
+      <artifactId>swagger-core</artifactId>
+      <version>${swagger.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>io.swagger</groupId>
+      <artifactId>swagger-jaxrs</artifactId>
+      <version>${swagger.version}</version>
+      <exclusions>
+        <exclusion>
+          <!-- Because it is already in the jersey one and causes the shade plugin to be confused -->
+          <groupId>javax.ws.rs</groupId>
+          <artifactId>jsr311-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>io.swagger</groupId>
+      <artifactId>swagger-models</artifactId>
+      <version>${swagger.version}</version>
+    </dependency>
+    <dependency>
       <groupId>org.codehaus.jackson</groupId>
       <artifactId>jackson-xc</artifactId>
     </dependency>

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutService.java
deleted file mode 100644
index 40cd6e0..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ActiveWidgetLayoutService.java
+++ /dev/null
@@ -1,76 +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 java.util.HashMap;
-import java.util.Map;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-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 org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.controller.spi.Resource;
-import org.apache.commons.lang.StringUtils;
-
-/**
- * WidgetLayout Service
- */
-public class ActiveWidgetLayoutService extends BaseService {
-
-  private final String userName;
-
-  public ActiveWidgetLayoutService(String userName) {
-    this.userName = userName;
-  }
-
-  /**
-   * Handles URL: /activeWidgetLayouts
-   * Get all instances for a view.
-   *
-   * @param headers  http headers
-   * @param ui       uri info
-   *
-   * @return instance collection resource representation
-   */
-  @GET
-  @Produces("text/plain")
-  public Response getServices(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-
-    return handleRequest(headers, body, ui, Request.Type.GET,
-            createResource(null));
-  }
-
-  @PUT
-  @Produces("text/plain")
-  public Response updateServices(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-
-    return handleRequest(headers, body, ui, Request.Type.PUT, createResource(null));
-  }
-
-  private ResourceInstance createResource(String widgetLayoutId) {
-    Map<Resource.Type,String> mapIds = new HashMap<Resource.Type, String>();
-    mapIds.put(Resource.Type.User, StringUtils.lowerCase(userName));
-    return createResource(Resource.Type.ActiveWidgetLayout, mapIds);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupPrivilegeService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupPrivilegeService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupPrivilegeService.java
deleted file mode 100644
index 9c1f1a3..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupPrivilegeService.java
+++ /dev/null
@@ -1,77 +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 java.util.HashMap;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletResponse;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-
-import org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.controller.spi.Resource;
-
-/**
- *  Service responsible for group privilege resource requests.
- */
-public class GroupPrivilegeService extends PrivilegeService {
-
-  private final String groupName;
-
-  public GroupPrivilegeService(String groupName) {
-    this.groupName = groupName;
-  }
-
-  // ----- PrivilegeService --------------------------------------------------
-
-  @Override
-  public Response createPrivilege(String body, HttpHeaders headers, UriInfo ui) {
-    return Response.status(HttpServletResponse.SC_NOT_IMPLEMENTED).build();
-  }
-
-  @Override
-  public Response updatePrivilege(String body, HttpHeaders headers, UriInfo ui, String privilegeId) {
-    return Response.status(HttpServletResponse.SC_NOT_IMPLEMENTED).build();
-  }
-
-  @Override
-  public Response updatePrivileges(String body, HttpHeaders headers, UriInfo ui) {
-    return Response.status(HttpServletResponse.SC_NOT_IMPLEMENTED).build();
-  }
-
-  @Override
-  public Response deletePrivilege(HttpHeaders headers, UriInfo ui, String privilegeId) {
-    return Response.status(HttpServletResponse.SC_NOT_IMPLEMENTED).build();
-  }
-
-  @Override
-  public Response deletePrivileges(String body, HttpHeaders headers, UriInfo ui) {
-    return Response.status(HttpServletResponse.SC_NOT_IMPLEMENTED).build();
-  }
-
-  @Override
-  protected ResourceInstance createPrivilegeResource(String privilegeId) {
-    final Map<Resource.Type, String> mapIds = new HashMap<Resource.Type, String>();
-    mapIds.put(Resource.Type.Group, groupName);
-    mapIds.put(Resource.Type.GroupPrivilege, privilegeId);
-    return createResource(Resource.Type.GroupPrivilege, mapIds);
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupService.java
deleted file mode 100644
index 8ec0097..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/GroupService.java
+++ /dev/null
@@ -1,155 +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 java.util.Collections;
-
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-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 org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.controller.spi.Resource;
-
-/**
- * Service responsible for user groups requests.
- */
-@Path("/groups/")
-public class GroupService extends BaseService {
-  /**
-   * Gets all groups.
-   * Handles: GET /groups requests.
-   *
-   * @param headers    http headers
-   * @param ui         uri info
-   */
-  @GET
-  @Produces("text/plain")
-  public Response getGroups(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createGroupResource(null));
-  }
-
-  /**
-   * Gets a single group.
-   * Handles: GET /groups/{groupName} requests.
-   *
-   * @param headers      http headers
-   * @param ui           uri info
-   * @param groupName    the group name
-   * @return information regarding the specified group
-   */
-  @GET
-  @Path("{groupName}")
-  @Produces("text/plain")
-  public Response getGroup(@Context HttpHeaders headers, @Context UriInfo ui,
-      @PathParam("groupName") String groupName) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createGroupResource(groupName));
-  }
-
-  /**
-   * Creates a group.
-   * Handles: POST /groups requests.
-   *
-   * @param headers      http headers
-   * @param ui           uri info
-   * @return information regarding the created group
-   */
-   @POST
-   @Produces("text/plain")
-   public Response createGroup(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, body, ui, Request.Type.POST, createGroupResource(null));
-  }
-
-  /**
-   * Creates a group.
-   * Handles: POST /groups/{groupName} requests.
-   *
-   * @param headers      http headers
-   * @param ui           uri info
-   * @param groupName    the group name
-   * @return information regarding the created group
-   *
-   * @deprecated Use requests to /groups instead.
-   */
-   @POST
-   @Deprecated
-   @Path("{groupName}")
-   @Produces("text/plain")
-   public Response createGroup(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                                 @PathParam("groupName") String groupName) {
-    return handleRequest(headers, body, ui, Request.Type.POST, createGroupResource(groupName));
-  }
-
-  /**
-   * Deletes a group.
-   * Handles:  DELETE /groups/{groupName} requests.
-   *
-   * @param headers      http headers
-   * @param ui           uri info
-   * @param groupName    the group name
-   * @return information regarding the deleted group
-   */
-  @DELETE
-  @Path("{groupName}")
-  @Produces("text/plain")
-  public Response deleteGroup(@Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("groupName") String groupName) {
-    return handleRequest(headers, null, ui, Request.Type.DELETE, createGroupResource(groupName));
-  }
-
-  /**
-   * Get the members sub-resource.
-   *
-   * @param groupName    the group name
-   * @return the members service
-   */
-  @Path("{groupName}/members")
-  public MemberService getMemberHandler(@PathParam("groupName") String groupName) {
-    return new MemberService(groupName);
-  }
-
-  /**
-   * Gets the group privilege service
-   */
-  @Path("{groupName}/privileges")
-  public PrivilegeService getPrivilegeService(@Context javax.ws.rs.core.Request request,
-                                              @PathParam ("groupName") String groupName) {
-
-    return new GroupPrivilegeService(groupName);
-  }
-
-
-  /**
-   * Create a group resource instance.
-   *
-   * @param groupName group name
-   *
-   * @return a group resource instance
-   */
-  private ResourceInstance createGroupResource(String groupName) {
-    return createResource(Resource.Type.Group,
-        Collections.singletonMap(Resource.Type.Group, groupName));
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/MemberService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/MemberService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/MemberService.java
deleted file mode 100644
index 28e53e6..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/MemberService.java
+++ /dev/null
@@ -1,163 +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 java.util.HashMap;
-import java.util.Map;
-
-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 org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.controller.spi.Resource;
-
-/**
- * Service responsible for user membership requests.
- */
-public class MemberService extends BaseService {
-  /**
-   * Name of the group.
-   */
-  private String groupName;
-
-  /**
-   * Constructor.
-   *
-   * @param groupName name of the group
-   */
-  public MemberService(String groupName) {
-    this.groupName = groupName;
-  }
-
-  /**
-   * Creates new members.
-   * Handles: POST /groups/{groupname}/members requests.
-   *
-   * @param headers      http headers
-   * @param ui           uri info
-   * @return information regarding the created member
-   */
-   @POST
-   @Produces("text/plain")
-   public Response createMember(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, body, ui, Request.Type.POST, createMemberResource(groupName, null));
-  }
-
-  /**
-   * Creates a new member.
-   * Handles: POST /groups/{groupname}/members/{username} requests.
-   *
-   * @param headers      http headers
-   * @param ui           uri info
-   * @param userName     the user name
-   * @return information regarding the created member
-   */
-   @POST
-   @Path("{userName}")
-   @Produces("text/plain")
-   public Response createMember(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                                 @PathParam("userName") String userName) {
-    return handleRequest(headers, body, ui, Request.Type.POST, createMemberResource(groupName, userName));
-  }
-
-   /**
-    * Deletes a member.
-    * Handles:  DELETE /groups/{groupname}/members/{username} requests.
-    *
-    * @param headers      http headers
-    * @param ui           uri info
-    * @param userName     the user name
-    * @return information regarding the deleted group
-    */
-   @DELETE
-   @Path("{userName}")
-   @Produces("text/plain")
-   public Response deleteMember(@Context HttpHeaders headers, @Context UriInfo ui,
-                                 @PathParam("userName") String userName) {
-     return handleRequest(headers, null, ui, Request.Type.DELETE, createMemberResource(groupName, userName));
-   }
-
-  /**
-   * Gets all members.
-   * Handles: GET /groups/{groupname}/members requests.
-   *
-   * @param headers    http headers
-   * @param ui         uri info
-   * @return information regarding all members
-   */
-  @GET
-  @Produces("text/plain")
-  public Response getMembers(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createMemberResource(groupName, null));
-  }
-
-  /**
-   * Gets member.
-   * Handles: GET /groups/{groupname}/members/{username} requests.
-   *
-   * @param headers    http headers
-   * @param ui         uri info
-   * @param userName   the user name
-   * @return information regarding the specific member
-   */
-  @GET
-  @Path("{userName}")
-  @Produces("text/plain")
-  public Response getMember(@Context HttpHeaders headers, @Context UriInfo ui,
-      @PathParam("userName") String userName) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createMemberResource(groupName, userName));
-  }
-
-  /**
-   * Updates all members.
-   * Handles: PUT /groups/{groupname}/members requests.
-   *
-   * @param headers    http headers
-   * @param ui         uri info
-   * @return status of the request
-   */
-  @PUT
-  @Produces("text/plain")
-  public Response updateMembers(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, body, ui, Request.Type.PUT, createMemberResource(groupName, null));
-  }
-
-  /**
-   * Create a member resource instance.
-   *
-   * @param groupName  group name
-   * @param userName   user name
-   *
-   * @return a member resource instance
-   */
-  private ResourceInstance createMemberResource(String groupName, String userName) {
-    final Map<Resource.Type, String> mapIds = new HashMap<Resource.Type, String>();
-    mapIds.put(Resource.Type.Group, groupName);
-    mapIds.put(Resource.Type.Member, userName);
-    return createResource(Resource.Type.Member, mapIds);
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserAuthorizationService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserAuthorizationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserAuthorizationService.java
deleted file mode 100644
index 26a7107..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserAuthorizationService.java
+++ /dev/null
@@ -1,103 +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 java.util.HashMap;
-import java.util.Map;
-
-import javax.ws.rs.GET;
-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 org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.controller.spi.Resource;
-import org.apache.commons.lang.StringUtils;
-
-/**
- * UserAuthorizationService is a read-only service responsible for user authorization resource requests.
- * <p/>
- * The result sets returned by this service represent the set of authorizations assigned to a given user.
- * Authorizations are tied to a resource, so a user may have the multiple authorization entries for the
- * same authorization id (for example VIEW.USE), however each will represnet a different view instance.
- */
-public class UserAuthorizationService extends BaseService {
-
-  /**
-   * The username this UserAuthorizationService is linked to
-   */
-  private final String username;
-
-  /**
-   * Create a new UserAuthorizationService that is linked to a particular user
-   *
-   * @param username the username of the user to link thi UserAuthorizationService to
-   */
-  public UserAuthorizationService(String username) {
-    this.username = username;
-  }
-
-  /**
-   * Handles: GET  /users/{user_name}/authorizations
-   * Get all authorizations for the relative user.
-   *
-   * @param headers http headers
-   * @param ui      uri info
-   * @return authorizations collection resource representation
-   */
-  @GET
-  @Produces("text/plain")
-  public Response getAuthorizations(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createAuthorizationResource(null));
-  }
-
-  /**
-   * Handles: GET  /permissions/{user_name}/authorizations/{authorization_id}
-   * Get a specific authorization.
-   *
-   * @param headers         http headers
-   * @param ui              uri info
-   * @param authorizationId authorization ID
-   * @return authorization instance representation
-   */
-  @GET
-  @Path("{authorization_id}")
-  @Produces("text/plain")
-  public Response getAuthorization(@Context HttpHeaders headers, @Context UriInfo ui,
-                                   @PathParam("authorization_id") String authorizationId) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createAuthorizationResource(authorizationId));
-  }
-
-  /**
-   * Create an authorization resource.
-   *
-   * @param authorizationId authorization id
-   * @return an authorization resource instance
-   */
-  protected ResourceInstance createAuthorizationResource(String authorizationId) {
-    Map<Resource.Type, String> mapIds = new HashMap<Resource.Type, String>();
-    mapIds.put(Resource.Type.User, StringUtils.lowerCase(username));
-    mapIds.put(Resource.Type.UserAuthorization, authorizationId);
-    return createResource(Resource.Type.UserAuthorization, mapIds);
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserPrivilegeService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserPrivilegeService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserPrivilegeService.java
deleted file mode 100644
index f9c95e7..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserPrivilegeService.java
+++ /dev/null
@@ -1,79 +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 privileges and
- * limitations under the License.
- */
-
-package org.apache.ambari.server.api.services;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.servlet.http.HttpServletResponse;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-
-import org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.controller.spi.Resource;
-import org.apache.commons.lang.StringUtils;
-/**
- *  Service responsible for user privilege resource requests.
- */
-public class UserPrivilegeService extends PrivilegeService {
-
-  private final String userName;
-
-  public UserPrivilegeService(String userName) {
-    this.userName = userName;
-  }
-
-  // ----- PrivilegeService --------------------------------------------------
-
-  @Override
-  public Response createPrivilege(String body, HttpHeaders headers, UriInfo ui) {
-    return Response.status(HttpServletResponse.SC_NOT_IMPLEMENTED).build();
-  }
-
-  @Override
-  public Response updatePrivilege(String body, HttpHeaders headers, UriInfo ui,
-      String privilegeId) {
-    return Response.status(HttpServletResponse.SC_NOT_IMPLEMENTED).build();
-  }
-
-  @Override
-  public Response updatePrivileges(String body, HttpHeaders headers, UriInfo ui) {
-    return Response.status(HttpServletResponse.SC_NOT_IMPLEMENTED).build();
-  }
-
-  @Override
-  public Response deletePrivilege(HttpHeaders headers, UriInfo ui,
-      String privilegeId) {
-    return Response.status(HttpServletResponse.SC_NOT_IMPLEMENTED).build();
-  }
-
-  @Override
-  public Response deletePrivileges(String body, HttpHeaders headers, UriInfo ui) {
-    return Response.status(HttpServletResponse.SC_NOT_IMPLEMENTED).build();
-  }
-
-  @Override
-  protected ResourceInstance createPrivilegeResource(String privilegeId) {
-    final Map<Resource.Type, String> mapIds = new HashMap<Resource.Type, String>();
-    mapIds.put(Resource.Type.User, StringUtils.lowerCase(userName));
-    mapIds.put(Resource.Type.UserPrivilege, privilegeId);
-    return createResource(Resource.Type.UserPrivilege, mapIds);
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserService.java
deleted file mode 100644
index 31f3a8c..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/UserService.java
+++ /dev/null
@@ -1,175 +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 java.util.Collections;
-
-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 org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.controller.spi.Resource;
-
-/**
- * Service responsible for user requests.
- */
-@Path("/users/")
-public class UserService extends BaseService {
-
-  /**
-   * Gets all users.
-   * Handles: GET /users requests.
-   */
-  @GET
-  @Produces("text/plain")
-  public Response getUsers(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, body, ui, Request.Type.GET, createUserResource(null));
-  }
-
-  /**
-   * Gets a single user.
-   * Handles: GET /users/{username} requests
-   *
-   * @param headers     http headers
-   * @param ui          uri info
-   * @param userName    the username
-   * @return information regarding the created user
-   */
-  @GET
-  @Path("{userName}")
-  @Produces("text/plain")
-  public Response getUser(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-      @PathParam("userName") String userName) {
-    return handleRequest(headers, body, ui, Request.Type.GET, createUserResource(userName));
-  }
-
-  /**
-   * Creates a user.
-   * Handles: POST /users
-   *
-   * @param headers     http headers
-   * @param ui          uri info
-   * @return information regarding the created user
-   */
-  @POST
-  @Produces("text/plain")
-  public Response createUser(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, body, ui, Request.Type.POST, createUserResource(null));
-  }
-
-  /**
-   * Creates a user.
-   * Handles: POST /users/{username}
-   *
-   * @param headers     http headers
-   * @param ui          uri info
-   * @param userName    the username
-   * @return information regarding the created user
-   */
-  @POST
-  @Path("{userName}")
-  @Produces("text/plain")
-  public Response createUser(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-      @PathParam("userName") String userName) {
-    return handleRequest(headers, body, ui, Request.Type.POST, createUserResource(userName));
-  }
-
-  /**
-   * Updates a specific user.
-   * Handles: PUT /users/{userName}
-   *
-   * @param headers     http headers
-   * @param ui          uri info
-   * @param userName   the username
-   * @return information regarding the updated user
-   */
-  @PUT
-  @Path("{userName}")
-  @Produces("text/plain")
-  public Response updateUser(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                                 @PathParam("userName") String userName) {
-
-    return handleRequest(headers, body, ui, Request.Type.PUT, createUserResource(userName));
-  }
-
-  /**
-   * Deletes a user.
-   * Handles:  DELETE /users/{userName}
-   */
-  @DELETE
-  @Path("{userName}")
-  @Produces("text/plain")
-  public Response deleteUser(@Context HttpHeaders headers, @Context UriInfo ui,
-                                 @PathParam("userName") String userName) {
-    return handleRequest(headers, null, ui, Request.Type.DELETE, createUserResource(userName));
-  }
-
-  /**
-   * Gets the user privilege service
-   */
-  @Path("{userName}/privileges")
-  public PrivilegeService getPrivilegeService(@Context javax.ws.rs.core.Request request,
-                                              @PathParam ("userName") String userName) {
-
-    return new UserPrivilegeService(userName);
-  }
-
-  /**
-   * Gets the active widget layout service
-   */
-  @Path("{userName}/activeWidgetLayouts")
-  public ActiveWidgetLayoutService getWidgetLayoutService(@Context javax.ws.rs.core.Request request,
-                                                    @PathParam ("userName") String userName) {
-
-    return new ActiveWidgetLayoutService(userName);
-  }
-
-  /**
-   * Gets the user authorization service.
-   *
-   * @param request  the request
-   * @param username the username
-   * @return the UserAuthorizationService
-   */
-  @Path("{userName}/authorizations")
-  public UserAuthorizationService getUserAuthorizations(
-      @Context javax.ws.rs.core.Request request, @PathParam("userName") String username) {
-    return new UserAuthorizationService(username);
-  }
-
-  /**
-   * Create a user resource instance.
-   *
-   * @param userName  user name
-   *
-   * @return a user resource instance
-   */
-  private ResourceInstance createUserResource(String userName) {
-    return createResource(Resource.Type.User,
-        Collections.singletonMap(Resource.Type.User, userName));
-  }
-}


[14/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/css/api-explorer.css
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/css/api-explorer.css b/ambari-web/api-docs/css/api-explorer.css
new file mode 100644
index 0000000..ef3abd4
--- /dev/null
+++ b/ambari-web/api-docs/css/api-explorer.css
@@ -0,0 +1,2426 @@
+.swagger-section pre code {
+    display: block;
+    padding: .5em
+}
+
+.swagger-section pre .markdown .emphasis {
+    font-style: italic
+}
+
+.swagger-section pre .nginx .built_in {
+    font-weight: 400
+}
+
+.swagger-section pre .clojure .built_in, .swagger-section pre .lisp .title, .swagger-section pre .nginx .title, .swagger-section pre .subst, .swagger-section pre .tag .title, .swagger-section pre code {
+    color: #fff
+}
+
+.swagger-section pre .addition, .swagger-section pre .aggregate, .swagger-section pre .apache .cbracket, .swagger-section pre .apache .tag, .swagger-section pre .bash .variable, .swagger-section pre .constant, .swagger-section pre .django .variable, .swagger-section pre .erlang_repl .function_or_atom, .swagger-section pre .flow, .swagger-section pre .markdown .header, .swagger-section pre .parent, .swagger-section pre .preprocessor, .swagger-section pre .ruby .symbol, .swagger-section pre .ruby .symbol .string, .swagger-section pre .rules .value, .swagger-section pre .rules .value .number, .swagger-section pre .smalltalk .class, .swagger-section pre .stream, .swagger-section pre .string, .swagger-section pre .tag .value, .swagger-section pre .template_tag, .swagger-section pre .tex .command, .swagger-section pre .tex .special, .swagger-section pre .title {
+    color: #00fcd4
+}
+
+.swagger-section pre .annotation, .swagger-section pre .chunk, .swagger-section pre .comment, .swagger-section pre .diff .header, .swagger-section pre .markdown .blockquote, .swagger-section pre .template_comment {
+    color: #e8eaeb
+}
+
+.swagger-section pre .change, .swagger-section pre .date, .swagger-section pre .go .constant, .swagger-section pre .literal, .swagger-section pre .markdown .bullet, .swagger-section pre .markdown .link_url, .swagger-section pre .number, .swagger-section pre .regexp, .swagger-section pre .smalltalk .char, .swagger-section pre .smalltalk .symbol, .swagger-section pre .tag {
+    color: #44c7f4
+}
+
+.swagger-section pre .apache .sqbracket, .swagger-section pre .array, .swagger-section pre .attr_selector, .swagger-section pre .clojure .attribute, .swagger-section pre .coffeescript .property, .swagger-section pre .decorator, .swagger-section pre .deletion, .swagger-section pre .doctype, .swagger-section pre .envvar, .swagger-section pre .erlang_repl .reserved, .swagger-section pre .filter .argument, .swagger-section pre .important, .swagger-section pre .javadoc, .swagger-section pre .label, .swagger-section pre .localvars, .swagger-section pre .markdown .link_label, .swagger-section pre .nginx .built_in, .swagger-section pre .pi, .swagger-section pre .prompt, .swagger-section pre .pseudo, .swagger-section pre .ruby .string, .swagger-section pre .shebang, .swagger-section pre .tex .formula, .swagger-section pre .vhdl .attribute {
+    color: #ff9ce3
+}
+
+.swagger-section pre .aggregate, .swagger-section pre .apache .tag, .swagger-section pre .bash .variable, .swagger-section pre .built_in, .swagger-section pre .css .tag, .swagger-section pre .go .typename, .swagger-section pre .id, .swagger-section pre .javadoctag, .swagger-section pre .keyword, .swagger-section pre .markdown .strong, .swagger-section pre .phpdoc, .swagger-section pre .request, .swagger-section pre .smalltalk .class, .swagger-section pre .status, .swagger-section pre .tex .command, .swagger-section pre .title, .swagger-section pre .winutils, .swagger-section pre .yardoctag {
+    font-weight: 700
+}
+
+.swagger-section pre .coffeescript .javascript, .swagger-section pre .javascript .xml, .swagger-section pre .tex .formula, .swagger-section pre .xml .cdata, .swagger-section pre .xml .css, .swagger-section pre .xml .javascript, .swagger-section pre .xml .vbscript {
+    opacity: .5
+}
+
+.swagger-section #resources {
+    position: relative;
+    height: 100%;
+    margin-bottom: 0
+}
+
+@media (min-width: 992px) {
+    .swagger-section #resources:before {
+        content: "";
+        background: #5c666f;
+        height: 100%;
+        width: 50%;
+        top: 0;
+        right: 0;
+        position: absolute;
+        z-index: -1
+    }
+}
+
+.swagger-section .resource {
+    margin: 0
+}
+
+.swagger-section .operations {
+    padding: 20px 0 0
+}
+
+.swagger-section .operation {
+    margin: 0
+}
+
+@media (min-width: 992px) {
+    .swagger-section .operation {
+        min-height: 100vh
+    }
+
+    .swagger-section .operation:after {
+        clear: both
+    }
+
+    .swagger-section .operation:after, .swagger-section .operation:before {
+        content: "";
+        display: table
+    }
+}
+
+@media (min-width: 992px) {
+    .swagger-section .operation > .content {
+        float: left;
+        width: 50%;
+        padding: 0 10px
+    }
+}
+
+@media (min-width: 1400px) {
+    .swagger-section .operation > .content {
+        padding: 0 20px
+    }
+}
+
+@media (min-width: 992px) {
+    .swagger-section .operation > .samples {
+        float: left;
+        width: 50%
+    }
+}
+
+.swagger-section h2.operation-title {
+    display: block;
+    float: none;
+    color: #333;
+    padding: 0;
+    font-size: 25px;
+    line-height: 1.3;
+    font-weight: 400;
+    margin: 20px 0
+}
+
+@media (min-width: 992px) {
+    .swagger-section h2.operation-title {
+        font-size: 32px;
+        font-weight: 200;
+        line-height: 1;
+        padding-right: 160px
+    }
+}
+
+@media (min-width: 1400px) {
+    .swagger-section h2.operation-title {
+        padding-right: 0;
+    }
+}
+
+.swagger-section h3 {
+    font-weight: 400
+}
+
+.swagger-section .heading {
+    padding: 0 20px
+}
+
+.swagger-section .heading .path {
+    display: table-cell
+}
+
+.swagger-section .heading .path a {
+    font-weight: 400;
+    color: #838991;
+    font-size: 12px;
+    max-width: 230px;
+    overflow: hidden;
+    display: inline-block;
+    vertical-align: top;
+    text-overflow: ellipsis;
+    white-space: nowrap
+}
+
+@media (min-width: 992px) {
+    .swagger-section .heading .path a {
+        font-size: 16px;
+        max-width: 545px;
+    }
+}
+
+@media (min-width: 1400px) {
+     .swagger-section .heading .path a {
+        max-width: 405px;
+    }
+}
+
+.swagger-section .heading .http_method {
+    display: table-cell
+}
+
+.swagger-section .heading .http_method a {
+    color: #fff;
+    text-transform: uppercase;
+    font-size: 11px;
+    border-radius: 20px;
+    padding: 2px 10px;
+    font-weight: 700;
+    display: inline-block
+}
+
+.swagger-section .action-summary {
+    margin: 0;
+    padding: 20px;
+    color: #838991
+}
+
+.swagger-section .operation.get .http_method a, .swagger-section .operation.get .http_method span {
+    background: #44c7f4
+}
+
+.swagger-section .operation.post .http_method a, .swagger-section .operation.post .http_method span {
+    background: #01b48f
+}
+
+.swagger-section .operation.delete .http_method a, .swagger-section .operation.delete .http_method span {
+    background: red
+}
+
+.swagger-section .operation.patch .http_method a, .swagger-section .operation.patch .http_method span {
+    background: #ff9a57
+}
+
+.swagger-section .ui-form-control.error {
+    border-color: #fd8888;
+    border-width: 2px
+}
+
+.swagger-section .parameter-item {
+    min-width: 320px;
+    background: #f8f8f9;
+    color: #5c666f;
+    font-size: 14px;
+    margin-bottom: 20px
+}
+
+.swagger-section .parameter-item .small-description {
+    font-size: 12px;
+    padding-top: 8px
+}
+
+.swagger-section .parameter-item .small-description code {
+    padding: 2px 4px;
+    border-radius: 4px;
+    font-size: 10px;
+    border: 1px solid rgba(0, 0, 0, .07)
+}
+
+.swagger-section .parameter-item .small-description code.code-signature {
+    background: 0 0;
+    color: gray;
+    margin-right: 5px
+}
+
+.swagger-section .parameter-item .small-description .markdown {
+    display: inline-table;
+}
+
+.swagger-section .parameter-item .small-description .markdown h1,
+.swagger-section .parameter-item .small-description .markdown h2,
+.swagger-section .parameter-item .small-description .markdown h3,
+.swagger-section .parameter-item .small-description .markdown h4,
+.swagger-section .parameter-item .small-description .markdown h5,
+.swagger-section .parameter-item .small-description .markdown p,
+.swagger-section .parameter-item .small-description .markdown li,
+.swagger-section .parameter-item .small-description .markdown pre
+{
+    margin: 5px 0;
+}
+
+@media (min-width: 992px) {
+    .swagger-section .parameter-item {
+        margin: 0 20px 20px;
+        border-radius: 3px;
+        border: 1px solid #e8eaeb;
+        min-width: 0
+    }
+}
+
+.swagger-section .parameter-item:last-child {
+    margin-bottom: 0
+}
+
+@media (min-width: 992px) {
+    .swagger-section .parameter-item:last-child {
+        margin-bottom: 20px
+    }
+}
+
+/*
+.swagger-section .parameter-item .parameter-content-type {
+    display: none
+}
+*/
+.swagger-section .parameter-item .param-property {
+    padding: 20px;
+    line-height: 1.4;
+    border-bottom: 1px solid #e8eaeb;
+    min-height: 59px
+}
+
+@media (min-width: 992px) {
+    .swagger-section .parameter-item .param-property {
+        position: relative;
+        padding-left: 150px
+    }
+
+    .swagger-section .parameter-item .param-property:hover {
+        background: #f0f0f2
+    }
+}
+
+.swagger-section .parameter-item .param-property:before {
+    content: attr(data-label);
+    display: block;
+    font-weight: 700;
+    margin-bottom: 15px;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+}
+
+@media (min-width: 992px) {
+    .swagger-section .parameter-item .param-property:before {
+        position: absolute;
+        top: 28px;
+        left: 0;
+        display: inline-block;
+        width: 150px;
+        vertical-align: top;
+        text-align: right;
+        padding: 0 20px
+    }
+}
+
+.swagger-section .parameter-item .param-property:first-child, .swagger-section .parameter-item .param-property:last-child {
+    border: 0
+}
+
+.swagger-section .parameter-item .param-property:first-child {
+    background: #949aa0;
+    font-weight: 700;
+    color: #fff
+}
+
+@media (min-width: 992px) {
+    .swagger-section .parameter-item .param-property:first-child {
+        border-bottom: 1px solid #e8eaeb;
+        background: #f8f8f9;
+        color: #5c666f;
+        font-weight: 400
+    }
+}
+
+.swagger-section .parameter-item .param-property:first-child:before {
+    display: none
+}
+
+@media (min-width: 992px) {
+    .swagger-section .parameter-item .param-property:first-child:before {
+        display: inline-block
+    }
+}
+
+.swagger-section .parameter-item .ui-form-control {
+    width: auto;
+    max-width: 100%
+}
+
+.swagger-section .parameter-item .ui-form-control.body-textarea {
+    min-height: 100px;
+    width: 100%
+}
+
+.swagger-section .parameter-item select.ui-form-control {
+    width: auto
+}
+
+@media (min-width: 992px) {
+    .swagger-section .operations .model-signature h4 {
+        color: #fff;
+        text-transform: uppercase;
+        letter-spacing: .08em;
+        font-size: 14px
+    }
+}
+
+@media (min-width: 1400px) {
+    .swagger-section .operations .model-signature h4 {
+        padding: 20px 30px
+    }
+}
+
+.swagger-section .operations .model-signature .description {
+    background: #5c666f;
+    padding-bottom: 15px;
+    color: #fff
+}
+
+@media (min-width: 992px) {
+    .swagger-section .operations .model-signature .description {
+        background: #4e575e
+    }
+}
+
+.swagger-section .operations .model-signature .description > div {
+    margin: 0;
+    padding: 15px 20px
+}
+
+.swagger-section .operations .model-signature .description > div:after {
+    clear: both
+}
+
+.swagger-section .operations .model-signature .description > div:after, .swagger-section .operations .model-signature .description > div:before {
+    content: "";
+    display: table
+}
+
+@media (min-width: 1400px) {
+    .swagger-section .operations .model-signature .description > div {
+        padding: 15px 30px
+    }
+}
+
+.swagger-section .operations .model-signature .description > div + div {
+    border-top: 1px solid #717d88
+}
+
+@media (min-width: 992px) {
+    .swagger-section .operations .model-signature .description > div + div {
+        border-top: 1px solid #5c666f
+    }
+}
+
+.swagger-section .operations .model-signature .description .objectName {
+    background: #535c64;
+    display: block;
+    font-weight: 700;
+    padding: 20px
+}
+
+@media (min-width: 992px) {
+    .swagger-section .operations .model-signature .description .objectName {
+        background: #576169;
+        font-size: 13px;
+        padding: 10px 30px;
+        margin-top: 15px
+    }
+
+    .swagger-section .operations .model-signature .description .objectName:first-child {
+        margin-top: 0
+    }
+}
+
+.swagger-section .operations .model-signature .description .objectName .bracketsIcon, .swagger-section .operations .model-signature .description .objectName .objectNameText {
+    display: table-cell
+}
+
+.swagger-section .operations .model-signature .description .objectName .objectNameText {
+    padding-left: 10px
+}
+
+.swagger-section .operations .model-signature .description .objectName .bracketsIcon {
+    opacity: .7;
+    font-family: Menlo, monospace;
+    font-size: 11px
+}
+
+.swagger-section .operations .model-signature .description .propType {
+    border-radius: 3px;
+    padding: 0 5px;
+    display: table-cell;
+    border: 1px solid;
+    font-weight: 400;
+    font-size: 10px;
+    font-family: Menlo, monospace;
+    position: relative;
+    top: -1px;
+    left: 5px;
+    max-width: 120px;
+    text-overflow: ellipsis;
+    overflow: hidden
+}
+
+.swagger-section .operations .model-signature .description .propType[title=object], .swagger-section .operations .model-signature .description .propType[title] {
+    color: #ff9ce3
+}
+
+.swagger-section .operations .model-signature .description .propType[title=string] {
+    color: #00fcd4
+}
+
+.swagger-section .operations .model-signature .description .propType[title=boolean], .swagger-section .operations .model-signature .description .propType[title=integer] {
+    color: #44c7f4
+}
+
+.swagger-section .operations .model-signature .description .propType[title="array[string]"], .swagger-section .operations .model-signature .description .propType[title="array[object]"], .swagger-section .operations .model-signature .description .propType[title=array] {
+    color: #eaca2c
+}
+
+@media (min-width: 992px) {
+    .swagger-section .operations .model-signature .description .propType {
+        display: inline-block;
+        vertical-align: top;
+        top: 0;
+        left: 0;
+        line-height: 1;
+        font-size: 9px;
+        padding: 4px 5px
+    }
+}
+
+.swagger-section .operations .model-signature .description .propName {
+    display: table-cell;
+    font-weight: 700
+}
+
+@media (min-width: 992px) {
+    .swagger-section .operations .model-signature .description .propName {
+        display: block
+    }
+}
+
+.swagger-section .operations .model-signature .description .propOptKey {
+    opacity: .7;
+    display: block
+}
+
+@media (min-width: 992px) {
+    .swagger-section .operations .model-signature .description .propOptKey {
+        display: inline-block;
+        vertical-align: top;
+        margin-left: 5px;
+        position: relative;
+        top: -2px
+    }
+}
+
+@media (min-width: 992px) {
+    .swagger-section .operations .model-signature .description .propDesc {
+        float: right;
+        width: 60%;
+        width: calc(100% - 200px);
+        padding-left: 20px;
+        font-size: 12px;
+        line-height: 1.5
+    }
+}
+
+@media (min-width: 992px) {
+    .swagger-section .operations .model-signature .description .propLabels {
+        text-align: right;
+        text-align: right;
+        display: block;
+        width: 40%;
+        width: calc(200px);
+        float: left;
+        font-size: 12px
+    }
+}
+
+.swagger-section pre {
+    background: #4e575e;
+    margin: 0;
+    word-wrap: break-word !important;
+    max-height: none;
+    border-radius: 0;
+    color: #fff
+}
+
+.swagger-section pre code {
+    color: #fff;
+    background: none !important
+}
+
+@media (min-width: 992px) {
+    .swagger-section .responses-wrapper {
+        padding: 0 20px
+    }
+}
+
+.swagger-section .operation-status {
+    background: #f8f8f9;
+    color: #5c666f;
+    min-width: 320px
+}
+
+@media (min-width: 992px) {
+    .swagger-section .operation-status {
+        background: 0 0
+    }
+}
+
+.swagger-section .operation-status td {
+    width: auto;
+    vertical-align: middle;
+    border-bottom: 1px solid #e8eaeb;
+    line-height: 1.4;
+    padding: 15px
+}
+
+.swagger-section .operation-status td:nth-child(1) {
+    padding: 20px
+}
+
+.swagger-section .operation-status td:nth-child(2) {
+    color: #8c9299
+}
+
+.swagger-section .token-generator {
+    min-width: 320px;
+    background: #5c666f;
+    padding: 15px 20px;
+    box-shadow: 0 1px 10px 0 rgba(0, 0, 0, .25);
+    position: relative;
+    max-height: 270px;
+    overflow-y: auto
+}
+
+@media (min-width: 992px) {
+    .swagger-section .token-generator {
+        padding-top: 40px;
+        padding-right: 20px;
+        box-shadow: none;
+        background: #f3f3f4;
+        color: #5c666f;
+        max-height: none;
+        min-width: 100%;
+        width: 100%;
+        margin-bottom: 30px;
+        border-bottom: 1px solid #e8eaeb
+    }
+}
+
+@media (min-width: 992px) {
+    .swagger-section .token-generator.hide {
+        display: block !important
+    }
+}
+
+.swagger-section .token-generator .tg-link {
+    color: #fff;
+    font-size: 13px;
+    text-decoration: underline;
+    padding-top: 10px;
+    display: inline-block;
+    cursor: pointer
+}
+
+.swagger-section .token-generator .tg-link + .tg-link {
+    margin-left: 15px
+}
+
+@media (min-width: 992px) {
+    .swagger-section .token-generator .tg-link {
+        color: #5c666f;
+        margin-bottom: 20px
+    }
+
+    .swagger-section .token-generator .tg-link:active, .swagger-section .token-generator .tg-link:hover {
+        color: #9da2a8
+    }
+}
+
+.swagger-section .token-generator [data-scope-list] {
+    margin-bottom: 10px
+}
+
+@media (min-width: 992px) {
+    .swagger-section .token-generator [data-scope-list] {
+        margin-bottom: 20px
+    }
+}
+
+.swagger-section .token-generator [data-scope] {
+    color: #fff;
+    padding-bottom: 10px
+}
+
+@media (min-width: 992px) {
+    .swagger-section .token-generator [data-scope] {
+        color: #5c666f;
+        border: 1px solid #dfe2e4;
+        border-radius: 20px;
+        padding: 8px 20px 8px 12px;
+        display: table;
+        margin-bottom: 7px
+    }
+}
+
+.swagger-section .token-generator [data-scope] .name {
+    font-size: 12px
+}
+
+.swagger-section .token-generator [data-scope] [data-remove] {
+    cursor: pointer
+}
+
+@media (min-width: 992px) {
+    .swagger-section .token-generator [data-scope] [data-remove] {
+        color: #333
+    }
+
+    .swagger-section .token-generator [data-scope] [data-remove]:active, .swagger-section .token-generator [data-scope] [data-remove]:hover {
+        color: red
+    }
+}
+
+.swagger-section .token-generator [data-scope] [data-remove]:after {
+    content: "\E179";
+    font-family: budicon-font !important;
+    font-style: normal !important;
+    font-weight: 400 !important;
+    font-variant: normal !important;
+    text-transform: none !important;
+    speak: none;
+    line-height: 1;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+    font-size: 10px;
+    position: relative;
+    left: 7px;
+    top: 2px;
+    opacity: .5
+}
+
+.swagger-section .token-generator [data-close] {
+    color: #fff;
+    position: absolute;
+    top: 0;
+    right: 0;
+    font-size: 12px;
+    padding: 14px 20px;
+    cursor: pointer
+}
+
+@media (min-width: 992px) {
+    .swagger-section .token-generator [data-close] {
+        display: none
+    }
+}
+
+.swagger-section .token-generator .btn {
+    background: #fff;
+    border: 0;
+    float: right
+}
+
+@media (min-width: 992px) {
+    .swagger-section .token-generator .btn {
+        border: 1px solid #cfd3d5;
+        height: 32px
+    }
+}
+
+.swagger-section .token-generator .btn:active, .swagger-section .token-generator .btn:hover {
+    background: #e8eaeb
+}
+
+@media (min-width: 992px) {
+    .swagger-section .token-generator .btn.disabled {
+        opacity: .3
+    }
+}
+
+.swagger-section .token-generator .btn > span {
+    position: relative;
+    top: 2px
+}
+
+.swagger-section .token-generator .custom-select {
+    background: #fff;
+    padding: 0 18px 0 12px;
+    border-radius: 3px;
+    display: inline-block;
+    width: 44.5%;
+    width: calc(50% - 5px);
+    height: 32px;
+    line-height: 32px;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+    overflow: hidden;
+    font-size: 13px;
+    vertical-align: top
+}
+
+@media (min-width: 992px) {
+    .swagger-section .token-generator .custom-select {
+        border: 1px solid #cfd3d5
+    }
+}
+
+@media (min-width: 992px) {
+    .swagger-section .token-generator .custom-select.disabled {
+        opacity: .3
+    }
+}
+
+.swagger-section .token-generator .custom-select:after {
+    content: "\E16E";
+    font-family: budicon-font !important;
+    font-style: normal !important;
+    font-weight: 400 !important;
+    font-variant: normal !important;
+    text-transform: none !important;
+    speak: none;
+    line-height: 1;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+    font-size: 12px;
+    position: absolute;
+    top: 12px;
+    right: 10px;
+    opacity: .7;
+    pointer-events: none;
+    color: #5c666f
+}
+
+.swagger-section .token-generator .custom-select + .custom-select {
+    margin-left: 5px
+}
+
+.swagger-section .token-generator .scope-selector {
+    padding: 15px 0
+}
+
+.swagger-section .token-generator .scope-selector:after {
+    clear: both
+}
+
+.swagger-section .token-generator .scope-selector:after, .swagger-section .token-generator .scope-selector:before {
+    content: "";
+    display: table
+}
+
+.swagger-section .token-generator .scope-selector > .area {
+    float: left
+}
+
+.swagger-section .token-generator .scope-selector label {
+    display: none
+}
+
+@media (min-width: 992px) {
+    .swagger-section .token-generator .scope-selector label {
+        display: block
+    }
+}
+
+.swagger-section .token-generator .scope-selector .controls {
+    width: calc(100% - 55px)
+}
+
+.swagger-section .token-generator .scope-selector .cta {
+    width: 55px
+}
+
+.swagger-section .token-generator .scope-selector .cta:after {
+    clear: both
+}
+
+.swagger-section .token-generator .scope-selector .cta:after, .swagger-section .token-generator .scope-selector .cta:before {
+    content: "";
+    display: table
+}
+
+.swagger-section .token-generator label {
+    text-transform: uppercase;
+    letter-spacing: .08em;
+    font-size: 12px;
+    font-weight: 700;
+    color: #fff;
+    display: inline-block;
+    margin-bottom: 10px
+}
+
+@media (min-width: 992px) {
+    .swagger-section .token-generator label {
+        color: #5c666f;
+        font-size: 13px;
+        margin-bottom: 15px
+    }
+}
+
+.swagger-section .operations h4 {
+    font-size: 16px;
+    padding: 20px;
+    margin: 0;
+    color: #5c666f;
+    cursor: pointer;
+    box-shadow: inset 0 -1px 0 0 #e8eaeb;
+    transition: box-shadow 0 300ms ease;
+    min-width: 320px;
+    position: relative
+}
+
+@media (min-width: 992px) {
+    .swagger-section .operations h4 {
+        box-shadow: none;
+        cursor: default
+    }
+}
+
+.swagger-section .operations h4:after {
+    content: "\E17B";
+    font-family: budicon-font !important;
+    font-style: normal !important;
+    font-weight: 400 !important;
+    font-variant: normal !important;
+    text-transform: none !important;
+    speak: none;
+    line-height: 1;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+    font-size: 12px;
+    position: absolute;
+    top: 25px;
+    right: 20px;
+    opacity: .7
+}
+
+@media (min-width: 992px) {
+    .swagger-section .operations h4:after {
+        display: none
+    }
+}
+
+/* change
+.swagger-section .operations [data-accordion].open h4 {
+    box-shadow: inset 0 -1px 0 0 transparent;
+    transition: box-shadow 0 0 ease
+}
+*/
+
+.swagger-section .operations h4:not(.collapsed) {
+    box-shadow: inset 0 -1px 0 0 transparent;
+    transition: box-shadow 0 0 ease
+}
+
+/* change
+.swagger-section .operations [data-accordion].open h4:after {
+    content: "\E17A";
+    font-family: budicon-font !important;
+    font-style: normal !important;
+    font-weight: 400 !important;
+    font-variant: normal !important;
+    text-transform: none !important;
+    speak: none;
+    line-height: 1;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale
+}
+*/
+
+.swagger-section .operations h4:not(.collapsed):after {
+    content: "\E17A";
+    font-family: budicon-font !important;
+    font-style: normal !important;
+    font-weight: 400 !important;
+    font-variant: normal !important;
+    text-transform: none !important;
+    speak: none;
+    line-height: 1;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale
+}
+
+/*
+@media (min-width: 992px) {
+    .swagger-section .scopes {
+        padding: 0 15px
+    }
+}
+
+.swagger-section .scopes .scope {
+    background: #f8f8f9;
+    color: #5c666f;
+    display: block;
+    padding: 15px 20px;
+    font-size: 12px;
+    cursor: pointer
+}
+
+.swagger-section .scopes .scope:before {
+    content: "";
+    font-family: budicon-font !important;
+    font-style: normal !important;
+    font-weight: 400 !important;
+    font-variant: normal !important;
+    text-transform: none !important;
+    speak: none;
+    line-height: 1;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+    position: relative;
+    top: 2px;
+    margin-right: 5px
+}
+
+.swagger-section .scopes .scope.active {
+    background: #ebebee
+}
+
+.swagger-section .scopes .scope.active:before {
+    content: "\E178";
+    font-family: budicon-font !important;
+    font-style: normal !important;
+    font-weight: 400 !important;
+    font-variant: normal !important;
+    text-transform: none !important;
+    speak: none;
+    line-height: 1;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale
+}
+
+@media (min-width: 992px) {
+    .swagger-section .scopes .scope.active {
+        background: #f8f8f9
+    }
+}
+
+@media (min-width: 992px) {
+    .swagger-section .scopes .scope {
+        display: inline-block;
+        border: 1px solid #e8eaeb;
+        border-radius: 20px;
+        background: 0 0;
+        padding: 8px 12px
+    }
+}
+
+.swagger-section .scopes .scope + .scope {
+    border-top: 1px solid #e8eaeb
+}
+
+@media (min-width: 992px) {
+    .swagger-section .scopes .scope + .scope {
+        margin: 5px
+    }
+}
+*/
+
+.api-popup-scopes .scopes {
+    padding: 0 15px
+}
+
+.api-popup-scopes .scopes .scope:before {
+    content: "";
+    font-family: budicon-font !important;
+    font-style: normal !important;
+    font-weight: 400 !important;
+    font-variant: normal !important;
+    text-transform: none !important;
+    speak: none;
+    line-height: 1;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+    position: relative;
+    top: 2px;
+    margin-right: 5px
+}
+
+.api-popup-scopes .scopes .scope.active:before {
+    content: "\E178";
+    font-family: budicon-font !important;
+    font-style: normal !important;
+    font-weight: 400 !important;
+    font-variant: normal !important;
+    text-transform: none !important;
+    speak: none;
+    line-height: 1;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale
+}
+
+.api-popup-scopes .scopes .scope.active {
+    background: #f8f8f9
+}
+
+.api-popup-scopes .scopes .scope {
+    cursor: pointer;
+    display: inline-block;
+    border: 1px solid #e8eaeb;
+    border-radius: 20px;
+    background: 0 0;
+    padding: 8px 12px
+}
+
+.api-popup-scopes .scopes .scope + .scope {
+    margin: 5px
+}
+
+.swagger-section .sticky-nav.fixed {
+    position: fixed;
+    top: 0;
+    left: 0;
+    width: 100%;
+    z-index: 600
+}
+
+@media (min-width: 992px) {
+    .swagger-section .sticky-nav.fixed {
+        width: 290px;
+        height: 100%;
+        overflow-y: auto
+    }
+}
+
+@media (min-width: 1400px) {
+    .swagger-section .sticky-nav.fixed {
+        width: 320px
+    }
+}
+
+.swagger-section .sticky-nav [data-navigator] {
+    transition: height 300ms ease;
+    height: 0;
+    overflow-y: scroll;
+    overflow-x: hidden;
+    background: #4e575e;
+    box-shadow: inset 0 2px 10px 0 rgba(0, 0, 0, .4);
+    position: absolute;
+    top: 43px;
+    width: 100%;
+    z-index: 500
+}
+
+@media (min-width: 992px) {
+    .swagger-section .sticky-nav [data-navigator] {
+        position: static;
+        height: auto;
+        overflow: visible;
+        background: #f8f8f9;
+        box-shadow: none
+    }
+
+    .swagger-section .sticky-nav [data-navigator]:before {
+        display: inline-block;
+        content: "API Reference";
+        text-transform: uppercase;
+        letter-spacing: .08em;
+        color: #5c666f;
+        font-size: 13px;
+        font-weight: 700;
+        margin-bottom: 15px;
+        padding: 0 20px
+    }
+}
+
+@media (min-width: 992px) {
+    .swagger-section .sticky-nav [data-navigator] [data-resource] {
+        cursor: pointer
+    }
+}
+
+@media (min-width: 992px) {
+    .swagger-section .sticky-nav [data-navigator] [data-resource] .item {
+        display: none
+    }
+}
+
+@media (min-width: 992px) {
+    .swagger-section .sticky-nav [data-navigator] [data-resource].active .item {
+        display: block
+    }
+}
+
+.swagger-section .sticky-nav [data-navigator] [data-resource]:before {
+    content: attr(label);
+    display: block;
+    color: #fff;
+    padding: 10px 20px;
+    text-transform: uppercase;
+    letter-spacing: .08em;
+    font-size: 11px;
+    font-weight: 700;
+    background: #454d53
+}
+
+@media (min-width: 992px) {
+    .swagger-section .sticky-nav [data-navigator] [data-resource]:before {
+        background: 0 0;
+        text-transform: none;
+        font-size: 16px;
+        font-weight: 400;
+        letter-spacing: 0;
+        color: #5c666f
+    }
+}
+
+@media (min-width: 992px) {
+    .swagger-section .sticky-nav [data-navigator] [label=Tools] {
+        display: none
+    }
+}
+
+.swagger-section .sticky-nav [data-navigator] .item {
+    padding: 12px 20px;
+    color: #fff;
+    cursor: pointer;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    position: relative
+}
+
+@media (min-width: 992px) {
+    .swagger-section .sticky-nav [data-navigator] .item {
+        color: #5c666f;
+        padding: 9px 9px 9px 40px;
+        font-size: 14px;
+        background: #f3f3f4
+    }
+
+    .swagger-section .sticky-nav [data-navigator] .item:active, .swagger-section .sticky-nav [data-navigator] .item:hover {
+        color: #8c9299
+    }
+}
+
+.swagger-section .sticky-nav [data-navigator] .item[data-tg-switch]:after {
+    content: 'OFF';
+    position: absolute;
+    right: 20px;
+    top: 8px;
+    display: block;
+    background: #000;
+    width: 40px;
+    font-size: 11px;
+    font-weight: 700;
+    text-transform: uppercase;
+    text-align: center;
+    padding: 5px 0;
+    border-radius: 13px;
+    opacity: .2
+}
+
+.swagger-section .sticky-nav [data-navigator] .item[data-tg-switch].active:after {
+    content: 'ON';
+    background: rgba(68, 199, 244, .5);
+    opacity: 1
+}
+
+.swagger-section .sticky-nav [data-navigator] .item[data-selected] {
+    background: rgba(68, 199, 244, .5);
+    padding-right: 42px
+}
+
+@media (min-width: 992px) {
+    .swagger-section .sticky-nav [data-navigator] .item[data-selected] {
+        background: #f3f3f4;
+        font-weight: 700;
+        color: #333
+    }
+
+    .swagger-section .sticky-nav [data-navigator] .item[data-selected]:active, .swagger-section .sticky-nav [data-navigator] .item[data-selected]:hover {
+        color: #333
+    }
+}
+
+.swagger-section .sticky-nav [data-navigator] .item[data-selected]:after {
+    content: "\E178";
+    font-family: budicon-font !important;
+    font-style: normal !important;
+    font-weight: 400 !important;
+    font-variant: normal !important;
+    text-transform: none !important;
+    speak: none;
+    line-height: 1;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+    font-size: 12px;
+    position: absolute;
+    top: 15px;
+    right: 20px;
+    opacity: .7;
+    pointer-events: none
+}
+
+@media (min-width: 992px) {
+    .swagger-section .sticky-nav [data-navigator] .item[data-selected]:after {
+        display: none
+    }
+}
+
+.swagger-section .sticky-nav [data-navigator] .item + .item {
+    border-top: 1px solid #576169
+}
+
+@media (min-width: 992px) {
+    .swagger-section .sticky-nav [data-navigator] .item + .item {
+        border-top: 1px solid #e8eaeb
+    }
+}
+
+.swagger-section .sticky-nav.nav-open [data-navigator] {
+    height: 180px;
+    height: 100vh
+}
+
+@media (min-width: 992px) {
+    .swagger-section .sticky-nav.nav-open [data-navigator] {
+        height: auto
+    }
+}
+
+.swagger-section .custom-select {
+    position: relative
+}
+
+.swagger-section .custom-select.disabled {
+    opacity: .65
+}
+
+.swagger-section .custom-select select {
+    position: absolute;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    opacity: 0;
+    -webkit-appearance: none
+}
+
+.swagger-section .mobile-nav {
+    position: relative;
+    background: #fff;
+    padding: 15px 20px;
+    cursor: default;
+    text-transform: uppercase;
+    letter-spacing: .08em;
+    font-size: 12px;
+    border-bottom: 1px solid #ebebee;
+    z-index: 800
+}
+
+@media (min-width: 992px) {
+    .swagger-section .mobile-nav {
+        display: none
+    }
+}
+
+.swagger-section .mobile-nav:after {
+    content: "\E16E";
+    font-family: budicon-font !important;
+    font-style: normal !important;
+    font-weight: 400 !important;
+    font-variant: normal !important;
+    text-transform: none !important;
+    speak: none;
+    line-height: 1;
+    -webkit-font-smoothing: antialiased;
+    -moz-osx-font-smoothing: grayscale;
+    font-size: 12px;
+    position: absolute;
+    top: 15px;
+    right: 20px;
+    opacity: .7;
+    pointer-events: none
+}
+
+.swagger-section .mobile-nav > span {
+    display: table-cell
+}
+
+.swagger-section .mobile-nav .select-label {
+    color: #9da2a8;
+    min-width: 110px
+}
+
+.swagger-section .mobile-nav [data-selected-value] {
+    max-width: 140px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap
+}
+
+.modal-backdrop {
+    background: none !important
+}
+
+.changes-disclaimer {
+    display: none;
+    border: 1px solid #dddde2;
+    border-radius: 3px;
+    padding: 15px;
+    margin: 20px 20px 40px;
+    line-height: 1.4;
+    background: #ebebee;
+    font-size: 13px
+}
+
+@media (min-width: 992px) {
+    .changes-disclaimer {
+        display: block
+    }
+}
+
+.site-header .container {
+    max-width: none !important;
+    width: 100%
+}
+
+body {
+    overflow-x: hidden
+}
+
+#api2-explorer .btn {
+    outline: 0
+}
+
+#api2-explorer code.json {
+    font-size: 12px
+}
+
+#api2-explorer a.toggle-samples {
+    display: none
+}
+
+#api2-explorer .modal {
+    background: rgba(244, 241, 241, .95)
+}
+
+#api2-explorer .modal h5 {
+    color: #5c666f;
+    text-transform: uppercase;
+    font-size: 12px;
+    margin: 10px 0;
+    letter-spacing: .065em
+}
+
+#api2-explorer .modal pre {
+    border-radius: 3px
+}
+
+#api2-explorer .modal .modal-content {
+    box-shadow: 0 0 10px 0 rgba(0, 0, 0, .1);
+    border: 0
+}
+
+#api2-explorer .modal .modal-title {
+    padding: 0;
+    margin: 0;
+    font-size: 16px
+}
+
+#api2-explorer .modal .modal-title .http_method {
+    text-transform: uppercase;
+    font-size: 12px;
+    letter-spacing: .065em
+}
+
+#api2-explorer .modal .modal-title .http_method .text {
+    color: #fff;
+    font-size: 11px;
+    padding: 4px 10px;
+    border-radius: 20px;
+    margin-left: 10px
+}
+
+#api2-explorer .modal .modal-dialog {
+    overflow: visible
+}
+
+#api2-explorer .modal .modal-dialog .modal-body {
+    padding: 20px;
+    max-height: none
+}
+
+@media (min-width: 992px) {
+    #api2-explorer .modal .modal-dialog .modal-body {
+        padding: 20px 30px
+    }
+}
+
+#swagger-ui-container {
+    position: relative
+}
+
+@media (min-width: 992px) {
+    .swagger-section #swagger_sidebar {
+        width: 290px;
+        position: absolute;
+        left: 0;
+        top: 0;
+        height: 100%;
+        background: #f8f8f9;
+        min-height: 100vh
+    }
+}
+
+@media (min-width: 1400px) {
+    .swagger-section #swagger_sidebar {
+        width: 320px
+    }
+}
+
+@media (min-width: 992px) {
+    .swagger-section #resources_container {
+        width: 100%;
+        padding-left: 290px
+    }
+}
+
+@media (min-width: 1400px) {
+    .swagger-section #resources_container {
+        padding-left: 320px
+    }
+}
+
+.swagger-section .implementation-notes {
+    padding: 0 20px
+}
+
+.swagger-section .endpoint {
+    margin: 0 0 100px
+}
+
+@media (min-width: 992px) {
+    .swagger-section .endpoint + .endpoint, .swagger-section .endpoint:first-child {
+        border-top: 1px solid rgba(0, 0, 0, .08)
+    }
+}
+
+.swagger-section .sandbox_header {
+    padding: 0 20px 20px
+}
+
+.swagger-section .sandbox_header a {
+    text-decoration: underline
+}
+
+.swagger-section .sandbox_header .btn-primary {
+    margin-right: 5px
+}
+
+.swagger-section #resources a.toggle-samples {
+    display: none
+}
+
+.swagger-section #resources .endpoint {
+    transition: opacity 300ms ease-in-out
+}
+
+@media (min-width: 992px) {
+    .swagger-section #resources {
+        width: 100%;
+        transition: width 300ms
+    }
+
+    .swagger-section #resources .operation .content {
+        position: relative
+    }
+
+    .swagger-section #resources a.toggle-samples {
+        display: inline-block;
+        position: absolute;
+        top: 30px;
+        right: 20px;
+        color: #5c666f;
+        text-decoration: none;
+        cursor: pointer
+    }
+
+    .swagger-section #resources a.toggle-samples:hover .text {
+        text-decoration: underline
+    }
+
+    .swagger-section #resources a.toggle-samples .circle-icon {
+        display: inline-block;
+        background: rgba(128, 128, 128, .09);
+        border-radius: 50%;
+        border: 1px solid rgba(92, 102, 111, .09);
+        font-size: 11px;
+        height: 30px;
+        width: 30px;
+        line-height: 30px;
+        padding: 0;
+        text-align: center;
+        position: relative;
+        margin-left: 8px
+    }
+
+    .swagger-section #resources a.toggle-samples .circle-icon:before {
+        content: '\E16F';
+        font-family: budicon-font !important;
+        font-style: normal !important;
+        font-weight: 400 !important;
+        font-variant: normal !important;
+        text-transform: none !important;
+        speak: none;
+        line-height: 1;
+        -webkit-font-smoothing: antialiased;
+        -moz-osx-font-smoothing: grayscale;
+        font-size: 12px;
+        position: relative;
+        top: 2px
+    }
+
+    .swagger-section #resources a.toggle-samples:active, .swagger-section #resources a.toggle-samples:hover {
+        color: #9da2a8
+    }
+}
+
+@media (min-width: 1400px) {
+    .swagger-section #resources a.toggle-samples {
+        display: none
+    }
+}
+
+.swagger-section #resources.is-collapsing .endpoint {
+    opacity: 0;
+    transition: none
+}
+
+@media (min-width: 992px) {
+    .swagger-section #resources.samples-collapsed {
+        width: 130%;
+    }
+
+    .swagger-section #resources.samples-collapsed a.toggle-samples .circle-icon:before {
+        content: '\E0F8';
+        font-family: budicon-font !important;
+        font-style: normal !important;
+        font-weight: 400 !important;
+        font-variant: normal !important;
+        text-transform: none !important;
+        speak: none;
+        line-height: 1;
+        -webkit-font-smoothing: antialiased;
+        -moz-osx-font-smoothing: grayscale
+    }
+
+    .swagger-section #resources.samples-collapsed .samples > * {
+        display: none
+    }
+}
+
+@media (min-width: 1400px) {
+    .swagger-section #resources.samples-collapsed {
+        width: 100%
+    }
+
+    .swagger-section #resources.samples-collapsed .samples > * {
+        display: inherit
+    }
+}
+
+.swagger-section ul#resources, .swagger-section ul.endpoints {
+    padding: 0
+}
+
+.swagger-section [data-accordion] [data-content] {
+    overflow: hidden;
+    max-height: 0
+}
+
+@media (min-width: 992px) {
+    .swagger-section [data-accordion] [data-content] {
+        max-height: none !important
+    }
+}
+
+.swagger-section .swagger-ui-wrap {
+    line-height: 1;
+    font-family: proxima-nova, sans-serif;
+    margin-left: auto;
+    margin-right: auto
+}
+
+.swagger-section .swagger-ui-wrap b, .swagger-section .swagger-ui-wrap strong {
+    font-family: proxima-nova, sans-serif;
+    font-weight: 700
+}
+
+.swagger-section .swagger-ui-wrap blockquote, .swagger-section .swagger-ui-wrap q {
+    quotes: none
+}
+
+.swagger-section .swagger-ui-wrap blockquote:after, .swagger-section .swagger-ui-wrap blockquote:before, .swagger-section .swagger-ui-wrap q:after, .swagger-section .swagger-ui-wrap q:before {
+    content: none
+}
+
+.swagger-section .swagger-ui-wrap .heading_with_menu h1, .swagger-section .swagger-ui-wrap .heading_with_menu h2, .swagger-section .swagger-ui-wrap .heading_with_menu h3, .swagger-section .swagger-ui-wrap .heading_with_menu h4, .swagger-section .swagger-ui-wrap .heading_with_menu h5, .swagger-section .swagger-ui-wrap .heading_with_menu h6 {
+    display: block;
+    clear: none;
+    float: left;
+    -moz-box-sizing: border-box;
+    -webkit-box-sizing: border-box;
+    -ms-box-sizing: border-box;
+    box-sizing: border-box;
+    width: 60%
+}
+
+.swagger-section .swagger-ui-wrap table {
+    border-collapse: collapse;
+    border-spacing: 0
+}
+
+.swagger-section .swagger-ui-wrap table thead tr th {
+    padding: 5px;
+    font-size: .9em;
+    color: #666;
+    border-bottom: 1px solid #999
+}
+
+.swagger-section .swagger-ui-wrap table tbody tr:last-child td {
+    border-bottom: none
+}
+
+.swagger-section .swagger-ui-wrap table tbody tr.offset {
+    background-color: #f0f0f0
+}
+
+.swagger-section .swagger-ui-wrap ol {
+    margin: 0 0 10px;
+    padding: 0 0 0 18px
+}
+
+.swagger-section .swagger-ui-wrap ol li {
+    padding: 5px 0;
+    font-size: .9em;
+    color: #333
+}
+
+.swagger-section .swagger-ui-wrap ol, .swagger-section .swagger-ui-wrap ul {
+    list-style: none
+}
+
+.swagger-section .swagger-ui-wrap h1 a, .swagger-section .swagger-ui-wrap h2 a, .swagger-section .swagger-ui-wrap h3 a, .swagger-section .swagger-ui-wrap h4 a, .swagger-section .swagger-ui-wrap h5 a, .swagger-section .swagger-ui-wrap h6 a {
+    text-decoration: none
+}
+
+.swagger-section .swagger-ui-wrap h1 a:hover, .swagger-section .swagger-ui-wrap h2 a:hover, .swagger-section .swagger-ui-wrap h3 a:hover, .swagger-section .swagger-ui-wrap h4 a:hover, .swagger-section .swagger-ui-wrap h5 a:hover, .swagger-section .swagger-ui-wrap h6 a:hover {
+    text-decoration: underline
+}
+
+.swagger-section .swagger-ui-wrap h1 span.divider, .swagger-section .swagger-ui-wrap h2 span.divider, .swagger-section .swagger-ui-wrap h3 span.divider, .swagger-section .swagger-ui-wrap h4 span.divider, .swagger-section .swagger-ui-wrap h5 span.divider, .swagger-section .swagger-ui-wrap h6 span.divider {
+    color: #aaa
+}
+
+.swagger-section .swagger-ui-wrap article, .swagger-section .swagger-ui-wrap aside, .swagger-section .swagger-ui-wrap details, .swagger-section .swagger-ui-wrap figcaption, .swagger-section .swagger-ui-wrap figure, .swagger-section .swagger-ui-wrap footer, .swagger-section .swagger-ui-wrap header, .swagger-section .swagger-ui-wrap hgroup, .swagger-section .swagger-ui-wrap menu, .swagger-section .swagger-ui-wrap nav, .swagger-section .swagger-ui-wrap section, .swagger-section .swagger-ui-wrap summary {
+    display: block
+}
+
+.swagger-section .swagger-ui-wrap .content > .content-type > div > label {
+    clear: both;
+    display: block;
+    color: #0F6AB4;
+    font-size: 1.1em;
+    margin: 0;
+    padding: 15px 0 5px
+}
+
+.swagger-section .swagger-ui-wrap .icon-btn {
+    cursor: pointer
+}
+
+.swagger-section .swagger-ui-wrap .info_title {
+    padding-bottom: 10px;
+    font-weight: 700;
+    font-size: 25px
+}
+
+.swagger-section .swagger-ui-wrap div.big p, .swagger-section .swagger-ui-wrap p.big {
+    font-size: 1em;
+    margin-bottom: 10px
+}
+
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.numeric input, .swagger-section .swagger-ui-wrap form.fullwidth ol li.string input, .swagger-section .swagger-ui-wrap form.fullwidth ol li.text textarea, .swagger-section .swagger-ui-wrap form.fullwidth ol li.url input {
+    width: 500px !important
+}
+
+.swagger-section .swagger-ui-wrap .info_license, .swagger-section .swagger-ui-wrap .info_tos {
+    padding-bottom: 5px
+}
+
+.swagger-section .swagger-ui-wrap .message-fail {
+    color: #c00
+}
+
+.swagger-section .swagger-ui-wrap .info_contact {
+    padding-bottom: 5px
+}
+
+.swagger-section .swagger-ui-wrap .info_description {
+    padding-bottom: 10px;
+    font-size: 15px
+}
+
+.swagger-section .swagger-ui-wrap .markdown ol li, .swagger-section .swagger-ui-wrap .markdown ul li {
+    padding: 3px 0;
+    line-height: 1.4em;
+    color: #333
+}
+
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input, .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input, .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input {
+    display: block;
+    padding: 4px;
+    width: auto;
+    clear: both
+}
+
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title, .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title, .swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title {
+    font-size: 1.3em
+}
+
+.swagger-section .swagger-ui-wrap table.fullwidth {
+    width: 100%
+}
+
+.swagger-section .swagger-ui-wrap .model-signature {
+    font-family: proxima-nova, sans-serif;
+    font-size: 1em;
+    line-height: 1.5em
+}
+
+.swagger-section .swagger-ui-wrap .model-signature .signature-nav a {
+    text-decoration: none;
+    color: #AAA
+}
+
+.swagger-section .swagger-ui-wrap .model-signature .signature-nav a:hover {
+    text-decoration: underline;
+    color: #000
+}
+
+.swagger-section .swagger-ui-wrap .model-signature .signature-nav .selected {
+    color: #000;
+    text-decoration: none
+}
+
+.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav {
+    display: block;
+    margin: 0;
+    padding: 0
+}
+
+.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li:last-child {
+    padding-right: 0;
+    border-right: none
+}
+
+.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li {
+    float: left;
+    margin: 0 5px 5px 0;
+    padding: 2px 5px 2px 0;
+    border-right: 1px solid #ddd
+}
+
+.swagger-section .swagger-ui-wrap .model-signature .snippet small {
+    font-size: .75em
+}
+
+.swagger-section .swagger-ui-wrap .model-signature .signature-container {
+    clear: both
+}
+
+.swagger-section .swagger-ui-wrap .required {
+    font-weight: 700
+}
+
+.swagger-section .swagger-ui-wrap h1 {
+    color: #000;
+    font-size: 1.5em;
+    line-height: 1.3em;
+    padding: 10px 0;
+    font-family: proxima-nova, sans-serif;
+    font-weight: 700
+}
+
+.swagger-section .swagger-ui-wrap .heading_with_menu {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block
+}
+
+.swagger-section .swagger-ui-wrap .heading_with_menu ul {
+    display: block;
+    clear: none;
+    float: right;
+    -moz-box-sizing: border-box;
+    -webkit-box-sizing: border-box;
+    -ms-box-sizing: border-box;
+    box-sizing: border-box;
+    margin-top: 10px
+}
+
+.swagger-section .swagger-ui-wrap span.weak {
+    color: #666
+}
+
+.swagger-section .swagger-ui-wrap .message-success {
+    color: #89BF04
+}
+
+.swagger-section .swagger-ui-wrap caption, .swagger-section .swagger-ui-wrap td, .swagger-section .swagger-ui-wrap th {
+    text-align: left;
+    font-weight: 400;
+    vertical-align: middle
+}
+
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea {
+    font-family: proxima-nova, sans-serif;
+    height: 250px;
+    padding: 4px;
+    display: block;
+    clear: both
+}
+
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select {
+    display: block;
+    clear: both
+}
+
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean {
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block
+}
+
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label {
+    display: block;
+    float: left;
+    clear: none;
+    margin: 0;
+    padding: 0
+}
+
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input {
+    display: block;
+    float: left;
+    clear: none;
+    margin: 0 5px 0 0
+}
+
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label {
+    color: #000
+}
+
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label {
+    display: block;
+    clear: both;
+    width: auto;
+    padding: 0 0 3px;
+    color: #666
+}
+
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr {
+    padding-left: 3px;
+    color: #888
+}
+
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints {
+    font-style: italic;
+    font-size: .9em;
+    margin: 0
+}
+
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.buttons {
+    margin: 0;
+    padding: 0
+}
+
+.swagger-section .swagger-ui-wrap span.blank, .swagger-section .swagger-ui-wrap span.empty {
+    color: #888;
+    font-style: italic
+}
+
+.swagger-section .swagger-ui-wrap .markdown h3 {
+    color: #547f00
+}
+
+.swagger-section .swagger-ui-wrap .markdown h4 {
+    color: #666
+}
+
+.swagger-section .swagger-ui-wrap div.gist {
+    margin: 20px 0 25px !important
+}
+
+.swagger-section .swagger-ui-wrap ul#resources {
+    font-family: proxima-nova, sans-serif;
+    font-size: .9em
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a, .swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a {
+    color: #000
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a, .swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a {
+    color: #555
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource:last-child {
+    border-bottom: none
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading {
+    border: 1px solid transparent;
+    float: none;
+    clear: both;
+    overflow: hidden;
+    display: block
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options {
+    overflow: hidden;
+    padding: 0;
+    display: block;
+    clear: none;
+    float: right;
+    margin: 14px 10px 0 0
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li {
+    float: left;
+    clear: none;
+    margin: 0;
+    padding: 2px 10px;
+    border-right: 1px solid #ddd;
+    color: #666;
+    font-size: .9em
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a {
+    color: #aaa;
+    text-decoration: none
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover {
+    color: #000
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active, .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active, .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover {
+    text-decoration: underline
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first, .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child {
+    padding-left: 0
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last, .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child {
+    padding-right: 0;
+    border-right: none
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first, .swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child {
+    padding-left: 0
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 {
+    display: block;
+    clear: none;
+    float: left;
+    width: auto;
+    margin: 0;
+    padding: 0;
+    line-height: 1.1em;
+    color: #000
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path {
+    padding-left: 10px
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover {
+    text-decoration: underline
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span {
+    margin: 0;
+    padding: 0
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options {
+    overflow: hidden;
+    padding: 0;
+    display: block;
+    clear: none;
+    float: right;
+    margin: 6px 10px 0 0
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li {
+    float: left;
+    clear: none;
+    margin: 0;
+    padding: 2px 10px;
+    font-size: .9em
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a {
+    text-decoration: none
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access {
+    color: #000
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content {
+    border-top: none
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a {
+    background-color: #c5862b
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li {
+    border-right: 1px solid #ddd;
+    border-right-color: #f0e0ca;
+    color: #c5862b
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a {
+    color: #c5862b
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a {
+    text-transform: uppercase;
+    background-color: #ffd20f
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li {
+    border-right: 1px solid #ddd;
+    border-right-color: #ffd20f;
+    color: #ffd20f
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a {
+    color: #ffd20f
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a {
+    background-color: #0f6ab4
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li {
+    border-right: 1px solid #ddd;
+    border-right-color: #c3d9ec;
+    color: #0f6ab4
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a {
+    color: #0f6ab4
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content {
+    border-top: none
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.op
 erations li.operation.patch div.heading ul.options li.last, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child {
+    padding-right: 0;
+    border-right: none
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover {
+    text-decoration: underline
+}
+
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first, .swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child {
+    padding-left: 0
+}
+
+.swagger-section .swagger-ui-wrap p#colophon {
+    margin: 0 15px 40px;
+    padding: 10px 0;
+    font-size: .8em;
+    border-top: 1px solid #ddd;
+    font-family: proxima-nova, sans-serif;
+    color: #999;
+    font-style: italic
+}
+
+.swagger-section .swagger-ui-wrap p#colophon a {
+    text-decoration: none;
+    color: #547f00
+}
+
+.swagger-section .swagger-ui-wrap h3 {
+    color: #000;
+    font-size: 1.1em;
+    padding: 10px 0
+}
+
+.swagger-section .swagger-ui-wrap .markdown ol, .swagger-section .swagger-ui-wrap .markdown ul {
+    font-family: proxima-nova, sans-serif;
+    margin: 5px 0 10px;
+    padding: 0 0 0 18px;
+    list-style-type: disc
+}
+
+.swagger-section .swagger-ui-wrap form.form_box {
+    background-color: #ebf3f9;
+    border: 1px solid #c3d9ec;
+    padding: 10px
+}
+
+.swagger-section .swagger-ui-wrap form.form_box label {
+    color: #0f6ab4 !important
+}
+
+.swagger-section .swagger-ui-wrap form.form_box input[type=submit] {
+    display: block;
+    padding: 10px
+}
+
+.swagger-section .swagger-ui-wrap form.form_box p.weak {
+    font-size: .8em
+}
+
+.swagger-section .swagger-ui-wrap form.form_box p {
+    font-size: .9em;
+    padding: 0 0 15px;
+    color: #7e7b6d
+}
+
+.swagger-section .swagger-ui-wrap form.form_box p a {
+    color: #646257
+}
+
+.swagger-section .swagger-ui-wrap form.form_box p strong {
+    color: #000
+}
+
+.swagger-section .title {
+    font-style: bold
+}
+
+.swagger-section .secondary_form {
+    display: none
+}
+
+.swagger-section .main_image {
+    display: block;
+    margin-left: auto;
+    margin-right: auto
+}
+
+.swagger-section .oauth_body {
+    margin-left: 100px;
+    margin-right: 100px
+}
+
+.swagger-section .oauth_submit {
+    text-align: center
+}
+
+.swagger-section .api-popup-dialog {
+    z-index: 10000;
+    position: absolute;
+    width: 500px;
+    background: #FFF;
+    padding: 20px;
+    border: 1px solid #ccc;
+    border-radius: 5px;
+    display: none;
+    font-size: 13px;
+    color: #777
+}
+
+.swagger-section .api-popup-dialog .api-popup-title {
+    font-size: 24px;
+    padding: 10px 0
+}
+
+.swagger-section .api-popup-dialog p.error-msg {
+    padding-left: 5px;
+    padding-bottom: 5px
+}
+
+.swagger-section .api-popup-dialog button.api-popup-authbtn, .swagger-section .api-popup-dialog button.api-popup-cancel {
+    height: 30px
+}
+
+.swagger-section .api-popup-scopes {
+    padding: 10px 20px
+}
+
+.swagger-section .api-popup-scopes li {
+    padding: 5px 0;
+    line-height: 20px
+}
+
+.swagger-section .api-popup-scopes .api-scope-desc {
+    padding-left: 20px;
+    font-style: italic
+}
+
+.swagger-section .api-popup-scopes li input {
+    position: relative;
+    top: 2px
+}
+
+.swagger-section .api-popup-actions {
+    padding-top: 10px
+}
+
+.swagger-section .access, .swagger-section .auth {
+    float: right
+}
+
+.swagger-section #api_information_panel {
+    position: absolute;
+    background: #FFF;
+    border: 1px solid #ccc;
+    border-radius: 5px;
+    display: none;
+    font-size: 13px;
+    max-width: 300px;
+    line-height: 30px;
+    color: #000;
+    padding: 5px
+}
+
+.swagger-section #api_information_panel p .api-msg-enabled {
+    color: green
+}
+
+.swagger-section #api_information_panel p .api-msg-disabled {
+    color: red
+}
+
+.swagger-section .api-ic {
+    /*    height: 18px;
+      vertical-align: middle;
+       display: inline-block;
+       background: url(../images/explorer_icons.png) no-repeat*/
+}
+
+.swagger-section .ic-info {
+    background-position: 0 0;
+    width: 18px;
+    margin-top: -7px;
+    margin-left: 4px
+}
+
+.swagger-section .ic-warning {
+    background-position: -60px 0;
+    width: 18px;
+    margin-top: -7px;
+    margin-left: 4px
+}
+
+.swagger-section .ic-error {
+    background-position: -30px 0;
+    width: 18px;
+    margin-top: -7px;
+    margin-left: 4px
+}
+
+.swagger-section .ic-off {
+    /*   background-position: -90px 0;
+       width: 58px;
+       margin-top: -4px;
+    */
+    cursor: pointer
+}
+
+.swagger-section .ic-on {
+    /*    background-position: -160px 0;
+        width: 58px;
+        margin-top: -4px;
+    */
+    cursor: pointer
+}
+
+.swagger-section #header {
+    background-color: #89bf04;
+    padding: 14px
+}
+
+.swagger-section #header a#logo {
+    font-size: 1.5em;
+    font-weight: 700;
+    text-decoration: none;
+    background: url(../images/logo_small.png) left center no-repeat;
+    padding: 20px 0 20px 40px;
+    color: #fff
+}
+
+.swagger-section #header form#api_selector {
+    display: block;
+    clear: none;
+    float: right
+}
+
+.swagger-section #header form#api_selector .input {
+    display: block;
+    clear: none;
+    float: left;
+    margin: 0 10px 0 0
+}
+
+.swagger-section #header form#api_selector .input input#input_apiKey {
+    width: 200px
+}
+
+.swagger-section #header form#api_selector .input input#input_baseUrl {
+    width: 400px
+}
+
+.swagger-section #header form#api_selector .input a#explore {
+    display: block;
+    text-decoration: none;
+    font-weight: 700;
+    padding: 6px 8px;
+    font-size: .9em;
+    color: #fff;
+    background-color: #547f00;
+    -moz-border-radius: 4px;
+    -webkit-border-radius: 4px;
+    -o-border-radius: 4px;
+    -ms-border-radius: 4px;
+    -khtml-border-radius: 4px;
+    border-radius: 4px
+}
+
+.swagger-section #header form#api_selector .input a#explore:hover {
+    background-color: #547f00
+}
+
+.swagger-section #header form#api_selector .input input {
+    font-size: .9em;
+    padding: 3px;
+    margin: 0
+}
+
+.swagger-section #content_message {
+    margin: 10px 15px;
+    font-style: italic;
+    color: #999
+}
+
+.swagger-section #message-bar {
+    min-height: 30px;
+    text-align: center;
+    padding-top: 10px
+}
\ No newline at end of file


[44/49] ambari git commit: AMBARI-21035. Integrate ClusterService with Swagger, addendum (adoroszlai)

Posted by ad...@apache.org.
AMBARI-21035. Integrate ClusterService with Swagger, addendum (adoroszlai)


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

Branch: refs/heads/trunk
Commit: f2cad775e98e6478fcc4282a8eff1014cc00414d
Parents: f678794
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Tue May 23 10:55:13 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Tue May 23 10:55:13 2017 +0200

----------------------------------------------------------------------
 .../api/services/ClusterRequestSwagger.java     | 30 ++++++++++++++
 .../server/api/services/ClusterService.java     |  2 +-
 .../server/state/ClusterHealthReport.java       | 43 +++++++++++++++-----
 3 files changed, 64 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f2cad775/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterRequestSwagger.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterRequestSwagger.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterRequestSwagger.java
new file mode 100644
index 0000000..693a462
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterRequestSwagger.java
@@ -0,0 +1,30 @@
+/*
+ * 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.controller.ApiModel;
+import org.apache.ambari.server.controller.ClusterRequest;
+import org.apache.ambari.server.controller.internal.ClusterResourceProvider;
+
+import io.swagger.annotations.ApiModelProperty;
+
+@SuppressWarnings("unused") // for Swagger
+public interface ClusterRequestSwagger extends ApiModel {
+  @ApiModelProperty(name = ClusterResourceProvider.RESPONSE_KEY)
+  ClusterRequest getClusterRequest();
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/f2cad775/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
index 80fcd2e..f61fb2a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
@@ -59,7 +59,7 @@ import io.swagger.annotations.ApiResponses;
 @Api(value = "/clusters", description = "Endpoint for cluster-specific operations")
 public class ClusterService extends BaseService {
 
-  private static final String CLUSTER_REQUEST_TYPE = "org.apache.ambari.server.controller.ClusterRequest";
+  private static final String CLUSTER_REQUEST_TYPE = "org.apache.ambari.server.api.services.ClusterRequestSwagger";
   private static final String ARTIFACT_REQUEST_TYPE = "org.apache.ambari.server.controller.ClusterArtifactRequest";
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/f2cad775/ambari-server/src/main/java/org/apache/ambari/server/state/ClusterHealthReport.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ClusterHealthReport.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ClusterHealthReport.java
index 4be44c6..90dac00 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/ClusterHealthReport.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ClusterHealthReport.java
@@ -20,11 +20,24 @@ package org.apache.ambari.server.state;
 
 import org.codehaus.jackson.annotate.JsonProperty;
 
+import io.swagger.annotations.ApiModelProperty;
+
 /**
  * Cluster Health Report (part of Clusters API response)
  */
 public class ClusterHealthReport {
 
+  private static final String HOST_STALE_CONFIG = "Host/stale_config";
+  private static final String HOST_MAINTENANCE_STATE = "Host/maintenance_state";
+  private static final String HOST_HOST_STATE_HEALTHY = "Host/host_state/HEALTHY";
+  private static final String HOST_HOST_STATE_UNHEALTHY = "Host/host_state/UNHEALTHY";
+  private static final String HOST_HOST_STATE_INIT = "Host/host_state/INIT";
+  private static final String HOST_HOST_STATUS_HEALTHY = "Host/host_status/HEALTHY";
+  private static final String HOST_HOST_STATUS_UNHEALTHY = "Host/host_status/UNHEALTHY";
+  private static final String HOST_HOST_STATUS_UNKNOWN = "Host/host_status/UNKNOWN";
+  private static final String HOST_HOST_STATUS_ALERT = "Host/host_status/ALERT";
+  private static final String HOST_HOST_STATE_HEARTBEAT_LOST = "Host/host_state/HEARTBEAT_LOST";
+
   private int staleConfigsHosts;
   private int maintenanceStateHosts;
 
@@ -41,7 +54,8 @@ public class ClusterHealthReport {
   /**
    * @return number of hosts having stale_config set to true
    */
-  @JsonProperty("Host/stale_config")
+  @JsonProperty(HOST_STALE_CONFIG)
+  @ApiModelProperty(name = HOST_STALE_CONFIG)
   public int getStaleConfigsHosts() {
     return staleConfigsHosts;
   }
@@ -56,7 +70,8 @@ public class ClusterHealthReport {
   /**
    * @return number of hosts having maintenance state on
    */
-  @JsonProperty("Host/maintenance_state")
+  @JsonProperty(HOST_MAINTENANCE_STATE)
+  @ApiModelProperty(name = HOST_MAINTENANCE_STATE)
   public int getMaintenanceStateHosts() {
     return maintenanceStateHosts;
   }
@@ -71,7 +86,8 @@ public class ClusterHealthReport {
   /**
    * @return number of hosts having host state HEALTHY
    */
-  @JsonProperty("Host/host_state/HEALTHY")
+  @JsonProperty(HOST_HOST_STATE_HEALTHY)
+  @ApiModelProperty(name = HOST_HOST_STATE_HEALTHY)
   public int getHealthyStateHosts() {
     return healthyStateHosts;
   }
@@ -86,7 +102,8 @@ public class ClusterHealthReport {
   /**
    * @return number of hosts having host state UNHEALTHY
    */
-  @JsonProperty("Host/host_state/UNHEALTHY")
+  @JsonProperty(HOST_HOST_STATE_UNHEALTHY)
+  @ApiModelProperty(name = HOST_HOST_STATE_UNHEALTHY)
   public int getUnhealthyStateHosts() {
     return unhealthyStateHosts;
   }
@@ -101,7 +118,8 @@ public class ClusterHealthReport {
   /**
    * @return number of hosts having host state INIT
    */
-  @JsonProperty("Host/host_state/INIT")
+  @JsonProperty(HOST_HOST_STATE_INIT)
+  @ApiModelProperty(name = HOST_HOST_STATE_INIT)
   public int getInitStateHosts() {
     return initStateHosts;
   }
@@ -116,7 +134,8 @@ public class ClusterHealthReport {
   /**
    * @return number of hosts having host status HEALTHY
    */
-  @JsonProperty("Host/host_status/HEALTHY")
+  @JsonProperty(HOST_HOST_STATUS_HEALTHY)
+  @ApiModelProperty(name = HOST_HOST_STATUS_HEALTHY)
   public int getHealthyStatusHosts() {
     return healthyStatusHosts;
   }
@@ -131,7 +150,8 @@ public class ClusterHealthReport {
   /**
    * @return number of hosts having host status UNHEALTHY
    */
-  @JsonProperty("Host/host_status/UNHEALTHY")
+  @JsonProperty(HOST_HOST_STATUS_UNHEALTHY)
+  @ApiModelProperty(name = HOST_HOST_STATUS_UNHEALTHY)
   public int getUnhealthyStatusHosts() {
     return unhealthyStatusHosts;
   }
@@ -146,7 +166,8 @@ public class ClusterHealthReport {
   /**
    * @return number of hosts having host status UNKNOWN
    */
-  @JsonProperty("Host/host_status/UNKNOWN")
+  @JsonProperty(HOST_HOST_STATUS_UNKNOWN)
+  @ApiModelProperty(name = HOST_HOST_STATUS_UNKNOWN)
   public int getUnknownStatusHosts() {
     return unknownStatusHosts;
   }
@@ -161,7 +182,8 @@ public class ClusterHealthReport {
   /**
    * @return number of hosts having host status ALERT
    */
-  @JsonProperty("Host/host_status/ALERT")
+  @JsonProperty(HOST_HOST_STATUS_ALERT)
+  @ApiModelProperty(name = HOST_HOST_STATUS_ALERT)
   public int getAlertStatusHosts() {
     return alertStatusHosts;
   }
@@ -176,7 +198,8 @@ public class ClusterHealthReport {
   /**
    * @return number of hosts having host status HEARTBEAT_LOST
    */
-  @JsonProperty("Host/host_state/HEARTBEAT_LOST")
+  @JsonProperty(HOST_HOST_STATE_HEARTBEAT_LOST)
+  @ApiModelProperty(name = HOST_HOST_STATE_HEARTBEAT_LOST)
   public int getHeartbeatLostStateHosts() {
     return heartbeatLostStateHosts;
   }


[36/49] ambari git commit: AMBARI-20995. Integrate ServiceService resource with Swagger (Balazs Bence Sari via adoroszlai)

Posted by ad...@apache.org.
AMBARI-20995. Integrate ServiceService resource with Swagger (Balazs Bence Sari via adoroszlai)


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

Branch: refs/heads/trunk
Commit: fea1aaec8a5ff5b6c2fae8cf38f9ca3b789e1ab9
Parents: 54983ee
Author: Balazs Bence Sari <bs...@hortonworks.com>
Authored: Tue May 16 09:09:07 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Tue May 16 09:09:07 2017 +0200

----------------------------------------------------------------------
 .../ambari/server/api/services/BaseService.java |   3 +
 .../server/api/services/ServiceService.java     | 291 +++++++++++++++++--
 .../ClusterServiceArtifactRequest.java          |  26 ++
 .../ClusterServiceArtifactResponse.java         |  49 ++++
 .../server/controller/ServiceRequest.java       |   8 +
 .../controller/ServiceRequestSwagger.java       |  31 ++
 .../server/controller/ServiceResponse.java      |  19 +-
 7 files changed, 394 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/fea1aaec/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
index 0b2afd1..964fb59 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
@@ -57,6 +57,7 @@ public abstract class BaseService {
   static final String MSG_NOT_AUTHENTICATED = "Not authenticated";
   static final String MSG_PERMISSION_DENIED = "Not permitted to perform the operation";
   static final String MSG_SERVER_ERROR = "Internal server error";
+  static final String MSG_RESOURCE_ALREADY_EXISTS = "The requested resource already exists.";
   static final String MSG_RESOURCE_NOT_FOUND = "The requested resource doesn't exist.";
 
   static final String QUERY_FIELDS = "fields";
@@ -81,6 +82,8 @@ public abstract class BaseService {
   static final String DATA_TYPE_STRING = "string";
 
   static final String PARAM_TYPE_QUERY = "query";
+  static final String PARAM_TYPE_BODY = "body";
+
 
   /**
    * Logger instance.

http://git-wip-us.apache.org/repos/asf/ambari/blob/fea1aaec/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java
index 52871f2..27de0b4 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java
@@ -30,16 +30,32 @@ 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.MediaType;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 
 import org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.controller.ClusterServiceArtifactResponse;
+import org.apache.ambari.server.controller.ServiceResponse;
 import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.http.HttpStatus;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 
 /**
  * Service responsible for services resource requests.
  */
+@Api(value = "Services", description = "Endpoint for service specific operations")
 public class ServiceService extends BaseService {
+  private static final String SERVICE_REQUEST_TYPE = "org.apache.ambari.server.controller.ServiceRequestSwagger";
+  private static final String ARTIFACT_REQUEST_TYPE = "org.apache.ambari.server.controller.ClusterServiceArtifactRequest";
+
   /**
    * Parent cluster name.
    */
@@ -65,9 +81,23 @@ public class ServiceService extends BaseService {
    */
   @GET
   @Path("{serviceName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get the details of a service",
+      nickname = "ServiceService#getService",
+      notes = "Returns the details of a service.",
+      response = ServiceResponse.ServiceResponseSwagger.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, defaultValue = "ServiceInfo/*",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getService(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                             @PathParam("serviceName") String serviceName) {
+                             @ApiParam @PathParam("serviceName") String serviceName) {
 
     return handleRequest(headers, body, ui, Request.Type.GET,
         createServiceResource(m_clusterName, serviceName));
@@ -82,7 +112,27 @@ public class ServiceService extends BaseService {
    * @return service collection resource representation
    */
   @GET
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get all services",
+      nickname = "ServiceService#getServices",
+      notes = "Returns all services.",
+      response = ServiceResponse.ServiceResponseSwagger.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION,
+          defaultValue = "ServiceInfo/service_name, ServiceInfo/cluster_name",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION,
+          defaultValue = "ServiceInfo/service_name.asc, ServiceInfo/cluster_name.asc",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getServices(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
     return handleRequest(headers, body, ui, Request.Type.GET,
         createServiceResource(m_clusterName, null));
@@ -100,10 +150,25 @@ public class ServiceService extends BaseService {
    */
   @POST
   @Path("{serviceName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Creates a service",
+      nickname = "ServiceService#createServices"
+  )
+  @ApiImplicitParams({
+      @ApiImplicitParam(dataType = SERVICE_REQUEST_TYPE, paramType = "body", allowMultiple = false)
+  })
+  @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+      @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_CONFLICT, message = MSG_RESOURCE_ALREADY_EXISTS),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response createService(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("serviceName") String serviceName) {
-
+                                @ApiParam @PathParam("serviceName") String serviceName) {
     return handleRequest(headers, body, ui, Request.Type.POST,
         createServiceResource(m_clusterName, serviceName));
   }
@@ -118,7 +183,23 @@ public class ServiceService extends BaseService {
    * @return information regarding the created services
    */
   @POST
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Creates a service",
+      nickname = "ServiceService#createService"
+  )
+  @ApiImplicitParams({
+      @ApiImplicitParam(dataType = SERVICE_REQUEST_TYPE, paramType = "body", allowMultiple = true)
+  })
+  @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+      @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_CONFLICT, message = MSG_RESOURCE_ALREADY_EXISTS),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response createServices(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
 
     return handleRequest(headers, body, ui, Request.Type.POST,
@@ -137,10 +218,24 @@ public class ServiceService extends BaseService {
    */
   @PUT
   @Path("{serviceName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Updates a service",
+      nickname = "ServiceService#updateService"
+  )
+  @ApiImplicitParams({
+      @ApiImplicitParam(dataType = SERVICE_REQUEST_TYPE, paramType = "body")
+  })
+  @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+      @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response updateService(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("serviceName") String serviceName) {
-
+                                @ApiParam @PathParam("serviceName") String serviceName) {
     return handleRequest(headers, body, ui, Request.Type.PUT, createServiceResource(m_clusterName, serviceName));
   }
 
@@ -154,7 +249,22 @@ public class ServiceService extends BaseService {
    * @return information regarding the updated service
    */
   @PUT
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Updates multiple services",
+      nickname = "ServiceService#updateServices"
+  )
+  @ApiImplicitParams({
+      @ApiImplicitParam(dataType = SERVICE_REQUEST_TYPE, paramType = "body")
+  })
+  @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+      @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response updateServices(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
 
     return handleRequest(headers, body, ui, Request.Type.PUT, createServiceResource(m_clusterName, null));
@@ -171,10 +281,19 @@ public class ServiceService extends BaseService {
    */
   @DELETE
   @Path("{serviceName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Deletes a service",
+      nickname = "ServiceService#deleteService"
+  )
+  @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response deleteService(@Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("serviceName") String serviceName) {
-
+                                @ApiParam(required = true) @PathParam("serviceName") String serviceName) {
     return handleRequest(headers, null, ui, Request.Type.DELETE, createServiceResource(m_clusterName, serviceName));
   }
 
@@ -185,6 +304,7 @@ public class ServiceService extends BaseService {
    * @return the components service
    */
   @Path("{serviceName}/components")
+  // TODO: find a way to handle this with Swagger (refactor or custom annotation?)
   public ComponentService getComponentHandler(@PathParam("serviceName") String serviceName) {
 
     return new ComponentService(m_clusterName, serviceName);
@@ -194,6 +314,7 @@ public class ServiceService extends BaseService {
    * Gets the alerts sub-resource.
    */
   @Path("{serviceName}/alerts")
+  // TODO: find a way to handle this with Swagger (refactor or custom annotation?)
   public AlertService getAlertHandler(
       @PathParam("serviceName") String serviceName) {
     return new AlertService(m_clusterName, serviceName, null);
@@ -213,12 +334,28 @@ public class ServiceService extends BaseService {
    */
   @POST
   @Path("{serviceName}/artifacts/{artifactName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Creates a service artifact",
+      nickname = "ServiceService#createArtifact"
+  )
+  @ApiImplicitParams({
+      @ApiImplicitParam(dataType = ARTIFACT_REQUEST_TYPE, paramType = "body", allowMultiple = false)
+  })
+  @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+      @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_CONFLICT, message = MSG_RESOURCE_ALREADY_EXISTS),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response createArtifact(String body,
                                  @Context HttpHeaders headers,
                                  @Context UriInfo ui,
-                                 @PathParam("serviceName") String serviceName,
-                                 @PathParam("artifactName") String artifactName) {
+                                 @ApiParam @PathParam("serviceName") String serviceName,
+                                 @ApiParam @PathParam("artifactName") String artifactName) {
 
     return handleRequest(headers, body, ui, Request.Type.POST,
         createArtifactResource(m_clusterName, serviceName, artifactName));
@@ -237,7 +374,27 @@ public class ServiceService extends BaseService {
    */
   @GET
   @Path("{serviceName}/artifacts")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get all service artifacts",
+      nickname = "ServiceService#getArtifacts",
+      response = ClusterServiceArtifactResponse.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION,
+          defaultValue = "Artifacts/artifact_name",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION,
+          defaultValue = "Artifacts/artifact_name",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getArtifacts(String body,
                               @Context HttpHeaders headers,
                               @Context UriInfo ui,
@@ -261,13 +418,32 @@ public class ServiceService extends BaseService {
    */
   @GET
   @Path("{serviceName}/artifacts/{artifactName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get the detais of a service artifact",
+      nickname = "ServiceService#getArtifact",
+      response = ClusterServiceArtifactResponse.class,
+      responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+      @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION,
+          defaultValue = "Artifacts/artifact_name",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION,
+          defaultValue = "Artifacts/artifact_name",
+          dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+      @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
   public Response getArtifact(String body,
                                  @Context HttpHeaders headers,
                                  @Context UriInfo ui,
-                                 @PathParam("serviceName") String serviceName,
-                                 @PathParam("artifactName") String artifactName) {
-
+                                 @ApiParam @PathParam("serviceName") String serviceName,
+                                 @ApiParam @PathParam("artifactName") String artifactName) {
     return handleRequest(headers, body, ui, Request.Type.GET,
         createArtifactResource(m_clusterName, serviceName, artifactName));
   }
@@ -284,11 +460,26 @@ public class ServiceService extends BaseService {
    */
   @PUT
   @Path("{serviceName}/artifacts")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Updates multiple artifacts",
+      nickname = "ServiceService#updateArtifacts"
+  )
+  @ApiImplicitParams({
+      @ApiImplicitParam(dataType = ARTIFACT_REQUEST_TYPE, paramType = "body")
+  })
+  @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+      @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response updateArtifacts(String body,
                                   @Context HttpHeaders headers,
                                   @Context UriInfo ui,
-                                  @PathParam("serviceName") String serviceName) {
+                                  @ApiParam @PathParam("serviceName") String serviceName) {
 
     return handleRequest(headers, body, ui, Request.Type.PUT,
         createArtifactResource(m_clusterName, serviceName, null));
@@ -307,12 +498,27 @@ public class ServiceService extends BaseService {
    */
   @PUT
   @Path("{serviceName}/artifacts/{artifactName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Updates a single artifact",
+      nickname = "ServiceService#updateArtifact"
+  )
+  @ApiImplicitParams({
+      @ApiImplicitParam(dataType = ARTIFACT_REQUEST_TYPE, paramType = "body")
+  })
+  @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+      @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response updateArtifact(String body,
                                  @Context HttpHeaders headers,
                                  @Context UriInfo ui,
-                                 @PathParam("serviceName") String serviceName,
-                                 @PathParam("artifactName") String artifactName) {
+                                 @ApiParam(required = true) @PathParam("serviceName") String serviceName,
+                                 @ApiParam(required = true) @PathParam("artifactName") String artifactName) {
 
     return handleRequest(headers, body, ui, Request.Type.PUT,
         createArtifactResource(m_clusterName, serviceName, artifactName));
@@ -330,11 +536,21 @@ public class ServiceService extends BaseService {
    */
   @DELETE
   @Path("{serviceName}/artifacts")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Deletes all artifacts of a service that match the provided predicate",
+    nickname = "ServiceService#deleteArtifacts"
+  )
+  @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response deleteArtifacts(String body,
                                   @Context HttpHeaders headers,
                                   @Context UriInfo ui,
-                                  @PathParam("serviceName") String serviceName) {
+                                  @ApiParam(required = true) @PathParam("serviceName") String serviceName) {
 
     return handleRequest(headers, body, ui, Request.Type.DELETE,
         createArtifactResource(m_clusterName, serviceName, null));
@@ -353,12 +569,22 @@ public class ServiceService extends BaseService {
    */
   @DELETE
   @Path("{serviceName}/artifacts/{artifactName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Deletes a single service artifact",
+      nickname = "ServiceService#deleteArtifact"
+  )
+  @ApiResponses({
+      @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+      @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+      @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+      @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+      @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response deleteArtifact(String body,
                                  @Context HttpHeaders headers,
                                  @Context UriInfo ui,
-                                 @PathParam("serviceName") String serviceName,
-                                 @PathParam("artifactName") String artifactName) {
+                                 @ApiParam(required = true) @PathParam("serviceName") String serviceName,
+                                 @ApiParam(required = true) @PathParam("artifactName") String artifactName) {
 
     return handleRequest(headers, body, ui, Request.Type.DELETE,
         createArtifactResource(m_clusterName, serviceName, artifactName));
@@ -375,6 +601,7 @@ public class ServiceService extends BaseService {
    * @return the alert history service
    */
   @Path("{serviceName}/alert_history")
+  // TODO: find a way to handle this with Swagger (refactor or custom annotation?)
   public AlertHistoryService getAlertHistoryService(
       @Context javax.ws.rs.core.Request request,
       @PathParam("serviceName") String serviceName) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/fea1aaec/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterServiceArtifactRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterServiceArtifactRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterServiceArtifactRequest.java
new file mode 100644
index 0000000..ac37c0f
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterServiceArtifactRequest.java
@@ -0,0 +1,26 @@
+package org.apache.ambari.server.controller;
+
+import java.util.Map;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Request schema for endpoint {@link org.apache.ambari.server.api.services.ServiceService#createArtifact(String,
+ * javax.ws.rs.core.HttpHeaders, javax.ws.rs.core.UriInfo, String, String)}
+ *
+ * The interface is not actually implemented, it only carries swagger annotations.
+ */
+public interface ClusterServiceArtifactRequest extends ApiModel {
+
+  @ApiModelProperty(name = "Artifacts")
+  public ClusterServiceArtifactRequestInfo getClusterServiceArtifactRequestInfo();
+
+  @ApiModelProperty(name = "artifact_data")
+  public Map<String, Object> getArtifactData();
+
+  public interface ClusterServiceArtifactRequestInfo {
+    @ApiModelProperty(name = "artifact_name")
+    public String getArtifactName();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fea1aaec/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterServiceArtifactResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterServiceArtifactResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterServiceArtifactResponse.java
new file mode 100644
index 0000000..29b8c94
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterServiceArtifactResponse.java
@@ -0,0 +1,49 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import java.util.Map;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response schema for endpoint {@link org.apache.ambari.server.api.services.ServiceService#getArtifact}
+ *
+ * The interface is not actually implemented, it only carries swagger annotations.
+ */
+public interface ClusterServiceArtifactResponse {
+
+  @ApiModelProperty(name = "Artifacts")
+  public ClusterServiceArtifactResponseInfo getClusterServiceArtifactResponseInfo();
+
+  @ApiModelProperty(name = "artifact_data")
+  public Map<String, Object> getArtifactData();
+
+  public interface ClusterServiceArtifactResponseInfo {
+    @ApiModelProperty(name = "artifact_name")
+    public String getArtifactName();
+
+    @ApiModelProperty(name = "cluster_name")
+    public String getClusterName();
+
+    @ApiModelProperty(name = "service_name")
+    public String getServiceName();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fea1aaec/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceRequest.java
index 6c0d4ea..5ac6251 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceRequest.java
@@ -18,6 +18,7 @@
 package org.apache.ambari.server.controller;
 
 
+import io.swagger.annotations.ApiModelProperty;
 
 public class ServiceRequest {
 
@@ -48,6 +49,7 @@ public class ServiceRequest {
   /**
    * @return the serviceName
    */
+  @ApiModelProperty(name = "service_name")
   public String getServiceName() {
     return serviceName;
   }
@@ -62,6 +64,7 @@ public class ServiceRequest {
   /**
    * @return the desiredState
    */
+  @ApiModelProperty(name = "state")
   public String getDesiredState() {
     return desiredState;
   }
@@ -76,6 +79,7 @@ public class ServiceRequest {
   /**
    * @return the clusterName
    */
+  @ApiModelProperty(name = "cluster_name")
   public String getClusterName() {
     return clusterName;
   }
@@ -97,6 +101,7 @@ public class ServiceRequest {
   /**
    * @return the maintenance state
    */
+  @ApiModelProperty(name = "maintenance_state")
   public String getMaintenanceState() {
     return maintenanceState;
   }
@@ -104,6 +109,7 @@ public class ServiceRequest {
   /**
    * @return credential store enabled
    */
+  @ApiModelProperty(name = "credential_store_enabled")
   public String getCredentialStoreEnabled() {
     return credentialStoreEnabled;
   }
@@ -126,6 +132,7 @@ public class ServiceRequest {
   /**
    * @param credentialStoreSupported the new credential store supported
    */
+  @ApiModelProperty(name = "credential_store_supporteds")
   public void setCredentialStoreSupported(String credentialStoreSupported) {
     this.credentialStoreSupported = credentialStoreSupported;
   }
@@ -139,4 +146,5 @@ public class ServiceRequest {
       .append(", credentialStoreSupported=").append(credentialStoreSupported);
     return sb.toString();
   }
+
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/fea1aaec/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceRequestSwagger.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceRequestSwagger.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceRequestSwagger.java
new file mode 100644
index 0000000..475ad41
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceRequestSwagger.java
@@ -0,0 +1,31 @@
+/**
+ * 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;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Request schema for endpoint {@link org.apache.ambari.server.api.services.ServiceService#createService(String,
+ *    javax.ws.rs.core.HttpHeaders, javax.ws.rs.core.UriInfo, String)}
+ *
+ * The interface is not actually implemented, it only carries swagger annotations.
+ */
+public interface ServiceRequestSwagger extends ApiModel {
+  @ApiModelProperty(name = "ServiceInfo")
+  public ServiceRequest getServiceRequest();
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fea1aaec/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceResponse.java
index 3e35c0c..44bdfc7 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ServiceResponse.java
@@ -19,6 +19,8 @@
 package org.apache.ambari.server.controller;
 
 
+import io.swagger.annotations.ApiModelProperty;
+
 public class ServiceResponse {
 
   private Long clusterId;
@@ -48,6 +50,7 @@ public class ServiceResponse {
   /**
    * @return the serviceName
    */
+  @ApiModelProperty(name = "service_name")
   public String getServiceName() {
     return serviceName;
   }
@@ -62,6 +65,7 @@ public class ServiceResponse {
   /**
    * @return the clusterId
    */
+  @ApiModelProperty(hidden = true)
   public Long getClusterId() {
     return clusterId;
   }
@@ -76,6 +80,7 @@ public class ServiceResponse {
   /**
    * @return the clusterName
    */
+  @ApiModelProperty(name = "cluster_name")
   public String getClusterName() {
     return clusterName;
   }
@@ -90,6 +95,7 @@ public class ServiceResponse {
   /**
    * @return the desiredState
    */
+  @ApiModelProperty(name = "state")
   public String getDesiredState() {
     return desiredState;
   }
@@ -104,6 +110,7 @@ public class ServiceResponse {
   /**
    * @return the desiredStackVersion
    */
+  @ApiModelProperty(hidden = true)
   public String getDesiredStackVersion() {
     return desiredStackVersion;
   }
@@ -141,7 +148,8 @@ public class ServiceResponse {
   public void setMaintenanceState(String state) {
     maintenanceState = state;
   }
-  
+
+  @ApiModelProperty(name = "maintenance_state")
   public String getMaintenanceState() {
     return maintenanceState;
   }
@@ -152,6 +160,7 @@ public class ServiceResponse {
    *
    * @return true or false
    */
+  @ApiModelProperty(name = "credential_store_supported")
   public boolean isCredentialStoreSupported() {
     return credentialStoreSupported;
   }
@@ -172,6 +181,7 @@ public class ServiceResponse {
    *
    * @return true or false
    */
+  @ApiModelProperty(name = "credential_store_enabled")
   public boolean isCredentialStoreEnabled() {
     return credentialStoreEnabled;
   }
@@ -194,4 +204,11 @@ public class ServiceResponse {
     return result;
   }
 
+  /**
+   * Interface to help correct Swagger documentation generation
+   */
+  public interface ServiceResponseSwagger extends ApiModel {
+    @ApiModelProperty(name = "ServiceInfo")
+    ServiceResponse getServiceResponse();
+  }
 }


[26/49] ambari git commit: AMBARI-20624. Misc fixes for ambari-server swagger integration prototype. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/docs/api/generated/index.html
----------------------------------------------------------------------
diff --git a/ambari-server/docs/api/generated/index.html b/ambari-server/docs/api/generated/index.html
new file mode 100644
index 0000000..1771346
--- /dev/null
+++ b/ambari-server/docs/api/generated/index.html
@@ -0,0 +1,17421 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+  <title>Swagger spec for Ambari REST API</title>
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <meta charset="UTF-8" />
+  <script>
+/*! jQuery v3.1.0 | (c) jQuery Foundation | jquery.org/license */
+!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.1.0",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null!=a?a<0?this[a+this.length]:this[a]:f.call(this)},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){retu
 rn r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=r.isArray(d)))?(e?(e=!1,f=c&&r.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:funct
 ion(){},isFunction:function(a){return"function"===r.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return!(!a||"[object Object]"!==k.call(a))&&(!(b=e(a))||(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;d<c;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b
 ||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;f<d;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a))return d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=
 !!a&&"length"in a&&a.length,c=r.type(a);return"function"!==c&&!r.isWindow(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>
 +~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"
 +a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeNam
 e.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeN
 ame.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"label"in b&&b.disabled===a||"form"in b&&b.disabled===a||"form"in b&&b.disabled===!1&&(b.isDisabled===a||b.isDisabled!==!a&&("label"in b||!ea(b))!==a)}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){retur
 n a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefine
 d"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.q
 uerySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument==
 =v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.
 attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&
 &(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.index
 Of(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeNa
 me.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toL
 owerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){
 var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:pa(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:pa(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function ra(){}ra.prototype=d.filters=d.pseudos,d.setFilters=new ra,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=Q.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c
 .length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function sa(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function ta(a,b,c){var d=b.dir,e=b.next,f=e||d,g=c&&"parentNode"===f,h=x++;return b.first?function(b,c,e){while(b=b[d])if(1===b.nodeType||g)return a(b,c,e)}:function(b,c,i){var j,k,l,m=[w,h];if(i){while(b=b[d])if((1===b.nodeType||g)&&a(b,c,i))return!0}else while(b=b[d])if(1===b.nodeType||g)if(l=b[u]||(b[u]={}),k=l[b.uniqueID]||(l[b.uniqueID]={}),e&&e===b.nodeName.toLowerCase())b=b[d]||b;else{if((j=k[f])&&j[0]===w&&j[1]===h)return m[2]=j[2];if(k[f]=m,m[2]=a(b,c,i))return!0}}}function ua(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d<e;d++)ga(a,b[d],c);return c}function wa(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=
 b;h<i;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function xa(a,b,c,d,e,f){return d&&!d[u]&&(d=xa(d)),e&&!e[u]&&(e=xa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||va(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:wa(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=wa(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i<f;i++)if(c=d.relative[a[i].type])m=[ta(ua(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++
 i;e<f;e++)if(d.relative[a[e].type])break;return xa(i>1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i<e&&ya(a.slice(i,e)),e<f&&ya(a=a.slice(e)),e<f&&sa(a))}m.push(c)}return ua(m)}function za(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,
 b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(_,aa),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=V.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(_,aa),$.test(j[0].type)&&qa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&sa(j),!a)return G.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||$.test(a)&&qa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCa
 se()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext,B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,C=/^.[^:#\[\.,]*$/;function D(a,b,c){if(r.isFunction(b))return r.grep(
 a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return r.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(C.test(b))return r.filter(b,a,c);b=r.filter(b,a)}return r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType})}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b<d;b++)if(r.contains(e[b],this))return!0}));for(c=this.pushStack([]),b=0;b<d;b++)r.find(a,e[b],c);return d>1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(D(this,a||[],!1))},not:function(a){return this.pushStack(D(this,a||[],!0))},is:function(a){return!!D(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var E,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,G=r.fn.init=function(a,b,c){var e,f;if(!a)
 return this;if(c=c||E,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:F.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),B.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};G.prototype=r.fn,E=r(d);var H=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a<c;a++)if(r.contains(this,b[a]))return!0})},closest:function(a,b){var c,d=0,e=this.length,f=[],g="string"!=typeof a&&r(a);if(!A.test(a))for(;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeTyp
 e<11&&(g?g.index(c)>-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function J(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return J(a,"nextSibling")},prev:function(a){return J(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previ
 ousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return a.contentDocument||r.merge([],a.childNodes)}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(I[a]||r.uniqueSort(e),H.test(a)&&e.reverse()),this.pushStack(e)}});var K=/\S+/g;function L(a){var b={};return r.each(a.match(K)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?L(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){r.each(b,function(b,c){r.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==r.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remo
 ve:function(){return r.each(arguments,function(a,b){var c;while((c=r.inArray(b,f,c))>-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function M(a){return a}function N(a){throw a}function O(a,b,c){var d;try{a&&r.isFunction(d=a.promise)?d.call(a).done(b).fail(c):a&&r.isFunction(d=a.then)?d.call(a,b,c):b.call(void 0,a)}catch(a){c.call(void 0,a)}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once 
 memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b<f)){if(a=d.apply(h,i),a===c.promise())throw new TypeError("Thenable self-resolution");j=a&&("object"==typeof a||"function"==typeof a)&&a.then,r.isFunction(j)?e?j.call(a,g(f,c,M,e),g(f,c,N,e)):(f++,j.call(a,g(f,c,M,e),g(f,c,N,e),g(f,c,M,c.notifyWith))):(d!==M&&(h=void 0,i=[a]),(e||c.resolveWith)(h,i))}},k=e?j:function(){try{j()}catch(a){r.Deferred.excep
 tionHook&&r.Deferred.exceptionHook(a,k.stackTrace),b+1>=f&&(d!==N&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:M,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:M)),c[2][3].add(g(0,a,r.isFunction(d)?d:N))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(O(a,g.done(h(c)).resolve,g.reject),"pending"===g.state()||r.isFunction(e[c]&&e[c
 ].then)))return g.then();while(c--)O(e[c],h(c),g.reject);return g.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&P.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var Q=r.Deferred();r.fn.ready=function(a){return Q.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,holdReady:function(a){a?r.readyWait++:r.ready(!0)},ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||Q.resolveWith(d,[r]))}}),r.ready.then=Q.then;function R(){d.removeEventListener("DOMContentLoaded",R),a.removeEventListener("load",R),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",R),a.addEventListener("load",R));var S=function(a,b,c,d,e,f,g){var h=0
 ,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)S(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,
+r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},T=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function U(){this.expando=r.expando+U.uid++}U.uid=1,U.prototype={cache:function(a){var b=a[this.expando];return b||(b={},T(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){r.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(K)||[])
 ,c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var V=new U,W=new U,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Y=/[A-Z]/g;function Z(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Y,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c||"false"!==c&&("null"===c?null:+c+""===c?+c:X.test(c)?JSON.parse(c):c)}catch(e){}W.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return W.hasData(a)||V.hasData(a)},data:function(a,b,c){return W.access(a,b,c)},removeData:function(a,b){W.remove(a,b)},_data:function(a,b,c){return V.access(a,b,c)},_removeData:function(a,b){V.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=W.get(f),1===f.nodeType&&!V.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.in
 dexOf("data-")&&(d=r.camelCase(d.slice(5)),Z(f,d,e[d])));V.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){W.set(this,a)}):S(this,function(b){var c;if(f&&void 0===b){if(c=W.get(f,a),void 0!==c)return c;if(c=Z(f,a),void 0!==c)return c}else this.each(function(){W.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=V.get(a,b),c&&(!d||r.isArray(c)?d=V.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return V.get(a,c)||V.access(a,c,{empty:r.Callbacks("once memory").add(function(){V.remove(a,[b+"queue",c])})})}}),r.fn.extend({
 queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?r.queue(this[0],a):void 0===b?this:this.each(function(){var c=r.queue(this,a,b);r._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&r.dequeue(this,a)})},dequeue:function(a){return this.each(function(){r.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=r.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=V.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var $=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,_=new RegExp("^(?:([+-])=|)("+$+")([a-z%]*)$","i"),aa=["Top","Right","Bottom","Left"],ba=function(a,b){return a=b||a,"none"===a.style.display||""===a.style.display&&r.contains(a.ownerDocument,a)&&"none"===r.css(a,"display")},ca=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f 
 in b)a.style[f]=g[f];return e};function da(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return r.css(a,b,"")},i=h(),j=c&&c[3]||(r.cssNumber[b]?"":"px"),k=(r.cssNumber[b]||"px"!==j&&+i)&&_.exec(r.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,r.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var ea={};function fa(a){var b,c=a.ownerDocument,d=a.nodeName,e=ea[d];return e?e:(b=c.body.appendChild(c.createElement(d)),e=r.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e="block"),ea[d]=e,e)}function ga(a,b){for(var c,d,e=[],f=0,g=a.length;f<g;f++)d=a[f],d.style&&(c=d.style.display,b?("none"===c&&(e[f]=V.get(d,"display")||null,e[f]||(d.style.display="")),""===d.style.display&&ba(d)&&(e[f]=fa(d))):"none"!==c&&(e[f]="none",V.set(d,"display",c)));for(f=0;f<g;f++)null!=e[f]&&(a[f].style.display=e[f]);return a}r.fn.extend({show:function(){return ga(this,!0)
 },hide:function(){return ga(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){ba(this)?r(this).show():r(this).hide()})}});var ha=/^(?:checkbox|radio)$/i,ia=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ja=/^$|\/(?:java|ecma)script/i,ka={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ka.optgroup=ka.option,ka.tbody=ka.tfoot=ka.colgroup=ka.caption=ka.thead,ka.th=ka.td;function la(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function ma(a,b){for(var c=0,d=a.length;c<d;c++)V.set(a[c],"globalEval",!b||V.get(b[c],"globalEval"))}var na=/<|&#?\w+;/;function oa(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.c
 reateDocumentFragment(),m=[],n=0,o=a.length;n<o;n++)if(f=a[n],f||0===f)if("object"===r.type(f))r.merge(m,f.nodeType?[f]:f);else if(na.test(f)){g=g||l.appendChild(b.createElement("div")),h=(ia.exec(f)||["",""])[1].toLowerCase(),i=ka[h]||ka._default,g.innerHTML=i[1]+r.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;r.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",n=0;while(f=m[n++])if(d&&r.inArray(f,d)>-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=la(l.appendChild(f),"script"),j&&ma(g),c){k=0;while(f=g[k++])ja.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaul
 tValue}();var pa=d.documentElement,qa=/^key/,ra=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,sa=/^([^.]*)(?:\.(.+)|)/;function ta(){return!0}function ua(){return!1}function va(){try{return d.activeElement}catch(a){}}function wa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)wa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ua;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(pa,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),
 b=(b||"").match(K)||[""],j=b.length;while(j--)h=sa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.hasData(a)&&V.get(a);if(q&&(i=q.events)){b=(b||"").match(K)||[""],j=b.length;while(j--)if(h=sa.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.gu
 id!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&V.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(V.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c<arguments.length;c++)i[c]=arguments[c];if(b.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,b)!==!1){h=r.event.handlers.call(this,b,j),c=0;while((f=h[c++])&&!b.isPropagationStopped()){b.currentTarget=f.elem,d=0;while((g=f.handlers[d++])&&!b.isImmediatePropagationStopped())b.rnamespace&&!b.rnamespace.test(g.namespace)||(b.handleObj=g,b.data=g.data,e=((r.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(b.result=e)===!1&&(b
 .preventDefault(),b.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,b),b.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;c<h;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?r(e,this).index(i)>-1:r.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},addProp:function(a,b){Object.defineProperty(r.Event.prototype,a,{enumerable:!0,configurable:!0,get:r.isFunction(b)?function(){if(this.originalEvent)return b(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[a]},set:function(b){Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:b})}})},fix:function(a){return a[r.expando]?a:new r.Event(a)},special:{load:{noBubb
 le:!0},focus:{trigger:function(){if(this!==va()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===va()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&r.nodeName(this,"input"))return this.click(),!1},_default:function(a){return r.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},r.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},r.Event=function(a,b){return this instanceof r.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ta:ua,this.target=a.target&&3===a.target.nodeType?a.target.parentNode:a.target,this.currentTarget=a.currentTarget,this.relatedTarget=a.relatedTarget):this.type=a,b&&r.extend(this,b),this.timeStamp=a&&a.timeStamp||r.now(),void(t
 his[r.expando]=!0)):new r.Event(a,b)},r.Event.prototype={constructor:r.Event,isDefaultPrevented:ua,isPropagationStopped:ua,isImmediatePropagationStopped:ua,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ta,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ta,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ta,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},r.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(a){var b=a.button;return null==a.which&&qa.test(a.t
 ype)?null!=a.charCode?a.charCode:a.keyCode:!a.which&&void 0!==b&&ra.test(a.type)?1&b?1:2&b?3:4&b?2:0:a.which}},r.event.addProp),r.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){r.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||r.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),r.fn.extend({on:function(a,b,c,d){return wa(this,a,b,c,d)},one:function(a,b,c,d){return wa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,r(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=ua),this.each(function(){r.event.remove(this,a,c,b)})}});var xa=/<(?!area|br|col|embed|hr|img|input|link|meta|p
 aram)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,ya=/<script|<style|<link/i,za=/checked\s*(?:[^=]|=\s*.checked.)/i,Aa=/^true\/(.*)/,Ba=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ca(a,b){return r.nodeName(a,"table")&&r.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function Da(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Ea(a){var b=Aa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Fa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(V.hasData(a)&&(f=V.access(a),g=V.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c<d;c++)r.event.add(b,e,j[e][c])}W.hasData(a)&&(h=W.access(a),i=r.extend({},h),W.set(b,i))}}function Ga(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ha.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function Ha(a,b,c,d){b=g.apply([],b);var e,f,h,i,j,k,l=0,m=a.length,n=m-1,q=b[0],s=r.isFunction(q);if
 (s||m>1&&"string"==typeof q&&!o.checkClone&&za.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ha(f,b,c,d)});if(m&&(e=oa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(la(e,"script"),Da),i=h.length;l<m;l++)j=e,l!==n&&(j=r.clone(j,!0,!0),i&&r.merge(h,la(j,"script"))),c.call(a[l],j,l);if(i)for(k=h[h.length-1].ownerDocument,r.map(h,Ea),l=0;l<i;l++)j=h[l],ja.test(j.type||"")&&!V.access(j,"globalEval")&&r.contains(k,j)&&(j.src?r._evalUrl&&r._evalUrl(j.src):p(j.textContent.replace(Ba,""),k))}return a}function Ia(a,b,c){for(var d,e=b?r.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||r.cleanData(la(d)),d.parentNode&&(c&&r.contains(d.ownerDocument,d)&&ma(la(d,"script")),d.parentNode.removeChild(d));return a}r.extend({htmlPrefilter:function(a){return a.replace(xa,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.
 nodeType||r.isXMLDoc(a)))for(g=la(h),f=la(a),d=0,e=f.length;d<e;d++)Ga(f[d],g[d]);if(b)if(c)for(f=f||la(a),g=g||la(h),d=0,e=f.length;d<e;d++)Fa(f[d],g[d]);else Fa(a,h);return g=la(h,"script"),g.length>0&&ma(g,!i&&la(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(T(c)){if(b=c[V.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[V.expando]=void 0}c[W.expando]&&(c[W.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ia(this,a,!0)},remove:function(a){return Ia(this,a)},text:function(a){return S(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ha(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.appendChild(a)}})},prepend:function(){return Ha(this,arguments,function(a){i
 f(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Ca(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ha(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(la(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return S(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!ya.test(a)&&!ka[(ia.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c<d;c++)b=this[c]||{},1===b.nodeType&&(r.cleanData(la(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ha(
 this,arguments,function(b){var c=this.parentNode;r.inArray(this,a)<0&&(r.cleanData(la(this)),c&&c.replaceChild(b,this))},a)}}),r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){r.fn[a]=function(a){for(var c,d=[],e=r(a),f=e.length-1,g=0;g<=f;g++)c=g===f?this:this.clone(!0),r(e[g])[b](c),h.apply(d,c.get());return this.pushStack(d)}});var Ja=/^margin/,Ka=new RegExp("^("+$+")(?!px)[a-z%]+$","i"),La=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)};!function(){function b(){if(i){i.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",i.innerHTML="",pa.appendChild(h);var b=a.getComputedStyle(i);c="1%"!==b.top,g="2px"===b.marginLeft,e="4px"===b.width,i.style.marginRight="50%",f="4px"===b.marginRight,pa.removeChild(h),i=null}}var c,e,f,g,h=d.createElement("div"),i=d.createElement("div");i.style&&(i.styl
 e.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===i.style.backgroundClip,h.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",h.appendChild(i),r.extend(o,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return b(),e},pixelMarginRight:function(){return b(),f},reliableMarginLeft:function(){return b(),g}}))}();function Ma(a,b,c){var d,e,f,g,h=a.style;return c=c||La(a),c&&(g=c.getPropertyValue(b)||c[b],""!==g||r.contains(a.ownerDocument,a)||(g=r.style(a,b)),!o.pixelMarginRight()&&Ka.test(g)&&Ja.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function Na(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Oa=/^(none|table(?!-c[ea]).+)/,Pa={position:"absolute",visibility:"hidden",display:"block"},Qa={letterSpacing:"0",f
 ontWeight:"400"},Ra=["Webkit","Moz","ms"],Sa=d.createElement("div").style;function Ta(a){if(a in Sa)return a;var b=a[0].toUpperCase()+a.slice(1),c=Ra.length;while(c--)if(a=Ra[c]+b,a in Sa)return a}function Ua(a,b,c){var d=_.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Va(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;f<4;f+=2)"margin"===c&&(g+=r.css(a,c+aa[f],!0,e)),d?("content"===c&&(g-=r.css(a,"padding"+aa[f],!0,e)),"margin"!==c&&(g-=r.css(a,"border"+aa[f]+"Width",!0,e))):(g+=r.css(a,"padding"+aa[f],!0,e),"padding"!==c&&(g+=r.css(a,"border"+aa[f]+"Width",!0,e)));return g}function Wa(a,b,c){var d,e=!0,f=La(a),g="border-box"===r.css(a,"boxSizing",!1,f);if(a.getClientRects().length&&(d=a.getBoundingClientRect()[b]),d<=0||null==d){if(d=Ma(a,b,f),(d<0||null==d)&&(d=a.style[b]),Ka.test(d))return d;e=g&&(o.boxSizingReliable()||d===a.style[b]),d=parseFloat(d)||0}return d+Va(a,b,c||(g?"border":"content"),e,f)+"px"}r.extend({cssHooks:{opacity:{get:
 function(a,b){if(b){var c=Ma(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=r.camelCase(b),i=a.style;return b=r.cssProps[h]||(r.cssProps[h]=Ta(h)||h),g=r.cssHooks[b]||r.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=_.exec(c))&&e[1]&&(c=da(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(r.cssNumber[h]?"":"px")),o.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=r.camelCase(b);return b=r.cssProps[h]||(r.cssProps[h]=Ta(h)||h),g=r.cssHooks[b]||r.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Ma(a,b,d)),"normal"==
 =e&&b in Qa&&(e=Qa[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),r.each(["height","width"],function(a,b){r.cssHooks[b]={get:function(a,c,d){if(c)return!Oa.test(r.css(a,"display"))||a.getClientRects().length&&a.getBoundingClientRect().width?Wa(a,b,d):ca(a,Pa,function(){return Wa(a,b,d)})},set:function(a,c,d){var e,f=d&&La(a),g=d&&Va(a,b,d,"border-box"===r.css(a,"boxSizing",!1,f),f);return g&&(e=_.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=r.css(a,b)),Ua(a,c,g)}}}),r.cssHooks.marginLeft=Na(o.reliableMarginLeft,function(a,b){if(b)return(parseFloat(Ma(a,"marginLeft"))||a.getBoundingClientRect().left-ca(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px"}),r.each({margin:"",padding:"",border:"Width"},function(a,b){r.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+aa[d]+b]=f[d]||f[d-2]||f[0];return e}},Ja.test(a)||(r.cssHooks[a+b].set=Ua)}),r.fn.extend({css:function(a,b){return S(this,function
 (a,b,c){var d,e,f={},g=0;if(r.isArray(b)){for(d=La(a),e=b.length;g<e;g++)f[b[g]]=r.css(a,b[g],!1,d);return f}return void 0!==c?r.style(a,b,c):r.css(a,b)},a,b,arguments.length>1)}});function Xa(a,b,c,d,e){return new Xa.prototype.init(a,b,c,d,e)}r.Tween=Xa,Xa.prototype={constructor:Xa,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=Xa.propHooks[this.prop];return a&&a.get?a.get(this):Xa.propHooks._default.get(this)},run:function(a){var b,c=Xa.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Xa.propHooks._default.set(this),this}},Xa.prototype.init.prototype=Xa.prototype,Xa.propHooks={_default:{get:function(a)
 {var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},Xa.propHooks.scrollTop=Xa.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=Xa.prototype.init,r.fx.step={};var Ya,Za,$a=/^(?:toggle|show|hide)$/,_a=/queueHooks$/;function ab(){Za&&(a.requestAnimationFrame(ab),r.fx.tick())}function bb(){return a.setTimeout(function(){Ya=void 0}),Ya=r.now()}function cb(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=aa[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function db(a,b,c){for(var d,e=(gb.tweeners[b]||[]).concat(gb.tweene
 rs["*"]),f=0,g=e.length;f<g;f++)if(d=e[f].call(c,b,a))return d}function eb(a,b,c){var d,e,f,g,h,i,j,k,l="width"in b||"height"in b,m=this,n={},o=a.style,p=a.nodeType&&ba(a),q=V.get(a,"fxshow");c.queue||(g=r._queueHooks(a,"fx"),null==g.unqueued&&(g.unqueued=0,h=g.empty.fire,g.empty.fire=function(){g.unqueued||h()}),g.unqueued++,m.always(function(){m.always(function(){g.unqueued--,r.queue(a,"fx").length||g.empty.fire()})}));for(d in b)if(e=b[d],$a.test(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}n[d]=q&&q[d]||r.style(a,d)}if(i=!r.isEmptyObject(b),i||!r.isEmptyObject(n)){l&&1===a.nodeType&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=q&&q.display,null==j&&(j=V.get(a,"display")),k=r.css(a,"display"),"none"===k&&(j?k=j:(ga([a],!0),j=a.style.display||j,k=r.css(a,"display"),ga([a]))),("inline"===k||"inline-block"===k&&null!=j)&&"none"===r.css(a,"float")&&(i||(m.done(function(){o.display=j}),null==j&&(k=o.display,j="none"==
 =k?"":k)),o.display="inline-block")),c.overflow&&(o.overflow="hidden",m.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]})),i=!1;for(d in n)i||(q?"hidden"in q&&(p=q.hidden):q=V.access(a,"fxshow",{display:j}),f&&(q.hidden=!p),p&&ga([a],!0),m.done(function(){p||ga([a]),V.remove(a,"fxshow");for(d in n)r.style(a,d,n[d])})),i=db(p?q[d]:0,d,m),d in q||(q[d]=i.start,p&&(i.end=i.start,i.start=0))}}function fb(a,b){var c,d,e,f,g;for(c in a)if(d=r.camelCase(c),e=b[d],f=a[c],r.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=r.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function gb(a,b,c){var d,e,f=0,g=gb.prefilters.length,h=r.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Ya||bb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;g<i;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),f<1&&i?c:(h.resolv
 eWith(a,[j]),!1)},j=h.promise({elem:a,props:r.extend({},b),opts:r.extend(!0,{specialEasing:{},easing:r.easing._default},c),originalProperties:b,originalOptions:c,startTime:Ya||bb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=r.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;c<d;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(fb(k,j.opts.specialEasing);f<g;f++)if(d=gb.prefilters[f].call(j,a,k,j.opts))return r.isFunction(d.stop)&&(r._queueHooks(j.elem,j.opts.queue).stop=r.proxy(d.stop,d)),d;return r.map(k,db,j),r.isFunction(j.opts.start)&&j.opts.start.call(a,j),r.fx.timer(r.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}r.Animation=r.extend(gb,{tweeners:{"*":[function(a,b){var c=this
 .createTween(a,b);return da(c.elem,a,_.exec(b),c),c}]},tweener:function(a,b){r.isFunction(a)?(b=a,a=["*"]):a=a.match(K);for(var c,d=0,e=a.length;d<e;d++)c=a[d],gb.tweeners[c]=gb.tweeners[c]||[],gb.tweeners[c].unshift(b)},prefilters:[eb],prefilter:function(a,b){b?gb.prefilters.unshift(a):gb.prefilters.push(a)}}),r.speed=function(a,b,c){var e=a&&"object"==typeof a?r.extend({},a):{complete:c||!c&&b||r.isFunction(a)&&a,duration:a,easing:c&&b||b&&!r.isFunction(b)&&b};return r.fx.off||d.hidden?e.duration=0:e.duration="number"==typeof e.duration?e.duration:e.duration in r.fx.speeds?r.fx.speeds[e.duration]:r.fx.speeds._default,null!=e.queue&&e.queue!==!0||(e.queue="fx"),e.old=e.complete,e.complete=function(){r.isFunction(e.old)&&e.old.call(this),e.queue&&r.dequeue(this,e.queue)},e},r.fn.extend({fadeTo:function(a,b,c,d){return this.filter(ba).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=r.isEmptyObject(a),f=r.speed(b,c,d),g=function(){var b=gb(thi
 s,r.extend({},a),f);(e||V.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=r.timers,g=V.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&_a.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||r.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=V.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=r.timers,g=d?d.length:0;for(c.finish=!0,r.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;b<g;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),r.each(["toggle","show","hide"],function(a,b
 ){var c=r.fn[b];r.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(cb(b,!0),a,d,e)}}),r.each({slideDown:cb("show"),slideUp:cb("hide"),slideToggle:cb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){r.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),r.timers=[],r.fx.tick=function(){var a,b=0,c=r.timers;for(Ya=r.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||r.fx.stop(),Ya=void 0},r.fx.timer=function(a){r.timers.push(a),a()?r.fx.start():r.timers.pop()},r.fx.interval=13,r.fx.start=function(){Za||(Za=a.requestAnimationFrame?a.requestAnimationFrame(ab):a.setInterval(r.fx.tick,r.fx.interval))},r.fx.stop=function(){a.cancelAnimationFrame?a.cancelAnimationFrame(Za):a.clearInterval(Za),Za=null},r.fx.speeds={slow:600,fast:200,_default:400},r.fn.delay=function(b,c){return b=r.fx?r.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=fu
 nction(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",o.checkOn=""!==a.value,o.optSelected=c.selected,a=d.createElement("input"),a.value="t",a.type="radio",o.radioValue="t"===a.value}();var hb,ib=r.expr.attrHandle;r.fn.extend({attr:function(a,b){return S(this,r.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?hb:void 0)),void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&r.nodeName(a,"input")){var c=a.value;re
 turn a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(K);
+if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),hb={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ib[b]||r.find.attr;ib[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=ib[g],ib[g]=e,e=null!=c(a,b,d)?g:null,ib[g]=f),e}});var jb=/^(?:input|select|textarea|button)$/i,kb=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return S(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):jb.test(a.nodeName)||kb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"cla
 ssName"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});var lb=/[\t\r\n\f]/g;function mb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,mb(this)))});if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=mb(c),d=1===c.nodeType&&(" "+e+" ").replace(lb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=r.trim(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeC
 lass(a.call(this,b,mb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=mb(c),d=1===c.nodeType&&(" "+e+" ").replace(lb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=r.trim(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,mb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(K)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=mb(this),b&&V.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":V.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+mb(c)+" ").replace(lb," ").indexOf(b)>-1)return!0;re
 turn!1}});var nb=/\r/g,ob=/[\x20\t\r\n\f]+/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":r.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(nb,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:r.trim(r.text(a)).replace(ob," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;i<h;i++)if(c=d[i],(c.selected||i===e)&&!c.disabled&&(!c.parentNode.disabled||!r.nodeName(c.parentNode,"
 optgroup"))){if(b=r(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(r.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var pb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!pb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")
 +"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,pb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(V.get(h,"events")||{})[b.type]&&V.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&T(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!T(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(
 a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=V.access(d,b);e||d.addEventListener(a,c,!0),V.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=V.access(d,b)-1;e?V.access(d,b,e):(d.removeEventListener(a,c,!0),V.remove(d,b))}}});var qb=a.location,rb=r.now(),sb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeo
 f b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var tb=/\[\]$/,ub=/\r?\n/g,vb=/^(?:submit|button|image|reset|file)$/i,wb=/^(?:input|select|textarea|keygen)/i;function xb(a,b,c,d){var e;if(r.isArray(b))r.each(b,function(b,e){c||tb.test(a)?d(a,e):xb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)xb(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(r.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)xb(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(f
 unction(){var a=this.type;return this.name&&!r(this).is(":disabled")&&wb.test(this.nodeName)&&!vb.test(a)&&(this.checked||!ha.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:r.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(ub,"\r\n")}}):{name:b.name,value:c.replace(ub,"\r\n")}}).get()}});var yb=/%20/g,zb=/#.*$/,Ab=/([?&])_=[^&]*/,Bb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Cb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Db=/^(?:GET|HEAD)$/,Eb=/^\/\//,Fb={},Gb={},Hb="*/".concat("*"),Ib=d.createElement("a");Ib.href=qb.href;function Jb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(K)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Kb(a,b,c,d){var e={},f=a===Gb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)
 }),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Lb(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Mb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Nb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}
 if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qb.href,type:"GET",isLocal:Cb.test(qb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Hb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Lb(Lb(a,r.ajaxSettings),b):Lb(r.ajaxSettings,a)},ajaxPrefilter:Jb(Fb),ajaxTransport:Jb(Gb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.co
 ntext&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Bb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||qb.href)+"").replace(Eb,qb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(K)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Ib.protocol+"//"+Ib.host!=j.protocol+"//"+j.host}c
 atch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Kb(Fb,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Db.test(o.type),f=o.url.replace(zb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(yb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(sb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Ab,""),n=(sb.test(f)?"&":"?")+"_="+rb++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Hb+"; q=0.01":""):o.accepts
 ["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Kb(Gb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Mb(o,y,d)),v=Nb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":
 "ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.
 length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Ob={0:200,1223:204},Pb=r.ajaxSettings.xhr();o.cors=!!Pb&&"withCredentials"in Pb,o.ajax=Pb=!!Pb,r.ajaxTransport(function(b){var c,d;if(o.cors||Pb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);
 c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Ob[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.c
 rossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Qb=[],Rb=/(=)\?(?=&|$)|\?\?/;r.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Qb.pop()||r.expando+"_"+rb++;return this[a]=!0,a}}),r.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Rb.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Rb.test(b.data)&&"data");if(h||"jsonp"===b.dataTypes[0])return e=b.jsonpCallback=r.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Rb,"$1"+e):b.jsonp!==!1&&(b.url+=(sb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||r.error(e+" was not called"),g[0]},b.dataTypes[0]="json",
 f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?r(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Qb.push(e)),g&&r.isFunction(f)&&f(g[0]),g=f=void 0}),"script"}),o.createHTMLDocument=function(){var a=d.implementation.createHTMLDocument("").body;return a.innerHTML="<form></form><form></form>",2===a.childNodes.length}(),r.parseHTML=function(a,b,c){if("string"!=typeof a)return[];"boolean"==typeof b&&(c=b,b=!1);var e,f,g;return b||(o.createHTMLDocument?(b=d.implementation.createHTMLDocument(""),e=b.createElement("base"),e.href=d.location.href,b.head.appendChild(e)):b=d),f=B.exec(a),g=!c&&[],f?[b.createElement(f[1])]:(f=oa([a],b,g),g&&g.length&&r(g).remove(),r.merge([],f.childNodes))},r.fn.load=function(a,b,c){var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=r.trim(a.slice(h)),a=a.slice(0,h)),r.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&r.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.ht
 ml(d?r("<div>").append(r.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},r.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){r.fn[b]=function(a){return this.on(b,a)}}),r.expr.pseudos.animated=function(a){return r.grep(r.timers,function(b){return a===b.elem}).length};function Sb(a){return r.isWindow(a)?a:9===a.nodeType&&a.defaultView}r.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=r.css(a,"position"),l=r(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=r.css(a,"top"),i=r.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),r.isFunction(b)&&(b=b.call(a,c,r.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},r.fn.extend({offset:function(a){if(arguments.length)return void 0===a?
 this:this.each(function(b){r.offset.setOffset(this,a,b)});var b,c,d,e,f=this[0];if(f)return f.getClientRects().length?(d=f.getBoundingClientRect(),d.width||d.height?(e=f.ownerDocument,c=Sb(e),b=e.documentElement,{top:d.top+c.pageYOffset-b.clientTop,left:d.left+c.pageXOffset-b.clientLeft}):d):{top:0,left:0}},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===r.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),r.nodeName(a[0],"html")||(d=a.offset()),d={top:d.top+r.css(a[0],"borderTopWidth",!0),left:d.left+r.css(a[0],"borderLeftWidth",!0)}),{top:b.top-d.top-r.css(c,"marginTop",!0),left:b.left-d.left-r.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===r.css(a,"position"))a=a.offsetParent;return a||pa})}}),r.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;r.fn[a]=function(d){return S(this,function(a,d,e){va
 r f=Sb(a);return void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),r.each(["top","left"],function(a,b){r.cssHooks[b]=Na(o.pixelPosition,function(a,c){if(c)return c=Ma(a,b),Ka.test(c)?r(a).position()[b]+"px":c})}),r.each({Height:"height",Width:"width"},function(a,b){r.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){r.fn[d]=function(e,f){var g=arguments.length&&(c||"boolean"!=typeof e),h=c||(e===!0||f===!0?"margin":"border");return S(this,function(b,c,e){var f;return r.isWindow(b)?0===d.indexOf("outer")?b["inner"+a]:b.document.documentElement["client"+a]:9===b.nodeType?(f=b.documentElement,Math.max(b.body["scroll"+a],f["scroll"+a],b.body["offset"+a],f["offset"+a],f["client"+a])):void 0===e?r.css(b,c,h):r.style(b,c,e,h)},b,g?e:void 0,g)}})}),r.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate
 :function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),r.parseJSON=JSON.parse,"function"==typeof define&&define.amd&&define("jquery",[],function(){return r});var Tb=a.jQuery,Ub=a.$;return r.noConflict=function(b){return a.$===r&&(a.$=Ub),b&&a.jQuery===r&&(a.jQuery=Tb),r},b||(a.jQuery=a.$=r),r});
+</script>
+
+  <script>
+!function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
+(function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:"0"<=a&&a<="7"?parseInt(e.substring(1),8):a==="u"||a==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return e==="\\"||e==="-"||e==="]"||e==="^"?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a=
+b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,f=b.length;a<f;++a){var h=b[a];if(/\\[bdsw]/i.test(h))c.push(h);else{var h=d(h),l;a+2<f&&"-"===b[a+1]?(l=d(b[a+2]),a+=2):l=h;e.push([h,l]);l<65||h>122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;a<e.length;++a)h=e[a],h[0]<=f[1]+1?f[1]=Math.max(f[1],h[1]):b.push(f=h);for(a=0;a<b.length;++a)h=b[a],c.push(g(h[0])),
+h[1]>h[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f<c;++f){var l=a[f];l==="("?++h:"\\"===l.charAt(0)&&(l=+l.substring(1))&&(l<=h?d[l]=-1:a[f]=g(l))}for(f=1;f<d.length;++f)-1===d[f]&&(d[f]=++x);for(h=f=0;f<c;++f)l=a[f],l==="("?(++h,d[h]||(a[f]="(?:")):"\\"===l.charAt(0)&&(l=+l.substring(1))&&l<=h&&
+(a[f]="\\"+d[l]);for(f=0;f<c;++f)"^"===a[f]&&"^"!==a[f+1]&&(a[f]="");if(e.ignoreCase&&m)for(f=0;f<c;++f)l=a[f],e=l.charAt(0),l.length>=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k<c;++k){var i=a[k];if(i.ignoreCase)j=!0;else if(/[a-z]/i.test(i.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){m=!0;j=!1;break}}for(var r={b:8,t:9,n:10,v:11,
+f:12,r:13},n=[],k=0,c=a.length;k<c;++k){i=a[k];if(i.global||i.multiline)throw Error(""+i);n.push("(?:"+s(i)+")")}return RegExp(n.join("|"),j?"gi":"g")}function T(a,d){function g(a){var c=a.nodeType;if(c==1){if(!b.test(a.className)){for(c=a.firstChild;c;c=c.nextSibling)g(c);c=a.nodeName

<TRUNCATED>

[10/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.svg
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.svg b/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.svg
new file mode 100644
index 0000000..d9f2a21
--- /dev/null
+++ b/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.svg
@@ -0,0 +1,403 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg">
+<defs >
+<font id="DroidSans" horiz-adv-x="1062" ><font-face
+    font-family="Droid Sans"
+    units-per-em="2048"
+    panose-1="2 11 6 6 3 8 4 2 2 4"
+    ascent="1907"
+    descent="-492"
+    alphabetic="0" />
+<glyph unicode=" " glyph-name="space" horiz-adv-x="532" />
+<glyph unicode="!" glyph-name="exclam" horiz-adv-x="551" d="M336 414H215L164 1462H387L336 414ZM147 111Q147 149 157 175T184 218T224 242T274 250Q300 250 323 243T364 219T391 176T401 111Q401 74 391 48T364 4T324 -21T274 -29Q247 -29 224 -21T184 4T157
+47T147 111Z" />
+<glyph unicode="&quot;" glyph-name="quotedbl" horiz-adv-x="823" d="M330 1462L289 934H174L133 1462H330ZM690 1462L649 934H535L494 1462H690Z" />
+<glyph unicode="#" glyph-name="numbersign" horiz-adv-x="1323" d="M983 893L920 565H1200V428H893L811 0H664L748 428H457L375 0H231L309 428H51V565H336L401 893H127V1030H426L508 1462H655L573 1030H866L950 1462H1094L1010 1030H1272V893H983ZM483 565H774L838
+893H547L483 565Z" />
+<glyph unicode="$" glyph-name="dollar" horiz-adv-x="1128" d="M985 446Q985 376 960 319T889 220T776 151T625 111V-119H487V102Q437 102 386 106T287 120T197 142T123 172V344Q156 328 199 312T291 282T389 261T487 252V686Q398 716 333 749T224 824T160 922T139
+1051Q139 1118 163 1173T233 1270T343 1338T487 1374V1554H625V1378Q725 1373 809 1352T961 1300L895 1155Q839 1180 769 1200T625 1227V805Q713 774 780 741T893 667T962 572T985 446ZM809 446Q809 479 799 506T768 556T711 598T625 635V262Q718 276 763 325T809
+446ZM315 1049Q315 1013 323 985T352 933T405 890T487 854V1223Q398 1207 357 1163T315 1049Z" />
+<glyph unicode="%" glyph-name="percent" horiz-adv-x="1690" d="M250 1026Q250 861 285 779T401 696Q557 696 557 1026Q557 1354 401 1354Q321 1354 286 1273T250 1026ZM705 1026Q705 918 687 832T632 687T538 597T401 565Q328 565 272 596T178 687T121 832T102
+1026Q102 1134 119 1219T173 1362T266 1452T401 1483Q476 1483 532 1452T627 1363T685 1219T705 1026ZM1133 440Q1133 275 1168 193T1284 111Q1440 111 1440 440Q1440 768 1284 768Q1204 768 1169 687T1133 440ZM1587 440Q1587 332 1570 247T1515 102T1421 12T1284
+-20Q1210 -20 1154 11T1061 102T1004 246T985 440Q985 548 1002 633T1056 776T1149 866T1284 897Q1359 897 1415 866T1510 777T1567 633T1587 440ZM1331 1462L520 0H362L1174 1462H1331Z" />
+<glyph unicode="&amp;" glyph-name="ampersand" horiz-adv-x="1438" d="M422 1165Q422 1131 430 1099T454 1034T497 968T559 897Q618 932 661 963T732 1026T774 1093T788 1169Q788 1205 776 1235T740 1288T683 1322T608 1335Q522 1335 472 1291T422 1165ZM557
+141Q615 141 664 152T755 184T833 231T901 289L514 696Q462 663 422 632T355 564T313 486T299 387Q299 333 316 288T367 210T448 159T557 141ZM109 381Q109 459 129 520T187 631T281 724T408 809Q377 845 347 883T295 965T258 1058T244 1165Q244 1240 269 1299T341
+1400T457 1463T614 1485Q697 1485 762 1464T873 1401T943 1300T967 1165Q967 1101 942 1047T875 946T779 860T664 784L1016 412Q1043 441 1064 471T1103 535T1133 608T1157 694H1341Q1326 628 1306 573T1259 468T1200 377T1128 293L1405 0H1180L1012 172Q963 127
+915 92T813 32T697 -6T557 -20Q452 -20 369 6T228 84T140 210T109 381Z" />
+<glyph unicode="&apos;" glyph-name="quotesingle" horiz-adv-x="463" d="M330 1462L289 934H174L133 1462H330Z" />
+<glyph unicode="(" glyph-name="parenleft" horiz-adv-x="616" d="M82 561Q82 686 100 807T155 1043T248 1263T383 1462H555Q415 1269 343 1038T270 563Q270 444 288 326T342 95T431 -124T553 -324H383Q305 -234 249 -131T155 84T100 317T82 561Z" />
+<glyph unicode=")" glyph-name="parenright" horiz-adv-x="616" d="M535 561Q535 437 517 317T462 85T368 -131T233 -324H63Q132 -230 185 -124T274 95T328 326T346 563Q346 807 274 1038T61 1462H233Q311 1369 367 1264T461 1044T517 808T535 561Z" />
+<glyph unicode="*" glyph-name="asterisk" horiz-adv-x="1128" d="M664 1556L621 1163L1018 1274L1044 1081L666 1053L911 727L733 631L557 989L399 631L215 727L457 1053L82 1081L111 1274L502 1163L459 1556H664Z" />
+<glyph unicode="+" glyph-name="plus" horiz-adv-x="1128" d="M489 647H102V797H489V1186H639V797H1026V647H639V262H489V647Z" />
+<glyph unicode="," glyph-name="comma" horiz-adv-x="512" d="M362 238L377 215Q363 161 344 100T301 -23T252 -146T201 -264H63Q78 -203 92 -137T120 -6T145 122T164 238H362Z" />
+<glyph unicode="-" glyph-name="hyphen" horiz-adv-x="659" d="M82 465V633H578V465H82Z" />
+<glyph unicode="." glyph-name="period" horiz-adv-x="549" d="M147 111Q147 149 157 175T184 218T224 242T274 250Q300 250 323 243T364 219T391 176T401 111Q401 74 391 48T364 4T324 -21T274 -29Q247 -29 224 -21T184 4T157 47T147 111Z" />
+<glyph unicode="/" glyph-name="slash" horiz-adv-x="764" d="M743 1462L199 0H20L565 1462H743Z" />
+<glyph unicode="0" glyph-name="zero" horiz-adv-x="1128" d="M1032 733Q1032 556 1007 416T925 179T779 31T563 -20Q445 -20 358 31T213 179T127 416T98 733Q98 910 123 1050T204 1286T348 1434T563 1485Q682 1485 770 1435T916 1288T1003 1051T1032 733ZM283
+733Q283 583 298 471T346 285T432 173T563 135Q640 135 694 172T782 283T832 469T848 733Q848 883 833 995T783 1181T694 1292T563 1329Q486 1329 433 1292T346 1181T298 995T283 733Z" />
+<glyph unicode="1" glyph-name="one" horiz-adv-x="1128" d="M711 0H535V913Q535 956 535 1005T537 1102T540 1195T543 1274Q526 1256 513 1243T487 1218T458 1193T422 1161L274 1040L178 1163L561 1462H711V0Z" />
+<glyph unicode="2" glyph-name="two" horiz-adv-x="1128" d="M1008 0H96V156L446 537Q521 618 580 685T680 816T744 944T766 1085Q766 1144 749 1189T701 1265T626 1313T530 1329Q435 1329 359 1291T213 1192L111 1311Q151 1347 197 1378T296 1433T408 1469T532
+1483Q628 1483 705 1456T837 1379T920 1256T950 1092Q950 1007 924 930T851 779T740 629T600 473L319 174V166H1008V0Z" />
+<glyph unicode="3" glyph-name="three" horiz-adv-x="1128" d="M961 1120Q961 1047 938 987T874 883T774 811T645 770V764Q822 742 914 652T1006 416Q1006 320 974 240T875 102T708 12T469 -20Q360 -20 264 -3T82 59V229Q169 183 270 158T465 133Q557 133 624
+153T734 210T798 301T819 422Q819 490 793 538T717 618T598 665T438 680H305V831H438Q519 831 582 851T687 908T752 996T774 1108Q774 1160 756 1201T705 1270T626 1314T524 1329Q417 1329 336 1296T180 1208L88 1333Q126 1364 172 1391T274 1438T391 1471T524
+1483Q632 1483 713 1456T850 1381T933 1266T961 1120Z" />
+<glyph unicode="4" glyph-name="four" horiz-adv-x="1128" d="M1087 328H874V0H698V328H23V487L686 1470H874V494H1087V328ZM698 494V850Q698 906 699 967T703 1087T707 1197T711 1282H702Q695 1262 685 1238T662 1189T636 1141T612 1102L201 494H698Z" />
+<glyph unicode="5" glyph-name="five" horiz-adv-x="1128" d="M545 897Q644 897 729 870T878 788T978 654T1014 469Q1014 355 980 264T879 110T714 14T487 -20Q436 -20 387 -15T292 -1T205 24T131 59V231Q164 208 208 190T302 160T400 142T492 135Q571 135 633
+153T738 211T804 309T827 449Q827 592 739 667T483 743Q456 743 425 741T362 734T302 726T252 717L162 774L217 1462H907V1296H375L336 877Q368 883 420 890T545 897Z" />
+<glyph unicode="6" glyph-name="six" horiz-adv-x="1128" d="M113 625Q113 730 123 834T160 1033T233 1211T350 1353T520 1448T752 1483Q771 1483 794 1482T840 1479T885 1473T924 1464V1309Q889 1321 845 1327T758 1333Q668 1333 600 1312T481 1251T398 1158T343
+1039T312 899T299 745H311Q331 781 359 812T426 866T511 902T618 915Q713 915 790 886T921 799T1004 660T1034 471Q1034 357 1003 266T914 112T774 14T590 -20Q490 -20 403 19T251 138T150 339T113 625ZM588 133Q648 133 697 153T783 215T838 320T858 471Q858 541
+842 596T792 691T710 751T594 772Q527 772 472 749T377 688T317 602T295 506Q295 439 313 373T368 253T460 167T588 133Z" />
+<glyph unicode="7" glyph-name="seven" horiz-adv-x="1128" d="M281 0L844 1296H90V1462H1030V1317L475 0H281Z" />
+<glyph unicode="8" glyph-name="eight" horiz-adv-x="1128" d="M565 1485Q649 1485 723 1463T854 1397T944 1287T977 1133Q977 1066 957 1012T902 915T819 837T715 774Q773 743 828 705T927 620T997 513T1024 381Q1024 289 991 215T897 88T752 8T565 -20Q455 -20
+370 7T226 84T137 208T106 373Q106 448 128 508T189 616T279 701T389 766Q340 797 297 833T223 915T173 1014T154 1135Q154 1222 187 1287T278 1397T409 1463T565 1485ZM285 371Q285 318 301 274T351 198T437 149T561 131Q631 131 684 148T774 198T828 277T846
+379Q846 431 827 473T771 551T683 619T569 682L539 696Q413 636 349 559T285 371ZM563 1333Q457 1333 395 1280T332 1126Q332 1069 349 1028T398 955T472 898T567 848Q615 870 657 896T731 955T781 1030T799 1126Q799 1227 736 1280T563 1333Z" />
+<glyph unicode="9" glyph-name="nine" horiz-adv-x="1128" d="M1028 838Q1028 733 1018 629T981 429T908 252T791 109T621 15T389 -20Q370 -20 347 -19T301 -16T256 -10T217 -2V154Q252 141 296 135T383 129Q518 129 605 176T743 303T815 491T842 717H829Q809
+681 781 650T715 596T629 560T522 547Q427 547 350 576T219 663T136 802T106 991Q106 1105 137 1196T226 1351T366 1449T551 1483Q652 1483 739 1444T890 1325T991 1124T1028 838ZM553 1329Q493 1329 444 1309T358 1247T303 1142T283 991Q283 921 299 866T349 771T431
+711T547 690Q615 690 670 713T764 774T824 860T846 956Q846 1023 828 1089T773 1209T681 1296T553 1329Z" />
+<glyph unicode=":" glyph-name="colon" horiz-adv-x="549" d="M147 111Q147 149 157 175T184 218T224 242T274 250Q300 250 323 243T364 219T391 176T401 111Q401 74 391 48T364 4T324 -21T274 -29Q247 -29 224 -21T184 4T157 47T147 111ZM147 987Q147 1026 157
+1052T184 1095T224 1119T274 1126Q300 1126 323 1119T364 1096T391 1053T401 987Q401 950 391 924T364 881T324 856T274 848Q247 848 224 856T184 881T157 924T147 987Z" />
+<glyph unicode=";" glyph-name="semicolon" horiz-adv-x="549" d="M362 238L377 215Q363 161 344 100T301 -23T252 -146T201 -264H63Q78 -203 92 -137T120 -6T145 122T164 238H362ZM147 987Q147 1026 157 1052T184 1095T224 1119T274 1126Q300 1126 323 1119T364
+1096T391 1053T401 987Q401 950 391 924T364 881T324 856T274 848Q247 848 224 856T184 881T157 924T147 987Z" />
+<glyph unicode="&lt;" glyph-name="less" horiz-adv-x="1128" d="M1026 238L102 662V764L1026 1245V1085L291 721L1026 399V238Z" />
+<glyph unicode="=" glyph-name="equal" horiz-adv-x="1128" d="M102 852V1001H1026V852H102ZM102 442V592H1026V442H102Z" />
+<glyph unicode="&gt;" glyph-name="greater" horiz-adv-x="1128" d="M102 399L838 721L102 1085V1245L1026 764V662L102 238V399Z" />
+<glyph unicode="?" glyph-name="question" horiz-adv-x="872" d="M281 414V451Q281 508 288 554T315 640T368 718T451 799Q499 840 533 873T588 941T620 1015T631 1108Q631 1156 616 1195T573 1263T502 1307T403 1323Q320 1323 245 1297T100 1237L37 1382Q118
+1424 212 1453T403 1483Q496 1483 570 1458T697 1384T777 1267T805 1110Q805 1043 792 991T751 893T684 806T590 717Q538 672 505 639T453 574T427 509T420 432V414H281ZM233 111Q233 149 243 175T270 218T310 242T360 250Q386 250 409 243T450 219T477 176T487
+111Q487 74 477 48T450 4T410 -21T360 -29Q333 -29 310 -21T270 4T243 47T233 111Z" />
+<glyph unicode="@" glyph-name="at" horiz-adv-x="1774" d="M1665 731Q1665 669 1656 607T1628 488T1581 383T1514 298T1428 242T1321 221Q1276 221 1240 236T1177 276T1135 333T1112 401H1108Q1090 364 1063 331T1001 274T921 235T823 221Q746 221 687 249T586
+327T524 449T502 606Q502 707 531 791T616 936T751 1031T928 1065Q973 1065 1018 1061T1104 1050T1179 1035T1237 1018L1214 602Q1213 580 1213 567T1212 545T1212 533T1212 526Q1212 473 1222 439T1250 385T1288 358T1333 350Q1379 350 1414 380T1472 463T1508
+585T1520 733Q1520 875 1477 985T1358 1172T1178 1287T950 1327Q781 1327 652 1272T436 1117T303 881T258 582Q258 431 297 314T413 117T603 -4T864 -45Q925 -45 984 -38T1099 -19T1205 8T1298 41V-100Q1212 -138 1104 -160T866 -182Q687 -182 547 -131T309 17T160
+255T109 575Q109 763 168 925T336 1207T601 1394T950 1462Q1106 1462 1237 1412T1463 1267T1612 1037T1665 731ZM662 602Q662 469 712 410T848 350Q903 350 942 372T1006 436T1044 535T1061 662L1075 915Q1047 923 1009 929T928 936Q854 936 804 907T722 831T676
+724T662 602Z" />
+<glyph unicode="A" glyph-name="A" horiz-adv-x="1245" d="M1055 0L895 453H350L188 0H0L537 1468H707L1245 0H1055ZM836 618L688 1042Q682 1060 674 1086T656 1142T638 1204T621 1268Q614 1237 605 1204T587 1141T570 1085T555 1042L410 618H836Z" />
+<glyph unicode="B" glyph-name="B" horiz-adv-x="1272" d="M199 1462H598Q726 1462 823 1443T986 1380T1085 1266T1118 1092Q1118 1030 1099 976T1042 881T951 813T827 776V766Q896 754 956 732T1062 670T1133 570T1159 424Q1159 324 1127 246T1033 113T883 29T684
+0H199V1462ZM385 842H629Q713 842 770 857T862 901T912 975T928 1079Q928 1199 851 1251T608 1303H385V842ZM385 686V158H651Q739 158 798 178T894 234T947 320T963 432Q963 488 947 535T893 615T793 667T639 686H385Z" />
+<glyph unicode="C" glyph-name="C" horiz-adv-x="1235" d="M793 1319Q686 1319 599 1279T451 1162T356 977T322 731Q322 590 351 481T440 296T587 182T793 143Q882 143 962 160T1120 201V39Q1081 24 1042 13T961 -6T870 -16T762 -20Q598 -20 478 34T280 187T163
+425T125 733Q125 899 168 1037T296 1274T506 1428T793 1483Q901 1483 999 1461T1176 1397L1098 1241Q1035 1273 961 1296T793 1319Z" />
+<glyph unicode="D" glyph-name="D" horiz-adv-x="1401" d="M1276 745Q1276 560 1228 421T1089 188T866 47T565 0H199V1462H606Q759 1462 883 1416T1094 1280T1228 1055T1276 745ZM1079 739Q1079 885 1046 991T950 1167T795 1269T586 1303H385V160H547Q811 160
+945 306T1079 739Z" />
+<glyph unicode="E" glyph-name="E" horiz-adv-x="1081" d="M958 0H199V1462H958V1298H385V846H920V684H385V164H958V0Z" />
+<glyph unicode="F" glyph-name="F" horiz-adv-x="1006" d="M385 0H199V1462H958V1298H385V782H920V618H385V0Z" />
+<glyph unicode="G" glyph-name="G" horiz-adv-x="1413" d="M782 772H1266V55Q1211 37 1155 23T1040 0T916 -15T776 -20Q619 -20 498 32T294 182T168 419T125 733Q125 905 172 1044T311 1280T535 1430T840 1483Q951 1483 1053 1461T1243 1397L1171 1235Q1135 1252
+1094 1267T1008 1293T918 1312T825 1319Q703 1319 609 1279T452 1162T355 977T322 731Q322 601 349 493T437 307T592 186T821 143Q865 143 901 145T969 152T1027 161T1081 172V608H782V772Z" />
+<glyph unicode="H" glyph-name="H" horiz-adv-x="1436" d="M1237 0H1051V682H385V0H199V1462H385V846H1051V1462H1237V0Z" />
+<glyph unicode="I" glyph-name="I" horiz-adv-x="694" d="M612 0H82V102L254 143V1319L82 1360V1462H612V1360L440 1319V143L612 102V0Z" />
+<glyph unicode="J" glyph-name="J" horiz-adv-x="555" d="M-29 -389Q-80 -389 -118 -383T-184 -365V-205Q-150 -214 -111 -219T-27 -225Q10 -225 47 -216T115 -181T165 -112T184 0V1462H371V20Q371 -85 342 -162T260 -289T134 -364T-29 -389Z" />
+<glyph unicode="K" glyph-name="K" horiz-adv-x="1186" d="M1186 0H975L524 698L385 584V0H199V1462H385V731L506 899L958 1462H1167L647 825L1186 0Z" />
+<glyph unicode="L" glyph-name="L" horiz-adv-x="1006" d="M199 0V1462H385V166H958V0H199Z" />
+<glyph unicode="M" glyph-name="M" horiz-adv-x="1782" d="M803 0L360 1280H352Q358 1206 362 1133Q366 1070 368 1001T371 874V0H199V1462H475L887 270H893L1307 1462H1583V0H1397V887Q1397 939 1399 1006T1404 1134Q1408 1205 1411 1278H1403L956 0H803Z" />
+<glyph unicode="N" glyph-name="N" horiz-adv-x="1493" d="M1294 0H1079L360 1210H352Q358 1133 362 1057Q366 992 368 921T371 793V0H199V1462H412L1128 258H1135Q1132 334 1128 408Q1127 440 1126 473T1123 540T1121 605T1120 662V1462H1294V0Z" />
+<glyph unicode="O" glyph-name="O" horiz-adv-x="1520" d="M1393 733Q1393 564 1353 425T1232 187T1034 34T760 -20Q597 -20 478 34T280 187T163 425T125 735Q125 905 163 1043T280 1280T479 1431T762 1485Q917 1485 1034 1432T1232 1280T1352 1043T1393 733ZM322
+733Q322 596 348 487T427 301T563 184T760 143Q874 143 956 183T1092 300T1171 486T1196 733Q1196 871 1171 980T1093 1164T958 1280T762 1321Q648 1321 565 1281T428 1165T348 980T322 733Z" />
+<glyph unicode="P" glyph-name="P" horiz-adv-x="1180" d="M1075 1034Q1075 943 1048 859T957 711T791 608T535 569H385V0H199V1462H561Q695 1462 792 1434T952 1351T1045 1216T1075 1034ZM385 727H514Q607 727 676 743T791 794T860 886T883 1024Q883 1166 801
+1234T545 1303H385V727Z" />
+<glyph unicode="Q" glyph-name="Q" horiz-adv-x="1518" d="M1393 733Q1393 602 1369 489T1297 286T1178 129T1014 25Q1057 -69 1125 -140T1284 -272L1163 -414Q1060 -341 974 -242T836 -16Q819 -18 799 -19T760 -20Q597 -20 478 34T280 187T163 425T125 735Q125
+905 163 1043T280 1280T479 1431T762 1485Q917 1485 1034 1432T1232 1280T1352 1043T1393 733ZM322 733Q322 596 348 487T427 301T563 184T760 143Q874 143 956 183T1092 300T1171 486T1196 733Q1196 871 1171 980T1093 1164T958 1280T762 1321Q648 1321 565 1281T428
+1165T348 980T322 733Z" />
+<glyph unicode="R" glyph-name="R" horiz-adv-x="1208" d="M385 604V0H199V1462H555Q821 1462 948 1359T1075 1047Q1075 960 1051 895T986 784T893 706T786 655L1184 0H965L614 604H385ZM385 762H549Q639 762 702 779T805 831T864 917T883 1038Q883 1110 863 1160T801
+1242T696 1288T545 1303H385V762Z" />
+<glyph unicode="S" glyph-name="S" horiz-adv-x="1063" d="M969 391Q969 294 935 218T836 88T680 8T473 -20Q362 -20 266 -3T104 49V227Q138 211 181 196T273 168T372 149T473 141Q633 141 709 201T786 373Q786 427 772 467T721 540T623 605T469 674Q380 709 315
+750T207 844T144 962T123 1112Q123 1200 155 1269T245 1385T383 1458T561 1483Q680 1483 775 1461T944 1403L877 1247Q812 1276 730 1297T559 1319Q437 1319 370 1263T303 1110Q303 1053 318 1012T368 937T460 874T602 811Q693 775 761 737T876 651T945 540T969
+391Z" />
+<glyph unicode="T" glyph-name="T" horiz-adv-x="1063" d="M625 0H438V1298H20V1462H1042V1298H625V0Z" />
+<glyph unicode="U" glyph-name="U" horiz-adv-x="1430" d="M1245 1464V516Q1245 402 1212 304T1113 134T946 21T709 -20Q581 -20 483 18T319 128T218 298T184 520V1462H371V510Q371 335 457 239T719 143Q808 143 872 170T977 246T1038 363T1059 512V1464H1245Z" />
+<glyph unicode="V" glyph-name="V" horiz-adv-x="1163" d="M965 1462H1163L674 0H487L0 1462H197L492 535Q521 444 542 360T580 201Q595 275 618 359T672 541L965 1462Z" />
+<glyph unicode="W" glyph-name="W" horiz-adv-x="1810" d="M809 1462H1006L1235 606Q1250 550 1264 494T1291 386T1313 286T1329 201Q1333 239 1339 284T1353 378T1370 479T1391 580L1591 1462H1790L1423 0H1235L981 938Q967 989 954 1043T930 1144Q918 1199 907
+1251Q896 1200 885 1145Q875 1098 863 1042T836 932L594 0H406L20 1462H217L440 573Q452 527 462 478T480 379T496 285T508 201Q513 238 520 287T538 390T559 499T584 604L809 1462Z" />
+<glyph unicode="X" glyph-name="X" horiz-adv-x="1120" d="M1120 0H909L555 635L188 0H0L453 764L31 1462H229L561 903L895 1462H1085L664 770L1120 0Z" />
+<glyph unicode="Y" glyph-name="Y" horiz-adv-x="1079" d="M539 723L879 1462H1079L633 569V0H446V559L0 1462H203L539 723Z" />
+<glyph unicode="Z" glyph-name="Z" horiz-adv-x="1104" d="M1022 0H82V145L793 1296H102V1462H1001V1317L291 166H1022V0Z" />
+<glyph unicode="[" glyph-name="bracketleft" horiz-adv-x="621" d="M569 -324H164V1462H569V1313H346V-174H569V-324Z" />
+<glyph unicode="\" glyph-name="backslash" horiz-adv-x="764" d="M201 1462L745 0H567L23 1462H201Z" />
+<glyph unicode="]" glyph-name="bracketright" horiz-adv-x="621" d="M51 -174H274V1313H51V1462H457V-324H51V-174Z" />
+<glyph unicode="^" glyph-name="asciicircum" horiz-adv-x="1090" d="M41 549L500 1473H602L1049 549H888L551 1284L202 549H41Z" />
+<glyph unicode="_" glyph-name="underscore" horiz-adv-x="842" d="M846 -324H-4V-184H846V-324Z" />
+<glyph unicode="`" glyph-name="grave" horiz-adv-x="1182" d="M786 1241H666Q631 1269 590 1310T511 1396T441 1480T393 1548V1569H612Q628 1535 649 1495T694 1414T741 1335T786 1268V1241Z" />
+<glyph unicode="a" glyph-name="a" horiz-adv-x="1087" d="M793 0L756 152H748Q715 107 682 75T610 21T523 -10T412 -20Q343 -20 285 -1T185 59T118 161T94 307Q94 471 209 559T561 655L745 662V731Q745 798 731 843T689 915T621 955T528 967Q445 967 374 943T236
+885L172 1022Q246 1062 337 1090T528 1118Q630 1118 704 1098T827 1033T900 919T924 752V0H793ZM459 127Q520 127 572 146T662 203T721 300T743 438V537L600 530Q510 526 449 510T352 466T299 397T283 305Q283 213 331 170T459 127Z" />
+<glyph unicode="b" glyph-name="b" horiz-adv-x="1200" d="M670 1118Q764 1118 841 1082T972 975T1057 797T1087 551Q1087 410 1057 304T973 125T841 17T670 -20Q611 -20 563 -7T477 27T409 78T356 139H344L307 0H174V1556H356V1180Q356 1145 355 1106T352 1032Q350
+992 348 954H356Q379 989 408 1019T475 1071T562 1105T670 1118ZM635 967Q555 967 502 942T416 864T370 734T356 551Q356 450 369 372T415 240T502 159T637 131Q772 131 835 240T899 553Q899 761 836 864T635 967Z" />
+<glyph unicode="c" glyph-name="c" horiz-adv-x="948" d="M594 -20Q493 -20 405 11T252 111T150 286T113 543Q113 700 151 809T255 987T411 1087T602 1118Q680 1118 754 1101T879 1059L825 905Q802 915 774 924T716 941T657 953T602 958Q445 958 373 858T301 545Q301
+334 373 237T594 139Q675 139 740 157T860 201V39Q806 10 745 -5T594 -20Z" />
+<glyph unicode="d" glyph-name="d" horiz-adv-x="1200" d="M852 147H844Q822 113 793 83T725 29T638 -7T530 -20Q437 -20 360 16T228 123T143 301T113 547Q113 688 143 794T228 973T360 1081T530 1118Q589 1118 637 1105T723 1070T792 1019T844 958H856Q853 992
+850 1023Q848 1049 846 1076T844 1120V1556H1026V0H879L852 147ZM565 131Q641 131 693 154T778 224T826 341T844 506V547Q844 648 831 726T785 858T698 939T563 967Q428 967 365 858T301 545Q301 336 364 234T565 131Z" />
+<glyph unicode="e" glyph-name="e" horiz-adv-x="1096" d="M608 -20Q498 -20 407 17T251 125T149 301T113 541Q113 677 146 784T239 965T382 1079T567 1118Q666 1118 745 1083T879 983T963 828T993 627V514H301Q306 321 382 230T610 139Q661 139 704 144T788 158T867
+182T944 215V53Q904 34 866 20T787 -3T703 -16T608 -20ZM563 967Q449 967 383 889T305 662H797Q797 730 784 786T742 883T669 945T563 967Z" />
+<glyph unicode="f" glyph-name="f" horiz-adv-x="674" d="M651 961H406V0H223V961H29V1036L223 1104V1200Q223 1307 245 1377T310 1490T415 1549T555 1567Q614 1567 663 1556T752 1530L705 1389Q674 1400 638 1408T561 1417Q521 1417 492 1408T444 1374T416 1309T406
+1202V1098H651V961Z" />
+<glyph unicode="g" glyph-name="g" horiz-adv-x="1061" d="M1020 1098V985L823 958Q851 923 870 869T889 745Q889 669 866 605T795 493T677 420T514 393Q492 393 470 393T434 397Q417 387 401 375T371 346T349 310T340 266Q340 239 352 223T384 197T433 185T492
+182H668Q761 182 825 159T929 95T988 1T1006 -115Q1006 -203 974 -273T874 -391T705 -466T463 -492Q356 -492 276 -471T143 -410T64 -314T37 -186Q37 -126 56 -81T109 -2T185 52T276 84Q234 103 207 144T180 238Q180 299 212 343T313 430Q270 448 235 479T175 551T137
+640T123 739Q123 828 148 898T222 1017T344 1092T514 1118Q551 1118 590 1113T657 1098H1020ZM209 -180Q209 -217 222 -249T264 -304T342 -340T463 -354Q649 -354 741 -297T834 -131Q834 -85 822 -56T783 -11T710 12T600 18H424Q389 18 351 10T282 -20T230 -80T209
+-180ZM301 745Q301 630 355 574T508 518Q608 518 659 573T711 748Q711 871 659 929T506 987Q407 987 354 927T301 745Z" />
+<glyph unicode="h" glyph-name="h" horiz-adv-x="1206" d="M860 0V707Q860 837 808 902T643 967Q562 967 507 941T419 864T371 739T356 569V0H174V1556H356V1094L348 950H358Q383 993 417 1024T493 1077T580 1108T674 1118Q857 1118 949 1023T1042 717V0H860Z" />
+<glyph unicode="i" glyph-name="i" horiz-adv-x="530" d="M356 0H174V1098H356V0ZM160 1395Q160 1455 190 1482T266 1509Q288 1509 307 1503T341 1482T364 1447T373 1395Q373 1337 342 1309T266 1280Q221 1280 191 1308T160 1395Z" />
+<glyph unicode="j" glyph-name="j" horiz-adv-x="530" d="M66 -492Q18 -492 -13 -485T-68 -467V-319Q-42 -329 -15 -334T47 -340Q74 -340 97 -333T137 -306T164 -254T174 -170V1098H356V-158Q356 -235 339 -296T286 -401T196 -468T66 -492ZM160 1395Q160 1455
+190 1482T266 1509Q288 1509 307 1503T341 1482T364 1447T373 1395Q373 1337 342 1309T266 1280Q221 1280 191 1308T160 1395Z" />
+<glyph unicode="k" glyph-name="k" horiz-adv-x="1016" d="M342 567L477 737L770 1098H981L580 623L1008 0H799L463 504L354 422V0H174V1556H354V842L338 567H342Z" />
+<glyph unicode="l" glyph-name="l" horiz-adv-x="530" d="M356 0H174V1556H356V0Z" />
+<glyph unicode="m" glyph-name="m" horiz-adv-x="1835" d="M1489 0V707Q1489 837 1439 902T1284 967Q1211 967 1160 944T1077 875T1029 762T1014 606V0H831V707Q831 837 782 902T627 967Q550 967 498 941T415 864T370 739T356 569V0H174V1098H322L348 950H358Q382
+993 415 1024T487 1077T571 1108T662 1118Q782 1118 861 1074T979 936H987Q1013 983 1049 1017T1129 1073T1221 1107T1319 1118Q1494 1118 1582 1023T1671 717V0H1489Z" />
+<glyph unicode="n" glyph-name="n" horiz-adv-x="1206" d="M860 0V707Q860 837 808 902T643 967Q562 967 507 941T419 864T371 739T356 569V0H174V1098H322L348 950H358Q383 993 417 1024T493 1077T580 1108T674 1118Q857 1118 949 1023T1042 717V0H860Z" />
+<glyph unicode="o" glyph-name="o" horiz-adv-x="1182" d="M1069 551Q1069 414 1036 308T940 129T788 18T588 -20Q485 -20 398 18T248 128T149 307T113 551Q113 687 146 792T242 970T393 1080T594 1118Q697 1118 784 1081T934 971T1033 793T1069 551ZM301 551Q301
+342 369 237T592 131Q746 131 813 236T881 551Q881 760 813 863T590 967Q436 967 369 864T301 551Z" />
+<glyph unicode="p" glyph-name="p" horiz-adv-x="1200" d="M670 -20Q611 -20 563 -7T477 27T409 78T356 139H344Q347 105 350 74Q352 48 354 21T356 -23V-492H174V1098H322L348 950H356Q379 985 408 1015T475 1068T562 1104T670 1118Q764 1118 841 1082T972 975T1057
+797T1087 551Q1087 410 1057 304T973 125T841 17T670 -20ZM635 967Q559 967 507 944T422 874T374 757T356 592V551Q356 450 369 372T415 240T502 159T637 131Q772 131 835 240T899 553Q899 761 836 864T635 967Z" />
+<glyph unicode="q" glyph-name="q" horiz-adv-x="1200" d="M565 131Q641 131 693 154T778 224T826 341T844 506V547Q844 648 831 726T785 858T698 939T563 967Q428 967 365 858T301 545Q301 336 364 234T565 131ZM530 -20Q437 -20 360 16T228 123T143 301T113
+547Q113 688 143 794T228 973T360 1081T530 1118Q589 1118 637 1105T723 1069T791 1016T844 950H852L879 1098H1026V-492H844V-23Q844 -4 846 25T850 81Q853 113 856 147H844Q822 113 793 83T725 29T638 -7T530 -20Z" />
+<glyph unicode="r" glyph-name="r" horiz-adv-x="817" d="M649 1118Q678 1118 714 1116T776 1108L752 940Q724 945 695 948T639 952Q576 952 524 927T435 854T377 740T356 592V0H174V1098H322L344 897H352Q377 940 405 980T469 1050T549 1099T649 1118Z" />
+<glyph unicode="s" glyph-name="s" horiz-adv-x="924" d="M831 301Q831 221 802 161T719 61T587 0T414 -20Q305 -20 227 -3T90 49V215Q121 199 159 184T239 156T325 137T414 129Q479 129 524 140T598 171T640 221T653 287Q653 318 643 343T607 392T534 442T416
+498Q344 529 287 559T189 626T128 711T106 827Q106 897 133 951T211 1043T331 1099T487 1118Q584 1118 664 1097T817 1042L754 895Q689 924 621 945T481 967Q379 967 330 934T281 838Q281 803 292 777T332 728T407 682T524 629Q596 599 652 569T749 502T810 416T831
+301Z" />
+<glyph unicode="t" glyph-name="t" horiz-adv-x="694" d="M506 129Q524 129 546 131T590 136T628 143T655 150V12Q642 6 622 0T578 -10T528 -17T477 -20Q415 -20 362 -4T271 51T210 156T188 324V961H33V1042L188 1120L266 1350H371V1098H647V961H371V324Q371 227
+402 178T506 129Z" />
+<glyph unicode="u" glyph-name="u" horiz-adv-x="1206" d="M885 0L858 147H848Q823 104 789 73T713 21T626 -10T532 -20Q441 -20 372 3T257 75T188 200T164 381V1098H346V391Q346 261 399 196T563 131Q644 131 699 157T787 233T835 358T850 528V1098H1032V0H885Z" />
+<glyph unicode="v" glyph-name="v" horiz-adv-x="981" d="M375 0L0 1098H188L387 487Q398 454 413 402T443 296T470 194T487 121H494Q499 146 511 194T538 296T568 402T594 487L793 1098H981L606 0H375Z" />
+<glyph unicode="w" glyph-name="w" horiz-adv-x="1528" d="M1008 0L840 616Q836 634 830 656T818 704T806 755T793 806Q779 864 764 926H758Q744 863 731 805Q720 755 708 702T684 612L512 0H301L20 1098H211L342 514Q352 469 362 417T381 313T397 216T408 141H414Q419
+167 427 210T446 302T468 398T489 479L668 1098H864L1036 479Q1045 445 1056 399T1079 306T1099 214T1112 141H1118Q1121 167 1127 210T1143 306T1162 412T1184 514L1321 1098H1507L1223 0H1008Z" />
+<glyph unicode="x" glyph-name="x" horiz-adv-x="1024" d="M408 563L55 1098H262L512 688L762 1098H969L614 563L987 0H780L512 436L242 0H35L408 563Z" />
+<glyph unicode="y" glyph-name="y" horiz-adv-x="1001" d="M10 1098H199L414 485Q428 445 442 401T469 313T491 228T504 152H510Q515 177 526 220T550 311T578 407T604 487L803 1098H991L557 -143Q529 -224 497 -288T421 -398T320 -467T182 -492Q130 -492 92 -487T27
+-475V-330Q48 -335 80 -338T147 -342Q195 -342 230 -331T291 -297T335 -243T369 -170L426 -10L10 1098Z" />
+<glyph unicode="z" glyph-name="z" horiz-adv-x="903" d="M821 0H82V125L618 961H115V1098H803V952L279 137H821V0Z" />
+<glyph unicode="{" glyph-name="braceleft" horiz-adv-x="725" d="M500 -16Q500 -64 512 -94T546 -142T601 -166T674 -174V-324Q597 -323 532 -307T419 -255T344 -164T317 -31V303Q317 406 252 449T61 492V647Q186 647 251 690T317 836V1169Q317 1247 344 1302T418
+1392T531 1444T674 1462V1313Q634 1312 602 1306T547 1282T512 1234T500 1155V823Q500 718 441 657T266 575V563Q381 543 440 482T500 315V-16Z" />
+<glyph unicode="|" glyph-name="bar" horiz-adv-x="1128" d="M489 1556H639V-492H489V1556Z" />
+<glyph unicode="}" glyph-name="braceright" horiz-adv-x="725" d="M225 315Q225 421 284 482T459 563V575Q344 595 285 656T225 823V1155Q225 1203 213 1233T179 1281T124 1305T51 1313V1462Q128 1461 193 1445T306 1393T381 1302T408 1169V836Q408 784 424 748T473
+690T554 657T664 647V492Q539 492 474 449T408 303V-31Q408 -109 381 -164T307 -254T194 -306T51 -324V-174Q91 -173 123 -167T178 -143T213 -95T225 -16V315Z" />
+<glyph unicode="~" glyph-name="asciitilde" horiz-adv-x="1128" d="M530 651Q493 667 466 678T416 695T373 704T330 707Q302 707 272 698T213 672T155 633T102 586V748Q202 856 350 856Q379 856 404 854T456 845T517 826T598 793Q635 777 662 766T713 749T757
+740T799 737Q827 737 857 746T916 772T974 811T1026 858V696Q927 588 778 588Q749 588 724 590T672 599T611 618T530 651Z" />
+<glyph unicode="&#xa0;" glyph-name="nbspace" horiz-adv-x="532" />
+<glyph unicode="&#xa1;" glyph-name="exclamdown" horiz-adv-x="551" d="M213 676H334L385 -373H162L213 676ZM401 979Q401 941 392 915T365 872T324 848T274 840Q248 840 225 847T185 871T157 914T147 979Q147 1016 157 1042T184 1085T225 1110T274 1118Q301
+1118 324 1110T364 1085T391 1042T401 979Z" />
+<glyph unicode="&#xa2;" glyph-name="cent" horiz-adv-x="1128" d="M886 212T831 197T700 180V-20H563V186Q476 199 407 236T289 340T214 506T188 743Q188 884 214 985T289 1155T407 1260T563 1311V1483H700V1319Q772 1316 840 1300T954 1260L901 1106Q878 1116
+850 1125T792 1142T733 1154T678 1159Q521 1159 449 1058T377 745Q377 535 449 438T670 340Q751 340 816 358T936 401V240Q886 212 831 197Z" />
+<glyph unicode="&#xa3;" glyph-name="sterling" horiz-adv-x="1128" d="M666 1481Q772 1481 859 1459T1012 1401L946 1257Q890 1286 820 1307T674 1329Q626 1329 585 1316T514 1273T468 1196T451 1083V788H827V651H451V440Q451 378 440 334T409 257T364 204T311
+166H1059V0H68V154Q112 165 148 185T211 240T253 322T268 438V651H70V788H268V1112Q268 1199 297 1267T379 1383T505 1456T666 1481Z" />
+<glyph unicode="&#xa4;" glyph-name="currency" horiz-adv-x="1128" d="M186 723Q186 782 203 835T252 936L123 1065L221 1163L348 1034Q395 1066 449 1084T563 1102Q623 1102 676 1084T776 1034L905 1163L1004 1067L874 938Q905 892 923 838T942 723Q942 663
+925 608T874 508L1001 381L905 285L776 412Q730 381 677 364T563 346Q503 346 448 364T348 414L221 287L125 383L252 510Q221 555 204 609T186 723ZM324 723Q324 673 342 630T393 554T469 502T563 483Q614 483 658 502T736 553T788 629T807 723Q807 774 788 818T736
+896T659 948T563 967Q513 967 470 948T394 896T343 819T324 723Z" />
+<glyph unicode="&#xa5;" glyph-name="yen" horiz-adv-x="1128" d="M563 723L909 1462H1100L715 694H954V557H653V399H954V262H653V0H475V262H174V399H475V557H174V694H408L29 1462H221L563 723Z" />
+<glyph unicode="&#xa6;" glyph-name="brokenbar" horiz-adv-x="1128" d="M489 1556H639V776H489V1556ZM489 289H639V-492H489V289Z" />
+<glyph unicode="&#xa7;" glyph-name="section" horiz-adv-x="995" d="M137 809Q137 860 150 901T185 975T237 1029T297 1067Q222 1105 180 1162T137 1303Q137 1364 164 1413T242 1496T362 1548T518 1567Q615 1567 693 1547T844 1495L788 1356Q723 1384 653 1403T512
+1423Q413 1423 362 1394T311 1307Q311 1280 323 1257T363 1212T439 1167T557 1114Q629 1086 685 1054T781 982T841 895T862 784Q862 732 850 690T818 613T771 555T717 514Q786 476 824 422T862 289Q862 218 833 163T749 69T618 10T444 -10Q336 -10 258 6T121 55V213Q152
+198 190 183T270 157T356 138T444 131Q513 131 559 143T633 174T672 219T684 272Q684 301 676 323T642 368T569 415T446 471Q373 502 316 533T218 603T158 692T137 809ZM291 831Q291 794 305 763T350 702T432 646T555 588L590 573Q610 586 630 604T667 645T694
+696T705 758Q705 796 692 828T647 889T560 947T424 1006Q399 998 376 983T333 945T303 893T291 831Z" />
+<glyph unicode="&#xa8;" glyph-name="dieresis" horiz-adv-x="1182" d="M307 1395Q307 1449 335 1473T403 1497Q442 1497 471 1473T500 1395Q500 1342 471 1317T403 1292Q363 1292 335 1317T307 1395ZM682 1395Q682 1449 710 1473T778 1497Q797 1497 814 1491T845
+1473T866 1441T874 1395Q874 1342 845 1317T778 1292Q738 1292 710 1317T682 1395Z" />
+<glyph unicode="&#xa9;" glyph-name="copyright" horiz-adv-x="1704" d="M891 1053Q830 1053 783 1031T704 968T656 866T639 731Q639 653 653 593T698 492T776 430T891 408Q914 408 941 411T996 421T1053 435T1106 453V322Q1082 311 1058 302T1007 286T950 276T885
+272Q783 272 707 305T581 399T505 545T479 733Q479 834 506 917T585 1061T714 1154T891 1188Q954 1188 1020 1172T1145 1126L1083 999Q1031 1025 983 1039T891 1053ZM100 731Q100 835 127 931T202 1110T320 1263T472 1380T652 1456T852 1483Q956 1483 1052 1456T1231
+1381T1384 1263T1501 1111T1577 931T1604 731Q1604 627 1577 531T1502 352T1384 200T1232 82T1052 7T852 -20Q748 -20 652 6T473 82T320 199T203 351T127 531T100 731ZM209 731Q209 598 259 481T397 277T602 139T852 88Q985 88 1102 138T1306 276T1444 481T1495
+731Q1495 864 1445 981T1307 1185T1102 1323T852 1374Q719 1374 602 1324T398 1186T260 981T209 731Z" />
+<glyph unicode="&#xaa;" glyph-name="ordfeminine" horiz-adv-x="678" d="M487 797L459 879Q441 857 422 840T379 810T327 791T264 784Q221 784 185 797T123 835T83 899T68 989Q68 1091 138 1145T352 1204L451 1208V1239Q451 1311 421 1339T334 1368Q286 1368
+241 1354T154 1317L106 1417Q157 1443 215 1461T334 1479Q459 1479 518 1426T578 1251V797H487ZM377 1110Q326 1107 292 1098T238 1074T208 1038T199 987Q199 936 224 914T291 891Q325 891 354 901T404 934T438 988T451 1065V1114L377 1110Z" />
+<glyph unicode="&#xab;" glyph-name="guillemotleft" horiz-adv-x="997" d="M82 553L391 967L508 889L270 541L508 193L391 115L82 526V553ZM489 553L799 967L915 889L678 541L915 193L799 115L489 526V553Z" />
+<glyph unicode="&#xac;" glyph-name="logicalnot" horiz-adv-x="1128" d="M1026 797V262H877V647H102V797H1026Z" />
+<glyph unicode="&#xad;" glyph-name="uni00AD" horiz-adv-x="659" d="M82 465V633H578V465H82Z" />
+<glyph unicode="&#xae;" glyph-name="registered" horiz-adv-x="1704" d="M743 768H815Q906 768 945 804T985 909Q985 983 944 1012T813 1042H743V768ZM1145 913Q1145 865 1132 828T1096 762T1045 713T985 680Q1052 570 1105 483Q1128 446 1149 411T1186 347T1213
+302L1223 285H1044L838 637H743V285H586V1178H819Q987 1178 1066 1113T1145 913ZM100 731Q100 835 127 931T202 1110T320 1263T472 1380T652 1456T852 1483Q956 1483 1052 1456T1231 1381T1384 1263T1501 1111T1577 931T1604 731Q1604 627 1577 531T1502 352T1384
+200T1232 82T1052 7T852 -20Q748 -20 652 6T473 82T320 199T203 351T127 531T100 731ZM209 731Q209 598 259 481T397 277T602 139T852 88Q985 88 1102 138T1306 276T1444 481T1495 731Q1495 864 1445 981T1307 1185T1102 1323T852 1374Q719 1374 602 1324T398 1186T260
+981T209 731Z" />
+<glyph unicode="&#xaf;" glyph-name="overscore" horiz-adv-x="1024" d="M1030 1556H-6V1696H1030V1556Z" />
+<glyph unicode="&#xb0;" glyph-name="degree" horiz-adv-x="877" d="M123 1167Q123 1232 148 1289T215 1390T315 1458T438 1483Q503 1483 560 1458T661 1390T729 1290T754 1167Q754 1102 729 1045T661 946T561 879T438 854Q373 854 316 878T216 945T148 1045T123
+1167ZM246 1167Q246 1128 261 1094T302 1033T363 992T438 977Q478 977 513 992T574 1033T616 1093T631 1167Q631 1207 616 1242T575 1304T513 1346T438 1362Q398 1362 363 1347T302 1305T261 1243T246 1167Z" />
+<glyph unicode="&#xb1;" glyph-name="plusminus" horiz-adv-x="1128" d="M489 647H102V797H489V1186H639V797H1026V647H639V262H489V647ZM102 0V150H1026V0H102Z" />
+<glyph unicode="&#xb2;" glyph-name="twosuperior" horiz-adv-x="678" d="M621 586H49V698L258 926Q315 988 351 1030T407 1106T434 1169T442 1233Q442 1298 409 1330T322 1362Q271 1362 225 1337T133 1274L55 1368Q109 1416 175 1448T324 1481Q384 1481 432 1465T515
+1417T567 1340T586 1237Q586 1187 572 1144T530 1059T464 971T373 870L225 713H621V586Z" />
+<glyph unicode="&#xb3;" glyph-name="threesuperior" horiz-adv-x="678" d="M590 1255Q590 1177 550 1124T440 1047Q528 1024 572 971T616 840Q616 780 596 730T535 645T430 589T281 569Q211 569 150 581T31 625V758Q94 724 160 705T279 686Q377 686 421 727T465
+842Q465 916 412 949T262 983H164V1096H262Q354 1096 396 1135T438 1239Q438 1271 428 1294T401 1333T360 1355T309 1362Q250 1362 202 1342T102 1284L33 1380Q62 1403 92 1421T157 1453T229 1473T311 1481Q380 1481 432 1464T520 1417T572 1346T590 1255Z" />
+<glyph unicode="&#xb4;" glyph-name="acute" horiz-adv-x="1182" d="M393 1268Q415 1297 438 1335T485 1413T530 1494T567 1569H786V1548Q770 1521 739 1481T669 1396T590 1311T514 1241H393V1268Z" />
+<glyph unicode="&#xb5;" glyph-name="mu" horiz-adv-x="1217" d="M356 391Q356 261 409 196T573 131Q655 131 710 157T798 233T846 358T860 528V1098H1042V0H895L868 147H858Q810 64 738 22T563 -20Q491 -20 438 3T350 68Q351 30 353 -10Q355 -45 355 -87T356
+-172V-492H174V1098H356V391Z" />
+<glyph unicode="&#xb6;" glyph-name="paragraph" horiz-adv-x="1341" d="M1126 -260H1006V1397H799V-260H678V559Q617 541 532 541Q437 541 360 566T228 651T143 806T113 1042Q113 1189 145 1287T237 1446T380 1531T563 1556H1126V-260Z" />
+<glyph unicode="&#xb7;" glyph-name="middot" horiz-adv-x="549" d="M147 723Q147 761 157 787T184 830T224 854T274 862Q300 862 323 855T364 831T391 788T401 723Q401 686 391 660T364 617T324 592T274 584Q247 584 224 592T184 617T157 660T147 723Z" />
+<glyph unicode="&#xb8;" glyph-name="cedilla" horiz-adv-x="420" d="M408 -287Q408 -384 338 -438T117 -492Q95 -492 73 -489T35 -483V-375Q50 -378 74 -379T115 -381Q186 -381 226 -360T266 -289Q266 -265 253 -248T217 -217T163 -195T94 -176L184 0H305L248
+-115Q282 -123 311 -136T361 -169T395 -219T408 -287Z" />
+<glyph unicode="&#xb9;" glyph-name="onesuperior" horiz-adv-x="678" d="M307 1462H442V586H297V1102Q297 1127 297 1157T299 1217T302 1275T305 1325Q291 1308 272 1288T231 1251L137 1178L63 1274L307 1462Z" />
+<glyph unicode="&#xba;" glyph-name="ordmasculine" horiz-adv-x="717" d="M651 1133Q651 1050 631 985T572 876T479 808T356 784Q293 784 240 807T148 875T88 985T66 1133Q66 1216 86 1280T145 1389T237 1456T360 1479Q422 1479 475 1456T568 1389T629 1281T651
+1133ZM197 1133Q197 1014 234 954T358 893Q443 893 480 953T518 1133Q518 1253 481 1310T358 1368Q272 1368 235 1311T197 1133Z" />
+<glyph unicode="&#xbb;" glyph-name="guillemotright" horiz-adv-x="997" d="M918 526L608 115L492 193L729 541L492 889L608 967L918 553V526ZM510 526L201 115L84 193L322 541L84 889L201 967L510 553V526Z" />
+<glyph unicode="&#xbc;" glyph-name="onequarter" horiz-adv-x="1509" d="M307 1462H442V586H297V1102Q297 1127 297 1157T299 1217T302 1275T305 1325Q291 1308 272 1288T231 1251L137 1178L63 1274L307 1462ZM1202 1462L391 0H234L1045 1462H1202ZM1419 193H1294V1H1151V193H776V304L1153
+883H1294V320H1419V193ZM1151 320V515Q1151 557 1152 606T1157 705Q1152 694 1142 676T1121 636T1098 595T1077 560L922 320H1151Z" />
+<glyph unicode="&#xbd;" glyph-name="onehalf" horiz-adv-x="1509" d="M544 1462H679V586H534V1102Q534 1127 534 1157T536 1217T539 1275T542 1325Q528 1308 509 1288T468 1251L374 1178L300 1274L544 1462ZM1181 1462L370 0H213L1024 1462H1181ZM1440 1H868V113L1077
+341Q1134 403 1170 445T1226 521T1253 584T1261 648Q1261 713 1228 745T1141 777Q1090 777 1044 752T952 689L874 783Q928 831 994 863T1143 896Q1203 896 1251 880T1334 832T1386 755T1405 652Q1405 602 1391 559T1349 474T1283 386T1192 285L1044 128H1440V1Z"
+/>
+<glyph unicode="&#xbe;" glyph-name="threequarters" horiz-adv-x="1509" d="M590 1255Q590 1177 550 1124T440 1047Q528 1024 572 971T616 840Q616 780 596 730T535 645T430 589T281 569Q211 569 150 581T31 625V758Q94 724 160 705T279 686Q377 686 421 727T465
+842Q465 916 412 949T262 983H164V1096H262Q354 1096 396 1135T438 1239Q438 1271 428 1294T401 1333T360 1355T309 1362Q250 1362 202 1342T102 1284L33 1380Q62 1403 92 1421T157 1453T229 1473T311 1481Q380 1481 432 1464T520 1417T572 1346T590 1255ZM1296
+1462L485 0H328L1139 1462H1296ZM1486 193H1361V1H1218V193H843V304L1220 883H1361V320H1486V193ZM1218 320V515Q1218 557 1219 606T1224 705Q1219 694 1209 676T1188 636T1165 595T1144 560L989 320H1218Z" />
+<glyph unicode="&#xbf;" glyph-name="questiondown" horiz-adv-x="872" d="M592 676V639Q592 581 584 536T557 450T505 371T422 291Q374 250 340 217T285 149T253 75T242 -18Q242 -66 257 -105T300 -173T371 -217T469 -233Q553 -233 628 -208T772 -147L836 -293Q754
+-335 660 -364T469 -393Q376 -393 302 -368T176 -294T96 -177T68 -20Q68 48 81 100T121 197T188 284T283 373Q335 418 368 451T420 516T446 580T453 657V676H592ZM639 979Q639 941 630 915T603 872T562 848T512 840Q486 840 463 847T423 871T395 914T385 979Q385
+1016 395 1042T422 1085T463 1110T512 1118Q539 1118 562 1110T602 1085T629 1042T639 979Z" />
+<glyph unicode="&#xc0;" glyph-name="Agrave" horiz-adv-x="1245" d="M1055 0L895 453H350L188 0H0L537 1468H707L1245 0H1055ZM836 618L688 1042Q682 1060 674 1086T656 1142T638 1204T621 1268Q614 1237 605 1204T587 1141T570 1085T555 1042L410 618H836ZM719
+1579H599Q564 1607 523 1648T444 1734T374 1818T326 1886V1907H545Q561 1873 582 1833T627 1752T674 1673T719 1606V1579Z" />
+<glyph unicode="&#xc1;" glyph-name="Aacute" horiz-adv-x="1245" d="M1055 0L895 453H350L188 0H0L537 1468H707L1245 0H1055ZM836 618L688 1042Q682 1060 674 1086T656 1142T638 1204T621 1268Q614 1237 605 1204T587 1141T570 1085T555 1042L410 618H836ZM534
+1606Q556 1635 579 1673T626 1751T671 1832T708 1907H927V1886Q911 1859 880 1819T810 1734T731 1649T655 1579H534V1606Z" />
+<glyph unicode="&#xc2;" glyph-name="Acircumflex" horiz-adv-x="1245" d="M1055 0L895 453H350L188 0H0L537 1468H707L1245 0H1055ZM836 618L688 1042Q682 1060 674 1086T656 1142T638 1204T621 1268Q614 1237 605 1204T587 1141T570 1085T555 1042L410 618H836ZM953
+1579H832Q781 1613 727 1661T621 1765Q567 1710 514 1662T410 1579H289V1606Q315 1635 349 1673T416 1751T479 1832T525 1907H717Q733 1873 762 1833T825 1752T893 1673T953 1606V1579Z" />
+<glyph unicode="&#xc3;" glyph-name="Atilde" horiz-adv-x="1245" d="M1055 0L895 453H350L188 0H0L537 1468H707L1245 0H1055ZM836 618L688 1042Q682 1060 674 1086T656 1142T638 1204T621 1268Q614 1237 605 1204T587 1141T570 1085T555 1042L410 618H836ZM772
+1581Q732 1581 693 1598T615 1637T542 1676T475 1694Q430 1694 406 1668T368 1579H264Q269 1639 285 1688T328 1771T392 1824T475 1843Q517 1843 557 1826T636 1787T708 1749T772 1731Q817 1731 840 1757T878 1845H983Q978 1785 962 1737T919 1654T855 1600T772
+1581Z" />
+<glyph unicode="&#xc4;" glyph-name="Adieresis" horiz-adv-x="1245" d="M1055 0L895 453H350L188 0H0L537 1468H707L1245 0H1055ZM836 618L688 1042Q682 1060 674 1086T656 1142T638 1204T621 1268Q614 1237 605 1204T587 1141T570 1085T555 1042L410 618H836ZM340
+1733Q340 1787 368 1811T436 1835Q475 1835 504 1811T533 1733Q533 1680 504 1655T436 1630Q396 1630 368 1655T340 1733ZM715 1733Q715 1787 743 1811T811 1835Q830 1835 847 1829T878 1811T899 1779T907 1733Q907 1680 878 1655T811 1630Q771 1630 743 1655T715
+1733Z" />
+<glyph unicode="&#xc5;" glyph-name="Aring" horiz-adv-x="1245" d="M1055 0L895 453H350L188 0H0L537 1468H707L1245 0H1055ZM836 618L688 1042Q682 1060 674 1086T656 1142T638 1204T621 1268Q614 1237 605 1204T587 1141T570 1085T555 1042L410 618H836ZM848
+1583Q848 1532 831 1492T783 1423T710 1381T619 1366Q569 1366 528 1380T458 1423T412 1490T396 1581Q396 1632 412 1671T457 1739T528 1781T619 1796Q667 1796 709 1782T782 1740T830 1673T848 1583ZM731 1581Q731 1634 700 1664T619 1694Q569 1694 538 1664T506
+1581Q506 1528 534 1498T619 1468Q668 1468 699 1498T731 1581Z" />
+<glyph unicode="&#xc6;" glyph-name="AE" horiz-adv-x="1745" d="M1622 0H862V453H387L184 0H-2L653 1462H1622V1298H1049V846H1583V684H1049V164H1622V0ZM459 618H862V1298H754L459 618Z" />
+<glyph unicode="&#xc7;" glyph-name="Ccedilla" horiz-adv-x="1235" d="M793 1319Q686 1319 599 1279T451 1162T356 977T322 731Q322 590 351 481T440 296T587 182T793 143Q882 143 962 160T1120 201V39Q1081 24 1042 13T961 -6T870 -16T762 -20Q598 -20 478 34T280
+187T163 425T125 733Q125 899 168 1037T296 1274T506 1428T793 1483Q901 1483 999 1461T1176 1397L1098 1241Q1035 1273 961 1296T793 1319ZM916 -287Q916 -384 846 -438T625 -492Q603 -492 581 -489T543 -483V-375Q558 -378 582 -379T623 -381Q694 -381 734 -360T774
+-289Q774 -265 761 -248T725 -217T671 -195T602 -176L692 0H813L756 -115Q790 -123 819 -136T869 -169T903 -219T916 -287Z" />
+<glyph unicode="&#xc8;" glyph-name="Egrave" horiz-adv-x="1081" d="M958 0H199V1462H958V1298H385V846H920V684H385V164H958V0ZM713 1579H593Q558 1607 517 1648T438 1734T368 1818T320 1886V1907H539Q555 1873 576 1833T621 1752T668 1673T713 1606V1579Z" />
+<glyph unicode="&#xc9;" glyph-name="Eacute" horiz-adv-x="1081" d="M958 0H199V1462H958V1298H385V846H920V684H385V164H958V0ZM456 1606Q478 1635 501 1673T548 1751T593 1832T630 1907H849V1886Q833 1859 802 1819T732 1734T653 1649T577 1579H456V1606Z" />
+<glyph unicode="&#xca;" glyph-name="Ecircumflex" horiz-adv-x="1081" d="M958 0H199V1462H958V1298H385V846H920V684H385V164H958V0ZM907 1579H786Q735 1613 681 1661T575 1765Q521 1710 468 1662T364 1579H243V1606Q269 1635 303 1673T370 1751T433 1832T479
+1907H671Q687 1873 716 1833T779 1752T847 1673T907 1606V1579Z" />
+<glyph unicode="&#xcb;" glyph-name="Edieresis" horiz-adv-x="1081" d="M958 0H199V1462H958V1298H385V846H920V684H385V164H958V0ZM296 1733Q296 1787 324 1811T392 1835Q431 1835 460 1811T489 1733Q489 1680 460 1655T392 1630Q352 1630 324 1655T296 1733ZM671
+1733Q671 1787 699 1811T767 1835Q786 1835 803 1829T834 1811T855 1779T863 1733Q863 1680 834 1655T767 1630Q727 1630 699 1655T671 1733Z" />
+<glyph unicode="&#xcc;" glyph-name="Igrave" horiz-adv-x="694" d="M612 0H82V102L254 143V1319L82 1360V1462H612V1360L440 1319V143L612 102V0ZM455 1579H335Q300 1607 259 1648T180 1734T110 1818T62 1886V1907H281Q297 1873 318 1833T363 1752T410 1673T455
+1606V1579Z" />
+<glyph unicode="&#xcd;" glyph-name="Iacute" horiz-adv-x="694" d="M612 0H82V102L254 143V1319L82 1360V1462H612V1360L440 1319V143L612 102V0ZM257 1606Q279 1635 302 1673T349 1751T394 1832T431 1907H650V1886Q634 1859 603 1819T533 1734T454 1649T378
+1579H257V1606Z" />
+<glyph unicode="&#xce;" glyph-name="Icircumflex" horiz-adv-x="694" d="M612 0H82V102L254 143V1319L82 1360V1462H612V1360L440 1319V143L612 102V0ZM681 1579H560Q509 1613 455 1661T349 1765Q295 1710 242 1662T138 1579H17V1606Q43 1635 77 1673T144 1751T207
+1832T253 1907H445Q461 1873 490 1833T553 1752T621 1673T681 1606V1579Z" />
+<glyph unicode="&#xcf;" glyph-name="Idieresis" horiz-adv-x="694" d="M612 0H82V102L254 143V1319L82 1360V1462H612V1360L440 1319V143L612 102V0ZM64 1733Q64 1787 92 1811T160 1835Q199 1835 228 1811T257 1733Q257 1680 228 1655T160 1630Q120 1630 92 1655T64
+1733ZM439 1733Q439 1787 467 1811T535 1835Q554 1835 571 1829T602 1811T623 1779T631 1733Q631 1680 602 1655T535 1630Q495 1630 467 1655T439 1733Z" />
+<glyph unicode="&#xd0;" glyph-name="Eth" horiz-adv-x="1401" d="M47 805H199V1462H606Q759 1462 883 1416T1094 1280T1228 1055T1276 745Q1276 560 1228 421T1089 188T866 47T565 0H199V643H47V805ZM1079 739Q1079 885 1046 991T950 1167T795 1269T586 1303H385V805H721V643H385V160H547Q811
+160 945 306T1079 739Z" />
+<glyph unicode="&#xd1;" glyph-name="Ntilde" horiz-adv-x="1493" d="M1294 0H1079L360 1210H352Q358 1133 362 1057Q366 992 368 921T371 793V0H199V1462H412L1128 258H1135Q1132 334 1128 408Q1127 440 1126 473T1123 540T1121 605T1120 662V1462H1294V0ZM905
+1581Q865 1581 826 1598T748 1637T675 1676T608 1694Q563 1694 539 1668T501 1579H397Q402 1639 418 1688T461 1771T525 1824T608 1843Q650 1843 690 1826T769 1787T841 1749T905 1731Q950 1731 973 1757T1011 1845H1116Q1111 1785 1095 1737T1052 1654T988 1600T905
+1581Z" />
+<glyph unicode="&#xd2;" glyph-name="Ograve" horiz-adv-x="1520" d="M1393 733Q1393 564 1353 425T1232 187T1034 34T760 -20Q597 -20 478 34T280 187T163 425T125 735Q125 905 163 1043T280 1280T479 1431T762 1485Q917 1485 1034 1432T1232 1280T1352 1043T1393
+733ZM322 733Q322 596 348 487T427 301T563 184T760 143Q874 143 956 183T1092 300T1171 486T1196 733Q1196 871 1171 980T1093 1164T958 1280T762 1321Q648 1321 565 1281T428 1165T348 980T322 733ZM870 1579H750Q715 1607 674 1648T595 1734T525 1818T477 1886V1907H696Q712
+1873 733 1833T778 1752T825 1673T870 1606V1579Z" />
+<glyph unicode="&#xd3;" glyph-name="Oacute" horiz-adv-x="1520" d="M1393 733Q1393 564 1353 425T1232 187T1034 34T760 -20Q597 -20 478 34T280 187T163 425T125 735Q125 905 163 1043T280 1280T479 1431T762 1485Q917 1485 1034 1432T1232 1280T1352 1043T1393
+733ZM322 733Q322 596 348 487T427 301T563 184T760 143Q874 143 956 183T1092 300T1171 486T1196 733Q1196 871 1171 980T1093 1164T958 1280T762 1321Q648 1321 565 1281T428 1165T348 980T322 733ZM651 1606Q673 1635 696 1673T743 1751T788 1832T825 1907H1044V1886Q1028
+1859 997 1819T927 1734T848 1649T772 1579H651V1606Z" />
+<glyph unicode="&#xd4;" glyph-name="Ocircumflex" horiz-adv-x="1520" d="M1393 733Q1393 564 1353 425T1232 187T1034 34T760 -20Q597 -20 478 34T280 187T163 425T125 735Q125 905 163 1043T280 1280T479 1431T762 1485Q917 1485 1034 1432T1232 1280T1352
+1043T1393 733ZM322 733Q322 596 348 487T427 301T563 184T760 143Q874 143 956 183T1092 300T1171 486T1196 733Q1196 871 1171 980T1093 1164T958 1280T762 1321Q648 1321 565 1281T428 1165T348 980T322 733ZM1096 1579H975Q924 1613 870 1661T764 1765Q710
+1710 657 1662T553 1579H432V1606Q458 1635 492 1673T559 1751T622 1832T668 1907H860Q876 1873 905 1833T968 1752T1036 1673T1096 1606V1579Z" />
+<glyph unicode="&#xd5;" glyph-name="Otilde" horiz-adv-x="1520" d="M1393 733Q1393 564 1353 425T1232 187T1034 34T760 -20Q597 -20 478 34T280 187T163 425T125 735Q125 905 163 1043T280 1280T479 1431T762 1485Q917 1485 1034 1432T1232 1280T1352 1043T1393
+733ZM322 733Q322 596 348 487T427 301T563 184T760 143Q874 143 956 183T1092 300T1171 486T1196 733Q1196 871 1171 980T1093 1164T958 1280T762 1321Q648 1321 565 1281T428 1165T348 980T322 733ZM891 1581Q851 1581 812 1598T734 1637T661 1676T594 1694Q549
+1694 525 1668T487 1579H383Q388 1639 404 1688T447 1771T511 1824T594 1843Q636 1843 676 1826T755 1787T827 1749T891 1731Q936 1731 959 1757T997 1845H1102Q1097 1785 1081 1737T1038 1654T974 1600T891 1581Z" />
+<glyph unicode="&#xd6;" glyph-name="Odieresis" horiz-adv-x="1520" d="M1393 733Q1393 564 1353 425T1232 187T1034 34T760 -20Q597 -20 478 34T280 187T163 425T125 735Q125 905 163 1043T280 1280T479 1431T762 1485Q917 1485 1034 1432T1232 1280T1352 1043T1393
+733ZM322 733Q322 596 348 487T427 301T563 184T760 143Q874 143 956 183T1092 300T1171 486T1196 733Q1196 871 1171 980T1093 1164T958 1280T762 1321Q648 1321 565 1281T428 1165T348 980T322 733ZM477 1733Q477 1787 505 1811T573 1835Q612 1835 641 1811T670
+1733Q670 1680 641 1655T573 1630Q533 1630 505 1655T477 1733ZM852 1733Q852 1787 880 1811T948 1835Q967 1835 984 1829T1015 1811T1036 1779T1044 1733Q1044 1680 1015 1655T948 1630Q908 1630 880 1655T852 1733Z" />
+<glyph unicode="&#xd7;" glyph-name="multiply" horiz-adv-x="1128" d="M459 723L141 1042L246 1147L563 829L885 1147L989 1044L668 723L987 403L885 301L563 618L246 303L143 406L459 723Z" />
+<glyph unicode="&#xd8;" glyph-name="Oslash" horiz-adv-x="1520" d="M1300 1454L1208 1305Q1299 1206 1346 1061T1393 733Q1393 564 1353 425T1232 187T1034 34T760 -20Q571 -20 438 51L360 -76L223 2L313 147Q216 247 171 396T125 735Q125 905 163 1043T280
+1280T479 1431T762 1485Q856 1485 936 1464T1083 1405L1163 1532L1300 1454ZM322 733Q322 602 345 498T416 315L995 1260Q947 1289 890 1305T762 1321Q648 1321 565 1281T428 1165T348 980T322 733ZM1196 733Q1196 990 1108 1141L530 201Q577 173 634 158T760 143Q874
+143 956 183T1092 300T1171 486T1196 733Z" />
+<glyph unicode="&#xd9;" glyph-name="Ugrave" horiz-adv-x="1430" d="M1245 1464V516Q1245 402 1212 304T1113 134T946 21T709 -20Q581 -20 483 18T319 128T218 298T184 520V1462H371V510Q371 335 457 239T719 143Q808 143 872 170T977 246T1038 363T1059 512V1464H1245ZM847
+1579H727Q692 1607 651 1648T572 1734T502 1818T454 1886V1907H673Q689 1873 710 1833T755 1752T802 1673T847 1606V1579Z" />
+<glyph unicode="&#xda;" glyph-name="Uacute" horiz-adv-x="1430" d="M1245 1464V516Q1245 402 1212 304T1113 134T946 21T709 -20Q581 -20 483 18T319 128T218 298T184 520V1462H371V510Q371 335 457 239T719 143Q808 143 872 170T977 246T1038 363T1059 512V1464H1245ZM590
+1606Q612 1635 635 1673T682 1751T727 1832T764 1907H983V1886Q967 1859 936 1819T866 1734T787 1649T711 1579H590V1606Z" />
+<glyph unicode="&#xdb;" glyph-name="Ucircumflex" horiz-adv-x="1430" d="M1245 1464V516Q1245 402 1212 304T1113 134T946 21T709 -20Q581 -20 483 18T319 128T218 298T184 520V1462H371V510Q371 335 457 239T719 143Q808 143 872 170T977 246T1038 363T1059
+512V1464H1245ZM1043 1579H922Q871 1613 817 1661T711 1765Q657 1710 604 1662T500 1579H379V1606Q405 1635 439 1673T506 1751T569 1832T615 1907H807Q823 1873 852 1833T915 1752T983 1673T1043 1606V1579Z" />
+<glyph unicode="&#xdc;" glyph-name="Udieresis" horiz-adv-x="1430" d="M1245 1464V516Q1245 402 1212 304T1113 134T946 21T709 -20Q581 -20 483 18T319 128T218 298T184 520V1462H371V510Q371 335 457 239T719 143Q808 143 872 170T977 246T1038 363T1059 512V1464H1245ZM432
+1733Q432 1787 460 1811T528 1835Q567 1835 596 1811T625 1733Q625 1680 596 1655T528 1630Q488 1630 460 1655T432 1733ZM807 1733Q807 1787 835 1811T903 1835Q922 1835 939 1829T970 1811T991 1779T999 1733Q999 1680 970 1655T903 1630Q863 1630 835 1655T807
+1733Z" />
+<glyph unicode="&#xdd;" glyph-name="Yacute" horiz-adv-x="1079" d="M539 723L879 1462H1079L633 569V0H446V559L0 1462H203L539 723ZM442 1606Q464 1635 487 1673T534 1751T579 1832T616 1907H835V1886Q819 1859 788 1819T718 1734T639 1649T563 1579H442V1606Z" />
+<glyph unicode="&#xde;" glyph-name="Thorn" horiz-adv-x="1180" d="M1075 782Q1075 691 1048 607T957 459T791 356T535 317H385V0H199V1462H385V1210H561Q695 1210 792 1182T952 1099T1045 964T1075 782ZM385 475H514Q607 475 676 491T791 542T860 634T883 772Q883
+915 801 983T545 1051H385V475Z" />
+<glyph unicode="&#xdf;" glyph-name="germandbls" horiz-adv-x="1233" d="M1010 1260Q1010 1203 989 1159T936 1078T867 1011T798 954T745 899T723 842Q723 821 730 805T756 769T811 725T903 662Q959 625 1003 589T1077 512T1124 423T1141 313Q1141 226 1113 163T1035
+60T914 0T758 -20Q661 -20 592 -3T469 49V215Q495 199 527 184T596 156T670 137T745 129Q801 129 841 141T908 176T946 231T958 303Q958 339 950 368T920 426T862 483T770 547Q707 587 665 621T596 688T558 757T547 834Q547 888 567 927T619 998T686 1057T753 1113T804
+1175T825 1253Q825 1295 809 1326T762 1377T691 1407T598 1417Q549 1417 505 1408T428 1374T376 1309T356 1202V0H174V1200Q174 1304 205 1374T293 1487T428 1548T598 1567Q690 1567 766 1548T896 1491T980 1395T1010 1260Z" />
+<glyph unicode="&#xe0;" glyph-name="agrave" horiz-adv-x="1087" d="M793 0L756 152H748Q715 107 682 75T610 21T523 -10T412 -20Q343 -20 285 -1T185 59T118 161T94 307Q94 471 209 559T561 655L745 662V731Q745 798 731 843T689 915T621 955T528 967Q445 967
+374 943T236 885L172 1022Q246 1062 337 1090T528 1118Q630 1118 704 1098T827 1033T900 919T924 752V0H793ZM459 127Q520 127 572 146T662 203T721 300T743 438V537L600 530Q510 526 449 510T352 466T299 397T283 305Q283 213 331 170T459 127ZM934 1241H814Q779
+1269 738 1310T659 1396T589 1480T541 1548V1569H760Q776 1535 797 1495T842 1414T889 1335T934 1268V1241Z" />
+<glyph unicode="&#xe1;" glyph-name="aacute" horiz-adv-x="1087" d="M793 0L756 152H748Q715 107 682 75T610 21T523 -10T412 -20Q343 -20 285 -1T185 59T118 161T94 307Q94 471 209 559T561 655L745 662V731Q745 798 731 843T689 915T621 955T528 967Q445 967
+374 943T236 885L172 1022Q246 1062 337 1090T528 1118Q630 1118 704 1098T827 1033T900 919T924 752V0H793ZM459 127Q520 127 572 146T662 203T721 300T743 438V537L600 530Q510 526 449 510T352 466T299 397T283 305Q283 213 331 170T459 127ZM446 1268Q468 1297
+491 1335T538 1413T583 1494T620 1569H839V1548Q823 1521 792 1481T722 1396T643 1311T567 1241H446V1268Z" />
+<glyph unicode="&#xe2;" glyph-name="acircumflex" horiz-adv-x="1087" d="M793 0L756 152H748Q715 107 682 75T610 21T523 -10T412 -20Q343 -20 285 -1T185 59T118 161T94 307Q94 471 209 559T561 655L745 662V731Q745 798 731 843T689 915T621 955T528 967Q445
+967 374 943T236 885L172 1022Q246 1062 337 1090T528 1118Q630 1118 704 1098T827 1033T900 919T924 752V0H793ZM459 127Q520 127 572 146T662 203T721 300T743 438V537L600 530Q510 526 449 510T352 466T299 397T283 305Q283 213 331 170T459 127ZM1148 1241H1027Q976
+1275 922 1323T816 1427Q762 1372 709 1324T605 1241H484V1268Q510 1297 544 1335T611 1413T674 1494T720 1569H912Q928 1535 957 1495T1020 1414T1088 1335T1148 1268V1241Z" />
+<glyph unicode="&#xe3;" glyph-name="atilde" horiz-adv-x="1087" d="M793 0L756 152H748Q715 107 682 75T610 21T523 -10T412 -20Q343 -20 285 -1T185 59T118 161T94 307Q94 471 209 559T561 655L745 662V731Q745 798 731 843T689 915T621 955T528 967Q445 967
+374 943T236 885L172 1022Q246 1062 337 1090T528 1118Q630 1118 704 1098T827 1033T900 919T924 752V0H793ZM459 127Q520 127 572 146T662 203T721 300T743 438V537L600 530Q510 526 449 510T352 466T299 397T283 305Q283 213 331 170T459 127ZM955 1243Q915 1243
+876 1260T798 1299T725 1338T658 1356Q613 1356 589 1330T551 1241H447Q452 1301 468 1350T511 1433T575 1486T658 1505Q700 1505 740 1488T819 1449T891 1411T955 1393Q1000 1393 1023 1419T1061 1507H1166Q1161 1447 1145 1399T1102 1316T1038 1262T955 1243Z"
+/>
+<glyph unicode="&#xe4;" glyph-name="adieresis" horiz-adv-x="1087" d="M793 0L756 152H748Q715 107 682 75T610 21T523 -10T412 -20Q343 -20 285 -1T185 59T118 161T94 307Q94 471 209 559T561 655L745 662V731Q745 798 731 843T689 915T621 955T528 967Q445
+967 374 943T236 885L172 1022Q246 1062 337 1090T528 1118Q630 1118 704 1098T827 1033T900 919T924 752V0H793ZM459 127Q520 127 572 146T662 203T721 300T743 438V537L600 530Q510 526 449 510T352 466T299 397T283 305Q283 213 331 170T459 127ZM529 1395Q529
+1449 557 1473T625 1497Q664 1497 693 1473T722 1395Q722 1342 693 1317T625 1292Q585 1292 557 1317T529 1395ZM904 1395Q904 1449 932 1473T1000 1497Q1019 1497 1036 1491T1067 1473T1088 1441T1096 1395Q1096 1342 1067 1317T1000 1292Q960 1292 932 1317T904
+1395Z" />
+<glyph unicode="&#xe5;" glyph-name="aring" horiz-adv-x="1087" d="M793 0L756 152H748Q715 107 682 75T610 21T523 -10T412 -20Q343 -20 285 -1T185 59T118 161T94 307Q94 471 209 559T561 655L745 662V731Q745 798 731 843T689 915T621 955T528 967Q445 967
+374 943T236 885L172 1022Q246 1062 337 1090T528 1118Q630 1118 704 1098T827 1033T900 919T924 752V0H793ZM459 127Q520 127 572 146T662 203T721 300T743 438V537L600 530Q510 526 449 510T352 466T299 397T283 305Q283 213 331 170T459 127ZM1039 1458Q1039
+1407 1022 1367T974 1298T901 1256T810 1241Q760 1241 719 1255T649 1298T603 1365T587 1456Q587 1507 603 1546T648 1614T719 1656T810 1671Q858 1671 900 1657T973 1615T1021 1548T1039 1458ZM922 1456Q922 1509 891 1539T810 1569Q760 1569 729 1539T697 1456Q697
+1403 725 1373T810 1343Q859 1343 890 1373T922 1456Z" />
+<glyph unicode="&#xe6;" glyph-name="ae" horiz-adv-x="1706" d="M94 307Q94 471 209 559T561 655L745 662V731Q745 798 731 843T689 915T621 955T528 967Q445 967 374 943T236 885L172 1022Q246 1062 337 1090T528 1118Q659 1118 742 1076T868 940Q919 1025 1002
+1071T1188 1118Q1285 1118 1362 1083T1493 983T1575 828T1604 627V514H932Q937 321 1010 230T1231 139Q1280 139 1322 144T1404 158T1480 182T1554 215V53Q1515 34 1478 20T1401 -3T1319 -16T1227 -20Q1089 -20 988 37T825 209Q791 155 753 113T668 41T562 -4T430
+-20Q359 -20 298 -1T191 59T120 161T94 307ZM283 305Q283 213 331 170T459 127Q520 127 572 146T662 203T721 300T743 438V537L600 530Q510 526 449 510T352 466T299 397T283 305ZM1184 967Q1074 967 1011 889T936 662H1407Q1407 730 1394 786T1354 883T1284 945T1184
+967Z" />
+<glyph unicode="&#xe7;" glyph-name="ccedilla" horiz-adv-x="948" d="M594 -20Q493 -20 405 11T252 111T150 286T113 543Q113 700 151 809T255 987T411 1087T602 1118Q680 1118 754 1101T879 1059L825 905Q802 915 774 924T716 941T657 953T602 958Q445 958 373
+858T301 545Q301 334 373 237T594 139Q675 139 740 157T860 201V39Q806 10 745 -5T594 -20ZM730 -287Q730 -384 660 -438T439 -492Q417 -492 395 -489T357 -483V-375Q372 -378 396 -379T437 -381Q508 -381 548 -360T588 -289Q588 -265 575 -248T539 -217T485 -195T416
+-176L506 0H627L570 -115Q604 -123 633 -136T683 -169T717 -219T730 -287Z" />
+<glyph unicode="&#xe8;" glyph-name="egrave" horiz-adv-x="1096" d="M608 -20Q498 -20 407 17T251 125T149 301T113 541Q113 677 146 784T239 965T382 1079T567 1118Q666 1118 745 1083T879 983T963 828T993 627V514H301Q306 321 382 230T610 139Q661 139 704
+144T788 158T867 182T944 215V53Q904 34 866 20T787 -3T703 -16T608 -20ZM563 967Q449 967 383 889T305 662H797Q797 730 784 786T742 883T669 945T563 967ZM934 1241H814Q779 1269 738 1310T659 1396T589 1480T541 1548V1569H760Q776 1535 797 1495T842 1414T889
+1335T934 1268V1241Z" />
+<glyph unicode="&#xe9;" glyph-name="eacute" horiz-adv-x="1096" d="M608 -20Q498 -20 407 17T251 125T149 301T113 541Q113 677 146 784T239 965T382 1079T567 1118Q666 1118 745 1083T879 983T963 828T993 627V514H301Q306 321 382 230T610 139Q661 139 704
+144T788 158T867 182T944 215V53Q904 34 866 20T787 -3T703 -16T608 -20ZM563 967Q449 967 383 889T305 662H797Q797 730 784 786T742 883T669 945T563 967ZM475 1268Q497 1297 520 1335T567 1413T612 1494T649 1569H868V1548Q852 1521 821 1481T751 1396T672 1311T596
+1241H475V1268Z" />
+<glyph unicode="&#xea;" glyph-name="ecircumflex" horiz-adv-x="1096" d="M608 -20Q498 -20 407 17T251 125T149 301T113 541Q113 677 146 784T239 965T382 1079T567 1118Q666 1118 745 1083T879 983T963 828T993 627V514H301Q306 321 382 230T610 139Q661 139
+704 144T788 158T867 182T944 215V53Q904 34 866 20T787 -3T703 -16T608 -20ZM563 967Q449 967 383 889T305 662H797Q797 730 784 786T742 883T669 945T563 967ZM1144 1241H1023Q972 1275 918 1323T812 1427Q758 1372 705 1324T601 1241H480V1268Q506 1297 540
+1335T607 1413T670 1494T716 1569H908Q924 1535 953 1495T1016 1414T1084 1335T1144 1268V1241Z" />
+<glyph unicode="&#xeb;" glyph-name="edieresis" horiz-adv-x="1096" d="M608 -20Q498 -20 407 17T251 125T149 301T113 541Q113 677 146 784T239 965T382 1079T567 1118Q666 1118 745 1083T879 983T963 828T993 627V514H301Q306 321 382 230T610 139Q661 139
+704 144T788 158T867 182T944 215V53Q904 34 866 20T787 -3T703 -16T608 -20ZM563 967Q449 967 383 889T305 662H797Q797 730 784 786T742 883T669 945T563 967ZM525 1395Q525 1449 553 1473T621 1497Q660 1497 689 1473T718 1395Q718 1342 689 1317T621 1292Q581
+1292 553 1317T525 1395ZM900 1395Q900 1449 928 1473T996 1497Q1015 1497 1032 1491T1063 1473T1084 1441T1092 1395Q1092 1342 1063 1317T996 1292Q956 1292 928 1317T900 1395Z" />
+<glyph unicode="&#xec;" glyph-name="igrave" horiz-adv-x="530" d="M356 0H174V1098H356V0ZM359 1241H239Q204 1269 163 1310T84 1396T14 1480T-34 1548V1569H185Q201 1535 222 1495T267 1414T314 1335T359 1268V1241Z" />
+<glyph unicode="&#xed;" glyph-name="iacute" horiz-adv-x="530" d="M356 0H174V1098H356V0ZM185 1268Q207 1297 230 1335T277 1413T322 1494T359 1569H578V1548Q562 1521 531 1481T461 1396T382 1311T306 1241H185V1268Z" />
+<glyph unicode="&#xee;" glyph-name="icircumflex" horiz-adv-x="530" d="M356 0H174V1098H356V0ZM597 1241H476Q425 1275 371 1323T265 1427Q211 1372 158 1324T54 1241H-67V1268Q-41 1297 -7 1335T60 1413T123 1494T169 1569H361Q377 1535 406 1495T469 1414T537
+1335T597 1268V1241Z" />
+<glyph unicode="&#xef;" glyph-name="idieresis" horiz-adv-x="530" d="M356 0H174V1098H356V0ZM-18 1395Q-18 1449 10 1473T78 1497Q117 1497 146 1473T175 1395Q175 1342 146 1317T78 1292Q38 1292 10 1317T-18 1395ZM357 1395Q357 1449 385 1473T453 1497Q472
+1497 489 1491T520 1473T541 1441T549 1395Q549 1342 520 1317T453 1292Q413 1292 385 1317T357 1395Z" />
+<glyph unicode="&#xf0;" glyph-name="eth" horiz-adv-x="1182" d="M1069 573Q1069 431 1036 321T940 135T788 20T588 -20Q484 -20 397 13T246 109T147 265T111 477Q111 596 142 688T233 843T376 938T565 971Q667 971 744 942T864 852L872 856Q841 974 781 1070T631
+1247L375 1094L301 1208L518 1339Q478 1367 436 1394T346 1448L416 1571Q481 1539 542 1503T662 1423L889 1561L963 1448L768 1331Q835 1266 890 1188T985 1017T1047 813T1069 573ZM881 526Q881 582 864 635T812 730T722 796T592 821Q515 821 461 798T371 731T320
+622T303 471Q303 395 319 333T371 225T461 156T592 131Q746 131 813 230T881 526Z" />
+<glyph unicode="&#xf1;" glyph-name="ntilde" horiz-adv-x="1206" d="M860 0V707Q860 837 808 902T643 967Q562 967 507 941T419 864T371 739T356 569V0H174V1098H322L348 950H358Q383 993 417 1024T493 1077T580 1108T674 1118Q857 1118 949 1023T1042 717V0H860ZM1015
+1243Q975 1243 936 1260T858 1299T785 1338T718 1356Q673 1356 649 1330T611 1241H507Q512 1301 528 1350T571 1433T635 1486T718 1505Q760 1505 800 1488T879 1449T951 1411T1015 1393Q1060 1393 1083 1419T1121 1507H1226Q1221 1447 1205 1399T1162 1316T1098
+1262T1015 1243Z" />
+<glyph unicode="&#xf2;" glyph-name="ograve" horiz-adv-x="1182" d="M1069 551Q1069 414 1036 308T940 129T788 18T588 -20Q485 -20 398 18T248 128T149 307T113 551Q113 687 146 792T242 970T393 1080T594 1118Q697 1118 784 1081T934 971T1033 793T1069 551ZM301
+551Q301 342 369 237T592 131Q746 131 813 236T881 551Q881 760 813 863T590 967Q436 967 369 864T301 551ZM1002 1241H882Q847 1269 806 1310T727 1396T657 1480T609 1548V1569H828Q844 1535 865 1495T910 1414T957 1335T1002 1268V1241Z" />
+<glyph unicode="&#xf3;" glyph-name="oacute" horiz-adv-x="1182" d="M1069 551Q1069 414 1036 308T940 129T788 18T588 -20Q485 -20 398 18T248 128T149 307T113 551Q113 687 146 792T242 970T393 1080T594 1118Q697 1118 784 1081T934 971T1033 793T1069 551ZM301
+551Q301 342 369 237T592 131Q746 131 813 236T881 551Q881 760 813 863T590 967Q436 967 369 864T301 551ZM473 1268Q495 1297 518 1335T565 1413T610 1494T647 1569H866V1548Q850 1521 819 1481T749 1396T670 1311T594 1241H473V1268Z" />
+<glyph unicode="&#xf4;" glyph-name="ocircumflex" horiz-adv-x="1182" d="M1069 551Q1069 414 1036 308T940 129T788 18T588 -20Q485 -20 398 18T248 128T149 307T113 551Q113 687 146 792T242 970T393 1080T594 1118Q697 1118 784 1081T934 971T1033 793T1069
+551ZM301 551Q301 342 369 237T592 131Q746 131 813 236T881 551Q881 760 813 863T590 967Q436 967 369 864T301 551ZM1173 1241H1052Q1001 1275 947 1323T841 1427Q787 1372 734 1324T630 1241H509V1268Q535 1297 569 1335T636 1413T699 1494T745 1569H937Q953
+1535 982 1495T1045 1414T1113 1335T1173 1268V1241Z" />
+<glyph unicode="&#xf5;" glyph-name="otilde" horiz-adv-x="1182" d="M1069 551Q1069 414 1036 308T940 129T788 18T588 -20Q485 -20 398 18T248 128T149 307T113 551Q113 687 146 792T242 970T393 1080T594 1118Q697 1118 784 1081T934 971T1033 793T1069 551ZM301
+551Q301 342 369 237T592 131Q746 131 813 236T881 551Q881 760 813 863T590 967Q436 967 369 864T301 551ZM992 1243Q952 1243 913 1260T835 1299T762 1338T695 1356Q650 1356 626 1330T588 1241H484Q489 1301 505 1350T548 1433T612 1486T695 1505Q737 1505 777
+1488T856 1449T928 1411T992 1393Q1037 1393 1060 1419T1098 1507H1203Q1198 1447 1182 1399T1139 1316T1075 1262T992 1243Z" />
+<glyph unicode="&#xf6;" glyph-name="odieresis" horiz-adv-x="1182" d="M1069 551Q1069 414 1036 308T940 129T788 18T588 -20Q485 -20 398 18T248 128T149 307T113 551Q113 687 146 792T242 970T393 1080T594 1118Q697 1118 784 1081T934 971T1033 793T1069
+551ZM301 551Q301 342 369 237T592 131Q746 131 813 236T881 551Q881 760 813 863T590 967Q436 967 369 864T301 551ZM556 1395Q556 1449 584 1473T652 1497Q691 1497 720 1473T749 1395Q749 1342 720 1317T652 1292Q612 1292 584 1317T556 1395ZM931 1395Q931
+1449 959 1473T1027 1497Q1046 1497 1063 1491T1094 1473T1115 1441T1123 1395Q1123 1342 1094 1317T1027 1292Q987 1292 959 1317T931 1395Z" />
+<glyph unicode="&#xf7;" glyph-name="divide" horiz-adv-x="1128" d="M102 647V797H1026V647H102ZM449 373Q449 408 458 431T482 470T518 491T563 498Q586 498 607 492T644 470T669 432T678 373Q678 340 669 317T644 278T607 255T563 248Q539 248 519 255T483
+277T458 316T449 373ZM449 1071Q449 1106 458 1129T482 1168T518 1189T563 1196Q586 1196 607 1190T644 1168T669 1130T678 1071Q678 1038 669 1015T644 976T607 953T563 946Q539 946 519 953T483 975T458 1014T449 1071Z" />
+<glyph unicode="&#xf8;" glyph-name="oslash" horiz-adv-x="1182" d="M1071 551Q1071 414 1038 308T942 129T790 18T590 -20Q465 -20 367 33L299 -76L168 -2L248 129Q185 201 150 307T115 551Q115 687 148 792T244 970T395 1080T596 1118Q659 1118 715 1104T821
+1061L889 1169L1020 1096L940 967Q1002 894 1036 790T1071 551ZM303 551Q303 467 312 402T344 285L741 932Q712 949 675 958T592 967Q438 967 371 864T303 551ZM883 551Q883 710 844 809L446 164Q477 147 513 139T594 131Q748 131 815 236T883 551Z" />
+<glyph unicode="&#xf9;" glyph-name="ugrave" horiz-adv-x="1206" d="M885 0L858 147H848Q823 104 789 73T713 21T626 -10T532 -20Q441 -20 372 3T257 75T188 200T164 381V1098H346V391Q346 261 399 196T563 131Q644 131 699 157T787 233T835 358T850 528V1098H1032V0H885ZM949
+1241H829Q794 1269 753 1310T674 1396T604 1480T556 1548V1569H775Q791 1535 812 1495T857 1414T904 1335T949 1268V1241Z" />
+<glyph unicode="&#xfa;" glyph-name="uacute" horiz-adv-x="1206" d="M885 0L858 147H848Q823 104 789 73T713 21T626 -10T532 -20Q441 -20 372 3T257 75T188 200T164 381V1098H346V391Q346 261 399 196T563 131Q644 131 699 157T787 233T835 358T850 528V1098H1032V0H885ZM489
+1268Q511 1297 534 1335T581 1413T626 1494T663 1569H882V1548Q866 1521 835 1481T765 1396T686 1311T610 1241H489V1268Z" />
+<glyph unicode="&#xfb;" glyph-name="ucircumflex" horiz-adv-x="1206" d="M885 0L858 147H848Q823 104 789 73T713 21T626 -10T532 -20Q441 -20 372 3T257 75T188 200T164 381V1098H346V391Q346 261 399 196T563 131Q644 131 699 157T787 233T835 358T850 528V1098H1032V0H885ZM930
+1241H809Q758 1275 704 1323T598 1427Q544 1372 491 1324T387 1241H266V1268Q292 1297 326 1335T393 1413T456 1494T502 1569H694Q710 1535 739 1495T802 1414T870 1335T930 1268V1241Z" />
+<glyph unicode="&#xfc;" glyph-name="udieresis" horiz-adv-x="1206" d="M885 0L858 147H848Q823 104 789 73T713 21T626 -10T532 -20Q441 -20 372 3T257 75T188 200T164 381V1098H346V391Q346 261 399 196T563 131Q644 131 699 157T787 233T835 358T850 528V1098H1032V0H885ZM309
+1395Q309 1449 337 1473T405 1497Q444 1497 473 1473T502 1395Q502 1342 473 1317T405 1292Q365 1292 337 1317T309 1395ZM684 1395Q684 1449 712 1473T780 1497Q799 1497 816 1491T847 1473T868 1441T876 1395Q876 1342 847 1317T780 1292Q740 1292 712 1317T684
+1395Z" />
+<glyph unicode="&#xfd;" glyph-name="yacute" horiz-adv-x="1001" d="M10 1098H199L414 485Q428 445 442 401T469 313T491 228T504 152H510Q515 177 526 220T550 311T578 407T604 487L803 1098H991L557 -143Q529 -224 497 -288T421 -398T320 -467T182 -492Q130
+-492 92 -487T27 -475V-330Q48 -335 80 -338T147 -342Q195 -342 230 -331T291 -297T335 -243T369 -170L426 -10L10 1098ZM407 1268Q429 1297 452 1335T499 1413T544 1494T581 1569H800V1548Q784 1521 753 1481T683 1396T604 1311T528 1241H407V1268Z" />
+<glyph unicode="&#xfe;" glyph-name="thorn" horiz-adv-x="1200" d="M356 950Q379 985 408 1015T475 1068T562 1104T670 1118Q764 1118 841 1082T972 975T1057 797T1087 551Q1087 410 1057 304T973 125T841 17T670 -20Q611 -20 563 -7T477 27T409 78T356 139H344Q347
+105 350 74Q352 48 354 21T356 -23V-492H174V1556H356V1098L348 950H356ZM635 967Q559 967 507 944T422 874T374 757T356 592V551Q356 450 369 372T415 240T502 159T637 131Q772 131 835 240T899 553Q899 761 836 864T635 967Z" />
+<glyph unicode="&#xff;" glyph-name="ydieresis" horiz-adv-x="1001" d="M10 1098H199L414 485Q428 445 442 401T469 313T491 228T504 152H510Q515 177 526 220T550 311T578 407T604 487L803 1098H991L557 -143Q529 -224 497 -288T421 -398T320 -467T182 -492Q130
+-492 92 -487T27 -475V-330Q48 -335 80 -338T147 -342Q195 -342 230 -331T291 -297T335 -243T369 -170L426 -10L10 1098ZM484 1395Q484 1449 512 1473T580 1497Q619 1497 648 1473T677 1395Q677 1342 648 1317T580 1292Q540 1292 512 1317T484 1395ZM859 1395Q859
+1449 887 1473T955 1497Q974 1497 991 1491T1022 1473T1043 1441T1051 1395Q1051 1342 1022 1317T955 1292Q915 1292 887 1317T859 1395Z" />
+<glyph unicode="&#x2013;" glyph-name="endash" horiz-adv-x="1024" d="M82 465V633H942V465H82Z" />
+<glyph unicode="&#x2014;" glyph-name="emdash" horiz-adv-x="2048" d="M82 465V633H1966V465H82Z" />
+<glyph unicode="&#x2018;" glyph-name="quoteleft" horiz-adv-x="358" d="M37 961L23 983Q37 1037 56 1098T99 1221T148 1344T199 1462H336Q321 1401 307 1335T279 1204T255 1076T236 961H37Z" />
+<glyph unicode="&#x2019;" glyph-name="quoteright" horiz-adv-x="358" d="M322 1462L336 1440Q322 1385 303 1325T260 1202T211 1078T160 961H23Q37 1021 51 1087T79 1219T104 1347T123 1462H322Z" />
+<glyph unicode="&#x201a;" glyph-name="quotesinglbase" horiz-adv-x="512" d="M362 238L377 215Q363 161 344 100T301 -23T252 -146T201 -264H63Q78 -203 92 -137T120 -6T145 122T164 238H362Z" />
+<glyph unicode="&#x201c;" glyph-name="quotedblleft" horiz-adv-x="743" d="M422 961L408 983Q422 1037 441 1098T484 1221T533 1344T584 1462H721Q706 1401 692 1335T664 1204T640 1076T621 961H422ZM37 961L23 983Q37 1037 56 1098T99 1221T148 1344T199 1462H336Q321
+1401 307 1335T279 1204T255 1076T236 961H37Z" />
+<glyph unicode="&#x201d;" glyph-name="quotedblright" horiz-adv-x="743" d="M322 1462L336 1440Q322 1385 303 1325T260 1202T211 1078T160 961H23Q37 1021 51 1087T79 1219T104 1347T123 1462H322ZM707 1462L721 1440Q707 1385 688 1325T645 1202T596 1078T545
+961H408Q422 1021 436 1087T464 1219T489 1347T508 1462H707Z" />
+<glyph unicode="&#x201e;" glyph-name="quotedblbase" horiz-adv-x="897" d="M362 238L377 215Q363 161 344 100T301 -23T252 -146T201 -264H63Q78 -203 92 -137T120 -6T145 122T164 238H362ZM748 238L762 215Q748 161 729 100T686 -23T637 -146T586 -264H449Q463
+-203 477 -137T505 -6T530 122T549 238H748Z" />
+<glyph unicode="&#x2022;" glyph-name="bullet" horiz-adv-x="770" d="M150 748Q150 819 168 869T217 950T292 996T385 1010Q434 1010 477 996T552 951T602 869T621 748Q621 678 603 628T552 547T477 500T385 485Q335 485 292 500T218 546T168 628T150 748Z" />
+<glyph unicode="&#x2039;" glyph-name="guilsinglleft" horiz-adv-x="590" d="M82 553L391 967L508 889L270 541L508 193L391 115L82 526V553Z" />
+<glyph unicode="&#x203a;" glyph-name="guilsinglright" horiz-adv-x="590" d="M508 526L199 115L82 193L319 541L82 889L199 967L508 553V526Z" />
+</font>
+</defs>
+</svg>

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.ttf
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.ttf b/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.ttf
new file mode 100644
index 0000000..fb8cea6
Binary files /dev/null and b/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.ttf differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.woff
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.woff b/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.woff
new file mode 100644
index 0000000..abf1989
Binary files /dev/null and b/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.woff differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.woff2
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.woff2 b/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.woff2
new file mode 100644
index 0000000..9f93f74
Binary files /dev/null and b/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.woff2 differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/images/Swagger_explorer.png
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/images/Swagger_explorer.png b/ambari-web/api-docs/images/Swagger_explorer.png
new file mode 100644
index 0000000..d3a54db
Binary files /dev/null and b/ambari-web/api-docs/images/Swagger_explorer.png differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/images/Swagger_explorer_min.png
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/images/Swagger_explorer_min.png b/ambari-web/api-docs/images/Swagger_explorer_min.png
new file mode 100644
index 0000000..fb30a37
Binary files /dev/null and b/ambari-web/api-docs/images/Swagger_explorer_min.png differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/images/explorer_icons.png
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/images/explorer_icons.png b/ambari-web/api-docs/images/explorer_icons.png
new file mode 100644
index 0000000..ed9d2ff
Binary files /dev/null and b/ambari-web/api-docs/images/explorer_icons.png differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/images/favicon-16x16.png
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/images/favicon-16x16.png b/ambari-web/api-docs/images/favicon-16x16.png
new file mode 100755
index 0000000..66b1a5b
Binary files /dev/null and b/ambari-web/api-docs/images/favicon-16x16.png differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/images/favicon-32x32.png
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/images/favicon-32x32.png b/ambari-web/api-docs/images/favicon-32x32.png
new file mode 100755
index 0000000..32f319f
Binary files /dev/null and b/ambari-web/api-docs/images/favicon-32x32.png differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/images/favicon.ico
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/images/favicon.ico b/ambari-web/api-docs/images/favicon.ico
new file mode 100755
index 0000000..8b60bcf
Binary files /dev/null and b/ambari-web/api-docs/images/favicon.ico differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/images/json_editor_integration.png
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/images/json_editor_integration.png b/ambari-web/api-docs/images/json_editor_integration.png
new file mode 100644
index 0000000..04424e4
Binary files /dev/null and b/ambari-web/api-docs/images/json_editor_integration.png differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/images/logo_small.png
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/images/logo_small.png b/ambari-web/api-docs/images/logo_small.png
new file mode 100644
index 0000000..5496a65
Binary files /dev/null and b/ambari-web/api-docs/images/logo_small.png differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/images/pet_store_api.png
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/images/pet_store_api.png b/ambari-web/api-docs/images/pet_store_api.png
new file mode 100644
index 0000000..f9f9cd4
Binary files /dev/null and b/ambari-web/api-docs/images/pet_store_api.png differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/images/senodio.png
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/images/senodio.png b/ambari-web/api-docs/images/senodio.png
new file mode 100644
index 0000000..02f50e0
Binary files /dev/null and b/ambari-web/api-docs/images/senodio.png differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/images/throbber.gif
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/images/throbber.gif b/ambari-web/api-docs/images/throbber.gif
new file mode 100644
index 0000000..0639388
Binary files /dev/null and b/ambari-web/api-docs/images/throbber.gif differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/images/wordnik_api.png
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/images/wordnik_api.png b/ambari-web/api-docs/images/wordnik_api.png
new file mode 100644
index 0000000..dca4f14
Binary files /dev/null and b/ambari-web/api-docs/images/wordnik_api.png differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/index.html
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/index.html b/ambari-web/api-docs/index.html
new file mode 100644
index 0000000..93ffe33
--- /dev/null
+++ b/ambari-web/api-docs/index.html
@@ -0,0 +1,241 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>Swagger explorer</title>
+
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+  <!--[if lt IE 9]>
+  <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
+  <!--style type="text/css"></style-->
+
+  <link href="css/index.css" rel="stylesheet"/>
+  <link href='css/standalone.css' rel='stylesheet'/>
+  <link href='css/api-explorer.css' rel='stylesheet' type='text/css'/>
+  <link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
+
+  <script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
+  <script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
+  <script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
+  <script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
+  <script src='lib/handlebars-2.0.0.js' type='text/javascript'></script>
+  <script src='lib/underscore-min.js' type='text/javascript'></script>
+  <script src='lib/backbone-min.js' type='text/javascript'></script>
+  <script src='swagger-ui.js' type='text/javascript'></script>
+  <script src='lib/jsoneditor.js' type='text/javascript'></script>
+  <script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
+  <script src='lib/marked.js' type='text/javascript'></script>
+  <script src='lib/swagger-oauth.js' type='text/javascript'></script>
+  <script src='lib/bootstrap.min.js' type='text/javascript'></script>
+
+  <script type="text/javascript">
+    jQuery.browser = jQuery.browser || {};
+    (function () {
+      jQuery.browser.msie = jQuery.browser.msie || false;
+      jQuery.browser.version = jQuery.browser.version || 0;
+      if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) {
+        jQuery.browser.msie = true;
+        jQuery.browser.version = RegExp.$1;
+      }
+    })();
+  </script>
+
+  <script type="text/javascript">
+    $(function () {
+      var url = window.location.search.match(/url=([^&]+)/);
+      if (url && url.length > 1) {
+        url = decodeURIComponent(url[1]);
+      } else {
+        url = window.location.protocol + "//" + window.location.host + window.location.pathname + "swagger.json";
+      }
+
+      window.swaggerUi = new SwaggerUi({
+        url: url,
+        dom_id: "swagger-ui-container",
+        supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
+        onComplete: function (swaggerApi, swaggerUi) {
+          if (typeof initOAuth == "function") {
+
+            initOAuth({
+              clientId: "ffe7748a-3a3f-4860-a02a-42ab08e4fde2",
+              realm: "realm",
+              appName: "Ambari"
+            });
+
+          }
+
+          $('pre code').each(function (i, e) {
+            hljs.highlightBlock(e)
+          });
+
+          if (swaggerUi.options.url) {
+            $('#input_baseUrl').val(swaggerUi.options.url);
+          }
+          if (swaggerUi.options.apiKey) {
+            $('#input_apiKey').val(swaggerUi.options.apiKey);
+          }
+
+          $("[data-toggle='tooltip']").tooltip();
+
+          addApiKeyAuthorization();
+        },
+        onFailure: function (data) {
+          log("Unable to Load SwaggerUI");
+        },
+        operationsSorter: function (a, b) {
+          var order = { 'get': '0', 'post': '1', 'put': '2', 'delete': '3' };
+          return order[a.method].localeCompare(order[b.method]);
+        },
+        docExpansion: "none",
+        sorter: "alpha"
+      });
+
+      function addApiKeyAuthorization() {
+        var key = encodeURIComponent($('#input_apiKey')[0].value);
+        if (key && key.trim() != "") {
+          var apiKeyAuth = new SwaggerClient.ApiKeyAuthorization("Authorization", "Bearer " + key, "header");
+          window.swaggerUi.api.clientAuthorizations.add("key", apiKeyAuth);
+          log("added key " + key);
+        }
+      }
+
+      $('#input_apiKey').change(addApiKeyAuthorization);
+      // if you have an apiKey you would like to pre-populate on the page for demonstration purposes...
+      /*
+       var apiKey = "myApiKeyXXXX123456789";
+       $('#input_apiKey').val(apiKey);
+       */
+
+      window.swaggerUi.load();
+      swaggerUi.api.clientAuthorizations.add("key", new SwaggerClient.ApiKeyAuthorization("X-Requested-By", "ambari", "header")); //Content-Type
+
+
+      function log() {
+        if ('console' in window) {
+          console.log.apply(console, arguments);
+        }
+      }
+    });
+  </script>
+
+  <script type="text/javascript">
+
+    $(function () {
+
+      $(window).scroll(function () {
+        var sticky = $(".sticky-nav");
+
+        i(sticky);
+        r(sticky);
+
+        function n() {
+          return window.matchMedia("(min-width: 992px)").matches
+        }
+
+        function e() {
+          n() ? sticky.parents(".sticky-nav-placeholder").removeAttr("style") : sticky.parents(".sticky-nav-placeholder").css("min-height", sticky.outerHeight())
+        }
+
+        function i(n) {
+          n.hasClass("fixed") || (navOffset = n.offset().top);
+          e();
+          $(window).scrollTop() > navOffset ? $(".modal.in").length || n.addClass("fixed") : n.removeClass("fixed")
+        }
+
+        function r(e) {
+          function i() {
+            var i = $(window).scrollTop(), r = e.parents(".sticky-nav");
+            return r.hasClass("fixed") && !n() && (i = i + r.outerHeight() + 40), i
+          }
+
+          function r(e) {
+            var t = o.next("[data-endpoint]"), n = o.prev("[data-endpoint]");
+            return "next" === e ? t.length ? t : o.parent().next().find("[data-endpoint]").first() : "prev" === e ? n.length ? n : o.parent().prev().find("[data-endpoint]").last() : []
+          }
+
+          var nav = e.find("[data-navigator]");
+          if (nav.find("[data-endpoint][data-selected]").length) {
+            var o = nav.find("[data-endpoint][data-selected]"),
+              a = $("#" + o.attr("data-endpoint")),
+              s = a.offset().top,
+              l = (s + a.outerHeight(), r("next")),
+              u = r("prev");
+            if (l.length) {
+              {
+                var d = $("#" + l.attr("data-endpoint")), f = d.offset().top;
+                f + d.outerHeight()
+              }
+              i() >= f && c(l)
+            }
+            if (u.length) {
+              var p = $("#" + u.attr("data-endpoint")),
+                g = u.offset().top;
+              v = (g + p.outerHeight(), 100);
+              i() < s - v && c(u)
+            }
+          }
+        }
+
+        function s() {
+          var e = $(".sticky-nav [data-navigator]"),
+            n = e.find("[data-endpoint]").first();
+          n.attr("data-selected", "");
+          u.find("[data-selected-value]").html(n.text())
+        }
+
+        function c(e) {
+          {
+            var n = $(".sticky-nav [data-navigator]");
+            $("#" + e.attr("data-endpoint"))
+          }
+          n.find("[data-resource]").removeClass("active");
+          n.find("[data-selected]").removeAttr("data-selected");
+          e.closest("[data-resource]").addClass("active");
+          e.attr("data-selected", "");
+          sticky.find("[data-selected-value]").html(e.text())
+        }
+      });
+
+    });
+  </script>
+
+  <script type="text/javascript">
+    $(function () {
+      $("[data-toggle='tooltip']").tooltip();
+    });
+  </script>
+
+</head>
+
+<body class="page-docs" style="zoom: 1;">
+<header class="site-header">
+  <nav role="navigation" class="navbar navbar-default">
+    <div class="container">
+      <div class="navbar-header">
+        <button type="button" data-toggle="collapse" data-target="#navbar-collapse" class="navbar-toggle"><span
+                class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span
+                class="icon-bar"></span><span class="icon-bar"></span></button>
+        <h1 class="navbar-brand"><a href="http://swagger.io"><span>swagger explorer</span></a></h1>
+      </div>
+      <div id="navbar-collapse" class="collapse navbar-collapse">
+        <ul class="nav navbar-nav navbar-left">
+          <li class="li-why"><a href="/#/main/dashboard" style="font-size: 25px; padding-left: 0px">Ambari REST API explorer</a></li>
+        </ul>
+      </div>
+    </div>
+  </nav>
+</header>
+
+<section class="content">
+  <div id="api2-explorer">
+    <div class="swagger-section page-docs" style="zoom: 1">
+      <div class="main-section">
+        <div id="swagger-ui-container" class="swagger-ui-wrap">
+        </div>
+      </div>
+    </div>
+  </div>
+</section>
+</body>
+</html>
+


[16/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/GroupPrivilegeResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/GroupPrivilegeResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/GroupPrivilegeResponse.java
new file mode 100644
index 0000000..a722ba5
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/GroupPrivilegeResponse.java
@@ -0,0 +1,61 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.ambari.server.api.services.groups.GroupPrivilegeService;
+import org.apache.ambari.server.orm.entities.PrincipalTypeEntity;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response schema for endpoint {@link GroupPrivilegeService#getPrivileges(HttpHeaders, UriInfo, String)}
+ */
+public class GroupPrivilegeResponse extends PrivilegeResponse implements ApiModel {
+
+  private String groupName;
+
+  /**
+   *
+   * @param groupName          group name
+   * @param permissionLabel    permission label
+   * @param permissionName     permission name
+   * @param privilegeId        privilege id
+   * @param principalType      principal type
+   */
+  public GroupPrivilegeResponse(String groupName, String permissionLabel, String permissionName, Integer privilegeId,
+                               PrincipalTypeEntity.PrincipalType principalType) {
+    this.groupName = groupName;
+    this.permissionLabel = permissionLabel;
+    this.privilegeId = privilegeId;
+    this.permissionName = permissionName;
+    this.principalType = principalType;
+  }
+
+  /**
+   *  Returns group name
+   * @return  group name
+   */
+  @ApiModelProperty(name = "PrivilegeInfo/group_name", required = true)
+  public String getGroupName() {
+    return groupName;
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/GroupRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/GroupRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/GroupRequest.java
index 1bc18cc..e63a383 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/GroupRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/GroupRequest.java
@@ -17,16 +17,19 @@
  */
 package org.apache.ambari.server.controller;
 
+import io.swagger.annotations.ApiModelProperty;
+
 /**
  * Represents a group maintenance request.
  */
-public class GroupRequest {
+public class GroupRequest implements ApiModel{
   private final String groupName;
 
   public GroupRequest(String groupName) {
     this.groupName = groupName;
   }
 
+  @ApiModelProperty(name = "Groups/group_name",required = true)
   public String getGroupName() {
     return groupName;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/GroupResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/GroupResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/GroupResponse.java
index 0baccc7..a1cbe80 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/GroupResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/GroupResponse.java
@@ -19,10 +19,12 @@ package org.apache.ambari.server.controller;
 
 import org.apache.ambari.server.security.authorization.GroupType;
 
+import io.swagger.annotations.ApiModelProperty;
+
 /**
  * Represents a user group maintenance response.
  */
-public class GroupResponse {
+public class GroupResponse implements ApiModel{
   private final String groupName;
   private final boolean ldapGroup;
   private final GroupType groupType;
@@ -39,14 +41,17 @@ public class GroupResponse {
     this.groupType = GroupType.LOCAL;
   }
 
+  @ApiModelProperty(name = "Groups/group_name")
   public String getGroupName() {
     return groupName;
   }
 
+  @ApiModelProperty(name = "Groups/ldap_group")
   public boolean isLdapGroup() {
     return ldapGroup;
   }
 
+  @ApiModelProperty(name = "Groups/group_type")
   public GroupType getGroupType() {
     return groupType;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/MemberRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/MemberRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/MemberRequest.java
index 0245f36..dd0e999 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/MemberRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/MemberRequest.java
@@ -17,6 +17,8 @@
  */
 package org.apache.ambari.server.controller;
 
+import io.swagger.annotations.ApiModelProperty;
+
 /**
  * Represents a member maintenance request.
  */
@@ -29,10 +31,12 @@ public class MemberRequest {
     this.userName  = userName;
   }
 
+  @ApiModelProperty(name = "MemberInfo/group_name", required = true)
   public String getGroupName() {
     return groupName;
   }
 
+  @ApiModelProperty(name = "MemberInfo/user_name", required = true)
   public String getUserName() {
     return userName;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/MemberResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/MemberResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/MemberResponse.java
index 3dc6558..69a69a7 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/MemberResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/MemberResponse.java
@@ -17,7 +17,9 @@
  */
 package org.apache.ambari.server.controller;
 
-public class MemberResponse {
+import io.swagger.annotations.ApiModelProperty;
+
+public class MemberResponse implements ApiModel{
   private final String groupName;
   private final String userName;
 
@@ -26,10 +28,12 @@ public class MemberResponse {
     this.userName = userName;
   }
 
+  @ApiModelProperty(name = "MemberInfo/group_name")
   public String getGroupName() {
     return groupName;
   }
 
+  @ApiModelProperty(name = "MemberInfo/user_name")
   public String getUserName() {
     return userName;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/PrivilegeResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/PrivilegeResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/PrivilegeResponse.java
new file mode 100644
index 0000000..a067afb
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/PrivilegeResponse.java
@@ -0,0 +1,175 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+
+import org.apache.ambari.server.orm.entities.PrincipalTypeEntity.PrincipalType;
+import org.apache.ambari.server.security.authorization.ResourceType;
+
+import io.swagger.annotations.ApiModelProperty;
+
+
+public abstract class PrivilegeResponse implements ApiModel {
+  protected String permissionLabel;
+  protected Integer privilegeId;
+  protected String permissionName;
+  protected PrincipalType principalType;
+  protected String principalName;
+  protected ResourceType type;
+  protected String clusterName;
+  protected String viewName;
+  protected String version;
+  protected String instanceName;
+
+
+  /**
+   * Returns permission label
+   * @return permission label
+   */
+  @ApiModelProperty(name = "PrivilegeInfo/permission_label")
+  public String getPermissionLabel() {
+    return permissionLabel;
+  }
+
+  /**
+   * Returns principal name
+   * @return principal name
+   */
+  @ApiModelProperty(name = "PrivilegeInfo/principal_name")
+  public String getPrincipalName() {
+    return principalName;
+  }
+
+  /**
+   * Sets principal name
+   * @param principalName  principal name
+   */
+  public void setPrincipalName(String principalName) {
+    this.principalName = principalName;
+  }
+
+  /**
+   * Returns privilege id
+   * @return  privilege id
+   */
+  @ApiModelProperty(name = "PrivilegeInfo/privilege_id")
+  public Integer getPrivilegeId() {
+    return privilegeId;
+  }
+
+  /**
+   * Returns permission name
+   * @return permission name
+   */
+  @ApiModelProperty(name = "PrivilegeInfo/permission_name")
+  public String getPermissionName() {
+    return permissionName;
+  }
+
+  /**
+   * Returns principal type
+   * @return principal type
+   */
+  @ApiModelProperty(name = "PrivilegeInfo/principal_type")
+  public PrincipalType getPrincipalType() {
+    return principalType;
+  }
+
+  /**
+   * Returns resource type
+   * @return resource type
+   */
+  @ApiModelProperty(name = "PrivilegeInfo/type")
+  public ResourceType getType() {
+    return type;
+  }
+
+  /**
+   * Sets resource type
+   * @param type resource type
+   */
+  public void setType(ResourceType type) {
+    this.type = type;
+  }
+
+  /**
+   * Returns cluster name
+   * @return cluster name
+   */
+  @ApiModelProperty(name = "PrivilegeInfo/cluster_name")
+  public String getClusterName() {
+    return clusterName;
+  }
+
+  /**
+   * Sets cluster name
+   * @param clusterName cluster name
+   */
+  public void setClusterName(String clusterName) {
+    this.clusterName = clusterName;
+  }
+
+  /**
+   * Returns view name
+   * @return view name
+   */
+  @ApiModelProperty(name = "PrivilegeInfo/view_name")
+  public String getViewName() {
+    return viewName;
+  }
+
+  /**
+   * Sets view name
+   * @param viewName  view name
+   */
+  public void setViewName(String viewName) {
+    this.viewName = viewName;
+  }
+
+  /**
+   * Returns view version
+   * @return view version
+   */
+  @ApiModelProperty(name = "PrivilegeInfo/version")
+  public String getVersion() {
+    return version;
+  }
+
+  /**
+   * Sets view version
+   * @param version view version
+   */
+  public void setVersion(String version) {
+    this.version = version;
+  }
+
+  /**
+   * Returns view instance name
+   * @return view instance name
+   */
+  @ApiModelProperty(name = "PrivilegeInfo/instance_name")
+  public String getInstanceName() {
+    return instanceName;
+  }
+
+  public void setInstanceName(String instanceName) {
+    this.instanceName = instanceName;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/UserAuthorizationResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/UserAuthorizationResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/UserAuthorizationResponse.java
new file mode 100644
index 0000000..1965e6f
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/UserAuthorizationResponse.java
@@ -0,0 +1,153 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.ambari.server.api.services.users.UserAuthorizationService;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response schema for endpoint {@link UserAuthorizationService#getAuthorizations(HttpHeaders, UriInfo, String)}
+ */
+public class UserAuthorizationResponse implements ApiModel {
+
+  private final String authorizationId;
+  private final String authorizationName;
+  private final String resourceType;
+  private final String userName;
+  private String clusterName;
+  private String viewName;
+  private String viewVersion;
+  private String viewInstanceName;
+
+
+  /**
+   *
+   * @param authorizationId      authorization id
+   * @param authorizationName    authorization name
+   * @param clusterName          cluster name
+   * @param resourceType         resource type
+   * @param userName             user name
+   */
+  public UserAuthorizationResponse(String authorizationId, String authorizationName,
+                               String clusterName, String resourceType, String userName) {
+    this.authorizationId = authorizationId;
+    this.authorizationName = authorizationName;
+    this.clusterName = clusterName;
+    this.resourceType = resourceType;
+    this.userName = userName;
+  }
+
+  /**
+   *
+   * @param authorizationId     authorization id
+   * @param authorizationName   authorization name
+   * @param resourceType        resource type
+   * @param userName            user name
+   * @param viewName            view name
+   * @param viewVersion         view version
+   * @param viewInstanceName    view instance name
+   */
+  public UserAuthorizationResponse(String authorizationId, String authorizationName,
+                               String resourceType, String userName, String viewName,
+                               String viewVersion, String viewInstanceName) {
+    this.authorizationId = authorizationId;
+    this.authorizationName = authorizationName;
+    this.resourceType = resourceType;
+    this.userName = userName;
+    this.viewName = viewName;
+    this.viewVersion = viewVersion;
+    this.viewInstanceName = viewInstanceName;
+  }
+
+  /**
+   * Returns authorization id
+   * @return authorization id
+   */
+  @ApiModelProperty(name = "AuthorizationInfo/authorization_id")
+  public String getAuthorizationId() {
+    return authorizationId;
+  }
+
+  /**
+   * Returns authorization name
+   * @return authorization name
+   */
+  @ApiModelProperty(name = "AuthorizationInfo/authorization_name")
+  public String getAuthorizationName() {
+    return authorizationName;
+  }
+
+  /**
+   * Returns resource type
+   * @return resource type
+   */
+  @ApiModelProperty(name = "AuthorizationInfo/resource_type")
+  public String getResourceType() {
+    return resourceType;
+  }
+
+  /**
+   * Returns view version
+   * @return view version
+   */
+  @ApiModelProperty(name = "AuthorizationInfo/view_version")
+  public String getViewVersion() {
+    return viewVersion;
+  }
+
+  /**
+   * Returns view instance name
+   * @return view instance name
+   */
+  @ApiModelProperty(name = "AuthorizationInfo/view_instance_name")
+  public String getViewInstanceName() {
+    return viewInstanceName;
+  }
+
+  /**
+   * Returns user name
+   * @return user name
+   */
+  @ApiModelProperty(name = "AuthorizationInfo/user_name",required = true)
+  public String getUserName() {
+    return userName;
+  }
+
+  /**
+   * Returns cluster name
+   * @return cluster name
+   */
+  @ApiModelProperty(name = "AuthorizationInfo/cluster_name")
+  public String getClusterName() {
+    return clusterName;
+  }
+
+  /**
+   * Returns view name
+   * @return view name
+   */
+  @ApiModelProperty(name = "AuthorizationInfo/view_name")
+  public String getViewName() {
+    return viewName;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/UserPrivilegeResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/UserPrivilegeResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/UserPrivilegeResponse.java
new file mode 100644
index 0000000..6502581
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/UserPrivilegeResponse.java
@@ -0,0 +1,61 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.ambari.server.api.services.users.UserPrivilegeService;
+import org.apache.ambari.server.orm.entities.PrincipalTypeEntity;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response schema for endpoint {@link UserPrivilegeService#getPrivileges(HttpHeaders, UriInfo, String)}
+ */
+public class UserPrivilegeResponse extends PrivilegeResponse implements ApiModel {
+
+  private final String userName;
+
+  /**
+   *
+   * @param userName           user name
+   * @param permissionLabel    permission label
+   * @param permissionName     permission name
+   * @param privilegeId        privilege id
+   * @param principalType      principal type
+   */
+  public UserPrivilegeResponse(String userName, String permissionLabel, String permissionName, Integer privilegeId,
+                           PrincipalTypeEntity.PrincipalType principalType) {
+    this.userName = userName;
+    this.permissionLabel = permissionLabel;
+    this.privilegeId = privilegeId;
+    this.permissionName = permissionName;
+    this.principalType = principalType;
+  }
+
+  /**
+   * Returns user name
+   * @return  user name
+   */
+  @ApiModelProperty(name = "PrivilegeInfo/user_name",required = true)
+  public String getUserName() {
+    return userName;
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/UserRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/UserRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/UserRequest.java
index 282131a..95f3d0f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/UserRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/UserRequest.java
@@ -17,9 +17,13 @@
  */
 package org.apache.ambari.server.controller;
 
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
 /**
  * Represents a user maintenance request.
  */
+@ApiModel
 public class UserRequest {
   private String userName;
   private String password;
@@ -27,14 +31,16 @@ public class UserRequest {
   private Boolean active;
   private Boolean admin;
 
-  public UserRequest(String name) {
-    this.userName = name;
-  }
-
+  @ApiModelProperty(name = "Users/user_name",hidden = true)
   public String getUsername() {
     return userName;
   }
 
+  public UserRequest(String name) {
+    this.userName = name;
+  }
+
+  @ApiModelProperty(name = "Users/password")
   public String getPassword() {
     return password;
   }
@@ -43,6 +49,7 @@ public class UserRequest {
     password = userPass;
   }
 
+  @ApiModelProperty(name = "Users/old_password")
   public String getOldPassword() {
     return oldPassword;
   }
@@ -51,6 +58,7 @@ public class UserRequest {
     oldPassword = oldUserPass;
   }
 
+  @ApiModelProperty(name = "Users/active")
   public Boolean isActive() {
     return active;
   }
@@ -59,6 +67,7 @@ public class UserRequest {
     this.active = active;
   }
 
+  @ApiModelProperty(name = "Users/admin")
   public Boolean isAdmin() {
     return admin;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/UserResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/UserResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/UserResponse.java
index b90f864..aa1c3fc 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/UserResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/UserResponse.java
@@ -22,10 +22,12 @@ import java.util.Set;
 
 import org.apache.ambari.server.security.authorization.UserType;
 
+import io.swagger.annotations.ApiModelProperty;
+
 /**
  * Represents a user maintenance request.
  */
-public class UserResponse {
+public class UserResponse implements ApiModel {
 
   private final String userName;
   private final UserType userType;
@@ -50,10 +52,12 @@ public class UserResponse {
     this.userType = UserType.LOCAL;
   }
 
+  @ApiModelProperty(name = "Users/user_name",required = true)
   public String getUsername() {
     return userName;
   }
 
+  @ApiModelProperty(name = "Users/groups")
   public Set<String> getGroups() {
     return groups;
   }
@@ -62,41 +66,45 @@ public class UserResponse {
     this.groups = groups;
   }
 
-  @Override
-  public boolean equals(Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
-
-    UserResponse that = (UserResponse) o;
-
-    if (userName != null ? !userName.equals(that.userName) : that.userName != null) return false;
-    return userType == that.userType;
-
-  }
-
-  @Override
-  public int hashCode() {
-    int result = userName != null ? userName.hashCode() : 0;
-    result = 31 * result + (userType != null ? userType.hashCode() : 0);
-    return result;
-  }
-
   /**
    * @return the isLdapUser
    */
+  @ApiModelProperty(name = "Users/ldap_user")
   public boolean isLdapUser() {
     return isLdapUser;
   }
 
+  @ApiModelProperty(name = "Users/active")
   public boolean isActive() {
     return isActive;
   }
 
+  @ApiModelProperty(name = "Users/admin")
   public boolean isAdmin() {
     return isAdmin;
   }
 
+  @ApiModelProperty(name = "Users/user_type")
   public UserType getUserType() {
     return userType;
   }
+
+  @Override
+  public boolean equals(Object o) {
+    if (this == o) return true;
+    if (o == null || getClass() != o.getClass()) return false;
+
+    UserResponse that = (UserResponse) o;
+
+    if (userName != null ? !userName.equals(that.userName) : that.userName != null) return false;
+    return userType == that.userType;
+
+  }
+
+  @Override
+  public int hashCode() {
+    int result = userName != null ? userName.hashCode() : 0;
+    result = 31 * result + (userType != null ? userType.hashCode() : 0);
+    return result;
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewInstanceRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewInstanceRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewInstanceRequest.java
new file mode 100644
index 0000000..1664c8a
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewInstanceRequest.java
@@ -0,0 +1,209 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import java.util.Map;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.ambari.server.api.services.views.ViewInstanceService;
+import org.apache.ambari.view.ClusterType;
+
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Request body schema for endpoint {@link ViewInstanceService#createService(String, HttpHeaders, UriInfo, String, String, String)}
+ */
+public class ViewInstanceRequest implements ApiModel{
+  private final ViewInstanceRequestInfo viewInstanceRequestInfo;
+
+  /**
+   * @param viewInstanceRequestInfo  {@link ViewInstanceRequestInfo}
+   */
+  public ViewInstanceRequest(ViewInstanceRequestInfo viewInstanceRequestInfo) {
+    this.viewInstanceRequestInfo = viewInstanceRequestInfo;
+  }
+
+  /**
+   * Returns wrapper class for view instance information
+   * @return {@link #viewInstanceRequestInfo}
+   */
+  @ApiModelProperty(name = "ViewInstanceInfo")
+  public ViewInstanceRequestInfo getViewInstanceInfo() {
+    return viewInstanceRequestInfo;
+  }
+
+  /**
+   * static class that wraps all view instance information
+   */
+  public static class ViewInstanceRequestInfo {
+    protected final String viewName;
+    protected final String version;
+    protected final String instanceName;
+    private final String label;
+    private final String description;
+    private final boolean visible;
+    private final String iconPath;
+    private final String icon64Path;
+    private final Map<String, String> properties;
+    private final Map<String, String> instanceData;
+    private final Integer clusterHandle;
+    private final ClusterType clusterType;
+
+    /**
+     *
+     * @param viewName        view name
+     * @param version         view version
+     * @param instanceName    instance name
+     * @param label           view label
+     * @param description     view description
+     * @param visible         visibility for view
+     * @param iconPath        icon path
+     * @param icon64Path      icon64 path
+     * @param properties      properties
+     * @param instanceData    instance data
+     * @param clusterHandle   cluster handle
+     * @param clusterType     cluster type (local|remote|none)
+     */
+    public ViewInstanceRequestInfo(String viewName, String version, String instanceName, String label, String description,
+                                   boolean visible, String iconPath, String icon64Path, Map<String, String> properties,
+                                   Map<String, String> instanceData, Integer clusterHandle, ClusterType clusterType) {
+      this.viewName = viewName;
+      this.version = version;
+      this.instanceName = instanceName;
+      this.label = label;
+      this.description = description;
+      this.visible = visible;
+      this.iconPath = iconPath;
+      this.icon64Path = icon64Path;
+      this.properties = properties;
+      this.instanceData = instanceData;
+      this.clusterHandle = clusterHandle;
+      this.clusterType = clusterType;
+    }
+
+    /**
+     * Returns view name
+     * @return view name
+     */
+    @ApiModelProperty(name = "view_name", hidden = true)
+    public String getViewName() {
+      return viewName;
+    }
+
+    /**
+     * Returns view version
+     * @return view version
+     */
+    @ApiModelProperty(hidden = true)
+    public String getVersion() {
+      return version;
+    }
+
+    /**
+     * Returns instance name
+     * @return instance name
+     */
+    @ApiModelProperty(name = "instance_name", hidden = true)
+    public String getInstanceName() {
+      return instanceName;
+    }
+
+    /**
+     * Returns view label
+     * @return view label
+     */
+    public String getLabel() {
+      return label;
+    }
+
+    /**
+     * Returns view description
+     * @return view description
+     */
+    public String getDescription() {
+      return description;
+    }
+
+    /**
+     * Returns visibility for view
+     * @return visibility for view
+     */
+    public boolean isVisible() {
+      return visible;
+    }
+
+    /**
+     * Returns icon path
+     * @return icon path
+     */
+    @ApiModelProperty(name = "icon_path")
+    public String getIconPath() {
+      return iconPath;
+    }
+
+    /**
+     * Returns icon64 patch
+     * @return icon64 path
+     */
+    @ApiModelProperty(name = "icon64_path")
+    public String getIcon64Path() {
+      return icon64Path;
+    }
+
+    /**
+     * Returns all view properties
+     * @return view properties
+     */
+    public Map<String, String> getProperties() {
+      return properties;
+    }
+
+    /**
+     * Returns instance data
+     * @return instance data
+     */
+    @ApiModelProperty(name = "instance_data")
+    public Map<String, String> getInstanceData() {
+      return instanceData;
+    }
+
+    /**
+     * Returns cluster handle
+     * @return cluster handle
+     */
+    @ApiModelProperty(name = "cluster_handle")
+    public Integer getClusterHandle() {
+      return clusterHandle;
+    }
+
+    /**
+     * Returns cluster type {@link ClusterType}
+     * @return cluster type
+     */
+    @ApiModelProperty(name = "cluster_type")
+    public ClusterType getClusterType() {
+      return clusterType;
+    }
+
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewInstanceResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewInstanceResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewInstanceResponse.java
new file mode 100644
index 0000000..d0a5206
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewInstanceResponse.java
@@ -0,0 +1,198 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import java.util.Map;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.ambari.server.api.services.views.ViewInstanceService;
+import org.apache.ambari.view.ClusterType;
+import org.apache.ambari.view.validation.ValidationResult;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response schema for endpoint {@link ViewInstanceService#getServices(String, HttpHeaders, UriInfo, String, String)}
+ */
+public class ViewInstanceResponse implements ApiModel{
+  private final ViewInstanceResponseInfo viewInstanceResponseInfo;
+
+  public ViewInstanceResponse(ViewInstanceResponseInfo viewInstanceResponseInfo) {
+    this.viewInstanceResponseInfo = viewInstanceResponseInfo;
+  }
+
+  @ApiModelProperty(name = "ViewInstanceInfo")
+  public ViewInstanceResponseInfo getViewInstanceInfo() {
+    return viewInstanceResponseInfo;
+  }
+
+  public class ViewInstanceResponseInfo extends ViewInstanceRequest.ViewInstanceRequestInfo {
+    private final String contextPath;
+    private final boolean staticDriven;
+    private String shortUrl;
+    private String shortUrlName;
+    private ValidationResult validationResult;
+    private Map<String, ValidationResult> propertyValidationResults;
+
+    /**
+     *
+     * @param viewName        view name
+     * @param version         view version
+     * @param instanceName    view instance name
+     * @param label           view label
+     * @param description     view description
+     * @param visible         visible
+     * @param iconPath        icon path
+     * @param icon64Path      icon64 path
+     * @param properties      view properties
+     * @param instanceData    view instance data
+     * @param clusterHandle   cluster handle
+     * @param clusterType     cluster type (local|remote|none)
+     * @param contextPath     context path
+     * @param staticDriven    is static driven
+     */
+    public ViewInstanceResponseInfo(String viewName, String version, String instanceName, String label, String description,
+                                    boolean visible, String iconPath, String icon64Path, Map<String, String> properties,
+                                    Map<String, String> instanceData, Integer clusterHandle, ClusterType clusterType,
+                                    String contextPath, boolean staticDriven) {
+      super(viewName, version, instanceName, label, description, visible, iconPath, icon64Path, properties, instanceData, clusterHandle, clusterType);
+      this.contextPath = contextPath;
+      this.staticDriven = staticDriven;
+    }
+
+    /**
+     * Return view name.
+     * @return view name
+     */
+    @Override
+    @ApiModelProperty(name = "view_name", hidden = false)
+    public String getViewName() {
+      return viewName;
+    }
+
+    /**
+     * Return view version
+     * @return view version
+     */
+    @Override
+    @ApiModelProperty(hidden = false)
+    public String getVersion() {
+      return version;
+    }
+
+    /**
+     * Return view instance name
+     * @return view instance name
+     */
+    @Override
+    @ApiModelProperty(name = "instance_name", hidden = false)
+    public String getInstanceName() {
+      return instanceName;
+    }
+
+    /**
+     * Return view context path
+     * @return context path
+     */
+    @ApiModelProperty(name = "context_path")
+    public String getContextPath() {
+      return contextPath;
+    }
+
+    /**
+     * Return if the view is static driven
+     * @return  {{@link #staticDriven}
+     */
+    @ApiModelProperty(name = "static")
+    public boolean isStaticDriven() {
+      return staticDriven;
+    }
+
+    /**
+     * Return short url for the view
+     * @return short url for the view
+     */
+    @ApiModelProperty(name = "short_url")
+    public String getShortUrl() {
+      return shortUrl;
+    }
+
+    /**
+     * set short url for the view
+     * @param shortUrl  short url
+     */
+    public void setShortUrl(String shortUrl) {
+      this.shortUrl = shortUrl;
+    }
+
+    /**
+     * Returns short url name
+     * @return short url name
+     */
+    @ApiModelProperty(name = "short_url_name")
+    public String getShortUrlName() {
+      return shortUrlName;
+    }
+
+    /**
+     * Sets short url name
+     * @param shortUrlName short url name
+     */
+    public void setShortUrlName(String shortUrlName) {
+      this.shortUrlName = shortUrlName;
+    }
+
+    /**
+     * Returns validation result
+     * @return {@link ValidationResult}
+     */
+    @ApiModelProperty(name = "validation_result")
+    public ValidationResult getValidationResult() {
+      return validationResult;
+    }
+
+    /**
+     * sets validation result
+     * @param validationResult {@link ValidationResult}
+     */
+    public void setValidationResult(ValidationResult validationResult) {
+      this.validationResult = validationResult;
+    }
+
+    /**
+     * Returns map of property->ValidationResult
+     * @return Map
+     */
+    @ApiModelProperty(name = "property_validation_results")
+    public Map<String, ValidationResult> getPropertyValidationResults() {
+      return propertyValidationResults;
+    }
+
+    /**
+     * Sets map of property->ValidationResult
+     * @param propertyValidationResults  Map
+     */
+    public void setPropertyValidationResults(Map<String, ValidationResult> propertyValidationResults) {
+      this.propertyValidationResults = propertyValidationResults;
+    }
+
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewPermissionResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewPermissionResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewPermissionResponse.java
new file mode 100644
index 0000000..15f4e6e
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewPermissionResponse.java
@@ -0,0 +1,122 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.ambari.server.api.services.views.ViewPermissionService;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response schema for endpoint {@link ViewPermissionService#getPermissions(HttpHeaders, UriInfo, String, String)}
+ */
+public class ViewPermissionResponse implements ApiModel {
+
+  private final ViewPermissionInfo viewPermissionInfo;
+
+  /**
+   *
+   * @param viewPermissionInfo view permission info
+   */
+  public ViewPermissionResponse(ViewPermissionInfo viewPermissionInfo) {
+    this.viewPermissionInfo = viewPermissionInfo;
+  }
+
+  /**
+   * Returns {@link ViewPermissionInfo} instance that hold all view permission information
+   * @return {@link ViewPermissionInfo}
+   */
+  @ApiModelProperty(name = "ViewPermissionInfo")
+  public ViewPermissionInfo getViewPermissionInfo() {
+    return viewPermissionInfo;
+  }
+
+  /**
+   * static wrapper class that holds all view permission information
+   */
+  public static class ViewPermissionInfo {
+    private final String viewName;
+    private final String version;
+    private final Integer permissionId;
+    private final String permissionName;
+    private final String resourceName;
+
+    /**
+     *
+     * @param viewName            view name
+     * @param version             view version
+     * @param permissionId        permission id
+     * @param permissionName      permission name
+     * @param resourceName        resource name
+     */
+    public ViewPermissionInfo(String viewName, String version, Integer permissionId, String permissionName, String resourceName) {
+      this.viewName = viewName;
+      this.version = version;
+      this.permissionId = permissionId;
+      this.permissionName = permissionName;
+      this.resourceName = resourceName;
+    }
+
+    /**
+     * Returns view name
+     * @return view name
+     */
+    @ApiModelProperty(name = "view_name")
+    public String getViewName() {
+      return viewName;
+    }
+
+    /**
+     * Returns view version
+     * @return view version
+     */
+    public String getVersion() {
+      return version;
+    }
+
+    /**
+     * Returns permission id
+     * @return permission id
+     */
+    @ApiModelProperty(name = "permission_id")
+    public Integer getPermissionId() {
+      return permissionId;
+    }
+
+    /**
+     * Returns permission name
+     * @return permission name
+     */
+    @ApiModelProperty(name = "permission_name")
+    public String getPermissionName() {
+      return permissionName;
+    }
+
+    /**
+     * Returns resource name
+     * @return resource names
+     */
+    @ApiModelProperty(name = "resource_name")
+    public String getResourceName() {
+      return resourceName;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewPrivilegeRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewPrivilegeRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewPrivilegeRequest.java
new file mode 100644
index 0000000..cf09e0a
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewPrivilegeRequest.java
@@ -0,0 +1,79 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.ambari.server.api.services.views.ViewPrivilegeService;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Request body schema for endpoint {@link ViewPrivilegeService#createPrivilege(String, HttpHeaders, UriInfo, String, String, String)} )}
+ */
+public class ViewPrivilegeRequest extends ViewPrivilegeResponse implements ApiModel {
+
+  /**
+   * Hide privilege id in request body schema
+   * @return privilege id
+   */
+  @ApiModelProperty(name = "PrivilegeInfo/privilege_id", hidden = true)
+  public Integer getPrivilegeId() {
+    return privilegeId;
+  }
+
+  /**
+   * Hide permission label in request body schema
+   * @return permission label
+   */
+  @ApiModelProperty(name = "PrivilegeInfo/permission_label", hidden = true)
+  public String getPermissionLabel() {
+    return permissionLabel;
+  }
+
+  /**
+   * Hide view name in request body schema
+   * @return view name
+   */
+  @ApiModelProperty(name = "PrivilegeInfo/view_name", hidden = true)
+  public String getViewName() {
+    return viewName;
+  }
+
+  /**
+   * Hide view version in request body schema
+   * @return view version
+   */
+  @ApiModelProperty(name = "PrivilegeInfo/version", hidden = true)
+  public String getVersion() {
+    return version;
+  }
+
+  /**
+   * Hide view instance name in request body schema
+   * @return view instance name
+   */
+  @ApiModelProperty(name = "PrivilegeInfo/instance_name", hidden = true)
+  public String getInstanceName() {
+    return instanceName;
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewPrivilegeResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewPrivilegeResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewPrivilegeResponse.java
new file mode 100644
index 0000000..8199948
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewPrivilegeResponse.java
@@ -0,0 +1,55 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.ambari.server.api.services.views.ViewPrivilegeService;
+import org.apache.ambari.server.security.authorization.ResourceType;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response schema for endpoint {@link ViewPrivilegeService#getPrivileges(HttpHeaders, UriInfo, String, String, String)}
+ */
+public class ViewPrivilegeResponse extends PrivilegeResponse implements ApiModel {
+
+  /**
+   * Hide cluster name from the response schema
+   * @return cluster name
+   */
+  @Override
+  @ApiModelProperty(name = "PrivilegeInfo/cluster_name", hidden = true)
+  public String getClusterName() {
+    return clusterName;
+  }
+
+  /**
+   * Hide resource type from the response schema
+   * @return resource type
+   */
+  @Override
+  @ApiModelProperty(name = "PrivilegeInfo/type", hidden = true)
+  public ResourceType getType() {
+    return type;
+  }
+
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewResponse.java
new file mode 100644
index 0000000..2d5a8f0
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewResponse.java
@@ -0,0 +1,82 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.ambari.server.api.services.views.ViewService;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response schema for endpoint {@link ViewService#getViews(String, HttpHeaders, UriInfo)}
+ */
+public class ViewResponse implements ApiModel {
+  private ViewInfo viewInfo;
+
+  /**
+   *
+   * @param viewInfo {@link ViewInfo}
+   */
+  public ViewResponse(ViewInfo viewInfo) {
+    this.viewInfo = viewInfo;
+  }
+
+  /**
+   * Returns view information wrapper class instance
+   * @return {@link #viewInfo}
+   */
+  @ApiModelProperty(name = "ViewInfo")
+  public ViewInfo getViewInfo() {
+    return viewInfo;
+  }
+
+  /**
+   * static wrapper class for view information
+   */
+  private class ViewInfo implements ApiModel{
+    private String viewName;
+
+    /**
+     *
+     * @param viewName view name
+     */
+    public ViewInfo(String viewName) {
+      this.viewName = viewName;
+    }
+
+    /**
+     * Returns view name
+     * @return view name
+     */
+    @ApiModelProperty(name = "view_name")
+    public String getViewName() {
+      return viewName;
+    }
+
+    /**
+     * Sets view name
+     * @param viewName view name
+     */
+    public void setViewName(String viewName) {
+      this.viewName = viewName;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewVersionResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewVersionResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewVersionResponse.java
new file mode 100644
index 0000000..0bc84c0
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewVersionResponse.java
@@ -0,0 +1,234 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import java.util.List;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.ambari.server.api.services.views.ViewVersionService;
+import org.apache.ambari.server.view.configuration.ParameterConfig;
+import org.apache.ambari.view.ViewDefinition;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response schema for endpoint {@link ViewVersionService#getVersions(String, HttpHeaders, UriInfo, String)}
+ */
+public class ViewVersionResponse implements ApiModel {
+
+  ViewVersionInfo viewVersionInfo;
+
+  /**
+   *
+   * @param viewVersionInfo  view version information {@link #viewVersionInfo}
+   */
+  public ViewVersionResponse(ViewVersionInfo viewVersionInfo) {
+    this.viewVersionInfo = viewVersionInfo;
+  }
+
+  /**
+   * Returns wrapper class instance for view version information
+   * @return {@link #viewVersionInfo}
+   */
+  @ApiModelProperty(name = "ViewVersionInfo")
+  public ViewVersionInfo getViewVersionInfo() {
+    return viewVersionInfo;
+  }
+
+  /**
+   * static wrapper class for view version information
+   */
+  public static class ViewVersionInfo implements ApiModel {
+    private final String archive;
+    private final String buildNumber;
+    private final boolean clusterConfigurable;
+    private final String description;
+    private final String label;
+    private final String maskerClass;
+    private final String maxAmbariVersion;
+    private final String minAmbariVersion;
+    private final List<ParameterConfig> parameters;
+    private final ViewDefinition.ViewStatus status;
+    private final String statusDetail;
+    private final boolean system;
+    private final String version;
+    private final String viewName;
+
+    /**
+     *
+     * @param archive               archive
+     * @param buildNumber           build number
+     * @param clusterConfigurable   cluster configurable
+     * @param description           version description
+     * @param label                 version label
+     * @param maskerClass           masker class
+     * @param maxAmbariVersion      maximum ambari version
+     * @param minAmbariVersion      minimum ambari version
+     * @param parameters            version parameters
+     * @param status                status
+     * @param statusDetail          status details
+     * @param system                system
+     * @param version               version number
+     * @param viewName              view name
+     */
+    public ViewVersionInfo(String archive, String buildNumber, boolean clusterConfigurable, String description,
+                           String label, String maskerClass, String maxAmbariVersion, String minAmbariVersion,
+                           List<ParameterConfig> parameters, ViewDefinition.ViewStatus status, String statusDetail,
+                           boolean system, String version, String viewName) {
+      this.archive = archive;
+      this.buildNumber = buildNumber;
+      this.clusterConfigurable = clusterConfigurable;
+      this.description = description;
+      this.label = label;
+      this.maskerClass = maskerClass;
+      this.maxAmbariVersion = maxAmbariVersion;
+      this.minAmbariVersion = minAmbariVersion;
+      this.parameters = parameters;
+      this.status = status;
+      this.statusDetail = statusDetail;
+      this.system = system;
+      this.version = version;
+      this.viewName = viewName;
+    }
+
+    /**
+     * Returns archive string
+     * @return  archive
+     */
+    public String getArchive() {
+      return archive;
+    }
+
+    /**
+     * Returns build number
+     * @return build number
+     */
+    @ApiModelProperty(name = "build_number")
+    public String getBuildNumber() {
+      return buildNumber;
+    }
+
+    /**
+     * Checks if cluster is configurable
+     * @return {@code true} if cluster is configurable
+     *         {@code false} otherwise.
+     */
+    @ApiModelProperty(name = "cluster_configurable")
+    public boolean isClusterConfigurable() {
+      return clusterConfigurable;
+    }
+
+    /**
+     * Returns view description
+     * @return view description
+     */
+    public String getDescription() {
+      return description;
+    }
+
+    /**
+     * Returns view label
+     * @return view label
+     */
+    public String getLabel() {
+      return label;
+    }
+
+    /**
+     * Returns masker class
+     * @return masker class
+     */
+    @ApiModelProperty(name = "masker_class")
+    public String getMaskerClass() {
+      return maskerClass;
+    }
+
+    /**
+     * Returns maximum ambari version
+     * @return maximum ambari version
+     */
+    @ApiModelProperty(name = "max_ambari_version")
+    public String getMaxAmbariVersion() {
+      return maxAmbariVersion;
+    }
+
+    /**
+     * Returns minimum ambari version
+     * @return minimum ambari version
+     */
+    @ApiModelProperty(name = "min_ambari_version")
+    public String getMinAmbariVersion() {
+      return minAmbariVersion;
+    }
+
+    /**
+     * Returns view parameters
+     * @return list of {@link ParameterConfig}
+     */
+    public List<ParameterConfig> getParameters() {
+      return parameters;
+    }
+
+    /**
+     * Returns view status
+     * @return {@link ViewDefinition.ViewStatus}
+     */
+    public ViewDefinition.ViewStatus getStatus() {
+      return status;
+    }
+
+    /**
+     * Returns views status details
+     * @return status details
+     */
+    @ApiModelProperty(name = "status_detail")
+    public String getStatusDetail() {
+      return statusDetail;
+    }
+
+    /**
+     * Checks if system
+     * @return {@code true} if system view
+     *         {@code false} otherwise.
+     */
+    public boolean isSystem() {
+      return system;
+    }
+
+    /**
+     * Returns view version
+     * @return view version
+     */
+    public String getVersion() {
+      return version;
+    }
+
+    /**
+     * Returns view name
+     * @return view name
+     */
+    @ApiModelProperty(name = "view_name")
+    public String getViewName() {
+      return viewName;
+    }
+
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProvider.java
index d9a7997..5d52af2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ActiveWidgetLayoutResourceProvider.java
@@ -26,6 +26,7 @@ import java.util.Set;
 
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.StaticallyInject;
+import org.apache.ambari.server.controller.ActiveWidgetLayoutResponse;
 import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.WidgetResponse;
 import org.apache.ambari.server.controller.spi.NoSuchParentResourceException;
@@ -168,36 +169,46 @@ public class ActiveWidgetLayoutResourceProvider extends AbstractControllerResour
     }
 
     for (WidgetLayoutEntity layoutEntity : layoutEntities) {
+      ActiveWidgetLayoutResponse activeWidgetLayoutResponse  = getResponse(layoutEntity);
       Resource resource = new ResourceImpl(Type.ActiveWidgetLayout);
-      resource.setProperty(WIDGETLAYOUT_ID_PROPERTY_ID, layoutEntity.getId());
-      String clusterName = null;
-      try {
-        clusterName = getManagementController().getClusters().getClusterById(layoutEntity.getClusterId()).getClusterName();
-      } catch (AmbariException e) {
-        throw new SystemException(e.getMessage());
-      }
-      resource.setProperty(WIDGETLAYOUT_CLUSTER_NAME_PROPERTY_ID, clusterName);
-      resource.setProperty(WIDGETLAYOUT_LAYOUT_NAME_PROPERTY_ID, layoutEntity.getLayoutName());
-      resource.setProperty(WIDGETLAYOUT_SECTION_NAME_PROPERTY_ID, layoutEntity.getSectionName());
-      resource.setProperty(WIDGETLAYOUT_SCOPE_PROPERTY_ID, layoutEntity.getScope());
-      resource.setProperty(WIDGETLAYOUT_USERNAME_PROPERTY_ID, layoutEntity.getUserName());
-      resource.setProperty(WIDGETLAYOUT_DISPLAY_NAME_PROPERTY_ID, layoutEntity.getDisplayName());
-
-      List<HashMap> widgets = new ArrayList<HashMap>();
-      List<WidgetLayoutUserWidgetEntity> widgetLayoutUserWidgetEntityList = layoutEntity.getListWidgetLayoutUserWidgetEntity();
-      for (WidgetLayoutUserWidgetEntity widgetLayoutUserWidgetEntity : widgetLayoutUserWidgetEntityList) {
-        WidgetEntity widgetEntity = widgetLayoutUserWidgetEntity.getWidget();
-        HashMap<String, Object> widgetInfoMap = new HashMap<String, Object>();
-        widgetInfoMap.put("WidgetInfo",WidgetResponse.coerce(widgetEntity));
-        widgets.add(widgetInfoMap);
-      }
-      resource.setProperty(WIDGETLAYOUT_WIDGETS_PROPERTY_ID, widgets);
-
+      resource.setProperty(WIDGETLAYOUT_ID_PROPERTY_ID, activeWidgetLayoutResponse.getId());
+      resource.setProperty(WIDGETLAYOUT_CLUSTER_NAME_PROPERTY_ID, activeWidgetLayoutResponse.getClusterName());
+      resource.setProperty(WIDGETLAYOUT_LAYOUT_NAME_PROPERTY_ID, activeWidgetLayoutResponse.getLayoutName());
+      resource.setProperty(WIDGETLAYOUT_SECTION_NAME_PROPERTY_ID, activeWidgetLayoutResponse.getSectionName());
+      resource.setProperty(WIDGETLAYOUT_SCOPE_PROPERTY_ID, activeWidgetLayoutResponse.getScope());
+      resource.setProperty(WIDGETLAYOUT_USERNAME_PROPERTY_ID, activeWidgetLayoutResponse.getUserName());
+      resource.setProperty(WIDGETLAYOUT_DISPLAY_NAME_PROPERTY_ID, activeWidgetLayoutResponse.getDisplayName());
+      resource.setProperty(WIDGETLAYOUT_WIDGETS_PROPERTY_ID, activeWidgetLayoutResponse.getWidgets());
       resources.add(resource);
     }
     return resources;
   }
 
+  /**
+   * Returns the response for the active widget layout that should be returned for the active widget layout REST endpoint
+   * @param layoutEntity {@link WidgetLayoutEntity}
+   * @return  {@link ActiveWidgetLayoutResponse}
+   * @throws SystemException
+   */
+  private ActiveWidgetLayoutResponse getResponse(WidgetLayoutEntity layoutEntity) throws SystemException {
+    String clusterName = null;
+    try {
+      clusterName = getManagementController().getClusters().getClusterById(layoutEntity.getClusterId()).getClusterName();
+    } catch (AmbariException e) {
+      throw new SystemException(e.getMessage());
+    }
+    List<HashMap<String,WidgetResponse>> widgets = new ArrayList<HashMap<String,WidgetResponse>>();
+    List<WidgetLayoutUserWidgetEntity> widgetLayoutUserWidgetEntityList = layoutEntity.getListWidgetLayoutUserWidgetEntity();
+    for (WidgetLayoutUserWidgetEntity widgetLayoutUserWidgetEntity : widgetLayoutUserWidgetEntityList) {
+      WidgetEntity widgetEntity = widgetLayoutUserWidgetEntity.getWidget();
+      HashMap<String, WidgetResponse> widgetInfoMap = new HashMap<String, WidgetResponse>();
+      widgetInfoMap.put("WidgetInfo",WidgetResponse.coerce(widgetEntity));
+      widgets.add(widgetInfoMap);
+    }
+   return  new ActiveWidgetLayoutResponse(layoutEntity.getId(), clusterName, layoutEntity.getDisplayName(), layoutEntity.getLayoutName(),
+      layoutEntity.getSectionName(), layoutEntity.getScope(), layoutEntity.getUserName(),  widgets);
+  }
+
   @Override
   public RequestStatus updateResources(Request request, Predicate predicate)
     throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProvider.java
index bf63794..38c39f3 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProvider.java
@@ -25,6 +25,8 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.ambari.server.StaticallyInject;
+import org.apache.ambari.server.controller.GroupPrivilegeResponse;
+import org.apache.ambari.server.controller.PrivilegeResponse;
 import org.apache.ambari.server.controller.spi.NoSuchParentResourceException;
 import org.apache.ambari.server.controller.spi.NoSuchResourceException;
 import org.apache.ambari.server.controller.spi.Predicate;
@@ -188,7 +190,8 @@ public class GroupPrivilegeResourceProvider extends ReadOnlyResourceProvider {
         final Collection<PrivilegeEntity> privileges = users.getGroupPrivileges(groupEntity);
 
         for (PrivilegeEntity privilegeEntity : privileges) {
-          resources.add(toResource(privilegeEntity, groupName, requestedIds));
+          GroupPrivilegeResponse response = getResponse(privilegeEntity, groupName);
+          resources.add(toResource(response, requestedIds));
         }
       }
     }
@@ -197,50 +200,83 @@ public class GroupPrivilegeResourceProvider extends ReadOnlyResourceProvider {
   }
 
   /**
-   * Translate the found data into a Resource
-   *
+   * Returns the response for the group privilege that should be returned for the group privilege REST endpoint
    * @param privilegeEntity the privilege data
-   * @param groupName        the group name
-   * @param requestedIds    the relevant request ids
-   * @return a resource
+   * @param groupName    the group name
+   * @return group privilege response
    */
-  protected Resource toResource(PrivilegeEntity privilegeEntity, Object groupName, Set<String> requestedIds) {
-    final ResourceImpl resource = new ResourceImpl(Resource.Type.GroupPrivilege);
+  protected GroupPrivilegeResponse getResponse(PrivilegeEntity privilegeEntity, String groupName) {
+    String permissionLabel = privilegeEntity.getPermission().getPermissionLabel();
+    String permissionName =  privilegeEntity.getPermission().getPermissionName();
+    String principalTypeName = privilegeEntity.getPrincipal().getPrincipalType().getName();
+    GroupPrivilegeResponse groupPrivilegeResponse = new GroupPrivilegeResponse(groupName, permissionLabel , permissionName,
+      privilegeEntity.getId(), PrincipalTypeEntity.PrincipalType.valueOf(principalTypeName));
 
-    setResourceProperty(resource, PRIVILEGE_GROUP_NAME_PROPERTY_ID, groupName, requestedIds);
-    setResourceProperty(resource, PRIVILEGE_PRIVILEGE_ID_PROPERTY_ID, privilegeEntity.getId(), requestedIds);
-    setResourceProperty(resource, PRIVILEGE_PERMISSION_NAME_PROPERTY_ID, privilegeEntity.getPermission().getPermissionName(), requestedIds);
-    setResourceProperty(resource, PRIVILEGE_PERMISSION_LABEL_PROPERTY_ID, privilegeEntity.getPermission().getPermissionLabel(), requestedIds);
-    setResourceProperty(resource, PRIVILEGE_PRINCIPAL_TYPE_PROPERTY_ID, privilegeEntity.getPrincipal().getPrincipalType().getName(), requestedIds);
-
-    final String principalTypeName = privilegeEntity.getPrincipal().getPrincipalType().getName();
     if (principalTypeName.equals(PrincipalTypeEntity.GROUP_PRINCIPAL_TYPE_NAME)) {
       final GroupEntity groupEntity = groupDAO.findGroupByPrincipal(privilegeEntity.getPrincipal());
-      setResourceProperty(resource, PRIVILEGE_PRINCIPAL_NAME_PROPERTY_ID, groupEntity.getGroupName(), requestedIds);
+      groupPrivilegeResponse.setPrincipalName(groupEntity.getGroupName());
     }
 
+
     String typeName = privilegeEntity.getResource().getResourceType().getName();
     ResourceType resourceType = ResourceType.translate(typeName);
-    if (resourceType != null) {
+
+    if(resourceType != null) {
       switch (resourceType) {
         case AMBARI:
           // there is nothing special to add for this case
           break;
         case CLUSTER:
           final ClusterEntity clusterEntity = clusterDAO.findByResourceId(privilegeEntity.getResource().getId());
-          setResourceProperty(resource, PRIVILEGE_CLUSTER_NAME_PROPERTY_ID, clusterEntity.getClusterName(), requestedIds);
+          groupPrivilegeResponse.setClusterName(clusterEntity.getClusterName());
           break;
         case VIEW:
           final ViewInstanceEntity viewInstanceEntity = viewInstanceDAO.findByResourceId(privilegeEntity.getResource().getId());
           final ViewEntity viewEntity = viewInstanceEntity.getViewEntity();
 
-          setResourceProperty(resource, PRIVILEGE_VIEW_NAME_PROPERTY_ID, viewEntity.getCommonName(), requestedIds);
-          setResourceProperty(resource, PRIVILEGE_VIEW_VERSION_PROPERTY_ID, viewEntity.getVersion(), requestedIds);
-          setResourceProperty(resource, PRIVILEGE_INSTANCE_NAME_PROPERTY_ID, viewInstanceEntity.getName(), requestedIds);
+          groupPrivilegeResponse.setViewName(viewEntity.getCommonName());
+          groupPrivilegeResponse.setVersion(viewEntity.getVersion());
+          groupPrivilegeResponse.setInstanceName(viewInstanceEntity.getName());
+          break;
+      }
+
+      groupPrivilegeResponse.setType(resourceType);
+    }
+
+    return groupPrivilegeResponse;
+  }
+
+  /**
+   * Translate the Response into a Resource
+   * @param response        {@link PrivilegeResponse}
+   * @param requestedIds    the relevant request ids
+   * @return a resource
+   */
+  protected Resource toResource(GroupPrivilegeResponse response, Set<String> requestedIds) {
+    final ResourceImpl resource = new ResourceImpl(Resource.Type.GroupPrivilege);
+
+    setResourceProperty(resource, PRIVILEGE_GROUP_NAME_PROPERTY_ID, response.getGroupName(), requestedIds);
+    setResourceProperty(resource, PRIVILEGE_PRIVILEGE_ID_PROPERTY_ID, response.getPrivilegeId(), requestedIds);
+    setResourceProperty(resource, PRIVILEGE_PERMISSION_NAME_PROPERTY_ID, response.getPermissionName(), requestedIds);
+    setResourceProperty(resource, PRIVILEGE_PERMISSION_LABEL_PROPERTY_ID, response.getPermissionLabel(), requestedIds);
+    setResourceProperty(resource, PRIVILEGE_PRINCIPAL_TYPE_PROPERTY_ID, response.getPrincipalType().name(), requestedIds);
+    if (response.getPrincipalName() != null) {
+      setResourceProperty(resource, PRIVILEGE_PRINCIPAL_NAME_PROPERTY_ID, response.getPrincipalName(), requestedIds);
+    }
+
+    if (response.getType() != null) {
+      setResourceProperty(resource, PRIVILEGE_TYPE_PROPERTY_ID, response.getType().name(), requestedIds);
+      switch (response.getType()) {
+        case CLUSTER:
+          setResourceProperty(resource, PRIVILEGE_CLUSTER_NAME_PROPERTY_ID, response.getClusterName(), requestedIds);
+          break;
+        case VIEW:
+          setResourceProperty(resource, PRIVILEGE_VIEW_NAME_PROPERTY_ID, response.getViewName(), requestedIds);
+          setResourceProperty(resource, PRIVILEGE_VIEW_VERSION_PROPERTY_ID, response.getVersion(), requestedIds);
+          setResourceProperty(resource, PRIVILEGE_INSTANCE_NAME_PROPERTY_ID, response.getInstanceName(), requestedIds);
           break;
       }
 
-      setResourceProperty(resource, PRIVILEGE_TYPE_PROPERTY_ID, resourceType.name(), requestedIds);
     }
 
     return resource;

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProvider.java
index 8193a49..6cb36db 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProvider.java
@@ -27,6 +27,7 @@ import java.util.Set;
 
 import org.apache.ambari.server.StaticallyInject;
 import org.apache.ambari.server.controller.AmbariManagementController;
+import org.apache.ambari.server.controller.UserAuthorizationResponse;
 import org.apache.ambari.server.controller.predicate.EqualsPredicate;
 import org.apache.ambari.server.controller.spi.ClusterController;
 import org.apache.ambari.server.controller.spi.NoSuchParentResourceException;
@@ -251,7 +252,10 @@ public class UserAuthorizationResourceProvider extends ReadOnlyResourceProvider
 
     for (RoleAuthorizationEntity entity : authorizationEntities) {
       Resource resource = new ResourceImpl(Type.UserAuthorization);
-      setResourceProperty(resource, AUTHORIZATION_ID_PROPERTY_ID, entity.getAuthorizationId(), requestedIds);
+      String clusterName = (String)privilegeResource.getPropertyValue(UserPrivilegeResourceProvider.PRIVILEGE_CLUSTER_NAME_PROPERTY_ID);
+      UserAuthorizationResponse userAuthorizationResponse = getResponse(entity.getAuthorizationId(),
+        entity.getAuthorizationName(), clusterName, resourceType, username);
+      setResourceProperty(resource, AUTHORIZATION_ID_PROPERTY_ID, userAuthorizationResponse.getAuthorizationId(), requestedIds);
       setResourceProperty(resource, USERNAME_PROPERTY_ID, username, requestedIds);
       setResourceProperty(resource, AUTHORIZATION_NAME_PROPERTY_ID, entity.getAuthorizationName(), requestedIds);
       setResourceProperty(resource, AUTHORIZATION_RESOURCE_TYPE_PROPERTY_ID, resourceType, requestedIds);
@@ -263,6 +267,7 @@ public class UserAuthorizationResourceProvider extends ReadOnlyResourceProvider
     }
   }
 
+
   /**
    * Creates and adds resources to the results where each resource properly identities the view
    * to which the authorization data applies.
@@ -291,21 +296,58 @@ public class UserAuthorizationResourceProvider extends ReadOnlyResourceProvider
                                 Set<String> requestedIds) {
     for (RoleAuthorizationEntity entity : authorizationEntities) {
       Resource resource = new ResourceImpl(Type.UserAuthorization);
-      setResourceProperty(resource, AUTHORIZATION_ID_PROPERTY_ID, entity.getAuthorizationId(), requestedIds);
-      setResourceProperty(resource, USERNAME_PROPERTY_ID, username, requestedIds);
-      setResourceProperty(resource, AUTHORIZATION_NAME_PROPERTY_ID, entity.getAuthorizationName(), requestedIds);
-      setResourceProperty(resource, AUTHORIZATION_RESOURCE_TYPE_PROPERTY_ID, resourceType, requestedIds);
-      setResourceProperty(resource, AUTHORIZATION_VIEW_NAME_PROPERTY_ID,
-          privilegeResource.getPropertyValue(UserPrivilegeResourceProvider.PRIVILEGE_VIEW_NAME_PROPERTY_ID),
+      String viewName = (String)privilegeResource.getPropertyValue(UserPrivilegeResourceProvider.PRIVILEGE_VIEW_NAME_PROPERTY_ID);
+      String viewVersion = (String)privilegeResource.getPropertyValue(UserPrivilegeResourceProvider.PRIVILEGE_VIEW_VERSION_PROPERTY_ID);
+      String viewInstanceName = (String)privilegeResource.getPropertyValue(UserPrivilegeResourceProvider.PRIVILEGE_INSTANCE_NAME_PROPERTY_ID);
+      UserAuthorizationResponse userAuthorizationResponse = getResponse(entity.getAuthorizationId(),
+        entity.getAuthorizationName(), resourceType, username, viewName, viewVersion, viewInstanceName);
+      setResourceProperty(resource, AUTHORIZATION_ID_PROPERTY_ID, userAuthorizationResponse.getAuthorizationId(), requestedIds);
+      setResourceProperty(resource, USERNAME_PROPERTY_ID, userAuthorizationResponse.getUserName(), requestedIds);
+      setResourceProperty(resource, AUTHORIZATION_NAME_PROPERTY_ID, userAuthorizationResponse.getAuthorizationName(), requestedIds);
+      setResourceProperty(resource, AUTHORIZATION_RESOURCE_TYPE_PROPERTY_ID, userAuthorizationResponse.getResourceType(), requestedIds);
+      setResourceProperty(resource, AUTHORIZATION_VIEW_NAME_PROPERTY_ID, userAuthorizationResponse.getViewName(),
           requestedIds);
-      setResourceProperty(resource, AUTHORIZATION_VIEW_VERSION_PROPERTY_ID,
-          privilegeResource.getPropertyValue(UserPrivilegeResourceProvider.PRIVILEGE_VIEW_VERSION_PROPERTY_ID),
+      setResourceProperty(resource, AUTHORIZATION_VIEW_VERSION_PROPERTY_ID, userAuthorizationResponse.getViewVersion(),
           requestedIds);
-      setResourceProperty(resource, AUTHORIZATION_VIEW_INSTANCE_NAME_PROPERTY_ID,
-          privilegeResource.getPropertyValue(UserPrivilegeResourceProvider.PRIVILEGE_INSTANCE_NAME_PROPERTY_ID),
+      setResourceProperty(resource, AUTHORIZATION_VIEW_INSTANCE_NAME_PROPERTY_ID, userAuthorizationResponse.getViewInstanceName(),
           requestedIds);
 
       resources.add(resource);
     }
   }
+
+  /**
+   *  Returns user authorization response instance that represents the response schema
+   *  for /users/{userName}/authorizations REST endpoint
+   * @param authorizationId     authorization id
+   * @param authorizationName   authorization name
+   * @param clusterName         cluster name
+   * @param resourceType        resource type
+   * @param userName            user name
+   * @return {@link UserAuthorizationResponse}
+   */
+  private UserAuthorizationResponse getResponse(String authorizationId, String authorizationName,
+                                                                     String clusterName, String resourceType, String userName) {
+    return new UserAuthorizationResponse(authorizationId, authorizationName, clusterName, resourceType, userName);
+
+  }
+
+  /**
+   * Returns user authorization response instance that represents the response schema
+   * for /users/{userName}/authorizations REST endpoint
+   * @param authorizationId      authorization id
+   * @param authorizationName    authorization name
+   * @param resourceType         resource type
+   * @param userName             user name
+   * @param viewName             view name
+   * @param viewVersion          view version
+   * @param viewInstanceName     view instance name
+   * @return  {@link UserAuthorizationResponse}
+   */
+  private UserAuthorizationResponse getResponse(String authorizationId, String authorizationName,
+                                                                     String resourceType, String userName, String viewName,
+                                                                     String viewVersion, String viewInstanceName) {
+    return new UserAuthorizationResponse(authorizationId, authorizationName, resourceType, userName, viewName, viewVersion, viewInstanceName);
+
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProvider.java
index b9b756b..bb689ec 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProvider.java
@@ -26,6 +26,8 @@ import java.util.Set;
 import java.util.TreeMap;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.ambari.server.controller.PrivilegeResponse;
+import org.apache.ambari.server.controller.UserPrivilegeResponse;
 import org.apache.ambari.server.controller.spi.NoSuchParentResourceException;
 import org.apache.ambari.server.controller.spi.NoSuchResourceException;
 import org.apache.ambari.server.controller.spi.Predicate;
@@ -299,42 +301,38 @@ public class UserPrivilegeResourceProvider extends ReadOnlyResourceProvider {
         final Collection<PrivilegeEntity> privileges = users.getUserPrivileges(userEntity);
 
         for (PrivilegeEntity privilegeEntity : privileges) {
-          resources.add(toResource(privilegeEntity, userName, requestedIds));
+          UserPrivilegeResponse response = getResponse(privilegeEntity, userName);
+          resources.add(toResource(response, requestedIds));
         }
       }
     }
     return resources;
   }
 
-
   /**
-   * Translate the found data into a Resource
-   *
-   * @param privilegeEntity the privilege data
-   * @param userName        the username
-   * @param requestedIds    the relevant request ids
-   * @return a resource
+   * Returns response schema instance for /users/{userName}/privileges REST endpoint
+   * @param privilegeEntity {@link PrivilegeEntity}
+   * @param userName   user name
+   * @return {@link UserPrivilegeResponse}
    */
-  protected Resource toResource(PrivilegeEntity privilegeEntity, Object userName, Set<String> requestedIds){
-    final ResourceImpl resource = new ResourceImpl(Resource.Type.UserPrivilege);
-
-    setResourceProperty(resource, PRIVILEGE_USER_NAME_PROPERTY_ID, userName, requestedIds);
-    setResourceProperty(resource, PRIVILEGE_PRIVILEGE_ID_PROPERTY_ID, privilegeEntity.getId(), requestedIds);
-    setResourceProperty(resource, PRIVILEGE_PERMISSION_NAME_PROPERTY_ID, privilegeEntity.getPermission().getPermissionName(), requestedIds);
-    setResourceProperty(resource, PRIVILEGE_PERMISSION_LABEL_PROPERTY_ID, privilegeEntity.getPermission().getPermissionLabel(), requestedIds);
-    setResourceProperty(resource, PRIVILEGE_PRINCIPAL_TYPE_PROPERTY_ID, privilegeEntity.getPrincipal().getPrincipalType().getName(), requestedIds);
+  protected UserPrivilegeResponse getResponse(PrivilegeEntity privilegeEntity, String userName) {
+    String permissionLabel = privilegeEntity.getPermission().getPermissionLabel();
+    String permissionName =  privilegeEntity.getPermission().getPermissionName();
+    String principalTypeName = privilegeEntity.getPrincipal().getPrincipalType().getName();
+    UserPrivilegeResponse userPrivilegeResponse = new UserPrivilegeResponse(userName, permissionLabel , permissionName,
+      privilegeEntity.getId(), PrincipalTypeEntity.PrincipalType.valueOf(principalTypeName));
 
-    final String principalTypeName = privilegeEntity.getPrincipal().getPrincipalType().getName();
     if (principalTypeName.equals(PrincipalTypeEntity.USER_PRINCIPAL_TYPE_NAME)) {
       final UserEntity user = userDAO.findUserByPrincipal(privilegeEntity.getPrincipal());
-      setResourceProperty(resource, PRIVILEGE_PRINCIPAL_NAME_PROPERTY_ID, user.getUserName(), requestedIds);
+      userPrivilegeResponse.setPrincipalName(user.getUserName());
     } else if (principalTypeName.equals(PrincipalTypeEntity.GROUP_PRINCIPAL_TYPE_NAME)) {
       final GroupEntity groupEntity = getCachedGroupByPrincipal(privilegeEntity.getPrincipal());
-      setResourceProperty(resource, PRIVILEGE_PRINCIPAL_NAME_PROPERTY_ID, groupEntity.getGroupName(), requestedIds);
+      userPrivilegeResponse.setPrincipalName(groupEntity.getGroupName());
     }
 
     String typeName = privilegeEntity.getResource().getResourceType().getName();
     ResourceType resourceType = ResourceType.translate(typeName);
+
     if(resourceType != null) {
       switch (resourceType) {
         case AMBARI:
@@ -342,21 +340,57 @@ public class UserPrivilegeResourceProvider extends ReadOnlyResourceProvider {
           break;
         case CLUSTER:
           final ClusterEntity clusterEntity = clusterCache.get().getUnchecked(privilegeEntity.getResource().getId());
-          setResourceProperty(resource, PRIVILEGE_CLUSTER_NAME_PROPERTY_ID, clusterEntity.getClusterName(), requestedIds);
+          userPrivilegeResponse.setClusterName(clusterEntity.getClusterName());
           break;
         case VIEW:
           final ViewInstanceEntity viewInstanceEntity = viewInstanceCache.get().getUnchecked(privilegeEntity.getResource().getId());
           final ViewEntity viewEntity = viewInstanceEntity.getViewEntity();
 
-          setResourceProperty(resource, PRIVILEGE_VIEW_NAME_PROPERTY_ID, viewEntity.getCommonName(), requestedIds);
-          setResourceProperty(resource, PRIVILEGE_VIEW_VERSION_PROPERTY_ID, viewEntity.getVersion(), requestedIds);
-          setResourceProperty(resource, PRIVILEGE_INSTANCE_NAME_PROPERTY_ID, viewInstanceEntity.getName(), requestedIds);
+          userPrivilegeResponse.setViewName(viewEntity.getCommonName());
+          userPrivilegeResponse.setVersion(viewEntity.getVersion());
+          userPrivilegeResponse.setInstanceName(viewInstanceEntity.getName());
           break;
       }
 
-      setResourceProperty(resource, PRIVILEGE_TYPE_PROPERTY_ID, resourceType.name(), requestedIds);
+      userPrivilegeResponse.setType(resourceType);
+    }
+
+    return userPrivilegeResponse;
+  }
+
+  /**
+   * Translate the Response into a Resource
+   * @param response        {@link PrivilegeResponse}
+   * @param requestedIds    the relevant request ids
+   * @return a resource
+   */
+  protected Resource toResource(UserPrivilegeResponse response, Set<String> requestedIds){
+    final ResourceImpl resource = new ResourceImpl(Resource.Type.UserPrivilege);
+
+
+
+    setResourceProperty(resource, PRIVILEGE_USER_NAME_PROPERTY_ID, response.getUserName(), requestedIds);
+    setResourceProperty(resource, PRIVILEGE_PRIVILEGE_ID_PROPERTY_ID, response.getPrivilegeId(), requestedIds);
+    setResourceProperty(resource, PRIVILEGE_PERMISSION_NAME_PROPERTY_ID, response.getPermissionName(), requestedIds);
+    setResourceProperty(resource, PRIVILEGE_PERMISSION_LABEL_PROPERTY_ID, response.getPermissionLabel(), requestedIds);
+    setResourceProperty(resource, PRIVILEGE_PRINCIPAL_TYPE_PROPERTY_ID, response.getPrincipalType().name(), requestedIds);
+    if (response.getPrincipalName() != null) {
+      setResourceProperty(resource, PRIVILEGE_PRINCIPAL_NAME_PROPERTY_ID, response.getPrincipalName(), requestedIds);
     }
+    if (response.getType() != null) {
+      setResourceProperty(resource, PRIVILEGE_TYPE_PROPERTY_ID, response.getType().name(), requestedIds);
+      switch (response.getType()) {
+        case CLUSTER:
+          setResourceProperty(resource, PRIVILEGE_CLUSTER_NAME_PROPERTY_ID, response.getClusterName(), requestedIds);
+          break;
+        case VIEW:
+          setResourceProperty(resource, PRIVILEGE_VIEW_NAME_PROPERTY_ID, response.getViewName(), requestedIds);
+          setResourceProperty(resource, PRIVILEGE_VIEW_VERSION_PROPERTY_ID, response.getVersion(), requestedIds);
+          setResourceProperty(resource, PRIVILEGE_INSTANCE_NAME_PROPERTY_ID, response.getInstanceName(), requestedIds);
+          break;
+      }
 
+    }
     return resource;
   }
 }
\ No newline at end of file


[27/49] ambari git commit: AMBARI-20624. Misc fixes for ambari-server swagger integration prototype. (jaimin)

Posted by ad...@apache.org.
AMBARI-20624. Misc fixes for ambari-server swagger integration prototype. (jaimin)


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

Branch: refs/heads/trunk
Commit: 3cb45e849a45b71142eb294a6625d9ec2d5c050a
Parents: e250b90
Author: Jaimin Jetly <ja...@hortonworks.com>
Authored: Sun Apr 2 22:11:51 2017 -0700
Committer: Jaimin Jetly <ja...@hortonworks.com>
Committed: Sun Apr 2 22:11:51 2017 -0700

----------------------------------------------------------------------
 .../docs/api/asciidoc/definitions.adoc          |   321 -
 ambari-server/docs/api/asciidoc/overview.adoc   |    23 -
 ambari-server/docs/api/asciidoc/paths.adoc      |  1264 --
 ambari-server/docs/api/generated/index.html     | 17421 +++++++++++++++++
 ambari-server/docs/api/generated/swagger.json   |  2305 +++
 ambari-server/pom.xml                           |    62 +-
 .../services/groups/GroupPrivilegeService.java  |     6 +-
 .../api/services/groups/GroupService.java       |     8 +-
 .../api/services/groups/MemberService.java      |     8 +-
 .../users/ActiveWidgetLayoutService.java        |     4 +-
 .../users/UserAuthorizationService.java         |     4 +-
 .../services/users/UserPrivilegeService.java    |     4 +-
 .../server/api/services/users/UserService.java  |    10 +-
 .../views/ViewDataMigrationService.java         |     4 +-
 .../api/services/views/ViewInstanceService.java |    10 +-
 .../services/views/ViewPermissionService.java   |     4 +-
 .../services/views/ViewPrivilegeService.java    |     8 +-
 .../server/api/services/views/ViewService.java  |     4 +-
 .../api/services/views/ViewVersionService.java  |     6 +-
 19 files changed, 19816 insertions(+), 1660 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/docs/api/asciidoc/definitions.adoc
----------------------------------------------------------------------
diff --git a/ambari-server/docs/api/asciidoc/definitions.adoc b/ambari-server/docs/api/asciidoc/definitions.adoc
deleted file mode 100644
index 76beb8c..0000000
--- a/ambari-server/docs/api/asciidoc/definitions.adoc
+++ /dev/null
@@ -1,321 +0,0 @@
-== Definitions
-=== ActiveWidgetLayoutRequest
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|WidgetLayouts||false|<<WidgetLayoutIdWrapper>> array|
-|===
-
-=== ActiveWidgetLayoutResponse
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|WidgetLayoutInfo/cluster_name||false|string|
-|WidgetLayoutInfo/display_name||false|string|
-|WidgetLayoutInfo/layout_name||false|string|
-|WidgetLayoutInfo/scope||false|string|
-|WidgetLayoutInfo/section_name||false|string|
-|WidgetLayoutInfo/user_name||false|string|
-|WidgetLayoutInfo/widgets||false|object array|
-|===
-
-=== GroupPrivilegeResponse
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|PrivilegeInfo/permission_label||false|string|
-|PrivilegeInfo/privilege_id||false|integer (int32)|
-|PrivilegeInfo/permission_name||false|string|
-|PrivilegeInfo/principal_type||false|enum (USER, GROUP, ROLE)|
-|PrivilegeInfo/principal_name||false|string|
-|PrivilegeInfo/type||false|enum (AMBARI, CLUSTER, VIEW)|
-|PrivilegeInfo/cluster_name||false|string|
-|PrivilegeInfo/view_name||false|string|
-|PrivilegeInfo/version||false|string|
-|PrivilegeInfo/instance_name||false|string|
-|PrivilegeInfo/group_name||true|string|
-|===
-
-=== GroupRequest
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|Groups/group_name||true|string|
-|===
-
-=== GroupResponse
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|Groups/group_name||false|string|
-|Groups/ldap_group||false|boolean|false
-|Groups/group_type||false|enum (LOCAL, LDAP, JWT, PAM)|
-|===
-
-=== MemberRequest
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|MemberInfo/group_name||true|string|
-|MemberInfo/user_name||true|string|
-|===
-
-=== MemberResponse
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|MemberInfo/group_name||false|string|
-|MemberInfo/user_name||false|string|
-|===
-
-=== ParameterConfig
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|name||false|string|
-|description||false|string|
-|label||false|string|
-|placeholder||false|string|
-|defaultValue||false|string|
-|clusterConfig||false|string|
-|required||false|boolean|false
-|masked||false|boolean|false
-|===
-
-=== PrivilegeResponse
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|PrivilegeInfo/permission_label||false|string|
-|PrivilegeInfo/privilege_id||false|integer (int32)|
-|PrivilegeInfo/permission_name||false|string|
-|PrivilegeInfo/principal_type||false|enum (USER, GROUP, ROLE)|
-|PrivilegeInfo/principal_name||false|string|
-|PrivilegeInfo/type||false|enum (AMBARI, CLUSTER, VIEW)|
-|PrivilegeInfo/cluster_name||false|string|
-|PrivilegeInfo/view_name||false|string|
-|PrivilegeInfo/version||false|string|
-|PrivilegeInfo/instance_name||false|string|
-|===
-
-=== UserAuthorizationResponse
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|AuthorizationInfo/authorization_id||false|string|
-|AuthorizationInfo/authorization_name||false|string|
-|AuthorizationInfo/resource_type||false|string|
-|AuthorizationInfo/user_name||true|string|
-|AuthorizationInfo/cluster_name||false|string|
-|AuthorizationInfo/view_name||false|string|
-|AuthorizationInfo/view_version||false|string|
-|AuthorizationInfo/view_instance_name||false|string|
-|===
-
-=== UserPrivilegeResponse
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|PrivilegeInfo/permission_label||false|string|
-|PrivilegeInfo/privilege_id||false|integer (int32)|
-|PrivilegeInfo/permission_name||false|string|
-|PrivilegeInfo/principal_type||false|enum (USER, GROUP, ROLE)|
-|PrivilegeInfo/principal_name||false|string|
-|PrivilegeInfo/type||false|enum (AMBARI, CLUSTER, VIEW)|
-|PrivilegeInfo/cluster_name||false|string|
-|PrivilegeInfo/view_name||false|string|
-|PrivilegeInfo/version||false|string|
-|PrivilegeInfo/instance_name||false|string|
-|PrivilegeInfo/user_name||true|string|
-|===
-
-=== UserRequest
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|Users/password||false|string|
-|Users/old_password||false|string|
-|Users/active||false|boolean|false
-|Users/admin||false|boolean|false
-|===
-
-=== UserResponse
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|Users/user_type||false|enum (LOCAL, LDAP, JWT, PAM)|
-|Users/groups||false|string array|
-|Users/user_name||true|string|
-|Users/active||false|boolean|false
-|Users/admin||false|boolean|false
-|Users/ldap_user||false|boolean|false
-|===
-
-=== ValidationResult
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|detail||false|string|
-|valid||false|boolean|false
-|===
-
-=== ViewInfo
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|view_name||false|string|
-|===
-
-=== ViewInstanceRequest
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|ViewInstanceInfo||false|<<ViewInstanceRequestInfo>>|
-|===
-
-=== ViewInstanceRequestInfo
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|label||false|string|
-|description||false|string|
-|visible||false|boolean|false
-|icon_path||false|string|
-|icon64_path||false|string|
-|properties||false|object|
-|instance_data||false|object|
-|cluster_handle||false|integer (int32)|
-|cluster_type||false|enum (LOCAL_AMBARI, REMOTE_AMBARI, NONE)|
-|===
-
-=== ViewInstanceResponse
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|ViewInstanceInfo||false|<<ViewInstanceResponseInfo>>|
-|===
-
-=== ViewInstanceResponseInfo
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|view_name||false|string|
-|version||false|string|
-|instance_name||false|string|
-|label||false|string|
-|description||false|string|
-|visible||false|boolean|false
-|icon_path||false|string|
-|icon64_path||false|string|
-|properties||false|object|
-|instance_data||false|object|
-|cluster_handle||false|integer (int32)|
-|cluster_type||false|enum (LOCAL_AMBARI, REMOTE_AMBARI, NONE)|
-|context_path||false|string|
-|static||false|boolean|false
-|short_url||false|string|
-|short_url_name||false|string|
-|validation_result||false|<<ValidationResult>>|
-|property_validation_results||false|object|
-|===
-
-=== ViewPermissionInfo
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|view_name||false|string|
-|version||false|string|
-|permission_id||false|integer (int32)|
-|permission_name||false|string|
-|resource_name||false|string|
-|===
-
-=== ViewPermissionResponse
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|ViewPermissionInfo||false|<<ViewPermissionInfo>>|
-|===
-
-=== ViewPrivilegeRequest
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|PrivilegeInfo/permission_name||false|string|
-|PrivilegeInfo/principal_type||false|enum (USER, GROUP, ROLE)|
-|PrivilegeInfo/principal_name||false|string|
-|===
-
-=== ViewPrivilegeResponse
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|PrivilegeInfo/permission_label||false|string|
-|PrivilegeInfo/privilege_id||false|integer (int32)|
-|PrivilegeInfo/permission_name||false|string|
-|PrivilegeInfo/principal_type||false|enum (USER, GROUP, ROLE)|
-|PrivilegeInfo/principal_name||false|string|
-|PrivilegeInfo/view_name||false|string|
-|PrivilegeInfo/version||false|string|
-|PrivilegeInfo/instance_name||false|string|
-|===
-
-=== ViewResponse
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|ViewInfo||false|<<ViewInfo>>|
-|===
-
-=== ViewVersionInfo
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|archive||false|string|
-|build_number||false|string|
-|cluster_configurable||false|boolean|false
-|description||false|string|
-|label||false|string|
-|masker_class||false|string|
-|max_ambari_version||false|string|
-|min_ambari_version||false|string|
-|parameters||false|<<ParameterConfig>> array|
-|status||false|enum (PENDING, DEPLOYING, DEPLOYED, ERROR)|
-|status_detail||false|string|
-|system||false|boolean|false
-|version||false|string|
-|view_name||false|string|
-|===
-
-=== ViewVersionResponse
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|ViewVersionInfo||false|<<ViewVersionInfo>>|
-|===
-
-=== WidgetLayoutIdWrapper
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|id||false|integer (int64)|
-|===
-
-=== WidgetResponse
-[options="header"]
-|===
-|Name|Description|Required|Schema|Default
-|id||false|integer (int64)|
-|widgetName||false|string|
-|widgetType||false|string|
-|metrics||false|string|
-|timeCreated||false|integer (int64)|
-|author||false|string|
-|description||false|string|
-|displayName||false|string|
-|scope||false|string|
-|widgetValues||false|string|
-|properties||false|string|
-|clusterName||false|string|
-|===
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/docs/api/asciidoc/overview.adoc
----------------------------------------------------------------------
diff --git a/ambari-server/docs/api/asciidoc/overview.adoc b/ambari-server/docs/api/asciidoc/overview.adoc
deleted file mode 100644
index e9e5649..0000000
--- a/ambari-server/docs/api/asciidoc/overview.adoc
+++ /dev/null
@@ -1,23 +0,0 @@
-= Swagger spec for Ambari REST API
-
-== Overview
-Ambari REST APIs has inherent support for querying, sorting and pagination
-
-=== Version information
-Version: v1
-
-=== License information
-License: Apache License, Version 2.0
-License URL: http://www.apache.org/licenses/LICENSE-2.0
-
-=== URI scheme
-BasePath: /api/v1
-Schemes: HTTP, HTTPS
-
-=== Tags
-
-* Groups: Endpoint for group specific operations
-* Users: Endpoint for user specific operations
-* Views
-
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/docs/api/asciidoc/paths.adoc
----------------------------------------------------------------------
diff --git a/ambari-server/docs/api/asciidoc/paths.adoc b/ambari-server/docs/api/asciidoc/paths.adoc
deleted file mode 100644
index d756051..0000000
--- a/ambari-server/docs/api/asciidoc/paths.adoc
+++ /dev/null
@@ -1,1264 +0,0 @@
-== Paths
-=== Create new group
-----
-POST /groups
-----
-
-==== Description
-:hardbreaks:
-Creates group resource.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|BodyParameter|body|input parameters in json form|true|<<GroupRequest>>|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|successful operation|No Content
-|500|Server Error|No Content
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Groups
-
-=== Get all groups
-----
-GET /groups
-----
-
-==== Description
-:hardbreaks:
-Returns details of all groups.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|QueryParameter|fields|Filter group details|false|string|Groups/*
-|QueryParameter|sortBy|Sort groups (asc | desc)|false|string|Groups/group_name.asc
-|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
-|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
-|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful retrieval of all group entries|<<GroupResponse>> array
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Groups
-
-=== Get group
-----
-GET /groups/{groupName}
-----
-
-==== Description
-:hardbreaks:
-Returns group details.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|groupName|group name|true|string|
-|QueryParameter|fields|Filter group details|false|string|Groups
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful retrieval of group resource|<<GroupResponse>>
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Groups
-
-=== Delete group
-----
-DELETE /groups/{groupName}
-----
-
-==== Description
-:hardbreaks:
-Delete group resource.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|groupName|group name|true|string|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|No Content
-|500|Server Error|No Content
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Groups
-
-=== Get all group members
-----
-GET /groups/{groupName}/members
-----
-
-==== Description
-:hardbreaks:
-Returns details of all members.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|groupName|group name|true|string|
-|QueryParameter|fields|Filter member details|false|string|MemberInfo/*
-|QueryParameter|sortBy|Sort members (asc | desc)|false|string|MemberInfo/user_name.asc
-|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
-|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
-|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|<<MemberResponse>> array
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Groups
-
-=== Update group members
-----
-PUT /groups/{groupName}/members
-----
-
-==== Description
-:hardbreaks:
-Updates group member resources.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|groupName|group name|true|string|
-|BodyParameter|body|input parameters in json form|true|<<MemberRequest>>|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|No Content
-|500|Server Error|No Content
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Groups
-
-=== Get group member
-----
-GET /groups/{groupName}/members/{userName}
-----
-
-==== Description
-:hardbreaks:
-Returns member details.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|groupName|group name|true|string|
-|PathParameter|userName|user name|true|string|
-|QueryParameter|fields|Filter member details|false|string|MemberInfo
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|<<MemberResponse>>
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Groups
-
-=== Delete group member
-----
-DELETE /groups/{groupName}/members/{userName}
-----
-
-==== Description
-:hardbreaks:
-Delete member resource.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|groupName|group name|true|string|
-|PathParameter|userName|user name|true|string|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|No Content
-|500|Server Error|No Content
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Groups
-
-=== Get all privileges
-----
-GET /groups/{groupName}/privileges
-----
-
-==== Description
-:hardbreaks:
-Returns all privileges for group.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|groupName|group name|true|string|
-|QueryParameter|fields|Filter user privileges|false|string|PrivilegeInfo/*
-|QueryParameter|sortBy|Sort user privileges (asc | desc)|false|string|PrivilegeInfo/user_name.asc
-|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
-|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
-|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|successful operation|<<GroupPrivilegeResponse>> array
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Groups
-
-=== Get group privilege
-----
-GET /groups/{groupName}/privileges/{privilegeId}
-----
-
-==== Description
-:hardbreaks:
-Returns group privilege details.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|userName|user name|true|string|
-|PathParameter|privilegeId|privilege id|true|string|
-|QueryParameter|fields|Filter group privilege details|false|string|PrivilegeInfo/*
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|<<PrivilegeResponse>>
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Groups
-
-=== Get all users
-----
-GET /users
-----
-
-==== Description
-:hardbreaks:
-Returns details of all users.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|QueryParameter|fields|Filter user details|false|string|Users/*
-|QueryParameter|sortBy|Sort users (asc | desc)|false|string|Users/user_name.desc
-|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
-|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
-|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|<<UserResponse>> array
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Users
-
-=== Create new user
-----
-POST /users/{userName}
-----
-
-==== Description
-:hardbreaks:
-Creates user resource.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|userName|user name|true|string|
-|BodyParameter|body|input parameters in json form|true|<<UserRequest>>|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|No Content
-|500|Server Error|No Content
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Users
-
-=== Get single user
-----
-GET /users/{userName}
-----
-
-==== Description
-:hardbreaks:
-Returns user details.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|userName|user name|true|string|admin
-|QueryParameter|fields|Filter user details|false|string|Users
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|<<UserResponse>>
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Users
-
-=== Delete single user
-----
-DELETE /users/{userName}
-----
-
-==== Description
-:hardbreaks:
-Delete user resource.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|userName|user name|true|string|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|No Content
-|500|Server Error|No Content
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Users
-
-=== Update user detail
-----
-PUT /users/{userName}
-----
-
-==== Description
-:hardbreaks:
-Updates user resource.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|userName|user name|true|string|
-|BodyParameter|body|input parameters in json form|true|<<UserRequest>>|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|No Content
-|500|Server Error|No Content
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Users
-
-=== Get user widget layouts
-----
-GET /users/{userName}/activeWidgetLayouts
-----
-
-==== Description
-:hardbreaks:
-Returns all active widget layouts for user.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|userName|user name|true|string|
-|QueryParameter|fields|Filter user layout details|false|string|WidgetLayoutInfo/*
-|QueryParameter|sortBy|Sort layouts (asc | desc)|false|string|WidgetLayoutInfo/user_name.asc
-|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
-|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
-|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|successful operation|<<ActiveWidgetLayoutResponse>> array
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Users
-
-=== Update user widget layouts
-----
-PUT /users/{userName}/activeWidgetLayouts
-----
-
-==== Description
-:hardbreaks:
-Updates user widget layout.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|userName|user name|true|string|
-|BodyParameter|body|input parameters in json form|true|<<ActiveWidgetLayoutRequest>>|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|No Content
-|500|Server Error|No Content
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Users
-
-=== Get all authorizations
-----
-GET /users/{userName}/authorizations
-----
-
-==== Description
-:hardbreaks:
-Returns all authorization for user.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|userName|user name|true|string|
-|QueryParameter|fields|Filter user authorization details|false|string|AuthorizationInfo/*
-|QueryParameter|sortBy|Sort user authorizations (asc | desc)|false|string|AuthorizationInfo/user_name.asc
-|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
-|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
-|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|successful operation|<<UserAuthorizationResponse>> array
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Users
-
-=== Get user authorization
-----
-GET /users/{userName}/authorizations/{authorization_id}
-----
-
-==== Description
-:hardbreaks:
-Returns user authorization details.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|userName|user name|true|string|
-|PathParameter|authorization_id|Authorization Id|true|string|
-|QueryParameter|fields|Filter user authorization details|false|string|AuthorizationInfo/*
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|<<UserAuthorizationResponse>>
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Users
-
-=== Get all privileges
-----
-GET /users/{userName}/privileges
-----
-
-==== Description
-:hardbreaks:
-Returns all privileges for user.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|userName|user name|true|string|admin
-|QueryParameter|fields|Filter user privileges|false|string|PrivilegeInfo/*
-|QueryParameter|sortBy|Sort user privileges (asc | desc)|false|string|PrivilegeInfo/user_name.asc
-|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
-|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
-|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|successful operation|<<UserPrivilegeResponse>> array
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Users
-
-=== Get user privilege
-----
-GET /users/{userName}/privileges/{privilegeId}
-----
-
-==== Description
-:hardbreaks:
-Returns user privilege details.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|userName|user name|true|string|
-|PathParameter|privilegeId|privilege id|true|string|
-|QueryParameter|fields|Filter user privilege details|false|string|PrivilegeInfo/*
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|<<UserPrivilegeResponse>>
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Users
-
-=== Get all views
-----
-GET /views
-----
-
-==== Description
-:hardbreaks:
-Returns details of all views.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|QueryParameter|fields|Filter view details|false|string|ViewInfo/*
-|QueryParameter|sortBy|Sort users (asc | desc)|false|string|ViewInfo/view_name.asc
-|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
-|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
-|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|<<ViewResponse>> array
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Views
-
-=== Get single view
-----
-GET /views/{viewName}
-----
-
-==== Description
-:hardbreaks:
-Returns view details.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|viewName|view name|true|string|
-|QueryParameter|fields|Filter view details|false|string|ViewInfo
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|<<ViewResponse>>
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Views
-
-=== Get all versions for a view
-----
-GET /views/{viewName}/versions
-----
-
-==== Description
-:hardbreaks:
-Returns details of all versions for a view.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|viewName|view name|true|string|
-|QueryParameter|fields|Filter view version details|false|string|ViewVersionInfo/*
-|QueryParameter|sortBy|Sort users (asc | desc)|false|string|ViewVersionInfo/version.desc
-|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
-|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
-|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|<<ViewVersionResponse>> array
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Views
-
-=== Get single view version
-----
-GET /views/{viewName}/versions/{version}
-----
-
-==== Description
-:hardbreaks:
-Returns view details.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|viewName|view name|true|string|
-|PathParameter|version||true|string|
-|QueryParameter|fields|Filter view details|false|string|ViewVersionInfo
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|<<ViewVersionResponse>>
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Views
-
-=== Get all view instances
-----
-GET /views/{viewName}/versions/{version}/instances
-----
-
-==== Description
-:hardbreaks:
-Returns all instances for a view version.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|viewName||true|string|
-|PathParameter|version||true|string|
-|QueryParameter|fields|Filter view instance details|false|string|ViewInstanceInfo/*
-|QueryParameter|sortBy|Sort users (asc | desc)|false|string|ViewInstanceInfo/instance_name.desc
-|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
-|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
-|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|<<ViewInstanceResponse>> array
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Views
-
-=== Create view instance
-----
-POST /views/{viewName}/versions/{version}/instances/{instanceName}
-----
-
-==== Description
-:hardbreaks:
-Creates view instance resource.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|viewName|view name|true|string|
-|PathParameter|version||true|string|
-|PathParameter|instanceName|instance name|true|string|
-|BodyParameter|body|input parameters in json form|true|<<ViewInstanceRequest>>|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|No Content
-|500|Server Error|No Content
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Views
-
-=== Get single view instance
-----
-GET /views/{viewName}/versions/{version}/instances/{instanceName}
-----
-
-==== Description
-:hardbreaks:
-Returns view instance details.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|viewName|view name|true|string|
-|PathParameter|version||true|string|
-|PathParameter|instanceName|instance name|true|string|
-|QueryParameter|fields|Filter view instance details|false|string|ViewInstanceInfo
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|<<ViewInstanceResponse>>
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Views
-
-=== Delete view instance
-----
-DELETE /views/{viewName}/versions/{version}/instances/{instanceName}
-----
-
-==== Description
-:hardbreaks:
-Delete view resource.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|viewName|view name|true|string|
-|PathParameter|version||true|string|
-|PathParameter|instanceName|instance name|true|string|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|No Content
-|500|Server Error|No Content
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Views
-
-=== Update view instance detail
-----
-PUT /views/{viewName}/versions/{version}/instances/{instanceName}
-----
-
-==== Description
-:hardbreaks:
-Updates view instance resource.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|viewName|view name|true|string|
-|PathParameter|version||true|string|
-|PathParameter|instanceName|instance name|true|string|
-|BodyParameter|body|input parameters in json form|true|<<ViewInstanceRequest>>|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|No Content
-|500|Server Error|No Content
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Views
-
-=== Migrate view instance data
-----
-PUT /views/{viewName}/versions/{version}/instances/{instanceName}/migrate/{originVersion}/{originInstanceName}
-----
-
-==== Description
-:hardbreaks:
-Migrates view instance persistence data from origin view instance specified in the path params.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|viewName|view name|true|string|
-|PathParameter|viewVersion|view version|true|string|
-|PathParameter|instanceName|instance name|true|string|
-|PathParameter|originVersion|origin version|true|string|
-|PathParameter|originInstanceName|origin instance name|true|string|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|No Content
-|500|Server Error|No Content
-|===
-
-==== Tags
-
-* Views
-
-=== Create view instance privilege
-----
-POST /views/{viewName}/versions/{version}/instances/{instanceName}/privileges
-----
-
-==== Description
-:hardbreaks:
-Create privilege resource for view instance.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|viewName|view name|true|string|
-|PathParameter|version|view version|true|string|
-|PathParameter|instanceName|instance name|true|string|
-|BodyParameter|body|input parameters in json form|true|<<ViewPrivilegeRequest>>|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|No Content
-|500|Server Error|No Content
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Views
-
-=== Get all view instance privileges
-----
-GET /views/{viewName}/versions/{version}/instances/{instanceName}/privileges
-----
-
-==== Description
-:hardbreaks:
-Returns all privileges for the resource.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|viewName|view name|true|string|
-|PathParameter|version|view version|true|string|
-|PathParameter|instanceName|instance name|true|string|
-|QueryParameter|fields|Filter privileges|false|string|PrivilegeInfo/*
-|QueryParameter|sortBy|Sort privileges (asc | desc)|false|string|PrivilegeInfo/user_name.asc
-|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
-|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
-|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|successful operation|<<ViewPrivilegeResponse>> array
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Views
-
-=== Get single view instance privilege
-----
-GET /views/{viewName}/versions/{version}/instances/{instanceName}/privileges/{privilegeId}
-----
-
-==== Description
-:hardbreaks:
-Returns privilege details.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|viewName|view name|true|string|
-|PathParameter|version|view version|true|string|
-|PathParameter|instanceName|instance name|true|string|
-|PathParameter|privilegeId|privilege id|true|string|
-|QueryParameter|fields|Filter privilege details|false|string|PrivilegeInfo
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|<<ViewPrivilegeResponse>>
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Views
-
-=== Delete view instance privilege
-----
-DELETE /views/{viewName}/versions/{version}/instances/{instanceName}/privileges/{privilegeId}
-----
-
-==== Description
-:hardbreaks:
-Delete view instance privilege resource.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|viewName|view name|true|string|
-|PathParameter|version|view version|true|string|
-|PathParameter|instanceName|instance name|true|string|
-|PathParameter|privilegeId|privilege id|true|string|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|No Content
-|500|Server Error|No Content
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Views
-
-=== Get all permissions for a view
-----
-GET /views/{viewName}/versions/{version}/permissions
-----
-
-==== Description
-:hardbreaks:
-Returns all permission details for the version of a view.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|viewName|view name|true|string|
-|PathParameter|version|view version|true|string|
-|QueryParameter|fields|Filter privileges|false|string|PermissionInfo/*
-|QueryParameter|page_size|The number of resources to be returned for the paged response.|false|integer|10
-|QueryParameter|from|The starting page resource (inclusive). Valid values are :offset | "start"|false|string|0
-|QueryParameter|to|The ending page resource (inclusive). Valid values are :offset | "end"|false|string|
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|<<ViewPermissionResponse>> array
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Views
-
-=== Get single view permission
-----
-GET /views/{viewName}/versions/{version}/permissions/{permissionId}
-----
-
-==== Description
-:hardbreaks:
-Returns permission details for a single version of a view.
-
-==== Parameters
-[options="header"]
-|===
-|Type|Name|Description|Required|Schema|Default
-|PathParameter|viewName|view name|true|string|
-|PathParameter|version|view version|true|string|
-|PathParameter|permissionId|permission id|true|string|
-|QueryParameter|fields|Filter view permission details|false|string|PermissionInfo
-|===
-
-==== Responses
-[options="header"]
-|===
-|HTTP Code|Description|Schema
-|200|Successful operation|<<ViewPermissionResponse>>
-|===
-
-==== Produces
-
-* text/plain
-
-==== Tags
-
-* Views
-


[11/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.svg
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.svg b/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.svg
new file mode 100644
index 0000000..a54bbbb
--- /dev/null
+++ b/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.svg
@@ -0,0 +1,411 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg">
+<defs >
+<font id="DroidSans" horiz-adv-x="1123" ><font-face
+    font-family="Droid Sans"
+    units-per-em="2048"
+    panose-1="2 11 8 6 3 8 4 2 2 4"
+    ascent="1907"
+    descent="-492"
+    alphabetic="0" />
+<glyph unicode=" " glyph-name="space" horiz-adv-x="532" />
+<glyph unicode="!" glyph-name="exclam" horiz-adv-x="586" d="M416 485H172L121 1462H467L416 485ZM117 143Q117 190 130 222T168 275T224 304T293 313Q328 313 359 304T415 275T453 223T467 143Q467 98 453 66T415 13T360 -17T293 -27Q256 -27 224 -18T168 13T131
+66T117 143Z" />
+<glyph unicode="&quot;" glyph-name="quotedbl" horiz-adv-x="967" d="M412 1462L371 934H174L133 1462H412ZM834 1462L793 934H596L555 1462H834Z" />
+<glyph unicode="#" glyph-name="numbersign" horiz-adv-x="1323" d="M999 844L952 612H1210V406H913L836 0H616L694 406H500L424 0H209L283 406H45V612H322L369 844H117V1053H406L483 1460H702L625 1053H823L901 1460H1116L1038 1053H1278V844H999ZM539 612H735L782
+844H586L539 612Z" />
+<glyph unicode="$" glyph-name="dollar" horiz-adv-x="1128" d="M1061 457Q1061 382 1035 318T956 206T825 127T645 86V-119H508V82Q442 84 386 90T281 107T188 133T100 168V432Q142 411 191 392T294 358T401 331T508 317V635Q500 638 491 642Q483 645 475 648T461
+653Q370 688 302 726T189 811T121 915T98 1044Q98 1119 126 1180T208 1287T337 1361T508 1399V1556H645V1405Q732 1400 823 1380T1014 1317L913 1083Q848 1109 778 1129T645 1155V862L684 848Q779 813 850 776T968 693T1038 590T1061 457ZM760 451Q760 475 754
+493T733 526T698 553T645 580V328Q704 337 732 367T760 451ZM399 1051Q399 1004 425 973T508 920V1153Q454 1147 427 1123T399 1051Z" />
+<glyph unicode="%" glyph-name="percent" horiz-adv-x="1804" d="M315 1024Q315 897 337 835T410 772Q459 772 482 834T506 1024Q506 1274 410 1274Q360 1274 338 1213T315 1024ZM758 1026Q758 918 738 832T674 687T565 597T408 565Q323 565 259 596T151 687T85
+832T63 1026Q63 1134 83 1219T145 1362T253 1452T408 1483Q494 1483 559 1452T669 1363T735 1219T758 1026ZM1425 1462L614 0H375L1186 1462H1425ZM1298 440Q1298 313 1320 251T1393 188Q1442 188 1465 250T1489 440Q1489 690 1393 690Q1343 690 1321 629T1298
+440ZM1741 442Q1741 334 1721 249T1657 104T1548 14T1391 -18Q1306 -18 1242 13T1135 104T1069 248T1047 442Q1047 550 1067 635T1129 778T1236 868T1391 899Q1477 899 1542 868T1652 779T1718 635T1741 442Z" />
+<glyph unicode="&amp;" glyph-name="ampersand" horiz-adv-x="1479" d="M1475 0H1098L1001 100Q921 45 825 13T612 -20Q492 -20 395 10T228 94T120 225T82 395Q82 472 100 532T153 642T235 731T344 807Q306 853 280 895T237 979T214 1062T207 1149Q207 1227 237
+1288T322 1393T452 1460T618 1483Q704 1483 776 1462T901 1401T984 1301T1014 1165Q1014 1096 992 1039T931 932T842 842T731 766L991 498Q1026 564 1052 637T1098 784H1415Q1400 727 1380 664T1332 538T1270 411T1192 291L1475 0ZM403 424Q403 380 419 345T463
+286T530 249T614 236Q674 236 725 251T819 295L510 625Q459 583 431 535T403 424ZM731 1124Q731 1155 721 1176T695 1212T658 1232T616 1239Q594 1239 572 1233T531 1214T501 1178T489 1122Q489 1070 512 1024T575 932Q652 976 691 1020T731 1124Z" />
+<glyph unicode="&apos;" glyph-name="quotesingle" horiz-adv-x="545" d="M412 1462L371 934H174L133 1462H412Z" />
+<glyph unicode="(" glyph-name="parenleft" horiz-adv-x="694" d="M82 561Q82 686 100 807T155 1043T248 1263T383 1462H633Q492 1269 420 1038T348 563Q348 444 366 326T420 95T509 -124T631 -324H383Q305 -234 249 -131T155 84T100 317T82 561Z" />
+<glyph unicode=")" glyph-name="parenright" horiz-adv-x="694" d="M612 561Q612 437 594 317T539 85T446 -131T311 -324H63Q132 -230 185 -124T274 95T328 326T346 563Q346 807 274 1038T61 1462H311Q389 1369 445 1264T539 1044T594 808T612 561Z" />
+<glyph unicode="*" glyph-name="asterisk" horiz-adv-x="1116" d="M688 1556L647 1188L1020 1292L1053 1040L713 1016L936 719L709 598L553 911L416 600L180 719L401 1016L63 1042L102 1292L467 1188L426 1556H688Z" />
+<glyph unicode="+" glyph-name="plus" horiz-adv-x="1128" d="M455 612H88V831H455V1200H674V831H1040V612H674V248H455V612Z" />
+<glyph unicode="," glyph-name="comma" horiz-adv-x="594" d="M459 215Q445 161 426 100T383 -23T334 -146T283 -264H63Q78 -203 92 -137T120 -6T145 122T164 238H444L459 215Z" />
+<glyph unicode="-" glyph-name="hyphen" horiz-adv-x="659" d="M61 424V674H598V424H61Z" />
+<glyph unicode="." glyph-name="period" horiz-adv-x="584" d="M117 143Q117 190 130 222T168 275T224 304T293 313Q328 313 359 304T415 275T453 223T467 143Q467 98 453 66T415 13T360 -17T293 -27Q256 -27 224 -18T168 13T131 66T117 143Z" />
+<glyph unicode="/" glyph-name="slash" horiz-adv-x="846" d="M836 1462L291 0H14L559 1462H836Z" />
+<glyph unicode="0" glyph-name="zero" horiz-adv-x="1128" d="M1065 731Q1065 554 1038 415T950 179T794 31T563 -20Q436 -20 342 31T186 179T94 415T63 731Q63 908 90 1048T178 1285T333 1433T563 1485Q689 1485 783 1434T940 1286T1034 1049T1065 731ZM371 731Q371
+481 414 355T563 229Q667 229 712 354T758 731Q758 982 713 1108T563 1235Q510 1235 474 1203T414 1108T381 951T371 731Z" />
+<glyph unicode="1" glyph-name="one" horiz-adv-x="1128" d="M817 0H508V846Q508 872 508 908T510 984T513 1064T516 1137Q511 1131 499 1119T472 1093T441 1063T410 1036L242 901L92 1087L563 1462H817V0Z" />
+<glyph unicode="2" glyph-name="two" horiz-adv-x="1128" d="M1063 0H82V215L426 586Q491 656 544 715T635 830T694 944T715 1069Q715 1143 671 1184T551 1225Q472 1225 399 1186T246 1075L78 1274Q123 1315 172 1352T280 1419T410 1465T569 1483Q674 1483 757
+1454T900 1372T990 1242T1022 1071Q1022 985 992 907T910 753T790 603T643 451L467 274V260H1063V0Z" />
+<glyph unicode="3" glyph-name="three" horiz-adv-x="1128" d="M1006 1135Q1006 1059 982 999T915 893T815 817T690 770V764Q867 742 958 657T1049 426Q1049 330 1015 249T909 107T729 14T473 -20Q355 -20 251 -1T57 59V322Q102 298 152 280T252 250T350 231T442
+225Q528 225 585 241T676 286T724 355T739 444Q739 489 721 525T661 587T552 627T387 641H283V858H385Q477 858 538 874T635 919T687 986T702 1067Q702 1145 654 1189T500 1233Q452 1233 411 1224T334 1200T269 1168T215 1133L59 1339Q101 1370 150 1396T258 1441T383
+1472T526 1483Q634 1483 722 1460T874 1392T971 1283T1006 1135Z" />
+<glyph unicode="4" glyph-name="four" horiz-adv-x="1128" d="M1085 303H909V0H608V303H4V518L625 1462H909V543H1085V303ZM608 543V791Q608 804 608 828T610 884T612 948T615 1011T618 1063T621 1096H612Q594 1054 572 1007T520 913L276 543H608Z" />
+<glyph unicode="5" glyph-name="five" horiz-adv-x="1128" d="M598 934Q692 934 773 905T914 820T1008 681T1042 489Q1042 370 1005 276T896 116T718 15T473 -20Q418 -20 364 -15T261 -1T167 24T86 59V326Q121 306 167 289T262 259T362 239T457 231Q591 231 661
+286T731 463Q731 571 663 627T451 684Q425 684 396 681T338 673T283 663T238 651L115 717L170 1462H942V1200H438L414 913Q446 920 488 927T598 934Z" />
+<glyph unicode="6" glyph-name="six" horiz-adv-x="1128" d="M76 621Q76 726 87 830T128 1029T208 1207T336 1349T522 1444T776 1479Q797 1479 822 1478T872 1476T922 1471T965 1464V1217Q927 1226 885 1231T799 1237Q664 1237 577 1204T439 1110T367 966T340
+780H352Q372 816 400 847T467 901T552 937T659 950Q754 950 830 919T958 829T1039 684T1067 487Q1067 368 1034 274T938 115T788 15T590 -20Q482 -20 388 18T225 136T116 335T76 621ZM584 227Q625 227 658 242T716 289T754 369T768 483Q768 590 724 651T588 713Q542
+713 504 695T439 648T398 583T383 510Q383 459 395 409T433 318T496 252T584 227Z" />
+<glyph unicode="7" glyph-name="seven" horiz-adv-x="1128" d="M207 0L727 1200H55V1460H1063V1266L530 0H207Z" />
+<glyph unicode="8" glyph-name="eight" horiz-adv-x="1128" d="M565 1481Q656 1481 737 1459T879 1393T976 1283T1012 1128Q1012 1062 992 1009T937 912T854 834T750 772Q808 741 863 703T962 618T1031 511T1057 379Q1057 288 1021 214T920 88T765 8T565 -20Q447
+-20 355 7T200 84T105 207T72 371Q72 446 94 506T154 614T243 699T352 764Q303 795 260 831T186 912T136 1011T117 1130Q117 1217 153 1282T252 1392T395 1459T565 1481ZM358 389Q358 349 371 316T409 258T473 221T561 207Q666 207 718 256T770 387Q770 429 753
+462T708 524T645 577T575 623L553 637Q509 615 473 590T412 534T372 467T358 389ZM563 1255Q530 1255 502 1245T453 1216T420 1169T408 1106Q408 1064 420 1034T454 980T504 938T565 901Q596 917 624 936T673 979T708 1035T721 1106Q721 1141 709 1169T676 1216T626
+1245T563 1255Z" />
+<glyph unicode="9" glyph-name="nine" horiz-adv-x="1128" d="M1055 838Q1055 733 1044 629T1003 429T923 252T795 109T609 15T354 -20Q333 -20 308 -19T258 -17T208 -13T166 -6V242Q203 232 245 227T332 221Q467 221 554 254T692 348T764 493T791 678H778Q758
+642 730 611T664 557T578 521T471 508Q376 508 300 539T172 629T91 774T63 971Q63 1090 96 1184T192 1343T342 1444T541 1479Q649 1479 743 1441T906 1323T1015 1123T1055 838ZM547 1231Q506 1231 472 1216T414 1170T376 1090T362 975Q362 869 407 807T543 745Q589
+745 627 763T692 810T733 875T748 948Q748 999 736 1049T698 1140T635 1206T547 1231Z" />
+<glyph unicode=":" glyph-name="colon" horiz-adv-x="584" d="M117 143Q117 190 130 222T168 275T224 304T293 313Q328 313 359 304T415 275T453 223T467 143Q467 98 453 66T415 13T360 -17T293 -27Q256 -27 224 -18T168 13T131 66T117 143ZM117 969Q117 1016
+130 1048T168 1101T224 1130T293 1139Q328 1139 359 1130T415 1101T453 1049T467 969Q467 924 453 892T415 839T360 809T293 799Q256 799 224 808T168 838T131 891T117 969Z" />
+<glyph unicode=";" glyph-name="semicolon" horiz-adv-x="594" d="M444 238L459 215Q445 161 426 100T383 -23T334 -146T283 -264H63Q78 -203 92 -137T120 -6T145 122T164 238H444ZM117 969Q117 1016 130 1048T168 1101T224 1130T293 1139Q328 1139 359 1130T415
+1101T453 1049T467 969Q467 924 453 892T415 839T360 809T293 799Q256 799 224 808T168 838T131 891T117 969Z" />
+<glyph unicode="&lt;" glyph-name="less" horiz-adv-x="1128" d="M1040 203L88 641V784L1040 1280V1040L397 723L1040 442V203Z" />
+<glyph unicode="=" glyph-name="equal" horiz-adv-x="1128" d="M88 807V1024H1040V807H88ZM88 418V637H1040V418H88Z" />
+<glyph unicode="&gt;" glyph-name="greater" horiz-adv-x="1128" d="M88 442L731 723L88 1040V1280L1040 784V641L88 203V442Z" />
+<glyph unicode="?" glyph-name="question" horiz-adv-x="940" d="M264 485V559Q264 610 274 651T306 730T362 803T444 877Q486 910 515 936T562 987T588 1041T596 1106Q596 1163 558 1200T440 1237Q371 1237 292 1208T127 1137L25 1358Q68 1383 118 1405T223 1445T334
+1473T444 1483Q546 1483 628 1459T767 1387T854 1273T885 1120Q885 1057 871 1008T830 916T761 834T664 750Q622 717 596 693T554 646T534 601T528 545V485H264ZM231 143Q231 190 244 222T282 275T338 304T408 313Q443 313 474 304T530 275T568 223T582 143Q582
+98 568 66T530 13T475 -17T408 -27Q371 -27 339 -18T282 13T245 66T231 143Z" />
+<glyph unicode="@" glyph-name="at" horiz-adv-x="1774" d="M1673 752Q1673 657 1651 564T1582 398T1467 279T1303 233Q1265 233 1232 242T1170 269T1122 310T1090 362H1075Q1056 337 1031 314T975 272T907 244T825 233Q742 233 678 261T569 342T502 468T479 631Q479
+734 510 820T599 968T740 1065T926 1100Q971 1100 1019 1095T1111 1082T1195 1064T1262 1044L1241 625Q1239 603 1239 582T1239 555Q1239 513 1245 486T1262 444T1286 422T1315 416Q1350 416 1376 443T1419 516T1445 623T1454 754Q1454 882 1416 982T1311 1151T1150
+1256T948 1292Q795 1292 679 1241T484 1099T365 882T324 608Q324 470 359 364T463 185T633 75T866 37Q922 37 981 44T1098 63T1213 92T1321 129V-63Q1227 -105 1113 -129T868 -154Q687 -154 545 -103T304 46T154 283T102 602Q102 726 129 839T207 1050T331 1227T499
+1363T706 1450T948 1481Q1106 1481 1239 1431T1468 1286T1619 1056T1673 752ZM711 627Q711 515 749 466T850 416Q892 416 922 435T972 490T1002 575T1016 686L1028 907Q1008 912 981 915T926 918Q867 918 826 893T760 827T723 734T711 627Z" />
+<glyph unicode="A" glyph-name="A" horiz-adv-x="1331" d="M1018 0L918 348H414L313 0H0L475 1468H854L1331 0H1018ZM846 608L752 928Q746 946 734 987T709 1077T683 1177T666 1262Q662 1240 656 1210T641 1147T623 1079T606 1015T592 962T582 928L489 608H846Z" />
+<glyph unicode="B" glyph-name="B" horiz-adv-x="1315" d="M184 1462H612Q750 1462 854 1443T1028 1380T1133 1266T1169 1092Q1169 1030 1154 976T1110 881T1040 813T944 776V766Q999 754 1046 732T1129 670T1185 570T1206 424Q1206 324 1171 246T1071 113T912
+29T700 0H184V1462ZM494 883H655Q713 883 752 893T815 925T849 977T860 1051Q860 1135 808 1171T641 1208H494V883ZM494 637V256H676Q737 256 778 270T845 310T882 373T893 455Q893 496 882 529T845 587T775 624T668 637H494Z" />
+<glyph unicode="C" glyph-name="C" horiz-adv-x="1305" d="M805 1225Q716 1225 648 1191T533 1092T462 935T438 727Q438 610 459 519T525 366T639 271T805 238Q894 238 983 258T1178 315V55Q1130 35 1083 21T987 -2T887 -15T776 -20Q607 -20 483 34T278 186T158
+422T119 729Q119 895 164 1033T296 1272T511 1427T805 1483Q914 1483 1023 1456T1233 1380L1133 1128Q1051 1167 968 1196T805 1225Z" />
+<glyph unicode="D" glyph-name="D" horiz-adv-x="1434" d="M1315 745Q1315 560 1265 421T1119 188T885 47T569 0H184V1462H612Q773 1462 902 1416T1124 1280T1265 1055T1315 745ZM1001 737Q1001 859 977 947T906 1094T792 1180T637 1208H494V256H608Q804 256 902
+376T1001 737Z" />
+<glyph unicode="E" glyph-name="E" horiz-adv-x="1147" d="M1026 0H184V1462H1026V1208H494V887H989V633H494V256H1026V0Z" />
+<glyph unicode="F" glyph-name="F" horiz-adv-x="1124" d="M489 0H184V1462H1022V1208H489V831H985V578H489V0Z" />
+<glyph unicode="G" glyph-name="G" horiz-adv-x="1483" d="M739 821H1319V63Q1261 44 1202 29T1080 3T947 -14T799 -20Q635 -20 509 28T296 172T164 408T119 733Q119 905 169 1044T316 1280T556 1430T883 1483Q1000 1483 1112 1458T1317 1393L1214 1145Q1146 1179
+1061 1202T881 1225Q779 1225 698 1190T558 1089T469 932T438 727Q438 619 459 530T527 375T645 274T819 238Q885 238 930 244T1016 258V563H739V821Z" />
+<glyph unicode="H" glyph-name="H" horiz-adv-x="1485" d="M1300 0H991V631H494V0H184V1462H494V889H991V1462H1300V0Z" />
+<glyph unicode="I" glyph-name="I" horiz-adv-x="797" d="M731 0H66V176L244 258V1204L66 1286V1462H731V1286L553 1204V258L731 176V0Z" />
+<glyph unicode="J" glyph-name="J" horiz-adv-x="678" d="M-2 -430Q-67 -430 -116 -424T-199 -408V-150Q-162 -158 -122 -164T-33 -170Q13 -170 52 -160T121 -126T167 -60T184 43V1462H494V53Q494 -73 458 -164T356 -314T199 -402T-2 -430Z" />
+<glyph unicode="K" glyph-name="K" horiz-adv-x="1298" d="M1298 0H946L610 608L494 522V0H184V1462H494V758L616 965L950 1462H1294L827 803L1298 0Z" />
+<glyph unicode="L" glyph-name="L" horiz-adv-x="1096" d="M184 0V1462H494V256H1026V0H184Z" />
+<glyph unicode="M" glyph-name="M" horiz-adv-x="1870" d="M772 0L451 1147H442Q448 1055 452 969Q454 932 455 893T458 816T460 743T461 680V0H184V1462H606L922 344H928L1264 1462H1686V0H1397V692Q1397 718 1397 751T1399 821T1401 896T1404 970Q1408 1054
+1411 1145H1403L1057 0H772Z" />
+<glyph unicode="N" glyph-name="N" horiz-adv-x="1604" d="M1419 0H1026L451 1106H442Q448 1029 452 953Q456 888 458 817T461 688V0H184V1462H575L1149 367H1155Q1152 443 1148 517Q1147 549 1146 582T1143 649T1142 714T1141 770V1462H1419V0Z" />
+<glyph unicode="O" glyph-name="O" horiz-adv-x="1548" d="M1430 733Q1430 564 1391 425T1270 187T1066 34T774 -20Q606 -20 483 34T279 187T159 425T119 735Q119 905 158 1043T279 1280T483 1431T776 1485Q944 1485 1067 1432T1270 1280T1390 1043T1430 733ZM438
+733Q438 618 458 527T519 372T624 274T774 240Q863 240 926 274T1030 371T1090 526T1110 733Q1110 848 1091 939T1031 1095T927 1193T776 1227Q689 1227 625 1193T520 1095T458 940T438 733Z" />
+<glyph unicode="P" glyph-name="P" horiz-adv-x="1225" d="M494 774H555Q686 774 752 826T819 995Q819 1104 760 1156T573 1208H494V774ZM1133 1006Q1133 910 1104 822T1009 667T834 560T565 520H494V0H184V1462H590Q731 1462 833 1431T1002 1341T1101 1198T1133 1006Z" />
+<glyph unicode="Q" glyph-name="Q" horiz-adv-x="1548" d="M1430 733Q1430 614 1411 510T1352 319T1253 166T1112 55L1473 -348H1075L807 -18Q800 -18 794 -19Q789 -20 784 -20T774 -20Q606 -20 483 34T279 187T159 425T119 735Q119 905 158 1043T279 1280T483
+1431T776 1485Q944 1485 1067 1432T1270 1280T1390 1043T1430 733ZM438 733Q438 618 458 527T519 372T624 274T774 240Q863 240 926 274T1030 371T1090 526T1110 733Q1110 848 1091 939T1031 1095T927 1193T776 1227Q689 1227 625 1193T520 1095T458 940T438 733Z"
+/>
+<glyph unicode="R" glyph-name="R" horiz-adv-x="1290" d="M494 813H578Q707 813 763 864T819 1016Q819 1120 759 1164T573 1208H494V813ZM494 561V0H184V1462H584Q865 1462 999 1354T1133 1024Q1133 949 1113 888T1060 780T983 697T891 637Q1002 459 1090 319Q1128
+259 1163 202T1227 100T1273 28L1290 0H946L629 561H494Z" />
+<glyph unicode="S" glyph-name="S" horiz-adv-x="1073" d="M985 406Q985 308 952 230T854 96T696 10T481 -20Q375 -20 277 2T94 68V356Q142 333 191 312T290 273T391 246T492 236Q543 236 579 247T638 279T671 328T682 391Q682 432 665 463T616 522T540 576T440
+631Q394 655 337 689T230 773T145 895T111 1067Q111 1165 143 1242T236 1373T381 1455T573 1483Q626 1483 676 1476T776 1456T876 1424T979 1380L879 1139Q834 1160 795 1176T719 1203T647 1219T575 1225Q497 1225 456 1184T414 1073Q414 1036 426 1008T466 954T537
+903T643 844Q718 804 781 763T889 671T960 556T985 406Z" />
+<glyph unicode="T" glyph-name="T" horiz-adv-x="1124" d="M717 0H408V1204H41V1462H1083V1204H717V0Z" />
+<glyph unicode="U" glyph-name="U" horiz-adv-x="1466" d="M1292 1462V516Q1292 402 1258 304T1153 134T976 21T727 -20Q592 -20 489 18T316 128T210 298T174 520V1462H483V543Q483 462 499 405T546 311T625 257T735 240Q866 240 924 316T983 545V1462H1292Z" />
+<glyph unicode="V" glyph-name="V" horiz-adv-x="1249" d="M936 1462H1249L793 0H455L0 1462H313L561 582Q566 565 574 525T592 437T611 341T625 260Q630 293 639 341T658 436T677 524T692 582L936 1462Z" />
+<glyph unicode="W" glyph-name="W" horiz-adv-x="1898" d="M1546 0H1194L1014 721Q1010 736 1005 763T992 824T978 895T965 967T955 1031T948 1079Q946 1061 942 1032T931 968T919 896T906 825T893 763T883 719L705 0H352L0 1462H305L471 664Q474 648 479 618T492
+549T506 469T521 387T534 313T543 256Q546 278 551 312T563 384T576 464T590 540T601 603T610 643L813 1462H1085L1288 643Q1291 631 1296 604T1308 541T1322 464T1335 385T1347 312T1356 256Q1359 278 1364 312T1377 387T1391 469T1406 549T1418 617T1427 664L1593
+1462H1898L1546 0Z" />
+<glyph unicode="X" glyph-name="X" horiz-adv-x="1284" d="M1284 0H930L631 553L332 0H0L444 754L31 1462H373L647 936L915 1462H1249L831 737L1284 0Z" />
+<glyph unicode="Y" glyph-name="Y" horiz-adv-x="1196" d="M598 860L862 1462H1196L752 569V0H444V559L0 1462H336L598 860Z" />
+<glyph unicode="Z" glyph-name="Z" horiz-adv-x="1104" d="M1055 0H49V201L668 1206H68V1462H1036V1262L418 256H1055V0Z" />
+<glyph unicode="[" glyph-name="bracketleft" horiz-adv-x="678" d="M627 -324H143V1462H627V1251H403V-113H627V-324Z" />
+<glyph unicode="\" glyph-name="backslash" horiz-adv-x="846" d="M289 1462L834 0H557L12 1462H289Z" />
+<glyph unicode="]" glyph-name="bracketright" horiz-adv-x="678" d="M51 -113H274V1251H51V1462H535V-324H51V-113Z" />
+<glyph unicode="^" glyph-name="asciicircum" horiz-adv-x="1090" d="M8 520L446 1470H590L1085 520H846L524 1163Q455 1002 384 839T244 520H8Z" />
+<glyph unicode="_" glyph-name="underscore" horiz-adv-x="842" d="M846 -324H-4V-184H846V-324Z" />
+<glyph unicode="`" glyph-name="grave" horiz-adv-x="1182" d="M645 1241Q611 1269 564 1310T470 1396T386 1480T332 1548V1569H674Q690 1535 711 1495T756 1414T803 1335T848 1268V1241H645Z" />
+<glyph unicode="a" glyph-name="a" horiz-adv-x="1176" d="M809 0L750 152H741Q708 107 675 75T603 21T516 -10T403 -20Q335 -20 277 1T177 66T110 176T86 334Q86 512 200 596T541 690L719 696V780Q719 849 679 882T567 915Q495 915 427 894T289 838L190 1040Q274
+1087 376 1114T590 1141Q799 1141 910 1043T1022 745V0H809ZM719 518L618 514Q557 512 515 498T448 461T411 405T399 332Q399 262 433 233T522 203Q564 203 600 217T662 260T704 330T719 426V518Z" />
+<glyph unicode="b" glyph-name="b" horiz-adv-x="1245" d="M756 1139Q842 1139 913 1102T1035 992T1114 811T1143 561Q1143 417 1115 309T1034 127T909 17T748 -20Q692 -20 649 -8T571 24T512 69T465 123H444L393 0H160V1556H465V1194Q465 1161 463 1123T459 1051Q456
+1012 453 973H465Q486 1008 513 1038T575 1090T656 1126T756 1139ZM653 895Q602 895 567 877T509 821T477 728T465 596V563Q465 482 474 419T506 314T564 249T655 227Q746 227 788 313T831 565Q831 730 789 812T653 895Z" />
+<glyph unicode="c" glyph-name="c" horiz-adv-x="1022" d="M625 -20Q505 -20 409 13T244 115T139 293T102 553Q102 720 139 832T245 1013T410 1110T625 1139Q711 1139 796 1118T956 1059L868 827Q802 856 741 874T625 893Q514 893 464 809T414 555Q414 387 464
+307T621 227Q708 227 779 249T924 307V53Q887 35 852 21T782 -2T708 -15T625 -20Z" />
+<glyph unicode="d" glyph-name="d" horiz-adv-x="1245" d="M489 -20Q403 -20 332 17T210 126T131 307T102 557Q102 701 130 809T211 991T337 1102T498 1139Q552 1139 597 1127T678 1092T742 1040T793 975H803Q797 1014 792 1054Q787 1088 784 1126T780 1198V1556H1085V0H852L793
+145H780Q759 111 732 81T670 28T590 -7T489 -20ZM600 223Q654 223 692 241T753 297T788 391T801 522V555Q801 636 791 699T758 804T696 869T598 891Q502 891 457 805T412 553Q412 388 457 306T600 223Z" />
+<glyph unicode="e" glyph-name="e" horiz-adv-x="1190" d="M612 922Q531 922 478 865T416 686H805Q804 737 792 780T756 854T696 904T612 922ZM651 -20Q531 -20 430 15T256 120T143 298T102 551Q102 698 139 808T242 991T402 1102T610 1139Q721 1139 810 1106T962
+1007T1058 848T1092 631V483H410Q412 419 430 368T482 281T563 226T672 207Q723 207 768 212T857 229T942 256T1028 295V59Q988 38 948 24T862 -1T765 -15T651 -20Z" />
+<glyph unicode="f" glyph-name="f" horiz-adv-x="793" d="M741 889H514V0H209V889H41V1036L209 1118V1200Q209 1307 235 1377T309 1490T425 1549T578 1567Q670 1567 733 1553T840 1520L768 1296Q737 1307 703 1316T623 1325Q563 1325 539 1287T514 1188V1118H741V889Z" />
+<glyph unicode="g" glyph-name="g" horiz-adv-x="1130" d="M1085 1116V950L922 899Q942 865 950 829T958 750Q958 665 931 595T851 474T718 397T532 369Q509 369 482 371T442 377Q422 360 411 342T399 297Q399 276 412 264T446 244T495 234T553 231H727Q808 231
+872 213T980 156T1049 60T1073 -80Q1073 -175 1035 -251T922 -381T734 -463T475 -492Q361 -492 276 -471T134 -409T49 -311T20 -182Q20 -121 41 -76T97 1T176 53T268 84Q247 93 227 109T190 146T163 192T152 246Q152 278 161 304T189 352T234 395T295 436Q207 474
+156 558T104 756Q104 846 132 917T214 1037T348 1113T532 1139Q552 1139 577 1137T626 1131T672 1123T705 1116H1085ZM285 -158Q285 -183 295 -206T330 -248T393 -276T489 -287Q645 -287 724 -243T803 -125Q803 -62 754 -41T602 -20H461Q434 -20 403 -26T346 -49T303
+-91T285 -158ZM395 752Q395 661 429 611T532 561Q604 561 636 611T668 752Q668 842 637 895T532 948Q395 948 395 752Z" />
+<glyph unicode="h" glyph-name="h" horiz-adv-x="1284" d="M1130 0H825V653Q825 774 788 834T672 895Q613 895 573 871T509 800T475 684T465 526V0H160V1556H465V1239Q465 1197 463 1151T458 1065Q454 1019 451 975H467Q516 1062 592 1100T764 1139Q847 1139 914
+1116T1030 1042T1104 915T1130 729V0Z" />
+<glyph unicode="i" glyph-name="i" horiz-adv-x="625" d="M147 1407Q147 1450 160 1478T195 1524T248 1549T313 1556Q347 1556 377 1549T429 1525T465 1479T479 1407Q479 1365 466 1336T430 1290T377 1265T313 1257Q279 1257 249 1264T196 1289T160 1336T147 1407ZM465
+0H160V1118H465V0Z" />
+<glyph unicode="j" glyph-name="j" horiz-adv-x="625" d="M102 -492Q54 -492 3 -485T-82 -467V-227Q-51 -237 -24 -241T37 -246Q62 -246 84 -239T123 -212T150 -160T160 -76V1118H465V-121Q465 -198 446 -265T383 -383T270 -463T102 -492ZM147 1407Q147 1450 160
+1478T195 1524T248 1549T313 1556Q347 1556 377 1549T429 1525T465 1479T479 1407Q479 1365 466 1336T430 1290T377 1265T313 1257Q279 1257 249 1264T196 1289T160 1336T147 1407Z" />
+<glyph unicode="k" glyph-name="k" horiz-adv-x="1208" d="M453 608L565 778L838 1118H1182L778 633L1208 0H856L584 430L465 348V0H160V1556H465V862L449 608H453Z" />
+<glyph unicode="l" glyph-name="l" horiz-adv-x="625" d="M465 0H160V1556H465V0Z" />
+<glyph unicode="m" glyph-name="m" horiz-adv-x="1929" d="M1120 0H815V653Q815 774 779 834T666 895Q608 895 570 871T508 800T475 684T465 526V0H160V1118H393L434 975H451Q475 1018 508 1049T582 1100T667 1129T758 1139Q873 1139 953 1100T1077 975H1102Q1126
+1018 1160 1049T1235 1100T1321 1129T1413 1139Q1593 1139 1684 1042T1776 729V0H1470V653Q1470 774 1434 834T1321 895Q1212 895 1166 809T1120 561V0Z" />
+<glyph unicode="n" glyph-name="n" horiz-adv-x="1284" d="M1130 0H825V653Q825 774 789 834T672 895Q612 895 572 871T509 800T475 684T465 526V0H160V1118H393L434 975H451Q475 1018 509 1049T585 1100T672 1129T766 1139Q848 1139 915 1116T1030 1042T1104
+915T1130 729V0Z" />
+<glyph unicode="o" glyph-name="o" horiz-adv-x="1227" d="M414 561Q414 394 461 310T614 225Q719 225 766 310T813 561Q813 728 766 810T612 893Q507 893 461 811T414 561ZM1124 561Q1124 421 1089 313T987 131T825 19T610 -20Q499 -20 406 18T246 131T140 313T102
+561Q102 700 137 808T239 989T401 1101T616 1139Q727 1139 820 1101T980 990T1086 808T1124 561Z" />
+<glyph unicode="p" glyph-name="p" horiz-adv-x="1245" d="M748 -20Q693 -20 650 -8T572 24T512 69T465 123H449Q453 88 457 57Q460 31 462 4T465 -39V-492H160V1118H408L451 973H465Q486 1007 513 1037T575 1089T656 1125T756 1139Q843 1139 914 1102T1036 992T1115
+811T1143 561Q1143 418 1114 310T1033 128T908 17T748 -20ZM653 895Q602 895 567 877T509 821T477 728T465 596V563Q465 482 474 419T506 314T564 249T655 227Q746 227 788 313T831 565Q831 730 789 812T653 895Z" />
+<glyph unicode="q" glyph-name="q" horiz-adv-x="1245" d="M602 219Q657 219 694 237T755 293T789 386T801 518V555Q801 636 792 699T759 804T697 869T600 891Q504 891 459 805T414 553Q414 385 459 302T602 219ZM489 -20Q402 -20 331 17T209 126T130 307T102
+557Q102 700 130 808T211 990T337 1101T498 1139Q554 1139 599 1127T680 1092T745 1040T795 975H803L827 1118H1085V-492H780V-23Q780 -4 782 24T787 80Q790 112 793 145H780Q760 111 733 81T671 28T590 -7T489 -20Z" />
+<glyph unicode="r" glyph-name="r" horiz-adv-x="889" d="M743 1139Q755 1139 769 1139T797 1137T822 1134T840 1130V844Q832 846 818 848T789 851T758 853T733 854Q674 854 625 839T540 791T485 703T465 569V0H160V1118H391L436 950H451Q475 993 503 1028T565
+1087T643 1125T743 1139Z" />
+<glyph unicode="s" glyph-name="s" horiz-adv-x="985" d="M905 332Q905 244 873 178T782 68T639 2T451 -20Q396 -20 349 -17T260 -5T179 15T100 45V297Q142 276 188 259T281 230T370 210T451 203Q492 203 521 210T568 231T595 263T604 303Q604 324 598 340T568
+375T501 417T381 475Q308 508 255 540T167 613T115 704T98 827Q98 905 128 963T213 1061T345 1119T518 1139Q618 1139 708 1116T893 1047L801 831Q725 867 656 890T518 913Q456 913 429 891T401 831Q401 811 408 796T436 764T495 728T594 680Q665 649 722 619T820
+549T883 458T905 332Z" />
+<glyph unicode="t" glyph-name="t" horiz-adv-x="848" d="M614 223Q659 223 699 233T782 258V31Q739 9 676 -5T537 -20Q464 -20 401 -3T292 56T220 170T193 350V889H47V1018L215 1120L303 1356H498V1118H770V889H498V350Q498 285 530 254T614 223Z" />
+<glyph unicode="u" glyph-name="u" horiz-adv-x="1284" d="M891 0L850 143H834Q809 100 775 70T699 19T612 -10T518 -20Q436 -20 369 3T254 77T180 204T154 389V1118H459V465Q459 344 495 284T612 223Q672 223 712 247T775 318T809 434T819 592V1118H1124V0H891Z" />
+<glyph unicode="v" glyph-name="v" horiz-adv-x="1104" d="M395 0L0 1118H319L504 481Q521 424 533 363T549 252H555Q558 305 570 364T600 481L784 1118H1104L709 0H395Z" />
+<glyph unicode="w" glyph-name="w" horiz-adv-x="1651" d="M1014 0L928 391Q924 408 918 439T903 510T887 594T869 683Q849 786 825 905H819Q796 786 777 682Q769 638 761 593T744 509T730 437T719 387L629 0H301L0 1118H303L416 623Q425 584 434 530T452 420T468
+315T479 236H485Q486 255 489 285T498 351T508 422T519 491T529 547T537 582L659 1118H995L1112 582Q1117 560 1125 514T1141 416T1156 314T1163 236H1169Q1172 261 1179 310T1196 415T1215 528T1235 623L1352 1118H1651L1346 0H1014Z" />
+<glyph unicode="x" glyph-name="x" horiz-adv-x="1122" d="M389 571L29 1118H375L561 782L750 1118H1096L731 571L1112 0H766L561 362L356 0H10L389 571Z" />
+<glyph unicode="y" glyph-name="y" horiz-adv-x="1104" d="M0 1118H334L514 489Q530 437 537 378T547 272H553Q555 295 558 323T567 380T578 437T592 489L768 1118H1104L662 -143Q600 -320 493 -406T225 -492Q173 -492 135 -487T70 -475V-233Q91 -238 123 -242T190
+-246Q238 -246 272 -233T330 -197T372 -140T403 -66L422 -10L0 1118Z" />
+<glyph unicode="z" glyph-name="z" horiz-adv-x="936" d="M877 0H55V180L512 885H86V1118H858V920L416 233H877V0Z" />
+<glyph unicode="{" glyph-name="braceleft" horiz-adv-x="745" d="M287 367T222 408T31 449V688Q93 688 141 697T223 728T272 784T287 866V1184Q287 1258 306 1310T374 1396T509 1446T725 1462V1237Q685 1236 653 1230T598 1209T563 1166T551 1096V797Q545 610
+317 575V563Q432 546 493 491T551 342V43Q551 0 563 -27T597 -69T652 -91T725 -98V-324Q594 -324 509 -308T375 -259T306 -172T287 -45V270Q287 367 222 408Z" />
+<glyph unicode="|" glyph-name="bar" horiz-adv-x="1128" d="M455 1550H674V-465H455V1550Z" />
+<glyph unicode="}" glyph-name="braceright" horiz-adv-x="745" d="M469 -45Q469 -119 450 -172T382 -258T247 -308T31 -324V-98Q71 -97 103 -91T157 -70T192 -27T205 43V342Q202 436 263 491T438 563V575Q211 610 205 797V1096Q205 1139 193 1166T158 1208T103
+1230T31 1237V1462Q162 1462 247 1446T381 1397T450 1311T469 1184V866Q468 818 484 784T533 729T614 698T725 688V449Q600 449 535 408T469 270V-45Z" />
+<glyph unicode="~" glyph-name="asciitilde" horiz-adv-x="1128" d="M528 616Q491 632 463 643T411 660T366 669T322 672Q293 672 262 663T201 637T143 598T88 551V782Q139 836 202 863T344 891Q374 891 399 889T453 879T517 860T600 827Q638 811 666 801T719
+784T764 775T807 772Q836 772 867 781T928 807T986 845T1040 893V662Q939 553 784 553Q754 553 729 555T675 564T611 583T528 616Z" />
+<glyph unicode="&#xa0;" glyph-name="nbspace" horiz-adv-x="532" />
+<glyph unicode="&#xa1;" glyph-name="exclamdown" horiz-adv-x="586" d="M168 606H412L463 -369H117L168 606ZM467 948Q467 901 454 869T416 816T360 787T291 778Q256 778 225 787T169 816T131 868T117 948Q117 993 131 1025T169 1078T224 1108T291 1118Q328 1118
+360 1109T416 1079T453 1026T467 948Z" />
+<glyph unicode="&#xa2;" glyph-name="cent" horiz-adv-x="1128" d="M543 -20V186Q451 199 377 236T251 340T171 506T143 743Q143 884 171 985T251 1155T378 1260T543 1311V1483H721V1319Q759 1318 797 1313T870 1299T937 1281T993 1260L907 1034Q886 1044 860
+1053T805 1070T750 1082T698 1087Q632 1087 586 1067T511 1006T468 901T455 750Q455 579 512 500T698 420Q774 420 844 438T965 481V242Q914 213 852 198T721 180V-20H543Z" />
+<glyph unicode="&#xa3;" glyph-name="sterling" horiz-adv-x="1128" d="M680 1483Q790 1483 879 1459T1049 1401L956 1171Q885 1200 827 1217T705 1235Q638 1235 601 1197T563 1063V870H897V651H563V508Q563 453 550 413T514 343T466 294T412 260H1090V0H82V248Q124
+266 157 287T214 337T250 407T262 506V651H84V870H262V1065Q262 1178 293 1257T380 1387T512 1460T680 1483Z" />
+<glyph unicode="&#xa4;" glyph-name="currency" horiz-adv-x="1128" d="M168 723Q168 777 182 826T221 920L92 1047L240 1194L367 1067Q410 1092 461 1106T563 1120Q617 1120 665 1107T760 1065L887 1194L1036 1051L907 922Q932 880 946 829T961 723Q961 667 947
+618T907 524L1032 399L887 254L760 379Q716 356 667 342T563 328Q507 328 458 340T365 379L240 256L94 401L221 526Q168 617 168 723ZM375 723Q375 684 390 650T430 590T490 550T563 535Q603 535 638 549T699 589T741 649T756 723Q756 763 741 797T700 857T638
+898T563 913Q524 913 490 898T431 858T390 798T375 723Z" />
+<glyph unicode="&#xa5;" glyph-name="yen" horiz-adv-x="1128" d="M565 860L809 1462H1122L760 715H954V537H709V399H954V221H709V0H422V221H174V399H422V537H174V715H365L8 1462H324L565 860Z" />
+<glyph unicode="&#xa6;" glyph-name="brokenbar" horiz-adv-x="1128" d="M455 1550H674V735H455V1550ZM455 350H674V-465H455V350Z" />
+<glyph unicode="&#xa7;" glyph-name="section" horiz-adv-x="995" d="M121 805Q121 849 131 886T160 955T203 1012T254 1055Q191 1095 156 1154T121 1288Q121 1353 150 1406T232 1498T360 1556T526 1577Q628 1577 716 1554T889 1493L807 1303Q739 1335 669 1360T520
+1386Q439 1386 402 1363T365 1292Q365 1267 377 1246T415 1206T481 1167T578 1124Q649 1096 707 1062T807 987T872 895T895 782Q895 682 861 621T770 522Q832 482 863 430T895 303Q895 229 864 170T776 68T638 3T455 -20Q345 -20 261 0T106 59V266Q145 246 190
+229T281 198T371 176T455 168Q511 168 548 177T607 202T639 239T649 285Q649 310 642 329T612 368T549 408T442 457Q366 489 306 521T205 593T143 685T121 805ZM344 827Q344 764 400 716T575 616L590 610Q605 621 619 635T644 668T661 708T668 756Q668 788 658
+815T621 867T550 917T434 967Q416 960 400 947T372 915T352 875T344 827Z" />
+<glyph unicode="&#xa8;" glyph-name="dieresis" horiz-adv-x="1182" d="M248 1405Q248 1440 259 1465T288 1507T332 1532T387 1540Q416 1540 441 1532T486 1508T516 1466T528 1405Q528 1371 517 1346T486 1305T442 1280T387 1272Q358 1272 333 1280T289 1304T259
+1346T248 1405ZM651 1405Q651 1440 662 1465T692 1507T737 1532T793 1540Q821 1540 846 1532T891 1508T922 1466T934 1405Q934 1371 923 1346T892 1305T847 1280T793 1272Q733 1272 692 1305T651 1405Z" />
+<glyph unicode="&#xa9;" glyph-name="copyright" horiz-adv-x="1704" d="M895 1010Q798 1010 745 936T692 731Q692 596 740 524T895 451Q952 451 1018 466T1141 510V319Q1084 292 1025 277T889 262Q782 262 702 296T569 392T488 540T461 733Q461 836 487 921T565
+1068T697 1164T881 1198Q964 1198 1041 1176T1186 1120L1112 952Q999 1010 895 1010ZM100 731Q100 835 127 931T202 1110T320 1263T472 1380T652 1456T852 1483Q956 1483 1052 1456T1231 1381T1384 1263T1501 1111T1577 931T1604 731Q1604 627 1577 531T1502 352T1384
+200T1232 82T1052 7T852 -20Q748 -20 652 6T473 82T320 199T203 351T127 531T100 731ZM242 731Q242 604 290 493T420 300T614 169T852 121Q979 121 1090 169T1283 299T1414 493T1462 731Q1462 858 1414 969T1284 1162T1090 1293T852 1341Q725 1341 614 1293T421
+1163T290 969T242 731Z" />
+<glyph unicode="&#xaa;" glyph-name="ordfeminine" horiz-adv-x="743" d="M520 764L489 874Q449 816 393 784T268 752Q218 752 178 765T108 806T63 876T47 975Q47 1035 68 1076T130 1144T230 1184T365 1202L455 1206Q455 1269 426 1296T342 1323Q302 1323 253
+1306T152 1262L86 1397Q148 1429 222 1454T387 1479Q455 1479 505 1460T589 1405T638 1319T655 1206V764H520ZM373 1081Q335 1078 312 1068T275 1044T257 1012T252 977Q252 939 271 921T317 903Q349 903 374 914T418 944T445 991T455 1051V1087L373 1081Z" />
+<glyph unicode="&#xab;" glyph-name="guillemotleft" horiz-adv-x="1198" d="M82 573L391 1028L610 909L393 561L610 213L391 94L82 547V573ZM588 573L897 1028L1116 909L899 561L1116 213L897 94L588 547V573Z" />
+<glyph unicode="&#xac;" glyph-name="logicalnot" horiz-adv-x="1128" d="M1040 248H821V612H88V831H1040V248Z" />
+<glyph unicode="&#xad;" glyph-name="uni00AD" horiz-adv-x="659" d="M61 424V674H598V424H61Z" />
+<glyph unicode="&#xae;" glyph-name="registered" horiz-adv-x="1704" d="M1157 905Q1157 811 1119 756T1014 672L1251 272H997L819 610H772V272H543V1188H807Q989 1188 1073 1118T1157 905ZM772 778H803Q869 778 897 806T926 901Q926 936 919 959T896 995T857
+1014T801 1020H772V778ZM100 731Q100 835 127 931T202 1110T320 1263T472 1380T652 1456T852 1483Q956 1483 1052 1456T1231 1381T1384 1263T1501 1111T1577 931T1604 731Q1604 627 1577 531T1502 352T1384 200T1232 82T1052 7T852 -20Q748 -20 652 6T473 82T320
+199T203 351T127 531T100 731ZM242 731Q242 604 290 493T420 300T614 169T852 121Q979 121 1090 169T1283 299T1414 493T1462 731Q1462 858 1414 969T1284 1162T1090 1293T852 1341Q725 1341 614 1293T421 1163T290 969T242 731Z" />
+<glyph unicode="&#xaf;" glyph-name="overscore" horiz-adv-x="1024" d="M1030 1556H-6V1757H1030V1556Z" />
+<glyph unicode="&#xb0;" glyph-name="degree" horiz-adv-x="877" d="M92 1137Q92 1208 119 1271T193 1381T303 1455T438 1483Q510 1483 573 1456T683 1381T757 1271T784 1137Q784 1065 757 1002T684 893T574 820T438 793Q366 793 303 819T193 892T119 1002T92
+1137ZM283 1137Q283 1106 295 1078T328 1029T377 996T438 983Q470 983 498 995T548 1029T581 1078T594 1137Q594 1169 582 1197T548 1247T499 1281T438 1294Q406 1294 378 1282T328 1248T295 1198T283 1137Z" />
+<glyph unicode="&#xb1;" glyph-name="plusminus" horiz-adv-x="1128" d="M455 674H88V893H455V1262H674V893H1040V674H674V309H455V674ZM88 0V219H1040V0H88Z" />
+<glyph unicode="&#xb2;" glyph-name="twosuperior" horiz-adv-x="776" d="M702 586H55V754L279 973Q325 1018 355 1051T404 1111T430 1161T438 1212Q438 1250 414 1270T350 1290Q310 1290 267 1270T170 1202L47 1354Q112 1411 193 1447T383 1483Q449 1483 503
+1467T596 1419T656 1341T678 1233Q678 1187 666 1147T626 1065T557 980T455 881L350 786H702V586Z" />
+<glyph unicode="&#xb3;" glyph-name="threesuperior" horiz-adv-x="776" d="M666 1249Q666 1180 626 1130T496 1051V1038Q547 1028 584 1007T645 959T682 898T694 829Q694 708 606 639T332 569Q256 569 190 586T59 639V829Q125 789 191 764T330 739Q404 739 438
+766T473 846Q473 867 465 886T438 919T387 943T307 952H195V1112H287Q339 1112 371 1121T421 1145T445 1180T451 1221Q451 1259 426 1284T350 1309Q303 1309 261 1290T162 1231L61 1372Q123 1419 198 1450T377 1481Q439 1481 492 1465T583 1418T644 1345T666 1249Z"
+/>
+<glyph unicode="&#xb4;" glyph-name="acute" horiz-adv-x="1182" d="M332 1241V1268Q353 1297 377 1335T424 1413T469 1494T506 1569H848V1548Q837 1530 816 1506T768 1453T710 1396T648 1338T587 1285T535 1241H332Z" />
+<glyph unicode="&#xb5;" glyph-name="mu" horiz-adv-x="1290" d="M465 465Q465 344 502 284T621 223Q679 223 718 247T781 318T815 434T825 592V1118H1130V0H897L854 150H842Q807 65 755 23T627 -20Q573 -20 528 3T455 70Q457 28 460 -15Q462 -52 463 -94T465
+-172V-492H160V1118H465V465Z" />
+<glyph unicode="&#xb6;" glyph-name="paragraph" horiz-adv-x="1341" d="M1167 -260H1006V1356H840V-260H678V559Q617 541 532 541Q437 541 360 566T228 651T143 806T113 1042Q113 1189 145 1287T237 1446T380 1531T563 1556H1167V-260Z" />
+<glyph unicode="&#xb7;" glyph-name="middot" horiz-adv-x="584" d="M117 723Q117 770 130 802T168 855T224 884T293 893Q328 893 359 884T415 855T453 803T467 723Q467 678 453 646T415 593T360 563T293 553Q256 553 224 562T168 592T131 645T117 723Z" />
+<glyph unicode="&#xb8;" glyph-name="cedilla" horiz-adv-x="420" d="M418 -250Q418 -307 403 -352T351 -428T256 -475T109 -492Q64 -492 28 -486T-37 -471V-303Q-22 -307 -4 -310T34 -317T72 -322T106 -324Q135 -324 156 -311T178 -262Q178 -225 141 -197T12
+-154L90 0H283L256 -61Q287 -71 316 -88T367 -128T404 -182T418 -250Z" />
+<glyph unicode="&#xb9;" glyph-name="onesuperior" horiz-adv-x="776" d="M584 586H346V1032Q346 1052 346 1082T348 1144T351 1201T354 1239Q348 1231 339 1221T319 1199T298 1178T279 1161L201 1100L92 1227L393 1462H584V586Z" />
+<glyph unicode="&#xba;" glyph-name="ordmasculine" horiz-adv-x="754" d="M696 1116Q696 1029 674 962T609 848T508 777T375 752Q306 752 248 776T147 847T81 961T57 1116Q57 1203 79 1270T143 1384T244 1455T379 1479Q447 1479 504 1455T605 1385T672 1271T696
+1116ZM260 1116Q260 1016 287 966T377 915Q437 915 464 965T492 1116Q492 1216 465 1265T377 1315Q315 1315 288 1266T260 1116Z" />
+<glyph unicode="&#xbb;" glyph-name="guillemotright" horiz-adv-x="1198" d="M1118 547L809 94L590 213L807 561L590 909L809 1028L1118 573V547ZM612 547L303 94L84 213L301 561L84 909L303 1028L612 573V547Z" />
+<glyph unicode="&#xbc;" glyph-name="onequarter" horiz-adv-x="1804" d="M1370 1462L559 0H320L1131 1462H1370ZM794 586H556V1032Q556 1052 556 1082T558 1144T561 1201T564 1239Q558 1231 549 1221T529 1199T508 1178T489 1161L411 1100L302 1227L603 1462H794V586ZM1682
+152H1557V1H1319V152H936V306L1321 883H1557V320H1682V152ZM1319 320V484Q1319 526 1320 572T1325 668Q1320 655 1311 634T1290 590T1268 546T1248 511L1121 320H1319Z" />
+<glyph unicode="&#xbd;" glyph-name="onehalf" horiz-adv-x="1804" d="M1370 1462L559 0H320L1131 1462H1370ZM794 586H556V1032Q556 1052 556 1082T558 1144T561 1201T564 1239Q558 1231 549 1221T529 1199T508 1178T489 1161L411 1100L302 1227L603 1462H794V586ZM1716
+1H1069V169L1293 388Q1339 433 1369 466T1418 526T1444 576T1452 627Q1452 665 1428 685T1364 705Q1324 705 1281 685T1184 617L1061 769Q1126 826 1207 862T1397 898Q1463 898 1517 882T1610 834T1670 756T1692 648Q1692 602 1680 562T1640 480T1571 395T1469
+296L1364 201H1716V1Z" />
+<glyph unicode="&#xbe;" glyph-name="threequarters" horiz-adv-x="1804" d="M1441 1462L630 0H391L1202 1462H1441ZM1712 152H1587V1H1349V152H966V306L1351 883H1587V320H1712V152ZM1349 320V484Q1349 526 1350 572T1355 668Q1350 655 1341 634T1320 590T1298
+546T1278 511L1151 320H1349ZM697 1249Q697 1180 657 1130T527 1051V1038Q578 1028 615 1007T676 959T713 898T725 829Q725 708 637 639T363 569Q287 569 221 586T90 639V829Q156 789 222 764T361 739Q435 739 469 766T504 846Q504 867 496 886T469 919T418 943T338
+952H226V1112H318Q370 1112 402 1121T452 1145T476 1180T482 1221Q482 1259 457 1284T381 1309Q334 1309 292 1290T193 1231L92 1372Q154 1419 229 1450T408 1481Q470 1481 523 1465T614 1418T675 1345T697 1249Z" />
+<glyph unicode="&#xbf;" glyph-name="questiondown" horiz-adv-x="940" d="M686 606V532Q686 481 676 440T644 361T588 288T506 215Q464 182 435 156T388 105T362 51T354 -14Q354 -71 393 -108T510 -145Q579 -145 659 -116T823 -45L926 -266Q883 -292 832 -314T727
+-354T616 -381T506 -391Q404 -391 323 -367T184 -296T97 -182T66 -29Q66 34 79 83T121 175T190 258T287 342Q328 375 354 399T396 446T416 492T422 547V606H686ZM719 948Q719 901 706 869T668 816T612 787T543 778Q508 778 477 787T421 816T383 868T369 948Q369
+993 383 1025T421 1078T476 1108T543 1118Q580 1118 612 1109T668 1079T705 1026T719 948Z" />
+<glyph unicode="&#xc0;" glyph-name="Agrave" horiz-adv-x="1331" d="M1018 0L918 348H414L313 0H0L475 1468H854L1331 0H1018ZM846 608L752 928Q746 946 734 987T709 1077T683 1177T666 1262Q662 1240 656 1210T641 1147T623 1079T606 1015T592 962T582 928L489
+608H846ZM632 1579Q598 1607 551 1648T457 1734T373 1818T319 1886V1907H661Q677 1873 698 1833T743 1752T790 1673T835 1606V1579H632Z" />
+<glyph unicode="&#xc1;" glyph-name="Aacute" horiz-adv-x="1331" d="M1018 0L918 348H414L313 0H0L475 1468H854L1331 0H1018ZM846 608L752 928Q746 946 734 987T709 1077T683 1177T666 1262Q662 1240 656 1210T641 1147T623 1079T606 1015T592 962T582 928L489
+608H846ZM494 1579V1606Q515 1635 539 1673T586 1751T631 1832T668 1907H1010V1886Q999 1868 978 1844T930 1791T872 1734T810 1676T749 1623T697 1579H494Z" />
+<glyph unicode="&#xc2;" glyph-name="Acircumflex" horiz-adv-x="1331" d="M1018 0L918 348H414L313 0H0L475 1468H854L1331 0H1018ZM846 608L752 928Q746 946 734 987T709 1077T683 1177T666 1262Q662 1240 656 1210T641 1147T623 1079T606 1015T592 962T582
+928L489 608H846ZM879 1579Q828 1613 773 1656T666 1755Q612 1699 560 1656T457 1579H254V1606Q280 1635 311 1673T375 1751T438 1832T490 1907H846Q867 1873 897 1833T959 1752T1024 1673T1082 1606V1579H879Z" />
+<glyph unicode="&#xc3;" glyph-name="Atilde" horiz-adv-x="1331" d="M1018 0L918 348H414L313 0H0L475 1468H854L1331 0H1018ZM846 608L752 928Q746 946 734 987T709 1077T683 1177T666 1262Q662 1240 656 1210T641 1147T623 1079T606 1015T592 962T582 928L489
+608H846ZM504 1684Q473 1684 455 1658T424 1577H275Q281 1657 301 1715T353 1811T430 1867T527 1886Q568 1886 607 1870T684 1835T760 1799T834 1782Q865 1782 883 1808T914 1888H1063Q1057 1809 1037 1751T983 1655T907 1598T811 1579Q771 1579 731 1595T653 1631T578
+1667T504 1684Z" />
+<glyph unicode="&#xc4;" glyph-name="Adieresis" horiz-adv-x="1331" d="M1018 0L918 348H414L313 0H0L475 1468H854L1331 0H1018ZM846 608L752 928Q746 946 734 987T709 1077T683 1177T666 1262Q662 1240 656 1210T641 1147T623 1079T606 1015T592 962T582 928L489
+608H846ZM324 1743Q324 1778 335 1803T364 1845T408 1870T463 1878Q492 1878 517 1870T562 1846T592 1804T604 1743Q604 1709 593 1684T562 1643T518 1618T463 1610Q434 1610 409 1618T365 1642T335 1684T324 1743ZM727 1743Q727 1778 738 1803T768 1845T813 1870T869
+1878Q897 1878 922 1870T967 1846T998 1804T1010 1743Q1010 1709 999 1684T968 1643T923 1618T869 1610Q809 1610 768 1643T727 1743Z" />
+<glyph unicode="&#xc5;" glyph-name="Aring" horiz-adv-x="1331" d="M1018 0L918 348H414L313 0H0L475 1468H854L1331 0H1018ZM846 608L752 928Q746 946 734 987T709 1077T683 1177T666 1262Q662 1240 656 1210T641 1147T623 1079T606 1015T592 962T582 928L489
+608H846ZM918 1567Q918 1511 899 1467T845 1391T764 1344T664 1327Q609 1327 563 1343T485 1390T434 1465T416 1565Q416 1620 434 1664T484 1738T563 1785T664 1802Q717 1802 763 1786T843 1739T898 1665T918 1567ZM760 1565Q760 1610 733 1635T664 1661Q622 1661
+595 1636T568 1565Q568 1520 592 1494T664 1468Q706 1468 733 1494T760 1565Z" />
+<glyph unicode="&#xc6;" glyph-name="AE" horiz-adv-x="1888" d="M1767 0H926V348H465L315 0H0L655 1462H1767V1208H1235V887H1731V633H1235V256H1767V0ZM578 608H926V1198H829L578 608Z" />
+<glyph unicode="&#xc7;" glyph-name="Ccedilla" horiz-adv-x="1305" d="M805 1225Q716 1225 648 1191T533 1092T462 935T438 727Q438 610 459 519T525 366T639 271T805 238Q894 238 983 258T1178 315V55Q1130 35 1083 21T987 -2T887 -15T776 -20Q607 -20 483 34T278
+186T158 422T119 729Q119 895 164 1033T296 1272T511 1427T805 1483Q914 1483 1023 1456T1233 1380L1133 1128Q1051 1167 968 1196T805 1225ZM926 -250Q926 -307 911 -352T859 -428T764 -475T617 -492Q572 -492 536 -486T471 -471V-303Q486 -307 504 -310T542 -317T580
+-322T614 -324Q643 -324 664 -311T686 -262Q686 -225 649 -197T520 -154L598 0H791L764 -61Q795 -71 824 -88T875 -128T912 -182T926 -250Z" />
+<glyph unicode="&#xc8;" glyph-name="Egrave" horiz-adv-x="1147" d="M1026 0H184V1462H1026V1208H494V887H989V633H494V256H1026V0ZM572 1579Q538 1607 491 1648T397 1734T313 1818T259 1886V1907H601Q617 1873 638 1833T683 1752T730 1673T775 1606V1579H572Z" />
+<glyph unicode="&#xc9;" glyph-name="Eacute" horiz-adv-x="1147" d="M1026 0H184V1462H1026V1208H494V887H989V633H494V256H1026V0ZM424 1579V1606Q445 1635 469 1673T516 1751T561 1832T598 1907H940V1886Q929 1868 908 1844T860 1791T802 1734T740 1676T679
+1623T627 1579H424Z" />
+<glyph unicode="&#xca;" glyph-name="Ecircumflex" horiz-adv-x="1147" d="M1026 0H184V1462H1026V1208H494V887H989V633H494V256H1026V0ZM832 1579Q781 1613 726 1656T619 1755Q565 1699 513 1656T410 1579H207V1606Q233 1635 264 1673T328 1751T391 1832T443
+1907H799Q820 1873 850 1833T912 1752T977 1673T1035 1606V1579H832Z" />
+<glyph unicode="&#xcb;" glyph-name="Edieresis" horiz-adv-x="1147" d="M1026 0H184V1462H1026V1208H494V887H989V633H494V256H1026V0ZM273 1743Q273 1778 284 1803T313 1845T357 1870T412 1878Q441 1878 466 1870T511 1846T541 1804T553 1743Q553 1709 542 1684T511
+1643T467 1618T412 1610Q383 1610 358 1618T314 1642T284 1684T273 1743ZM676 1743Q676 1778 687 1803T717 1845T762 1870T818 1878Q846 1878 871 1870T916 1846T947 1804T959 1743Q959 1709 948 1684T917 1643T872 1618T818 1610Q758 1610 717 1643T676 1743Z"
+/>
+<glyph unicode="&#xcc;" glyph-name="Igrave" horiz-adv-x="797" d="M731 0H66V176L244 258V1204L66 1286V1462H731V1286L553 1204V258L731 176V0ZM355 1579Q321 1607 274 1648T180 1734T96 1818T42 1886V1907H384Q400 1873 421 1833T466 1752T513 1673T558 1606V1579H355Z"
+/>
+<glyph unicode="&#xcd;" glyph-name="Iacute" horiz-adv-x="797" d="M731 0H66V176L244 258V1204L66 1286V1462H731V1286L553 1204V258L731 176V0ZM237 1579V1606Q258 1635 282 1673T329 1751T374 1832T411 1907H753V1886Q742 1868 721 1844T673 1791T615 1734T553
+1676T492 1623T440 1579H237Z" />
+<glyph unicode="&#xce;" glyph-name="Icircumflex" horiz-adv-x="797" d="M731 0H66V176L244 258V1204L66 1286V1462H731V1286L553 1204V258L731 176V0ZM609 1579Q558 1613 503 1656T396 1755Q342 1699 290 1656T187 1579H-16V1606Q10 1635 41 1673T105 1751T168
+1832T220 1907H576Q597 1873 627 1833T689 1752T754 1673T812 1606V1579H609Z" />
+<glyph unicode="&#xcf;" glyph-name="Idieresis" horiz-adv-x="797" d="M731 0H66V176L244 258V1204L66 1286V1462H731V1286L553 1204V258L731 176V0ZM54 1743Q54 1778 65 1803T94 1845T138 1870T193 1878Q222 1878 247 1870T292 1846T322 1804T334 1743Q334 1709
+323 1684T292 1643T248 1618T193 1610Q164 1610 139 1618T95 1642T65 1684T54 1743ZM457 1743Q457 1778 468 1803T498 1845T543 1870T599 1878Q627 1878 652 1870T697 1846T728 1804T740 1743Q740 1709 729 1684T698 1643T653 1618T599 1610Q539 1610 498 1643T457
+1743Z" />
+<glyph unicode="&#xd0;" glyph-name="Eth" horiz-adv-x="1434" d="M47 850H184V1462H612Q773 1462 902 1416T1124 1280T1265 1055T1315 745Q1315 560 1265 421T1119 188T885 47T569 0H184V596H47V850ZM1001 737Q1001 859 977 947T906 1094T792 1180T637 1208H494V850H731V596H494V256H608Q804
+256 902 376T1001 737Z" />
+<glyph unicode="&#xd1;" glyph-name="Ntilde" horiz-adv-x="1604" d="M1419 0H1026L451 1106H442Q448 1029 452 953Q456 888 458 817T461 688V0H184V1462H575L1149 367H1155Q1152 443 1148 517Q1147 549 1146 582T1143 649T1142 714T1141 770V1462H1419V0ZM623
+1684Q592 1684 574 1658T543 1577H394Q400 1657 420 1715T472 1811T549 1867T646 1886Q687 1886 726 1870T803 1835T879 1799T953 1782Q984 1782 1002 1808T1033 1888H1182Q1176 1809 1156 1751T1102 1655T1026 1598T930 1579Q890 1579 850 1595T772 1631T697 1667T623
+1684Z" />
+<glyph unicode="&#xd2;" glyph-name="Ograve" horiz-adv-x="1548" d="M1430 733Q1430 564 1391 425T1270 187T1066 34T774 -20Q606 -20 483 34T279 187T159 425T119 735Q119 905 158 1043T279 1280T483 1431T776 1485Q944 1485 1067 1432T1270 1280T1390 1043T1430
+733ZM438 733Q438 618 458 527T519 372T624 274T774 240Q863 240 926 274T1030 371T1090 526T1110 733Q1110 848 1091 939T1031 1095T927 1193T776 1227Q689 1227 625 1193T520 1095T458 940T438 733ZM729 1579Q695 1607 648 1648T554 1734T470 1818T416 1886V1907H758Q774
+1873 795 1833T840 1752T887 1673T932 1606V1579H729Z" />
+<glyph unicode="&#xd3;" glyph-name="Oacute" horiz-adv-x="1548" d="M1430 733Q1430 564 1391 425T1270 187T1066 34T774 -20Q606 -20 483 34T279 187T159 425T119 735Q119 905 158 1043T279 1280T483 1431T776 1485Q944 1485 1067 1432T1270 1280T1390 1043T1430
+733ZM438 733Q438 618 458 527T519 372T624 274T774 240Q863 240 926 274T1030 371T1090 526T1110 733Q1110 848 1091 939T1031 1095T927 1193T776 1227Q689 1227 625 1193T520 1095T458 940T438 733ZM590 1579V1606Q611 1635 635 1673T682 1751T727 1832T764 1907H1106V1886Q1095
+1868 1074 1844T1026 1791T968 1734T906 1676T845 1623T793 1579H590Z" />
+<glyph unicode="&#xd4;" glyph-name="Ocircumflex" horiz-adv-x="1548" d="M1430 733Q1430 564 1391 425T1270 187T1066 34T774 -20Q606 -20 483 34T279 187T159 425T119 735Q119 905 158 1043T279 1280T483 1431T776 1485Q944 1485 1067 1432T1270 1280T1390
+1043T1430 733ZM438 733Q438 618 458 527T519 372T624 274T774 240Q863 240 926 274T1030 371T1090 526T1110 733Q1110 848 1091 939T1031 1095T927 1193T776 1227Q689 1227 625 1193T520 1095T458 940T438 733ZM975 1579Q924 1613 869 1656T762 1755Q708 1699
+656 1656T553 1579H350V1606Q376 1635 407 1673T471 1751T534 1832T586 1907H942Q963 1873 993 1833T1055 1752T1120 1673T1178 1606V1579H975Z" />
+<glyph unicode="&#xd5;" glyph-name="Otilde" horiz-adv-x="1548" d="M1430 733Q1430 564 1391 425T1270 187T1066 34T774 -20Q606 -20 483 34T279 187T159 425T119 735Q119 905 158 1043T279 1280T483 1431T776 1485Q944 1485 1067 1432T1270 1280T1390 1043T1430
+733ZM438 733Q438 618 458 527T519 372T624 274T774 240Q863 240 926 274T1030 371T1090 526T1110 733Q1110 848 1091 939T1031 1095T927 1193T776 1227Q689 1227 625 1193T520 1095T458 940T438 733ZM612 1684Q581 1684 563 1658T532 1577H383Q389 1657 409 1715T461
+1811T538 1867T635 1886Q676 1886 715 1870T792 1835T868 1799T942 1782Q973 1782 991 1808T1022 1888H1171Q1165 1809 1145 1751T1091 1655T1015 1598T919 1579Q879 1579 839 1595T761 1631T686 1667T612 1684Z" />
+<glyph unicode="&#xd6;" glyph-name="Odieresis" horiz-adv-x="1548" d="M1430 733Q1430 564 1391 425T1270 187T1066 34T774 -20Q606 -20 483 34T279 187T159 425T119 735Q119 905 158 1043T279 1280T483 1431T776 1485Q944 1485 1067 1432T1270 1280T1390 1043T1430
+733ZM438 733Q438 618 458 527T519 372T624 274T774 240Q863 240 926 274T1030 371T1090 526T1110 733Q1110 848 1091 939T1031 1095T927 1193T776 1227Q689 1227 625 1193T520 1095T458 940T438 733ZM428 1743Q428 1778 439 1803T468 1845T512 1870T567 1878Q596
+1878 621 1870T666 1846T696 1804T708 1743Q708 1709 697 1684T666 1643T622 1618T567 1610Q538 1610 513 1618T469 1642T439 1684T428 1743ZM831 1743Q831 1778 842 1803T872 1845T917 1870T973 1878Q1001 1878 1026 1870T1071 1846T1102 1804T1114 1743Q1114
+1709 1103 1684T1072 1643T1027 1618T973 1610Q913 1610 872 1643T831 1743Z" />
+<glyph unicode="&#xd7;" glyph-name="multiply" horiz-adv-x="1128" d="M408 723L109 1024L260 1178L561 879L866 1178L1020 1028L715 723L1016 420L866 268L561 569L260 270L111 422L408 723Z" />
+<glyph unicode="&#xd8;" glyph-name="Oslash" horiz-adv-x="1548" d="M1430 733Q1430 564 1391 425T1270 187T1066 34T774 -20Q595 -20 467 41L395 -76L227 18L309 152Q212 252 166 400T119 735Q119 905 158 1043T279 1280T483 1431T776 1485Q867 1485 944 1469T1087
+1421L1157 1532L1323 1436L1243 1307Q1337 1208 1383 1063T1430 733ZM438 733Q438 553 485 438L942 1184Q873 1227 776 1227Q689 1227 625 1193T520 1095T458 940T438 733ZM1110 733Q1110 904 1067 1020L612 279Q646 260 686 250T774 240Q863 240 926 274T1030
+371T1090 526T1110 733Z" />
+<glyph unicode="&#xd9;" glyph-name="Ugrave" horiz-adv-x="1466" d="M1292 1462V516Q1292 402 1258 304T1153 134T976 21T727 -20Q592 -20 489 18T316 128T210 298T174 520V1462H483V543Q483 462 499 405T546 311T625 257T735 240Q866 240 924 316T983 545V1462H1292ZM706
+1579Q672 1607 625 1648T531 1734T447 1818T393 1886V1907H735Q751 1873 772 1833T817 1752T864 1673T909 1606V1579H706Z" />
+<glyph unicode="&#xda;" glyph-name="Uacute" horiz-adv-x="1466" d="M1292 1462V516Q1292 402 1258 304T1153 134T976 21T727 -20Q592 -20 489 18T316 128T210 298T174 520V1462H483V543Q483 462 499 405T546 311T625 257T735 240Q866 240 924 316T983 545V1462H1292ZM570
+1579V1606Q591 1635 615 1673T662 1751T707 1832T744 1907H1086V1886Q1075 1868 1054 1844T1006 1791T948 1734T886 1676T825 1623T773 1579H570Z" />
+<glyph unicode="&#xdb;" glyph-name="Ucircumflex" horiz-adv-x="1466" d="M1292 1462V516Q1292 402 1258 304T1153 134T976 21T727 -20Q592 -20 489 18T316 128T210 298T174 520V1462H483V543Q483 462 499 405T546 311T625 257T735 240Q866 240 924 316T983 545V1462H1292ZM942
+1579Q891 1613 836 1656T729 1755Q675 1699 623 1656T520 1579H317V1606Q343 1635 374 1673T438 1751T501 1832T553 1907H909Q930 1873 960 1833T1022 1752T1087 1673T1145 1606V1579H942Z" />
+<glyph unicode="&#xdc;" glyph-name="Udieresis" horiz-adv-x="1466" d="M1292 1462V516Q1292 402 1258 304T1153 134T976 21T727 -20Q592 -20 489 18T316 128T210 298T174 520V1462H483V543Q483 462 499 405T546 311T625 257T735 240Q866 240 924 316T983 545V1462H1292ZM393
+1743Q393 1778 404 1803T433 1845T477 1870T532 1878Q561 1878 586 1870T631 1846T661 1804T673 1743Q673 1709 662 1684T631 1643T587 1618T532 1610Q503 1610 478 1618T434 1642T404 1684T393 1743ZM796 1743Q796 1778 807 1803T837 1845T882 1870T938 1878Q966
+1878 991 1870T1036 1846T1067 1804T1079 1743Q1079 1709 1068 1684T1037 1643T992 1618T938 1610Q878 1610 837 1643T796 1743Z" />
+<glyph unicode="&#xdd;" glyph-name="Yacute" horiz-adv-x="1196" d="M598 860L862 1462H1196L752 569V0H444V559L0 1462H336L598 860ZM422 1579V1606Q443 1635 467 1673T514 1751T559 1832T596 1907H938V1886Q927 1868 906 1844T858 1791T800 1734T738 1676T677
+1623T625 1579H422Z" />
+<glyph unicode="&#xde;" glyph-name="Thorn" horiz-adv-x="1225" d="M1133 770Q1133 676 1108 590T1024 438T870 333T633 293H494V0H184V1462H494V1233H655Q779 1233 869 1200T1017 1107T1104 961T1133 770ZM494 543H578Q699 543 759 595T819 770Q819 878 766
+929T598 981H494V543Z" />
+<glyph unicode="&#xdf;" glyph-name="germandbls" horiz-adv-x="1395" d="M1188 1241Q1188 1177 1167 1129T1114 1042T1045 975T976 922T923 877T901 834Q901 814 913 797T952 760T1020 715T1118 651Q1167 620 1205 588T1269 517T1309 432T1323 326Q1323 154 1206
+67T862 -20Q764 -20 692 -6T559 43V285Q583 269 617 254T690 226T768 207T842 199Q922 199 966 229T1010 322Q1010 349 1003 370T976 412T918 457T821 516Q758 552 716 584T647 647T609 713T598 788Q598 841 618 880T670 950T737 1007T805 1059T856 1117T877 1188Q877
+1251 827 1290T680 1329Q572 1329 519 1281T465 1128V0H160V1139Q160 1248 197 1328T302 1462T467 1541T680 1567Q795 1567 889 1546T1049 1483T1152 1380T1188 1241Z" />
+<glyph unicode="&#xe0;" glyph-name="agrave" horiz-adv-x="1176" d="M809 0L750 152H741Q708 107 675 75T603 21T516 -10T403 -20Q335 -20 277 1T177 66T110 176T86 334Q86 512 200 596T541 690L719 696V780Q719 849 679 882T567 915Q495 915 427 894T289 838L190
+1040Q274 1087 376 1114T590 1141Q799 1141 910 1043T1022 745V0H809ZM719 518L618 514Q557 512 515 498T448 461T411 405T399 332Q399 262 433 233T522 203Q564 203 600 217T662 260T704 330T719 426V518ZM808 1241Q774 1269 727 1310T633 1396T549 1480T495 1548V1569H837Q853
+1535 874 1495T919 1414T966 1335T1011 1268V1241H808Z" />
+<glyph unicode="&#xe1;" glyph-name="aacute" horiz-adv-x="1176" d="M809 0L750 152H741Q708 107 675 75T603 21T516 -10T403 -20Q335 -20 277 1T177 66T110 176T86 334Q86 512 200 596T541 690L719 696V780Q719 849 679 882T567 915Q495 915 427 894T289 838L190
+1040Q274 1087 376 1114T590 1141Q799 1141 910 1043T1022 745V0H809ZM719 518L618 514Q557 512 515 498T448 461T411 405T399 332Q399 262 433 233T522 203Q564 203 600 217T662 260T704 330T719 426V518ZM441 1241V1268Q462 1297 486 1335T533 1413T578 1494T615
+1569H957V1548Q946 1530 925 1506T877 1453T819 1396T757 1338T696 1285T644 1241H441Z" />
+<glyph unicode="&#xe2;" glyph-name="acircumflex" horiz-adv-x="1176" d="M809 0L750 152H741Q708 107 675 75T603 21T516 -10T403 -20Q335 -20 277 1T177 66T110 176T86 334Q86 512 200 596T541 690L719 696V780Q719 849 679 882T567 915Q495 915 427 894T289
+838L190 1040Q274 1087 376 1114T590 1141Q799 1141 910 1043T1022 745V0H809ZM719 518L618 514Q557 512 515 498T448 461T411 405T399 332Q399 262 433 233T522 203Q564 203 600 217T662 260T704 330T719 426V518ZM801 1496Q750 1530 695 1573T588 1672Q534 1616
+482 1573T379 1496H176V1523Q202 1552 233 1590T297 1668T360 1749T412 1824H768Q789 1790 819 1750T881 1669T946 1590T1004 1523V1496H801Z" />
+<glyph unicode="&#xe3;" glyph-name="atilde" horiz-adv-x="1176" d="M809 0L750 152H741Q708 107 675 75T603 21T516 -10T403 -20Q335 -20 277 1T177 66T110 176T86 334Q86 512 200 596T541 690L719 696V780Q719 849 679 882T567 915Q495 915 427 894T289 838L190
+1040Q274 1087 376 1114T590 1141Q799 1141 910 1043T1022 745V0H809ZM719 518L618 514Q557 512 515 498T448 461T411 405T399 332Q399 262 433 233T522 203Q564 203 600 217T662 260T704 330T719 426V518ZM681 1346Q650 1346 632 1320T601 1239H452Q458 1319 478
+1377T530 1473T607 1529T704 1548Q745 1548 784 1532T861 1497T937 1461T1011 1444Q1042 1444 1060 1470T1091 1550H1240Q1234 1471 1214 1413T1160 1317T1084 1260T988 1241Q948 1241 908 1257T830 1293T755 1329T681 1346Z" />
+<glyph unicode="&#xe4;" glyph-name="adieresis" horiz-adv-x="1176" d="M809 0L750 152H741Q708 107 675 75T603 21T516 -10T403 -20Q335 -20 277 1T177 66T110 176T86 334Q86 512 200 596T541 690L719 696V780Q719 849 679 882T567 915Q495 915 427 894T289
+838L190 1040Q274 1087 376 1114T590 1141Q799 1141 910 1043T1022 745V0H809ZM719 518L618 514Q557 512 515 498T448 461T411 405T399 332Q399 262 433 233T522 203Q564 203 600 217T662 260T704 330T719 426V518ZM254 1405Q254 1440 265 1465T294 1507T338 1532T393
+1540Q422 1540 447 1532T492 1508T522 1466T534 1405Q534 1371 523 1346T492 1305T448 1280T393 1272Q364 1272 339 1280T295 1304T265 1346T254 1405ZM657 1405Q657 1440 668 1465T698 1507T743 1532T799 1540Q827 1540 852 1532T897 1508T928 1466T940 1405Q940
+1371 929 1346T898 1305T853 1280T799 1272Q739 1272 698 1305T657 1405Z" />
+<glyph unicode="&#xe5;" glyph-name="aring" horiz-adv-x="1176" d="M809 0L750 152H741Q708 107 675 75T603 21T516 -10T403 -20Q335 -20 277 1T177 66T110 176T86 334Q86 512 200 596T541 690L719 696V780Q719 849 679 882T567 915Q495 915 427 894T289 838L190
+1040Q274 1087 376 1114T590 1141Q799 1141 910 1043T1022 745V0H809ZM719 518L618 514Q557 512 515 498T448 461T411 405T399 332Q399 262 433 233T522 203Q564 203 600 217T662 260T704 330T719 426V518ZM842 1479Q842 1423 823 1379T769 1303T688 1256T588 1239Q533
+1239 487 1255T409 1302T358 1377T340 1477Q340 1532 358 1576T408 1650T487 1697T588 1714Q641 1714 687 1698T767 1651T822 1577T842 1479ZM684 1477Q684 1522 657 1547T588 1573Q546 1573 519 1548T492 1477Q492 1432 516 1406T588 1380Q630 1380 657 1406T684
+1477Z" />
+<glyph unicode="&#xe6;" glyph-name="ae" horiz-adv-x="1806" d="M1268 -20Q1137 -20 1030 30T854 186Q811 132 769 94T678 30T568 -8T424 -20Q356 -20 295 1T187 66T113 176T86 334Q86 512 200 596T541 690L719 696V780Q719 849 679 882T567 915Q495 915 427
+894T289 838L190 1040Q274 1087 376 1114T590 1141Q804 1141 913 1010Q1039 1139 1227 1139Q1338 1139 1427 1106T1579 1007T1674 848T1708 631V483H1026Q1028 419 1046 368T1098 281T1179 226T1288 207Q1382 207 1469 228T1645 295V59Q1605 38 1565 24T1479 -1T1382
+-15T1268 -20ZM719 518L618 514Q557 512 515 498T448 461T411 405T399 332Q399 262 433 233T522 203Q564 203 600 217T662 260T704 330T719 426V518ZM1229 922Q1147 922 1094 865T1032 686H1421Q1420 737 1408 780T1373 854T1313 904T1229 922Z" />
+<glyph unicode="&#xe7;" glyph-name="ccedilla" horiz-adv-x="1022" d="M625 -20Q505 -20 409 13T244 115T139 293T102 553Q102 720 139 832T245 1013T410 1110T625 1139Q711 1139 796 1118T956 1059L868 827Q802 856 741 874T625 893Q514 893 464 809T414 555Q414
+387 464 307T621 227Q708 227 779 249T924 307V53Q887 35 852 21T782 -2T708 -15T625 -20ZM778 -250Q778 -307 763 -352T711 -428T616 -475T469 -492Q424 -492 388 -486T323 -471V-303Q338 -307 356 -310T394 -317T432 -322T466 -324Q495 -324 516 -311T538 -262Q538
+-225 501 -197T372 -154L450 0H643L616 -61Q647 -71 676 -88T727 -128T764 -182T778 -250Z" />
+<glyph unicode="&#xe8;" glyph-name="egrave" horiz-adv-x="1190" d="M612 922Q531 922 478 865T416 686H805Q804 737 792 780T756 854T696 904T612 922ZM651 -20Q531 -20 430 15T256 120T143 298T102 551Q102 698 139 808T242 991T402 1102T610 1139Q721 1139
+810 1106T962 1007T1058 848T1092 631V483H410Q412 419 430 368T482 281T563 226T672 207Q723 207 768 212T857 229T942 256T1028 295V59Q988 38 948 24T862 -1T765 -15T651 -20ZM834 1241Q800 1269 753 1310T659 1396T575 1480T521 1548V1569H863Q879 1535 900
+1495T945 1414T992 1335T1037 1268V1241H834Z" />
+<glyph unicode="&#xe9;" glyph-name="eacute" horiz-adv-x="1190" d="M612 922Q531 922 478 865T416 686H805Q804 737 792 780T756 854T696 904T612 922ZM651 -20Q531 -20 430 15T256 120T143 298T102 551Q102 698 139 808T242 991T402 1102T610 1139Q721 1139
+810 1106T962 1007T1058 848T1092 631V483H410Q412 419 430 368T482 281T563 226T672 207Q723 207 768 212T857 229T942 256T1028 295V59Q988 38 948 24T862 -1T765 -15T651 -20ZM447 1241V1268Q468 1297 492 1335T539 1413T584 1494T621 1569H963V1548Q952 1530
+931 1506T883 1453T825 1396T763 1338T702 1285T650 1241H447Z" />
+<glyph unicode="&#xea;" glyph-name="ecircumflex" horiz-adv-x="1190" d="M612 922Q531 922 478 865T416 686H805Q804 737 792 780T756 854T696 904T612 922ZM651 -20Q531 -20 430 15T256 120T143 298T102 551Q102 698 139 808T242 991T402 1102T610 1139Q721
+1139 810 1106T962 1007T1058 848T1092 631V483H410Q412 419 430 368T482 281T563 226T672 207Q723 207 768 212T857 229T942 256T1028 295V59Q988 38 948 24T862 -1T765 -15T651 -20ZM819 1241Q768 1275 713 1318T606 1417Q552 1361 500 1318T397 1241H194V1268Q220
+1297 251 1335T315 1413T378 1494T430 1569H786Q807 1535 837 1495T899 1414T964 1335T1022 1268V1241H819Z" />
+<glyph unicode="&#xeb;" glyph-name="edieresis" horiz-adv-x="1190" d="M612 922Q531 922 478 865T416 686H805Q804 737 792 780T756 854T696 904T612 922ZM651 -20Q531 -20 430 15T256 120T143 298T102 551Q102 698 139 808T242 991T402 1102T610 1139Q721 1139
+810 1106T962 1007T1058 848T1092 631V483H410Q412 419 430 368T482 281T563 226T672 207Q723 207 768 212T857 229T942 256T1028 295V59Q988 38 948 24T862 -1T765 -15T651 -20ZM266 1405Q266 1440 277 1465T306 1507T350 1532T405 1540Q434 1540 459 1532T504
+1508T534 1466T546 1405Q546 1371 535 1346T504 1305T460 1280T405 1272Q376 1272 351 1280T307 1304T277 1346T266 1405ZM669 1405Q669 1440 680 1465T710 1507T755 1532T811 1540Q839 1540 864 1532T909 1508T940 1466T952 1405Q952 1371 941 1346T910 1305T865
+1280T811 1272Q751 1272 710 1305T669 1405Z" />
+<glyph unicode="&#xec;" glyph-name="igrave" horiz-adv-x="625" d="M465 0H160V1118H465V0ZM269 1241Q235 1269 188 1310T94 1396T10 1480T-44 1548V1569H298Q314 1535 335 1495T380 1414T427 1335T472 1268V1241H269Z" />
+<glyph unicode="&#xed;" glyph-name="iacute" horiz-adv-x="625" d="M465 0H160V1118H465V0ZM145 1241V1268Q166 1297 190 1335T237 1413T282 1494T319 1569H661V1548Q650 1530 629 1506T581 1453T523 1396T461 1338T400 1285T348 1241H145Z" />
+<glyph unicode="&#xee;" glyph-name="icircumflex" horiz-adv-x="625" d="M465 0H160V1118H465V0ZM521 1241Q470 1275 415 1318T308 1417Q254 1361 202 1318T99 1241H-104V1268Q-78 1297 -47 1335T17 1413T80 1494T132 1569H488Q509 1535 539 1495T601 1414T666
+1335T724 1268V1241H521Z" />
+<glyph unicode="&#xef;" glyph-name="idieresis" horiz-adv-x="625" d="M465 0H160V1118H465V0ZM-32 1405Q-32 1440 -21 1465T8 1507T52 1532T107 1540Q136 1540 161 1532T206 1508T236 1466T248 1405Q248 1371 237 1346T206 1305T162 1280T107 1272Q78 1272 53
+1280T9 1304T-21 1346T-32 1405ZM371 1405Q371 1440 382 1465T412 1507T457 1532T513 1540Q541 1540 566 1532T611 1508T642 1466T654 1405Q654 1371 643 1346T612 1305T567 1280T513 1272Q453 1272 412 1305T371 1405Z" />
+<glyph unicode="&#xf0;" glyph-name="eth" horiz-adv-x="1182" d="M457 1309Q423 1330 384 1354T303 1401L399 1571Q472 1537 536 1503T657 1430L883 1569L983 1415L809 1309Q881 1240 935 1162T1024 993T1078 798T1096 573Q1096 431 1060 321T957 135T795 20T582
+-20Q471 -20 378 14T218 113T112 272T74 489Q74 611 106 705T197 863T337 961T516 995Q612 995 680 964T780 883L801 885Q773 973 723 1050T606 1184L375 1040L274 1196L457 1309ZM784 532Q784 579 773 622T737 698T675 750T586 770Q478 770 432 700T385 487Q385
+424 396 372T432 283T495 226T586 205Q692 205 738 286T784 532Z" />
+<glyph unicode="&#xf1;" glyph-name="ntilde" horiz-adv-x="1284" d="M1130 0H825V653Q825 774 789 834T672 895Q612 895 572 871T509 800T475 684T465 526V0H160V1118H393L434 975H451Q475 1018 509 1049T585 1100T672 1129T766 1139Q848 1139 915 1116T1030
+1042T1104 915T1130 729V0ZM477 1346Q446 1346 428 1320T397 1239H248Q254 1319 274 1377T326 1473T403 1529T500 1548Q541 1548 580 1532T657 1497T733 1461T807 1444Q838 1444 856 1470T887 1550H1036Q1030 1471 1010 1413T956 1317T880 1260T784 1241Q744 1241
+704 1257T626 1293T551 1329T477 1346Z" />
+<glyph unicode="&#xf2;" glyph-name="ograve" horiz-adv-x="1227" d="M414 561Q414 394 461 310T614 225Q719 225 766 310T813 561Q813 728 766 810T612 893Q507 893 461 811T414 561ZM1124 561Q1124 421 1089 313T987 131T825 19T610 -20Q499 -20 406 18T246
+131T140 313T102 561Q102 700 137 808T239 989T401 1101T616 1139Q727 1139 820 1101T980 990T1086 808T1124 561ZM841 1241Q807 1269 760 1310T666 1396T582 1480T528 1548V1569H870Q886 1535 907 1495T952 1414T999 1335T1044 1268V1241H841Z" />
+<glyph unicode="&#xf3;" glyph-name="oacute" horiz-adv-x="1227" d="M414 561Q414 394 461 310T614 225Q719 225 766 310T813 561Q813 728 766 810T612 893Q507 893 461 811T414 561ZM1124 561Q1124 421 1089 313T987 131T825 19T610 -20Q499 -20 406 18T246
+131T140 313T102 561Q102 700 137 808T239 989T401 1101T616 1139Q727 1139 820 1101T980 990T1086 808T1124 561ZM434 1241V1268Q455 1297 479 1335T526 1413T571 1494T608 1569H950V1548Q939 1530 918 1506T870 1453T812 1396T750 1338T689 1285T637 1241H434Z"
+/>
+<glyph unicode="&#xf4;" glyph-name="ocircumflex" horiz-adv-x="1227" d="M414 561Q414 394 461 310T614 225Q719 225 766 310T813 561Q813 728 766 810T612 893Q507 893 461 811T414 561ZM1124 561Q1124 421 1089 313T987 131T825 19T610 -20Q499 -20 406 18T246
+131T140 313T102 561Q102 700 137 808T239 989T401 1101T616 1139Q727 1139 820 1101T980 990T1086 808T1124 561ZM821 1241Q770 1275 715 1318T608 1417Q554 1361 502 1318T399 1241H196V1268Q222 1297 253 1335T317 1413T380 1494T432 1569H788Q809 1535 839
+1495T901 1414T966 1335T1024 1268V1241H821Z" />
+<glyph unicode="&#xf5;" glyph-name="otilde" horiz-adv-x="1227" d="M414 561Q414 394 461 310T614 225Q719 225 766 310T813 561Q813 728 766 810T612 893Q507 893 461 811T414 561ZM1124 561Q1124 421 1089 313T987 131T825 19T610 -20Q499 -20 406 18T246
+131T140 313T102 561Q102 700 137 808T239 989T401 1101T616 1139Q727 1139 820 1101T980 990T1086 808T1124 561ZM444 1346Q413 1346 395 1320T364 1239H215Q221 1319 241 1377T293 1473T370 1529T467 1548Q508 1548 547 1532T624 1497T700 1461T774 1444Q805
+1444 823 1470T854 1550H1003Q997 1471 977 1413T923 1317T847 1260T751 1241Q711 1241 671 1257T593 1293T518 1329T444 1346Z" />
+<glyph unicode="&#xf6;" glyph-name="odieresis" horiz-adv-x="1227" d="M414 561Q414 394 461 310T614 225Q719 225 766 310T813 561Q813 728 766 810T612 893Q507 893 461 811T414 561ZM1124 561Q1124 421 1089 313T987 131T825 19T610 -20Q499 -20 406 18T246
+131T140 313T102 561Q102 700 137 808T239 989T401 1101T616 1139Q727 1139 820 1101T980 990T1086 808T1124 561ZM266 1405Q266 1440 277 1465T306 1507T350 1532T405 1540Q434 1540 459 1532T504 1508T534 1466T546 1405Q546 1371 535 1346T504 1305T460 1280T405
+1272Q376 1272 351 1280T307 1304T277 1346T266 1405ZM669 1405Q669 1440 680 1465T710 1507T755 1532T811 1540Q839 1540 864 1532T909 1508T940 1466T952 1405Q952 1371 941 1346T910 1305T865 1280T811 1272Q751 1272 710 1305T669 1405Z" />
+<glyph unicode="&#xf7;" glyph-name="divide" horiz-adv-x="1128" d="M88 612V831H1040V612H88ZM424 373Q424 415 435 444T465 490T509 516T563 524Q591 524 616 516T660 491T690 444T702 373Q702 333 691 304T660 257T616 230T563 221Q535 221 510 229T465 256T435
+304T424 373ZM424 1071Q424 1113 435 1142T465 1189T509 1215T563 1223Q591 1223 616 1215T660 1189T690 1142T702 1071Q702 1031 691 1003T660 956T616 929T563 920Q535 920 510 928T465 955T435 1002T424 1071Z" />
+<glyph unicode="&#xf8;" glyph-name="oslash" horiz-adv-x="1227" d="M1124 561Q1124 421 1089 313T987 131T825 19T610 -20Q553 -20 501 -10T401 18L344 -76L182 14L250 125Q181 199 142 308T102 561Q102 700 137 808T239 989T401 1101T616 1139Q678 1139 735
+1126T844 1090L893 1169L1053 1073L991 975Q1054 903 1089 799T1124 561ZM414 561Q414 475 426 410L709 868Q669 893 612 893Q507 893 461 811T414 561ZM813 561Q813 625 807 674L539 240Q556 232 574 229T614 225Q719 225 766 310T813 561Z" />
+<glyph unicode="&#xf9;" glyph-name="ugrave" horiz-adv-x="1284" d="M891 0L850 143H834Q809 100 775 70T699 19T612 -10T518 -20Q436 -20 369 3T254 77T180 204T154 389V1118H459V465Q459 344 495 284T612 223Q672 223 712 247T775 318T809 434T819 592V1118H1124V0H891ZM839
+1241Q805 1269 758 1310T664 1396T580 1480T526 1548V1569H868Q884 1535 905 1495T950 1414T997 1335T1042 1268V1241H839Z" />
+<glyph unicode="&#xfa;" glyph-name="uacute" horiz-adv-x="1284" d="M891 0L850 143H834Q809 100 775 70T699 19T612 -10T518 -20Q436 -20 369 3T254 77T180 204T154 389V1118H459V465Q459 344 495 284T612 223Q672 223 712 247T775 318T809 434T819 592V1118H1124V0H891ZM461
+1241V1268Q482 1297 506 1335T553 1413T598 1494T635 1569H977V1548Q966 1530 945 1506T897 1453T839 1396T777 1338T716 1285T664 1241H461Z" />
+<glyph unicode="&#xfb;" glyph-name="ucircumflex" horiz-adv-x="1284" d="M891 0L850 143H834Q809 100 775 70T699 19T612 -10T518 -20Q436 -20 369 3T254 77T180 204T154 389V1118H459V465Q459 344 495 284T612 223Q672 223 712 247T775 318T809 434T819 592V1118H1124V0H891ZM842
+1241Q791 1275 736 1318T629 1417Q575 1361 523 1318T420 1241H217V1268Q243 1297 274 1335T338 1413T401 1494T453 1569H809Q830 1535 860 1495T922 1414T987 1335T1045 1268V1241H842Z" />
+<glyph unicode="&#xfc;" glyph-name="udieresis" horiz-adv-x="1284" d="M891 0L850 143H834Q809 100 775 70T699 19T612 -10T518 -20Q436 -20 369 3T254 77T180 204T154 389V1118H459V465Q459 344 495 284T612 223Q672 223 712 247T775 318T809 434T819 592V1118H1124V0H891ZM295
+1405Q295 1440 306 1465T335 1507T379 1532T434 1540Q463 1540 488 1532T533 1508T563 1466T575 1405Q575 1371 564 1346T533 1305T489 1280T434 1272Q405 1272 380 1280T336 1304T306 1346T295 1405ZM698 1405Q698 1440 709 1465T739 1507T784 1532T840 1540Q868
+1540 893 1532T938 1508T969 1466T981 1405Q981 1371 970 1346T939 1305T894 1280T840 1272Q780 1272 739 1305T698 1405Z" />
+<glyph unicode="&#xfd;" glyph-name="yacute" horiz-adv-x="1104" d="M0 1118H334L514 489Q530 437 537 378T547 272H553Q555 295 558 323T567 380T578 437T592 489L768 1118H1104L662 -143Q600 -320 493 -406T225 -492Q173 -492 135 -487T70 -475V-233Q91 -238
+123 -242T190 -246Q238 -246 272 -233T330 -197T372 -140T403 -66L422 -10L0 1118ZM393 1241V1268Q414 1297 438 1335T485 1413T530 1494T567 1569H909V1548Q898 1530 877 1506T829 1453T771 1396T709 1338T648 1285T596 1241H393Z" />
+<glyph unicode="&#xfe;" glyph-name="thorn" horiz-adv-x="1245" d="M465 973Q485 1008 512 1038T576 1090T656 1126T756 1139Q842 1139 913 1102T1035 992T1114 811T1143 561Q1143 418 1115 310T1036 128T914 17T756 -20Q701 -20 656 -10T576 20T513 64T465 117H451Q454
+85 458 55Q461 29 463 3T465 -39V-492H160V1556H465V1165Q465 1141 463 1108T458 1045Q454 1010 451 973H465ZM653 895Q602 895 567 877T509 821T477 728T465 596V563Q465 482 474 419T506 314T564 249T655 227Q746 227 788 313T831 565Q831 730 789 812T653 895Z"
+/>
+<glyph unicode="&#xff;" glyph-name="ydieresis" horiz-adv-x="1104" d="M0 1118H334L514 489Q530 437 537 378T547 272H553Q555 295 558 323T567 380T578 437T592 489L768 1118H1104L662 -143Q600 -320 493 -406T225 -492Q173 -492 135 -487T70 -475V-233Q91
+-238 123 -242T190 -246Q238 -246 272 -233T330 -197T372 -140T403 -66L422 -10L0 1118ZM466 1405Q466 1440 477 1465T506 1507T550 1532T605 1540Q634 1540 659 1532T704 1508T734 1466T746 1405Q746 1371 735 1346T704 1305T660 1280T605 1272Q576 1272 551 1280T507
+1304T477 1346T466 1405ZM869 1405Q869 1440 880 1465T910 1507T955 1532T1011 1540Q1039 1540 1064 1532T1109 1508T1140 1466T1152 1405Q1152 1371 1141 1346T1110 1305T1065 1280T1011 1272Q951 1272 910 1305T869 1405Z" />
+<glyph unicode="&#x2013;" glyph-name="endash" horiz-adv-x="1024" d="M82 436V666H942V436H82Z" />
+<glyph unicode="&#x2014;" glyph-name="emdash" horiz-adv-x="2048" d="M82 436V666H1966V436H82Z" />
+<glyph unicode="&#x2018;" glyph-name="quoteleft" horiz-adv-x="440" d="M37 961L23 983Q37 1037 56 1098T99 1221T148 1344T199 1462H418Q403 1401 389 1335T361 1204T336 1076T317 961H37Z" />
+<glyph unicode="&#x2019;" glyph-name="quoteright" horiz-adv-x="440" d="M403 1462L418 1440Q404 1385 385 1325T342 1202T293 1078T242 961H23Q37 1021 51 1087T79 1219T104 1347T123 1462H403Z" />
+<glyph unicode="&#x201a;" glyph-name="quotesinglbase" horiz-adv-x="594" d="M459 215Q445 161 426 100T383 -23T334 -146T283 -264H63Q78 -203 92 -137T120 -6T145 122T164 238H444L459 215Z" />
+<glyph unicode="&#x201c;" glyph-name="quotedblleft" horiz-adv-x="907" d="M489 983Q503 1037 523 1098T566 1221T615 1344T666 1462H885Q870 1401 856 1335T828 1204T803 1076T784 961H504L489 983ZM23 983Q37 1037 56 1098T99 1221T148 1344T199 1462H418Q403
+1401 389 1335T361 1204T336 1076T317 961H37L23 983Z" />
+<glyph unicode="&#x201d;" glyph-name="quotedblright" horiz-adv-x="907" d="M418 1440Q404 1385 385 1325T342 1202T293 1078T242 961H23Q37 1021 51 1087T79 1219T104 1347T123 1462H403L418 1440ZM885 1440Q871 1385 852 1325T809 1202T760 1078T709 961H489Q504
+1021 518 1087T546 1219T571 1347T590 1462H870L885 1440Z" />
+<glyph unicode="&#x201e;" glyph-name="quotedblbase" horiz-adv-x="1061" d="M459 215Q445 161 426 100T383 -23T334 -146T283 -264H63Q78 -203 92 -137T120 -6T145 122T164 238H444L459 215ZM926 215Q912 161 893 100T850 -23T801 -146T750 -264H530Q545 -203
+559 -137T587 -6T612 122T631 238H911L926 215Z" />
+<glyph unicode="&#x2022;" glyph-name="bullet" horiz-adv-x="770" d="M98 748Q98 834 120 894T180 992T271 1047T385 1065Q444 1065 496 1048T588 992T649 894T672 748Q672 663 650 603T588 505T497 448T385 430Q324 430 272 448T181 504T120 603T98 748Z" />
+<glyph unicode="&#x2039;" glyph-name="guilsinglleft" horiz-adv-x="692" d="M82 573L391 1028L610 909L393 561L610 213L391 94L82 547V573Z" />
+<glyph unicode="&#x203a;" glyph-name="guilsinglright" horiz-adv-x="692" d="M610 547L301 94L82 213L299 561L82 909L301 1028L610 573V547Z" />
+</font>
+</defs>
+</svg>

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.ttf
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.ttf b/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.ttf
new file mode 100644
index 0000000..15896c4
Binary files /dev/null and b/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.ttf differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.woff
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.woff b/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.woff
new file mode 100644
index 0000000..67e3e25
Binary files /dev/null and b/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.woff differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.woff2
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.woff2 b/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.woff2
new file mode 100644
index 0000000..1e726a7
Binary files /dev/null and b/ambari-web/api-docs/fonts/droid-sans-v6-latin-700.woff2 differ

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.eot
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.eot b/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.eot
new file mode 100644
index 0000000..ac2698e
Binary files /dev/null and b/ambari-web/api-docs/fonts/droid-sans-v6-latin-regular.eot differ


[18/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewDataMigrationService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewDataMigrationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewDataMigrationService.java
deleted file mode 100644
index 2a9aa64..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewDataMigrationService.java
+++ /dev/null
@@ -1,122 +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 javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.WebApplicationException;
-import javax.ws.rs.core.Response;
-
-import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
-import org.apache.ambari.server.view.ViewDataMigrationUtility;
-import org.apache.ambari.server.view.ViewRegistry;
-import org.apache.ambari.view.migration.ViewDataMigrationException;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * Service responsible for data migration between view instances.
- */
-public class ViewDataMigrationService extends BaseService {
-  /**
-   * Logger.
-   */
-  private static final Log LOG = LogFactory.getLog(ViewDataMigrationService.class);
-
-  /**
-   * The current view name.
-   */
-  private final String viewName;
-
-  /**
-   * The current view version.
-   */
-  private final String viewVersion;
-
-  /**
-   * The current view instance name.
-   */
-  private final String instanceName;
-
-  /**
-   * The singleton view registry.
-   */
-  ViewRegistry viewRegistry;
-
-  /**
-   * The view data migration utility.
-   */
-  private ViewDataMigrationUtility viewDataMigrationUtility;
-
-  /**
-   * Constructor.
-   *
-   * @param viewName       the current view name
-   * @param viewVersion    the current view version
-   * @param instanceName   the current view instance name
-   */
-  public ViewDataMigrationService(String viewName, String viewVersion, String instanceName) {
-    this.viewName = viewName;
-    this.viewVersion = viewVersion;
-    this.instanceName = instanceName;
-    this.viewRegistry = ViewRegistry.getInstance();
-  }
-
-  /**
-   * Migrates view instance persistence data from origin view instance
-   * specified in the path params.
-   *
-   * @param originViewVersion  the origin view version
-   * @param originInstanceName the origin view instance name
-   */
-  @PUT
-  @Path("{originVersion}/{originInstanceName}")
-  public Response migrateData(@PathParam("originVersion") String originViewVersion,
-                              @PathParam("originInstanceName") String originInstanceName)
-      throws ViewDataMigrationException {
-
-    if (!viewRegistry.checkAdmin()) {
-      throw new WebApplicationException(Response.Status.FORBIDDEN);
-    }
-
-    LOG.info("Data Migration to view instance " + viewName + "/" + viewVersion + "/" + instanceName +
-        " from " + viewName + "/" + originViewVersion + "/" + originInstanceName);
-
-    ViewInstanceEntity instanceDefinition = viewRegistry.getInstanceDefinition(
-        viewName, viewVersion, instanceName);
-    ViewInstanceEntity originInstanceDefinition = viewRegistry.getInstanceDefinition(
-        viewName, originViewVersion, originInstanceName);
-
-    getViewDataMigrationUtility().migrateData(instanceDefinition, originInstanceDefinition, false);
-
-    Response.ResponseBuilder builder = Response.status(Response.Status.OK);
-    return builder.build();
-  }
-
-  protected ViewDataMigrationUtility getViewDataMigrationUtility() {
-    if (viewDataMigrationUtility == null) {
-      viewDataMigrationUtility = new ViewDataMigrationUtility(viewRegistry);
-    }
-    return viewDataMigrationUtility;
-  }
-
-  protected void setViewDataMigrationUtility(ViewDataMigrationUtility viewDataMigrationUtility) {
-    this.viewDataMigrationUtility = viewDataMigrationUtility;
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewExternalSubResourceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewExternalSubResourceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewExternalSubResourceService.java
deleted file mode 100644
index 66ccae7..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewExternalSubResourceService.java
+++ /dev/null
@@ -1,146 +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 java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import javax.ws.rs.GET;
-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 org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.controller.spi.Resource;
-import org.apache.ambari.server.orm.entities.ViewEntity;
-import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
-
-/**
- * Service responsible for view sub-resource requests.
- */
-public class ViewExternalSubResourceService  extends BaseService {
-
-  /**
-   * The resource type.
-   */
-  private final Resource.Type type;
-
-  /**
-   * The view name.
-   */
-  private final String viewName;
-
-  /**
-   * The view version.
-   */
-  private final String version;
-
-  /**
-   * The instance name.
-   */
-  private final String instanceName;
-
-  /**
-   * Mapping of resource names to services.
-   */
-  private final Map<String, Object> resourceServiceMap = new HashMap<String, Object>();
-
-
-  // ----- Constructors ------------------------------------------------------
-
-  public ViewExternalSubResourceService(Resource.Type type, ViewInstanceEntity viewInstanceDefinition) {
-    ViewEntity viewEntity = viewInstanceDefinition.getViewEntity();
-
-    this.type         = type;
-    this.viewName     = viewEntity.getCommonName();
-    this.version      = viewEntity.getVersion();
-    this.instanceName = viewInstanceDefinition.getName();
-  }
-
-  /**
-   * Handles URL: /resources
-   * Get all external resources for a view.
-   *
-   * @param headers  http headers
-   * @param ui       uri info
-   *
-   * @return instance collection resource representation
-   */
-  @GET
-  @Produces("text/plain")
-  public Response getResources(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, body, ui, Request.Type.GET,
-        createResource(viewName, instanceName));
-  }
-
-  /**
-   * Handles: GET /resources/{resourceName} Get a specific external resource.
-   *
-   * @param resourceName  resource name
-   *
-   * @return resource service instance representation
-   *
-   * @throws IllegalArgumentException if the given resource name is unknown
-   */
-  @Path("{resourceName}")
-  public Object getResource(@PathParam("resourceName") String resourceName) throws IOException {
-
-    Object service = resourceServiceMap.get(resourceName);
-    if (service == null) {
-      throw new IllegalArgumentException("A resource type " + resourceName + " for view instance " +
-          viewName + "/" + instanceName + " can not be found.");
-    }
-
-    return service;
-  }
-
-
-  // ----- helper methods ----------------------------------------------------
-
-  /**
-   * Register a sub-resource service.
-   *
-   * @param resourceName  the resource name
-   * @param service       the service
-   */
-  public void addResourceService(String resourceName, Object service) {
-    resourceServiceMap.put(resourceName, service);
-  }
-
-  /**
-   * Create an view instance resource.
-   *
-   * @param viewName      view name
-   * @param instanceName  instance name
-   *
-   * @return a view instance resource
-   */
-  private ResourceInstance createResource(String viewName, String instanceName) {
-    Map<Resource.Type,String> mapIds = new HashMap<Resource.Type, String>();
-    mapIds.put(Resource.Type.View, viewName);
-    mapIds.put(Resource.Type.ViewVersion, version);
-    mapIds.put(Resource.Type.ViewInstance, instanceName);
-    return createResource(type, mapIds);
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewInstanceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewInstanceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewInstanceService.java
deleted file mode 100644
index 53d4918..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewInstanceService.java
+++ /dev/null
@@ -1,282 +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 java.util.HashMap;
-import java.util.Map;
-
-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.WebApplicationException;
-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 org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.controller.spi.Resource;
-import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
-import org.apache.ambari.server.security.authorization.AuthorizationException;
-import org.apache.ambari.server.view.ViewRegistry;
-
-/**
- * Service responsible for instances resource requests.
- */
-public class ViewInstanceService extends BaseService {
-  /**
-   * Parent view name.
-   */
-  private final String viewName;
-
-  /**
-   * The view version.
-   */
-  private final String version;
-
-  /**
-   * The view registry;
-   */
-  private final ViewRegistry viewRegistry;
-
-  // ----- Constructors ------------------------------------------------------
-
-  /**
-   * Construct a view instance service.
-   *
-   * @param viewName  the view id
-   * @param version   the version
-   */
-  public ViewInstanceService(String viewName, String version) {
-    this.viewName = viewName;
-    this.version = version;
-
-    viewRegistry = ViewRegistry.getInstance();
-  }
-
-
-  // ----- ViewInstanceService -----------------------------------------------
-
-  /**
-   * Handles URL: /views/{viewID}/instances/{instanceID}
-   * Get a specific instance.
-   *
-   * @param headers       http headers
-   * @param ui            uri info
-   * @param instanceName  instance id
-   *
-   * @return instance resource representation
-   */
-  @GET
-  @Path("{instanceName}")
-  @Produces("text/plain")
-  public Response getService(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                             @PathParam("instanceName") String instanceName) throws AuthorizationException {
-    return handleRequest(headers, body, ui, Request.Type.GET, createResource(viewName, version, instanceName));
-  }
-
-  /**
-   * Handles URL: /views/{viewID}/instances
-   * Get all instances for a view.
-   *
-   * @param headers  http headers
-   * @param ui       uri info
-   *
-   * @return instance collection resource representation
-   */
-  @GET
-  @Produces("text/plain")
-  public Response getServices(String body, @Context HttpHeaders headers, @Context UriInfo ui) throws AuthorizationException {
-    return handleRequest(headers, body, ui, Request.Type.GET, createResource(viewName, version, null));
-  }
-
-  /**
-   * Handles: POST /views/{viewID}/instances/{instanceId}
-   * Create a specific instance.
-   *
-   * @param body          http body
-   * @param headers       http headers
-   * @param ui            uri info
-   * @param instanceName  instance id
-   *
-   * @return information regarding the created instance
-   */
-  @POST
-  @Path("{instanceName}")
-  @Produces("text/plain")
-  public Response createService(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("instanceName") String instanceName) throws AuthorizationException {
-    return handleRequest(headers, body, ui, Request.Type.POST, createResource(viewName, version, instanceName));
-  }
-
-  /**
-   * Handles: POST /views/{viewID}/instances
-   * Create multiple instances.
-   *
-   * @param body     http body
-   * @param headers  http headers
-   * @param ui       uri info
-   *
-   * @return information regarding the created instances
-   */
-  @POST
-  @Produces("text/plain")
-  public Response createServices(String body, @Context HttpHeaders headers, @Context UriInfo ui) throws AuthorizationException {
-    return handleRequest(headers, body, ui, Request.Type.POST, createResource(viewName, version, null));
-  }
-
-  /**
-   * Handles: PUT /views/{viewID}/instances/{instanceId}
-   * Update a specific instance.
-   *
-   * @param body          http body
-   * @param headers       http headers
-   * @param ui            uri info
-   * @param instanceName  instance id
-   *
-   * @return information regarding the updated instance
-   */
-  @PUT
-  @Path("{instanceName}")
-  @Produces("text/plain")
-  public Response updateService(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("instanceName") String instanceName) throws AuthorizationException {
-    return handleRequest(headers, body, ui, Request.Type.PUT, createResource(viewName, version, instanceName));
-  }
-
-  /**
-   * Handles: PUT /views/{viewID}/instances
-   * Update multiple instances.
-   *
-   * @param body     http body
-   * @param headers  http headers
-   * @param ui       uri info
-   *
-   * @return information regarding the updated instance
-   */
-  @PUT
-  @Produces("text/plain")
-  public Response updateServices(String body, @Context HttpHeaders headers, @Context UriInfo ui) throws AuthorizationException {
-    return handleRequest(headers, body, ui, Request.Type.PUT, createResource(viewName, version, null));
-  }
-
-  /**
-   * Handles: DELETE /views/{viewID}/instances/{instanceId}
-   * Delete a specific instance.
-   *
-   * @param headers       http headers
-   * @param ui            uri info
-   * @param instanceName  instance id
-   *
-   * @return information regarding the deleted instance
-   */
-  @DELETE
-  @Path("{instanceName}")
-  @Produces("text/plain")
-  public Response deleteService(@Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("instanceName") String instanceName) throws AuthorizationException {
-    return handleRequest(headers, null, ui, Request.Type.DELETE, createResource(viewName, version, instanceName));
-  }
-
-  /**
-   * Get the sub-resource
-   *
-   * @param instanceName  the instance id
-   *
-   * @return the service
-   */
-  @Path("{instanceName}/{resources}")
-  public Object getResourceHandler(@Context javax.ws.rs.core.Request request,
-                                   @PathParam("instanceName") String instanceName,
-                                   @PathParam("resources") String resources) {
-
-    hasPermission(Request.Type.valueOf(request.getMethod()), instanceName);
-
-    ViewInstanceEntity instanceDefinition =
-        ViewRegistry.getInstance().getInstanceDefinition(viewName, version, instanceName);
-
-    if (instanceDefinition == null) {
-      throw new IllegalArgumentException("A view instance " +
-          viewName + "/" + instanceName + " can not be found.");
-    }
-
-    Object service = instanceDefinition.getService(resources);
-
-    if (service == null) {
-      throw new IllegalArgumentException("A resource type " + resources + " for view instance " +
-          viewName + "/" + instanceName + " can not be found.");
-    }
-    return service;
-  }
-
-  /**
-   * Gets the admin privilege service
-   */
-  @Path("{instanceName}/privileges")
-  public PrivilegeService getPrivilegeService(@Context javax.ws.rs.core.Request request,
-                                              @PathParam ("instanceName") String instanceName) {
-
-    hasPermission(Request.Type.valueOf(request.getMethod()), instanceName);
-
-    return new ViewPrivilegeService(viewName, version, instanceName);
-  }
-
-  @Path("{instanceName}/migrate")
-  public ViewDataMigrationService migrateData(@Context javax.ws.rs.core.Request request,
-                                              @PathParam ("instanceName") String instanceName) {
-    return new ViewDataMigrationService(viewName, version, instanceName);
-  }
-  // ----- helper methods ----------------------------------------------------
-
-  /**
-   * Create an view instance resource.
-   *
-   * @param viewName      view name
-   * @param instanceName  instance name
-   *
-   * @return a view instance resource
-   */
-  private ResourceInstance createResource(String viewName, String viewVersion, String instanceName) {
-    Map<Resource.Type, String> mapIds = new HashMap<Resource.Type, String>();
-    mapIds.put(Resource.Type.View, viewName);
-    mapIds.put(Resource.Type.ViewVersion, viewVersion);
-    mapIds.put(Resource.Type.ViewInstance, instanceName);
-    return createResource(Resource.Type.ViewInstance, mapIds);
-  }
-
-  /**
-   * Determine whether or not the access specified by the given request type
-   * is permitted for the current user on the view instance resource identified
-   * by the given instance name.
-   *
-   * @param requestType   the request method type
-   * @param instanceName  the name of the view instance resource
-   *
-   * @throws WebApplicationException if access is forbidden
-   */
-  private void hasPermission(Request.Type requestType, String instanceName) {
-    if (!viewRegistry.checkPermission(viewName, version, instanceName, requestType == Request.Type.GET)) {
-      throw new WebApplicationException(Response.Status.FORBIDDEN);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPermissionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPermissionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPermissionService.java
deleted file mode 100644
index 8f7f4ef..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPermissionService.java
+++ /dev/null
@@ -1,186 +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 java.util.HashMap;
-import java.util.Map;
-
-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 org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.controller.spi.Resource;
-
-
-/**
- * Service responsible for custom view permission resource requests.
- */
-public class ViewPermissionService extends BaseService {
-
-  /**
-   * Parent view name.
-   */
-  private final String viewName;
-
-  /**
-   * The view version.
-   */
-  private final String version;
-
-
-  // ----- Constructors ------------------------------------------------------
-
-  /**
-   * Construct a view permission service.
-   *
-   * @param viewName  the view id
-   * @param version   the version
-   */
-  public ViewPermissionService(String viewName, String version) {
-    this.viewName = viewName;
-    this.version  = version;
-  }
-
-
-  // ----- ViewPermissionService -----------------------------------------------
-
-  /**
-   * Handles: GET /permissions/{permissionID}
-   * Get a specific permission.
-   *
-   * @param headers        http headers
-   * @param ui             uri info
-   * @param permissionId   permission id
-   *
-   * @return permission instance representation
-   */
-  @GET
-  @Path("{permissionId}")
-  @Produces("text/plain")
-  public Response getPermission(@Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("permissionId") String permissionId) {
-
-    return handleRequest(headers, null, ui, Request.Type.GET, createPermissionResource(
-        viewName, version, permissionId));
-  }
-
-  /**
-   * Handles: GET  /permissions
-   * Get all permissions.
-   *
-   * @param headers  http headers
-   * @param ui       uri info
-   *
-   * @return permission collection resource representation
-   */
-  @GET
-  @Produces("text/plain")
-  public Response getPermissions(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createPermissionResource(
-        viewName, version, null));
-  }
-
-  /**
-   * Handles: POST /permissions/{permissionID}
-   * Create a specific permission.
-   *
-   * @param headers    http headers
-   * @param ui         uri info
-   * @param permissionId   permission id
-   *
-   * @return information regarding the created permission
-   */
-  @POST
-  @Path("{permissionId}")
-  @Produces("text/plain")
-  public Response createPermission(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                                   @PathParam("permissionId") String permissionId) {
-
-    return handleRequest(headers, body, ui, Request.Type.POST, createPermissionResource(
-        viewName, version, permissionId));
-  }
-
-  /**
-   * Handles: PUT /permissions/{permissionID}
-   * Update a specific permission.
-   *
-   * @param headers   http headers
-   * @param ui        uri info
-   * @param permissionId  permission id
-   *
-   * @return information regarding the updated permission
-   */
-  @PUT
-  @Path("{permissionId}")
-  @Produces("text/plain")
-  public Response updatePermission(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                                   @PathParam("permissionId") String permissionId) {
-
-    return handleRequest(headers, body, ui, Request.Type.PUT, createPermissionResource(
-        viewName, version, permissionId));
-  }
-
-  /**
-   * Handles: DELETE /permissions/{permissionID}
-   * Delete a specific permission.
-   *
-   * @param headers   http headers
-   * @param ui        uri info
-   * @param permissionId  permission id
-   *
-   * @return information regarding the deleted permission
-   */
-  @DELETE
-  @Path("{permissionId}")
-  @Produces("text/plain")
-  public Response deletePermission(@Context HttpHeaders headers, @Context UriInfo ui,
-                                   @PathParam("permissionId") String permissionId) {
-
-    return handleRequest(headers, null, ui, Request.Type.DELETE, createPermissionResource(
-        viewName, version, permissionId));
-  }
-
-
-  // ----- helper methods ----------------------------------------------------
-
-  /**
-   * Create a permission resource.
-   *
-   * @param permissionId permission name
-   *
-   * @return a permission resource instance
-   */
-  protected ResourceInstance createPermissionResource(String viewName, String viewVersion, String permissionId) {
-    Map<Resource.Type,String> mapIds = new HashMap<Resource.Type, String>();
-    mapIds.put(Resource.Type.View, viewName);
-    mapIds.put(Resource.Type.ViewVersion, viewVersion);
-    mapIds.put(Resource.Type.ViewPermission, permissionId);
-
-    return createResource(Resource.Type.ViewPermission, mapIds);
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPrivilegeService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPrivilegeService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPrivilegeService.java
deleted file mode 100644
index 7393745..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewPrivilegeService.java
+++ /dev/null
@@ -1,55 +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 privileges and
- * limitations under the License.
- */
-
-package org.apache.ambari.server.api.services;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.controller.spi.Resource;
-
-/**
- *  Service responsible for view privilege resource requests.
- */
-public class ViewPrivilegeService extends PrivilegeService {
-
-  private final String viewName;
-  private final String viewVersion;
-  private final String instanceName;
-
-  public ViewPrivilegeService(String viewName, String viewVersion, String instanceName) {
-    this.viewName = viewName;
-    this.viewVersion = viewVersion;
-    this.instanceName = instanceName;
-  }
-
-  // ----- PrivilegeService --------------------------------------------------
-
-  @Override
-  protected ResourceInstance createPrivilegeResource(String privilegeId) {
-    Map<Resource.Type,String> mapIds = new HashMap<Resource.Type, String>();
-    mapIds.put(Resource.Type.View, viewName);
-    mapIds.put(Resource.Type.ViewVersion, viewVersion);
-    mapIds.put(Resource.Type.ViewInstance, instanceName);
-    mapIds.put(Resource.Type.ViewPrivilege, privilegeId);
-
-    return createResource(Resource.Type.ViewPrivilege, mapIds);
-  }
-}
-

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewService.java
deleted file mode 100644
index 17a9f34..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewService.java
+++ /dev/null
@@ -1,162 +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 java.util.Collections;
-
-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 org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.controller.spi.Resource;
-
-
-/**
- * Service responsible for view resource requests.
- */
-@Path("/views/")
-public class ViewService extends BaseService {
-
-  /**
-   * Handles: GET /views/{viewID}
-   * Get a specific view.
-   *
-   * @param headers    http headers
-   * @param ui         uri info
-   * @param viewName   view id
-   *
-   * @return view instance representation
-   */
-  @GET
-  @Path("{viewName}")
-  @Produces("text/plain")
-  public Response getView(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                             @PathParam("viewName") String viewName) {
-
-    return handleRequest(headers, body, ui, Request.Type.GET, createViewResource(viewName));
-  }
-
-  /**
-   * Handles: GET  /views
-   * Get all views.
-   *
-   * @param headers  http headers
-   * @param ui       uri info
-   *
-   * @return view collection resource representation
-   */
-  @GET
-  @Produces("text/plain")
-  public Response getViews(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, body, ui, Request.Type.GET, createViewResource(null));
-  }
-
-  /**
-   * Handles: POST /views/{viewID}
-   * Create a specific view.
-   *
-   * @param headers    http headers
-   * @param ui         uri info
-   * @param viewName   view id
-   *
-   * @return information regarding the created view
-   */
-  @POST
-  @Path("{viewName}")
-  @Produces("text/plain")
-  public Response createView(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("viewName") String viewName) {
-
-    return handleRequest(headers, body, ui, Request.Type.POST, createViewResource(viewName));
-  }
-
-  /**
-   * Handles: PUT /views/{viewID}
-   * Update a specific view.
-   *
-   * @param headers   http headers
-   * @param ui        uri info
-   * @param viewName  view id
-   *
-   * @return information regarding the updated view
-   */
-  @PUT
-  @Path("{viewName}")
-  @Produces("text/plain")
-  public Response updateView(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("viewName") String viewName) {
-
-    return handleRequest(headers, body, ui, Request.Type.PUT, createViewResource(viewName));
-  }
-
-  /**
-   * Handles: DELETE /views/{viewID}
-   * Delete a specific view.
-   *
-   * @param headers   http headers
-   * @param ui        uri info
-   * @param viewName  view id
-   *
-   * @return information regarding the deleted view
-   */
-  @DELETE
-  @Path("{viewName}")
-  @Produces("text/plain")
-  public Response deleteView(@Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("viewName") String viewName) {
-
-    return handleRequest(headers, null, ui, Request.Type.DELETE, createViewResource(viewName));
-  }
-
-  /**
-   * Get the instances sub-resource
-   *
-   * @param viewName  view id
-   *
-   * @return the versions service
-   */
-  @Path("{viewName}/versions")
-  public ViewVersionService getInstanceHandler(@PathParam("viewName") String viewName) {
-    return new ViewVersionService(viewName);
-  }
-
-
-  // ----- helper methods ----------------------------------------------------
-
-  /**
-   * Create a view resource.
-   *
-   * @param viewName view name
-   *
-   * @return a view resource instance
-   */
-  private ResourceInstance createViewResource(String viewName) {
-    return createResource(Resource.Type.View,
-        Collections.singletonMap(Resource.Type.View, viewName));
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewSubResourceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewSubResourceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewSubResourceService.java
deleted file mode 100644
index 76d28fe..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewSubResourceService.java
+++ /dev/null
@@ -1,134 +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 java.util.HashMap;
-import java.util.Map;
-
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-
-import org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.controller.spi.Resource;
-import org.apache.ambari.server.orm.entities.ViewEntity;
-import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
-import org.apache.ambari.view.ViewResourceHandler;
-
-/**
- * View sub-resource service.
- */
-public class ViewSubResourceService extends BaseService implements ViewResourceHandler {
-  /**
-   * The type of the sub-resource.
-   */
-  private final Resource.Type type;
-
-  /**
-   * The associated view name.
-   */
-  private final String viewName;
-
-  /**
-   * The view version.
-   */
-  private final String version;
-
-  /**
-   * The associated view instance name.
-   */
-  private final String instanceName;
-
-
-  // ----- Constructors ------------------------------------------------------
-
-  /**
-   * Construct a view sub-resource service.
-   */
-  public ViewSubResourceService(Resource.Type type, ViewInstanceEntity viewInstanceDefinition) {
-    ViewEntity viewEntity = viewInstanceDefinition.getViewEntity();
-
-    this.type         = type;
-    this.viewName     = viewEntity.getCommonName();
-    this.version      = viewEntity.getVersion();
-    this.instanceName = viewInstanceDefinition.getName();
-  }
-
-
-  // ----- ViewResourceHandler -----------------------------------------------
-
-  @Override
-  public Response handleRequest(HttpHeaders headers, UriInfo ui,
-                                RequestType requestType, MediaType mediaType,
-                                String resourceId) {
-    return handleRequest(headers, null, ui, getRequestType(requestType),
-        getMediaType(mediaType), createResource(resourceId));
-  }
-
-  @Override
-  public Response handleRequest(HttpHeaders headers, UriInfo ui, String resourceId) {
-    return handleRequest(headers, null, ui, Request.Type.GET,
-        createResource(resourceId));
-  }
-
-
-  // ----- helper methods ----------------------------------------------------
-
-  // create a resource with the given id
-  protected ResourceInstance createResource(String resourceId) {
-    Map<Resource.Type,String> mapIds = new HashMap<Resource.Type,String>();
-
-    mapIds.put(Resource.Type.View, viewName);
-    mapIds.put(Resource.Type.ViewVersion, version);
-    mapIds.put(Resource.Type.ViewInstance, instanceName);
-
-    if (resourceId != null) {
-      mapIds.put(type, resourceId);
-    }
-    return super.createResource(type, mapIds);
-  }
-
-  // get the internal request type from the view API request type
-  private Request.Type getRequestType(RequestType type) {
-    switch (type) {
-      case GET:
-        return Request.Type.GET;
-      case POST:
-        return Request.Type.POST;
-      case PUT:
-        return Request.Type.PUT;
-      case DELETE:
-        return Request.Type.DELETE;
-      case QUERY_POST:
-        return Request.Type.QUERY_POST;
-    }
-    throw new IllegalArgumentException("Unknown resource type " + type);
-  }
-
-  // get the JAX-RS media type from the view media type
-  private javax.ws.rs.core.MediaType getMediaType(MediaType type) {
-    switch (type) {
-      case TEXT_PLAIN:
-        return javax.ws.rs.core.MediaType.TEXT_PLAIN_TYPE;
-      case APPLICATION_JSON:
-        return javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE;
-    }
-    throw new IllegalArgumentException("Unknown media type " + type);
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewVersionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewVersionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewVersionService.java
deleted file mode 100644
index 3554da1..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewVersionService.java
+++ /dev/null
@@ -1,199 +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 java.util.HashMap;
-import java.util.Map;
-
-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 org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.controller.spi.Resource;
-
-
-/**
- * Service responsible for view version resource requests.
- */
-public class ViewVersionService extends BaseService {
-
-  /**
-   * Parent view name.
-   */
-  private final String viewName;
-
-
-  // ----- Constructors ------------------------------------------------------
-
-  /**
-   * Construct a view version service.
-   *
-   * @param viewName  the view name
-   */
-  public ViewVersionService(String viewName) {
-    this.viewName = viewName;
-  }
-
-
-  // ----- ViewVersionService ------------------------------------------------
-
-  /**
-   * Handles: GET /versions/{version}
-   * Get a specific view version.
-   *
-   * @param headers  http headers
-   * @param ui       uri info
-   * @param version  version id
-   *
-   * @return view instance representation
-   */
-  @GET
-  @Path("{version}")
-  @Produces("text/plain")
-  public Response getVersions(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                          @PathParam("version") String version) {
-
-    return handleRequest(headers, body, ui, Request.Type.GET, createResource(viewName, version));
-  }
-
-  /**
-   * Handles: GET  /versions
-   * Get all views versions.
-   *
-   * @param headers  http headers
-   * @param ui       uri info
-   *
-   * @return view collection resource representation
-   */
-  @GET
-  @Produces("text/plain")
-  public Response getVersions(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-
-    return handleRequest(headers, body, ui, Request.Type.GET, createResource(viewName, null));
-  }
-
-  /**
-   * Handles: POST /versions/{version}
-   * Create a specific view version.
-   *
-   * @param headers    http headers
-   * @param ui         uri info
-   * @param version    the version
-   *
-   * @return information regarding the created view
-   */
-  @POST
-  @Path("{version}")
-  @Produces("text/plain")
-  public Response createVersions(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                             @PathParam("version") String version) {
-
-    return handleRequest(headers, body, ui, Request.Type.POST, createResource(viewName, version));
-  }
-
-  /**
-   * Handles: PUT /versions/{version}
-   * Update a specific view version.
-   *
-   * @param headers   http headers
-   * @param ui        uri info
-   * @param version   the version
-   *
-   * @return information regarding the updated view
-   */
-  @PUT
-  @Path("{version}")
-  @Produces("text/plain")
-  public Response updateVersions(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                             @PathParam("version") String version) {
-
-    return handleRequest(headers, body, ui, Request.Type.PUT, createResource(viewName, version));
-  }
-
-  /**
-   * Handles: DELETE /versions/{version}
-   * Delete a specific view version.
-   *
-   * @param headers   http headers
-   * @param ui        uri info
-   * @param version   version id
-   *
-   * @return information regarding the deleted view version
-   */
-  @DELETE
-  @Path("{version}")
-  @Produces("text/plain")
-  public Response deleteVersions(@Context HttpHeaders headers, @Context UriInfo ui,
-                             @PathParam("version") String version) {
-
-    return handleRequest(headers, null, ui, Request.Type.DELETE, createResource(viewName, version));
-  }
-
-  /**
-   * Get the instances sub-resource
-   *
-   * @param version  the version
-   *
-   * @return the instance service
-   */
-  @Path("{version}/instances")
-  public ViewInstanceService getInstanceHandler(@PathParam("version") String version) {
-
-    return new ViewInstanceService(viewName, version);
-  }
-
-  /**
-   * Get the permissions sub-resource
-   *
-   * @param version  the version
-   *
-   * @return the permission service
-   */
-  @Path("{version}/permissions")
-  public ViewPermissionService getPermissionHandler(@PathParam("version") String version) {
-
-    return new ViewPermissionService(viewName, version);
-  }
-
-
-  // ----- helper methods ----------------------------------------------------
-
-  /**
-   * Create a view resource.
-   *
-   * @param viewName view name
-   *
-   * @return a view resource instance
-   */
-  private ResourceInstance createResource(String viewName, String version) {
-    Map<Resource.Type,String> mapIds = new HashMap<Resource.Type, String>();
-    mapIds.put(Resource.Type.View, viewName);
-    mapIds.put(Resource.Type.ViewVersion, version);
-    return createResource(Resource.Type.ViewVersion, mapIds);
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupPrivilegeService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupPrivilegeService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupPrivilegeService.java
new file mode 100644
index 0000000..8a23885
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupPrivilegeService.java
@@ -0,0 +1,113 @@
+/*
+ * 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.groups;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.ws.rs.GET;
+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 org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.api.services.BaseService;
+import org.apache.ambari.server.api.services.Request;
+import org.apache.ambari.server.controller.GroupPrivilegeResponse;
+import org.apache.ambari.server.controller.PrivilegeResponse;
+import org.apache.ambari.server.controller.spi.Resource;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+/**
+ *  Service responsible for group privilege resource requests.
+ */
+@Path("/groups/{groupName}/privileges")
+@Api(value = "Groups", description = "Endpoint for group specific operations")
+public class GroupPrivilegeService extends BaseService {
+
+  /**
+   * Handles: GET  /groups/{groupName}/privileges
+   * Get all group privileges.
+   * @param headers
+   * @param ui
+   * @param groupName
+   * @return
+   */
+  @GET
+  @Produces("text/plain")
+  @ApiOperation(value = "Get all privileges", notes = "Returns all privileges for group.", response = GroupPrivilegeResponse.class, responseContainer = "List")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter user privileges", defaultValue = "PrivilegeInfo/*", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "sortBy", value = "Sort user privileges (asc | desc)", defaultValue = "PrivilegeInfo/user_name.asc", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
+    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
+  })
+
+  public Response getPrivileges(@Context HttpHeaders headers, @Context UriInfo ui,
+                                @ApiParam(value = "group name", required = true) @PathParam("groupName") String groupName) {
+    return handleRequest(headers, null, ui, Request.Type.GET, createPrivilegeResource(groupName, null));
+  }
+
+
+  /**
+   * Handles: GET /groups/{groupName}/privileges{privilegeID}
+   * Get a specific privilege for a group.
+   *
+   * @param headers       http headers
+   * @param ui            uri info
+   * @param groupName     group name
+   * @param privilegeId   privilege id
+   * @return privilege instance representation
+   */
+  @GET
+  @Path("{privilegeId}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Get group privilege", notes = "Returns group privilege details.", response = GroupPrivilegeResponse.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter group privilege details", defaultValue = "PrivilegeInfo/*", dataType = "string", paramType = "query")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation", response = PrivilegeResponse.class)}
+  )
+  public Response getPrivilege(@Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "user name", required = true) @PathParam ("userName") String groupName,
+                               @ApiParam(value = "privilege id", required = true) @PathParam("privilegeId") String privilegeId) {
+    return handleRequest(headers, null, ui, Request.Type.GET, createPrivilegeResource(groupName, privilegeId));
+  }
+
+
+
+  protected ResourceInstance createPrivilegeResource(String groupName, String privilegeId) {
+    final Map<Resource.Type, String> mapIds = new HashMap<Resource.Type, String>();
+    mapIds.put(Resource.Type.Group, groupName);
+    mapIds.put(Resource.Type.GroupPrivilege, privilegeId);
+    return createResource(Resource.Type.GroupPrivilege, mapIds);
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupService.java
new file mode 100644
index 0000000..ad9db28
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupService.java
@@ -0,0 +1,177 @@
+/**
+ * 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.groups;
+
+import java.util.Collections;
+
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+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 org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.api.services.BaseService;
+import org.apache.ambari.server.api.services.Request;
+import org.apache.ambari.server.controller.GroupResponse;
+import org.apache.ambari.server.controller.spi.Resource;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+/**
+ * Service responsible for user groups requests.
+ */
+@Path("/groups/")
+@Api(value = "Groups", description = "Endpoint for group specific operations")
+public class GroupService extends BaseService {
+  /**
+   * Gets all groups.
+   * Handles: GET /groups requests.
+   *
+   * @param headers    http headers
+   * @param ui         uri info
+   */
+  @GET
+  @Produces("text/plain")
+  @ApiOperation(value = "Get all groups", notes = "Returns details of all groups.", response = GroupResponse.class, responseContainer = "List")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter group details", defaultValue = "Groups/*", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "sortBy", value = "Sort groups (asc | desc)", defaultValue = "Groups/group_name.asc", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
+    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful retrieval of all group entries", response = GroupResponse.class, responseContainer = "List")}
+  )
+  public Response getGroups(@Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, null, ui, Request.Type.GET, createGroupResource(null));
+  }
+
+  /**
+   * Gets a single group.
+   * Handles: GET /groups/{groupName} requests.
+   *
+   * @param headers      http headers
+   * @param ui           uri info
+   * @param groupName    the group name
+   * @return information regarding the specified group
+   */
+  @GET
+  @Path("{groupName}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Get group", notes = "Returns group details.", response = GroupResponse.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter group details", defaultValue = "Groups", dataType = "string", paramType = "query")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful retrieval of group resource", response = GroupResponse.class)}
+  )
+  public Response getGroup(@Context HttpHeaders headers, @Context UriInfo ui,
+                           @ApiParam(value = "group name", required = true) @PathParam("groupName") String groupName) {
+    return handleRequest(headers, null, ui, Request.Type.GET, createGroupResource(groupName));
+  }
+
+  /**
+   * Creates a group.
+   * Handles: POST /groups requests.
+   *
+   * @param headers      http headers
+   * @param ui           uri info
+   * @return information regarding the created group
+   */
+   @POST
+   @Produces("text/plain")
+   @ApiOperation(value = "Create new group", notes = "Creates group resource.")
+   @ApiImplicitParams({
+     @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.GroupRequest", paramType = "body")
+   })
+   @ApiResponses(value = {
+     @ApiResponse(code = 200, message = "successful operation"),
+     @ApiResponse(code = 500, message = "Server Error")}
+   )
+   public Response createGroup(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.POST, createGroupResource(null));
+  }
+
+  /**
+   * Creates a group.
+   * Handles: POST /groups/{groupName} requests.
+   *
+   * @param headers      http headers
+   * @param ui           uri info
+   * @param groupName    the group name
+   * @return information regarding the created group
+   *
+   * @deprecated Use requests to /groups instead.
+   */
+   @POST
+   @Deprecated
+   @Path("{groupName}")
+   @Produces("text/plain")
+   public Response createGroup(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                                 @PathParam("groupName") String groupName) {
+    return handleRequest(headers, body, ui, Request.Type.POST, createGroupResource(groupName));
+  }
+
+  /**
+   * Deletes a group.
+   * Handles:  DELETE /groups/{groupName} requests.
+   *
+   * @param headers      http headers
+   * @param ui           uri info
+   * @param groupName    the group name
+   * @return information regarding the deleted group
+   */
+  @DELETE
+  @Path("{groupName}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Delete group", notes = "Delete group resource.")
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation"),
+    @ApiResponse(code = 500, message = "Server Error")}
+  )
+  public Response deleteGroup(@Context HttpHeaders headers, @Context UriInfo ui,
+                              @ApiParam(value = "group name", required = true) @PathParam("groupName") String groupName) {
+    return handleRequest(headers, null, ui, Request.Type.DELETE, createGroupResource(groupName));
+  }
+
+
+  /**
+   * Create a group resource instance.
+   *
+   * @param groupName group name
+   *
+   * @return a group resource instance
+   */
+  private ResourceInstance createGroupResource(String groupName) {
+    return createResource(Resource.Type.Group,
+        Collections.singletonMap(Resource.Type.Group, groupName));
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/MemberService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/MemberService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/MemberService.java
new file mode 100644
index 0000000..ec02511
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/MemberService.java
@@ -0,0 +1,200 @@
+/**
+ * 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.groups;
+
+import java.util.HashMap;
+import java.util.Map;
+
+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 org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.api.services.BaseService;
+import org.apache.ambari.server.api.services.Request;
+import org.apache.ambari.server.controller.MemberResponse;
+import org.apache.ambari.server.controller.spi.Resource;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+/**
+ * Service responsible for user membership requests.
+ */
+@Path("/groups/{groupName}/members")
+@Api(value = "Groups", description = "Endpoint for group specific operations")
+public class MemberService extends BaseService {
+  /**
+   * Creates new members.
+   * Handles: POST /groups/{groupname}/members requests.
+   *
+   * @param headers      http headers
+   * @param ui           uri info
+   * @param groupName    group name
+   * @return information regarding the created member
+   */
+   @POST
+   @Produces("text/plain")
+   public Response createMember(String body, @Context HttpHeaders headers, @Context UriInfo ui, @PathParam("groupName") String groupName) {
+    return handleRequest(headers, body, ui, Request.Type.POST, createMemberResource(groupName, null));
+  }
+
+  /**
+   * Creates a new member.
+   * Handles: POST /groups/{groupname}/members/{username} requests.
+   *
+   * @param headers      http headers
+   * @param ui           uri info
+   * @param groupName    group name
+   * @param userName     the user name
+   * @return information regarding the created member
+   */
+   @POST
+   @Path("{userName}")
+   @Produces("text/plain")
+   public Response createMember(String body, @Context HttpHeaders headers, @Context UriInfo ui, @PathParam("groupName") String groupName,
+                                 @PathParam("userName") String userName) {
+    return handleRequest(headers, body, ui, Request.Type.POST, createMemberResource(groupName, userName));
+  }
+
+   /**
+    * Deletes a member.
+    * Handles:  DELETE /groups/{groupname}/members/{username} requests.
+    *
+    * @param headers      http headers
+    * @param ui           uri info
+    * @param groupName    group name
+    * @param userName     the user name
+    * @return information regarding the deleted group
+    */
+   @DELETE
+   @Path("{userName}")
+   @Produces("text/plain")
+   @ApiOperation(value = "Delete group member", notes = "Delete member resource.")
+   @ApiResponses(value = {
+     @ApiResponse(code = 200, message = "Successful operation"),
+     @ApiResponse(code = 500, message = "Server Error")}
+   )
+   public Response deleteMember(@Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "group name", required = true) @PathParam("groupName") String groupName,
+                                @ApiParam(value = "user name", required = true) @PathParam("userName") String userName) {
+     return handleRequest(headers, null, ui, Request.Type.DELETE, createMemberResource(groupName, userName));
+   }
+
+  /**
+   * Gets all members.
+   * Handles: GET /groups/{groupname}/members requests.
+   *
+   * @param headers    http headers
+   * @param ui         uri info
+   * @param groupName  group name
+   * @return information regarding all members
+   */
+  @GET
+  @Produces("text/plain")
+  @ApiOperation(value = "Get all group members", notes = "Returns details of all members.", response = MemberResponse.class, responseContainer = "List")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter member details", defaultValue = "MemberInfo/*", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "sortBy", value = "Sort members (asc | desc)", defaultValue = "MemberInfo/user_name.asc", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
+    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation", response = MemberResponse.class, responseContainer = "List")}
+  )
+  public Response getMembers(@Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "group name", required = true) @PathParam("groupName") String groupName) {
+    return handleRequest(headers, null, ui, Request.Type.GET, createMemberResource(groupName, null));
+  }
+
+  /**
+   * Gets member.
+   * Handles: GET /groups/{groupname}/members/{username} requests.
+   *
+   * @param headers    http headers
+   * @param ui         uri info
+   * @param groupName    group name
+   * @param userName   the user name
+   * @return information regarding the specific member
+   */
+  @GET
+  @Path("{userName}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Get group member", notes = "Returns member details.", response = MemberResponse.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter member details", defaultValue = "MemberInfo", dataType = "string", paramType = "query")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation", response = MemberResponse.class)}
+  )
+  public Response getMember(@Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "group name", required = true)  @PathParam("groupName") String groupName,
+                            @ApiParam(value = "user name", required = true) @PathParam("userName") String userName) {
+    return handleRequest(headers, null, ui, Request.Type.GET, createMemberResource(groupName, userName));
+  }
+
+  /**
+   * Updates all members.
+   * Handles: PUT /groups/{groupname}/members requests.
+   *
+   * @param headers    http headers
+   * @param ui         uri info
+   * @param groupName    group name
+   * @return status of the request
+   */
+  @PUT
+  @Produces("text/plain")
+  @ApiOperation(value = "Update group members", notes = "Updates group member resources.", responseContainer = "List")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.MemberRequest", paramType = "body")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation"),
+    @ApiResponse(code = 500, message = "Server Error")}
+  )
+  public Response updateMembers(String body, @Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "group name", required = true)
+                                 @PathParam("groupName") String groupName) {
+    return handleRequest(headers, body, ui, Request.Type.PUT, createMemberResource(groupName, null));
+  }
+
+  /**
+   * Create a member resource instance.
+   *
+   * @param groupName  group name
+   * @param userName   user name
+   *
+   * @return a member resource instance
+   */
+  private ResourceInstance createMemberResource(String groupName, String userName) {
+    final Map<Resource.Type, String> mapIds = new HashMap<Resource.Type, String>();
+    mapIds.put(Resource.Type.Group, groupName);
+    mapIds.put(Resource.Type.Member, userName);
+    return createResource(Resource.Type.Member, mapIds);
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/ActiveWidgetLayoutService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/ActiveWidgetLayoutService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/ActiveWidgetLayoutService.java
new file mode 100644
index 0000000..30714d4
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/ActiveWidgetLayoutService.java
@@ -0,0 +1,111 @@
+/**
+ * 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.users;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.ws.rs.GET;
+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 org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.api.services.BaseService;
+import org.apache.ambari.server.api.services.Request;
+import org.apache.ambari.server.controller.ActiveWidgetLayoutResponse;
+import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.commons.lang.StringUtils;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+/**
+ * WidgetLayout Service
+ */
+@Path("/users/{userName}/activeWidgetLayouts")
+@Api(value = "Users", description = "Endpoint for User specific operations")
+public class ActiveWidgetLayoutService extends BaseService {
+
+  /**
+   * Handles URL: /users/{userName}/activeWidgetLayouts
+   * Get all instances for a view.
+   *
+   * @param headers  http headers
+   * @param ui       uri info
+   * @param userName user name
+   *
+   * @return instance collection resource representation
+   */
+  @GET
+  @Produces("text/plain")
+  @ApiOperation(value = "Get user widget layouts", notes = "Returns all active widget layouts for user.", response = ActiveWidgetLayoutResponse.class, responseContainer = "List")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter user layout details", defaultValue = "WidgetLayoutInfo/*", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "sortBy", value = "Sort layouts (asc | desc)", defaultValue = "WidgetLayoutInfo/user_name.asc", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
+    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
+  })
+  public Response getServices(String body, @Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "user name", required = true)
+                              @PathParam("userName") String userName) {
+
+    return handleRequest(headers, body, ui, Request.Type.GET, createResource(userName));
+  }
+
+  /**
+   *
+   * @param body      body
+   * @param headers   http headers
+   * @param ui        uri info
+   * @param userName  user name
+   * @return
+   */
+  @PUT
+  @Produces("text/plain")
+  @ApiOperation(value = "Update user widget layouts", notes = "Updates user widget layout.")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.ActiveWidgetLayoutRequest", paramType = "body")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation"),
+    @ApiResponse(code = 500, message = "Server Error")}
+  )
+  public Response updateServices(String body, @Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "user name", required = true)
+                                 @PathParam("userName") String userName) {
+
+    return handleRequest(headers, body, ui, Request.Type.PUT, createResource(userName));
+  }
+
+  private ResourceInstance createResource(String userName) {
+    Map<Resource.Type,String> mapIds = new HashMap<Resource.Type, String>();
+    mapIds.put(Resource.Type.User, StringUtils.lowerCase(userName));
+    return createResource(Resource.Type.ActiveWidgetLayout, mapIds);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserAuthorizationService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserAuthorizationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserAuthorizationService.java
new file mode 100644
index 0000000..e6fda46
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserAuthorizationService.java
@@ -0,0 +1,120 @@
+/*
+ * 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.users;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.ws.rs.GET;
+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 org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.api.services.BaseService;
+import org.apache.ambari.server.api.services.Request;
+import org.apache.ambari.server.controller.UserAuthorizationResponse;
+import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.commons.lang.StringUtils;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+/**
+ * UserAuthorizationService is a read-only service responsible for user authorization resource requests.
+ * <p/>
+ * The result sets returned by this service represent the set of authorizations assigned to a given user.
+ * Authorizations are tied to a resource, so a user may have the multiple authorization entries for the
+ * same authorization id (for example VIEW.USE), however each will represnet a different view instance.
+ */
+@Path("/users/{userName}/authorizations")
+@Api(value = "Users", description = "Endpoint for user specific operations")
+public class UserAuthorizationService extends BaseService {
+
+  /**
+   * Handles: GET  /users/{user_name}/authorizations
+   * Get all authorizations for the relative user.
+   *
+   * @param headers        http headers
+   * @param ui             uri info
+   * @param userName       user name
+   * @return authorizations collection resource representation
+   */
+  @GET
+  @Produces("text/plain")
+  @ApiOperation(value = "Get all authorizations", notes = "Returns all authorization for user.", response = UserAuthorizationResponse.class, responseContainer = "List")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter user authorization details", defaultValue = "AuthorizationInfo/*", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "sortBy", value = "Sort user authorizations (asc | desc)", defaultValue = "AuthorizationInfo/user_name.asc", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
+    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
+  })
+  public Response getAuthorizations(@Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "user name", required = true)
+                                    @PathParam ("userName") String userName) {
+    return handleRequest(headers, null, ui, Request.Type.GET, createAuthorizationResource(userName,null));
+  }
+
+  /**
+   * Handles: GET  /users/{userName}/authorizations/{authorization_id}
+   * Get a specific authorization.
+   *
+   * @param headers         http headers
+   * @param ui              uri info
+   * @param userName        user name
+   * @param authorizationId authorization ID
+   * @return authorization instance representation
+   */
+  @GET
+  @Path("{authorization_id}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Get user authorization", notes = "Returns user authorization details.", response = UserAuthorizationResponse.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter user authorization details", defaultValue = "AuthorizationInfo/*", dataType = "string", paramType = "query")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation", response = UserAuthorizationResponse.class)}
+  )
+  public Response getAuthorization(@Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "user name", required = true)
+  @PathParam ("userName") String userName, @ApiParam(value = "Authorization Id", required = true) @PathParam("authorization_id") String authorizationId) {
+    return handleRequest(headers, null, ui, Request.Type.GET, createAuthorizationResource(userName, authorizationId));
+  }
+
+  /**
+   * Create an authorization resource.
+   * @param userName         user name
+   * @param authorizationId authorization id
+   * @return an authorization resource instance
+   */
+  protected ResourceInstance createAuthorizationResource(String userName, String authorizationId) {
+    Map<Resource.Type, String> mapIds = new HashMap<Resource.Type, String>();
+    mapIds.put(Resource.Type.User, StringUtils.lowerCase(userName));
+    mapIds.put(Resource.Type.UserAuthorization, authorizationId);
+    return createResource(Resource.Type.UserAuthorization, mapIds);
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserPrivilegeService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserPrivilegeService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserPrivilegeService.java
new file mode 100644
index 0000000..d6b4b29
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserPrivilegeService.java
@@ -0,0 +1,113 @@
+/**
+ * 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 privileges and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.api.services.users;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.ws.rs.GET;
+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 org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.api.services.BaseService;
+import org.apache.ambari.server.api.services.Request;
+import org.apache.ambari.server.controller.UserPrivilegeResponse;
+import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.commons.lang.StringUtils;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+/**
+ *  Service responsible for user privilege resource requests.
+ */
+@Path("/users/{userName}/privileges")
+@Api(value = "Users", description = "Endpoint for user specific operations")
+public class UserPrivilegeService extends BaseService {
+
+
+  /**
+   * Handles: GET  /users/{userName}/privileges
+   * Get all privileges.
+   * @param headers
+   * @param ui
+   * @param userName
+   * @return
+   */
+  @GET
+  @Produces("text/plain")
+  @ApiOperation(value = "Get all privileges", notes = "Returns all privileges for user.", response = UserPrivilegeResponse.class, responseContainer = "List")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter user privileges", defaultValue = "PrivilegeInfo/*", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "sortBy", value = "Sort user privileges (asc | desc)", defaultValue = "PrivilegeInfo/user_name.asc", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
+    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
+  })
+
+  public Response getPrivileges(@Context HttpHeaders headers, @Context UriInfo ui,
+                                @ApiParam(value = "user name", required = true, defaultValue = "admin") @PathParam("userName") String userName) {
+    return handleRequest(headers, null, ui, Request.Type.GET, createPrivilegeResource(userName, null));
+  }
+
+  /**
+   * Handles: GET /users/{userName}/privileges/{privilegeID}
+   * Get a specific privilege.
+   *
+   * @param headers        http headers
+   * @param ui             uri info
+   * @param userName       user name
+   * @param privilegeId   privilege id
+   *
+   * @return privilege instance representation
+   */
+  @GET
+  @Path("{privilegeId}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Get user privilege", notes = "Returns user privilege details.", response = UserPrivilegeResponse.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter user privilege details", defaultValue = "PrivilegeInfo/*", dataType = "string", paramType = "query")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation", response = UserPrivilegeResponse.class)}
+  )
+  public Response getPrivilege(@Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "user name", required = true) @PathParam ("userName") String userName,
+                               @ApiParam(value = "privilege id", required = true) @PathParam("privilegeId") String privilegeId) {
+    return handleRequest(headers, null, ui, Request.Type.GET, createPrivilegeResource(userName, privilegeId));
+  }
+
+
+  protected ResourceInstance createPrivilegeResource(String userName, String privilegeId) {
+    final Map<Resource.Type, String> mapIds = new HashMap<Resource.Type, String>();
+    mapIds.put(Resource.Type.User, StringUtils.lowerCase(userName));
+    mapIds.put(Resource.Type.UserPrivilege, privilegeId);
+    return createResource(Resource.Type.UserPrivilege, mapIds);
+  }
+}
\ No newline at end of file


[31/49] ambari git commit: AMBARI-20735. Checkstyle rule to ensure that all API endpoints are documented

Posted by ad...@apache.org.
AMBARI-20735. Checkstyle rule to ensure that all API endpoints are documented


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

Branch: refs/heads/trunk
Commit: 4ede671514563a3cc116bc2059d6d8b878a5a784
Parents: 3acd2e6
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Tue Apr 11 17:24:36 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Thu Apr 20 09:55:17 2017 +0200

----------------------------------------------------------------------
 ambari-server/checkstyle.xml                    |   1 +
 ambari-server/pom.xml                           |   2 +-
 ambari-server/src/main/assemblies/server.xml    |   2 +-
 utility/checkstyle.xml                          |  38 +++++
 utility/pom.xml                                 |   5 +-
 .../apache/ambari/annotations/ApiIgnore.java    |  29 ++++
 .../UndocumentedRestApiOperationCheck.java      |  76 ++++++++++
 ...dTransactionalOnPrivateMethodsCheckTest.java |   4 +-
 .../UndocumentedRestApiOperationCheckTest.java  |  53 +++++++
 .../checkstyle/InputRestApiOperation.java       | 138 +++++++++++++++++++
 10 files changed, 343 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4ede6715/ambari-server/checkstyle.xml
----------------------------------------------------------------------
diff --git a/ambari-server/checkstyle.xml b/ambari-server/checkstyle.xml
index bf7698d..6b4824a 100644
--- a/ambari-server/checkstyle.xml
+++ b/ambari-server/checkstyle.xml
@@ -13,6 +13,7 @@
 <module name="Checker">
   <module name="TreeWalker">
     <module name="AvoidTransactionalOnPrivateMethodsCheck"/>
+    <!-- <module name="UndocumentedRestApiOperationCheck"/> Swagger - uncomment when API documentation is done -->
 
     <module name="FallThrough"/>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/4ede6715/ambari-server/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index fbc2b9f..ba97f88 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -1631,7 +1631,7 @@
       <groupId>utility</groupId>
       <artifactId>utility</artifactId>
       <version>1.0.0.0-SNAPSHOT</version>
-      <scope>test</scope>
+      <scope>provided</scope> <!-- for @ApiIgnore -->
     </dependency>
     <dependency>
       <groupId>org.kohsuke</groupId>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4ede6715/ambari-server/src/main/assemblies/server.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/assemblies/server.xml b/ambari-server/src/main/assemblies/server.xml
index 2783526..43053fb 100644
--- a/ambari-server/src/main/assemblies/server.xml
+++ b/ambari-server/src/main/assemblies/server.xml
@@ -418,7 +418,7 @@
       <fileMode>644</fileMode>
       <outputDirectory>/usr/lib/ambari-server</outputDirectory>
       <unpack>false</unpack>
-      <scope>compile</scope>
+      <scope>runtime</scope>
     </dependencySet>
   </dependencySets>
 </assembly>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4ede6715/utility/checkstyle.xml
----------------------------------------------------------------------
diff --git a/utility/checkstyle.xml b/utility/checkstyle.xml
new file mode 100644
index 0000000..2e7d6f0
--- /dev/null
+++ b/utility/checkstyle.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!-- Licensed 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.
+  See accompanying LICENSE file. -->
+<!DOCTYPE module PUBLIC
+  "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
+  "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
+<module name="Checker">
+  <module name="TreeWalker">
+    <module name="FallThrough"/>
+
+    <!-- imports -->
+    <module name="AvoidStarImport"/>
+    <module name="IllegalImport"/>
+    <module name="ImportOrder">
+      <property name="groups" value="java,javax,org,com,*"/>
+      <property name="ordered" value="true"/>
+      <property name="separated" value="true"/>
+      <property name="option" value="top"/> <!-- static imports -->
+      <property name="sortStaticImportsAlphabetically" value="true"/>
+    </module>
+    <module name="RedundantImport"/>
+    <module name="UnusedImports"/>
+
+    <!-- blocks -->
+    <module name="AvoidNestedBlocks">
+      <property name="allowInSwitchCase" value="true"/>
+    </module>
+    <module name="EmptyBlock">
+      <property name="option" value="text"/>
+    </module>
+  </module>
+</module>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4ede6715/utility/pom.xml
----------------------------------------------------------------------
diff --git a/utility/pom.xml b/utility/pom.xml
index 6f60206..7d5eb93 100644
--- a/utility/pom.xml
+++ b/utility/pom.xml
@@ -52,7 +52,6 @@
       <groupId>com.google.guava</groupId>
       <artifactId>guava</artifactId>
       <version>19.0</version> <!-- required for checkstyle -->
-      <scope>test</scope>
     </dependency>
   </dependencies>
 
@@ -96,6 +95,10 @@
           <mappings/>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-checkstyle-plugin</artifactId>
+      </plugin>
     </plugins>
   </build>
 </project>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4ede6715/utility/src/main/java/org/apache/ambari/annotations/ApiIgnore.java
----------------------------------------------------------------------
diff --git a/utility/src/main/java/org/apache/ambari/annotations/ApiIgnore.java b/utility/src/main/java/org/apache/ambari/annotations/ApiIgnore.java
new file mode 100644
index 0000000..d50c2fd
--- /dev/null
+++ b/utility/src/main/java/org/apache/ambari/annotations/ApiIgnore.java
@@ -0,0 +1,29 @@
+/*
+ * 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.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.SOURCE)
+@Target({ElementType.METHOD})
+public @interface ApiIgnore {
+  // marker
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/4ede6715/utility/src/main/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheck.java
----------------------------------------------------------------------
diff --git a/utility/src/main/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheck.java b/utility/src/main/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheck.java
new file mode 100644
index 0000000..c6347db
--- /dev/null
+++ b/utility/src/main/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheck.java
@@ -0,0 +1,76 @@
+/*
+ * 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.checkstyle;
+
+import java.util.Set;
+
+import com.google.common.collect.ImmutableSet;
+import com.puppycrawl.tools.checkstyle.api.AbstractCheck;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+import com.puppycrawl.tools.checkstyle.utils.AnnotationUtility;
+
+/**
+ * REST API operations should either be documented, or marked to be ignored.
+ */
+public class UndocumentedRestApiOperationCheck extends AbstractCheck {
+
+  private static final Set<String> API_ANNOTATIONS = ImmutableSet.of("DELETE", "GET", "HEAD", "OPTIONS", "PUT", "POST");
+  private static final String API_OPERATION = "ApiOperation";
+  private static final String API_IGNORE = "ApiIgnore";
+  public static final String MESSAGE = "REST API operation should be documented";
+
+  @Override
+  public int[] getDefaultTokens() {
+    return new int[] { TokenTypes.METHOD_DEF };
+  }
+
+  @Override
+  public void visitToken(DetailAST ast) {
+    if (isApiOperation(ast) && !isDocumentedApiOperation(ast) && !isIgnoredApi(ast)) {
+      log(ast.getLineNo(), MESSAGE);
+    }
+  }
+
+  private static boolean isApiOperation(DetailAST ast) {
+    DetailAST modifiers = ast.findFirstToken(TokenTypes.MODIFIERS);
+    if (modifiers.findFirstToken(TokenTypes.LITERAL_PRIVATE) != null) {
+      return false;
+    }
+
+    DetailAST annotation = modifiers.findFirstToken(TokenTypes.ANNOTATION);
+    while (annotation != null) {
+      DetailAST name = annotation.findFirstToken(TokenTypes.IDENT);
+      if (name != null && API_ANNOTATIONS.contains(name.getText())) {
+        return true;
+      }
+      annotation = annotation.getNextSibling();
+    }
+
+    return false;
+  }
+
+  private static boolean isDocumentedApiOperation(DetailAST ast) {
+    return AnnotationUtility.containsAnnotation(ast, API_OPERATION);
+  }
+
+  private static boolean isIgnoredApi(DetailAST ast) {
+    return AnnotationUtility.containsAnnotation(ast, API_IGNORE);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/4ede6715/utility/src/test/java/org/apache/ambari/checkstyle/AvoidTransactionalOnPrivateMethodsCheckTest.java
----------------------------------------------------------------------
diff --git a/utility/src/test/java/org/apache/ambari/checkstyle/AvoidTransactionalOnPrivateMethodsCheckTest.java b/utility/src/test/java/org/apache/ambari/checkstyle/AvoidTransactionalOnPrivateMethodsCheckTest.java
index 14d7486..bfdbfa1 100644
--- a/utility/src/test/java/org/apache/ambari/checkstyle/AvoidTransactionalOnPrivateMethodsCheckTest.java
+++ b/utility/src/test/java/org/apache/ambari/checkstyle/AvoidTransactionalOnPrivateMethodsCheckTest.java
@@ -22,11 +22,11 @@ import static org.apache.ambari.checkstyle.AvoidTransactionalOnPrivateMethodsChe
 import java.io.File;
 import java.io.IOException;
 
+import org.junit.Test;
+
 import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
 import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
 
-import org.junit.Test;
-
 public class AvoidTransactionalOnPrivateMethodsCheckTest extends BaseCheckTestSupport {
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/4ede6715/utility/src/test/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheckTest.java
----------------------------------------------------------------------
diff --git a/utility/src/test/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheckTest.java b/utility/src/test/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheckTest.java
new file mode 100644
index 0000000..7caf3cf
--- /dev/null
+++ b/utility/src/test/java/org/apache/ambari/checkstyle/UndocumentedRestApiOperationCheckTest.java
@@ -0,0 +1,53 @@
+/*
+ * 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.checkstyle;
+
+import static org.apache.ambari.checkstyle.UndocumentedRestApiOperationCheck.MESSAGE;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.junit.Test;
+
+import com.puppycrawl.tools.checkstyle.BaseCheckTestSupport;
+import com.puppycrawl.tools.checkstyle.DefaultConfiguration;
+
+public class UndocumentedRestApiOperationCheckTest extends BaseCheckTestSupport {
+
+  @Override
+  protected String getPath(String filename) throws IOException {
+    return new File("src/test/resources/org/apache/ambari/checkstyle/" + filename)
+      .getCanonicalPath();
+  }
+
+  @Test
+  public void test() throws Exception {
+    final DefaultConfiguration config = createCheckConfig(UndocumentedRestApiOperationCheck.class);
+    final String[] expected = {
+      "36: " + MESSAGE,
+      "53: " + MESSAGE,
+      "70: " + MESSAGE,
+      "87: " + MESSAGE,
+      "104: " + MESSAGE,
+      "121: " + MESSAGE
+    };
+
+    verify(config, getPath("InputRestApiOperation.java"), expected);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/4ede6715/utility/src/test/resources/org/apache/ambari/checkstyle/InputRestApiOperation.java
----------------------------------------------------------------------
diff --git a/utility/src/test/resources/org/apache/ambari/checkstyle/InputRestApiOperation.java b/utility/src/test/resources/org/apache/ambari/checkstyle/InputRestApiOperation.java
new file mode 100644
index 0000000..9aa35ba
--- /dev/null
+++ b/utility/src/test/resources/org/apache/ambari/checkstyle/InputRestApiOperation.java
@@ -0,0 +1,138 @@
+/*
+ * 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.checkstyle;
+
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.HEAD;
+import javax.ws.rs.OPTIONS;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+
+import io.swagger.annotations.ApiOperation;
+
+import org.apache.ambari.annotations.ApiIgnore;
+
+/**
+ * Input file for UndocumentedRestApiOperationCheck.
+ */
+public class InputRestApiOperation {
+
+  @DELETE
+  public void undocumentedDELETE() {
+    ;
+  }
+
+  @DELETE
+  @ApiOperation(value = "...")
+  public void documentedDELETE() {
+    ;
+  }
+
+  @DELETE
+  @ApiIgnore
+  public void ignoredDELETE() {
+    ;
+  }
+
+  @HEAD
+  public void undocumentedHEAD() {
+    ;
+  }
+
+  @HEAD
+  @ApiOperation(value = "...")
+  public void documentedHEAD() {
+    ;
+  }
+
+  @HEAD
+  @ApiIgnore
+  public void ignoredHEAD() {
+    ;
+  }
+
+  @GET
+  public void undocumentedGET() {
+    ;
+  }
+
+  @GET
+  @ApiOperation(value = "...")
+  public void documentedGET() {
+    ;
+  }
+
+  @GET
+  @ApiIgnore
+  public void ignoredGET() {
+    ;
+  }
+
+  @OPTIONS
+  public void undocumentedOPTIONS() {
+    ;
+  }
+
+  @OPTIONS
+  @ApiOperation(value = "...")
+  public void documentedOPTIONS() {
+    ;
+  }
+
+  @OPTIONS
+  @ApiIgnore
+  public void ignoredOPTIONS() {
+    ;
+  }
+
+  @POST
+  public void undocumentedPOST() {
+    ;
+  }
+
+  @POST
+  @ApiOperation(value = "...")
+  public void documentedPOST() {
+    ;
+  }
+
+  @POST
+  @ApiIgnore
+  public void ignoredPOST() {
+    ;
+  }
+
+  @PUT
+  public void undocumentedPUT() {
+    ;
+  }
+
+  @PUT
+  @ApiOperation(value = "...")
+  public void documentedPUT() {
+    ;
+  }
+
+  @PUT
+  @ApiIgnore
+  public void ignoredPUT() {
+    ;
+  }
+
+}


[38/49] ambari git commit: AMBARI-20994. Integrate RootServiceService with Swagger (adoroszlai)

Posted by ad...@apache.org.
AMBARI-20994. Integrate RootServiceService with Swagger (adoroszlai)


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

Branch: refs/heads/trunk
Commit: 228b9289755c33342586d8cbe209b5341d7380d0
Parents: 580067f
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Tue May 16 11:02:06 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Tue May 16 11:02:06 2017 +0200

----------------------------------------------------------------------
 .../ambari/server/api/services/BaseService.java |   2 +
 .../server/api/services/RootServiceService.java | 363 ++++++++++++++-----
 .../AmbariManagementControllerImpl.java         |   5 -
 .../RootServiceComponentResponse.java           |  56 ++-
 .../RootServiceHostComponentResponse.java       |  72 ++--
 .../server/controller/RootServiceResponse.java  |  24 +-
 .../controller/RootServiceResponseFactory.java  |  30 +-
 .../internal/HostResourceProvider.java          |   8 +-
 .../RootServiceComponentResourceProvider.java   |  63 ++--
 ...ootServiceHostComponentResourceProvider.java |  70 ++--
 .../internal/RootServiceResourceProvider.java   |  20 +-
 .../api/services/RootServiceServiceTest.java    |  11 +-
 .../RootServiceResponseFactoryTest.java         |   9 +-
 ...ootServiceComponentResourceProviderTest.java |  21 +-
 14 files changed, 456 insertions(+), 298 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/228b9289/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
index 2808911..5f6474c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseService.java
@@ -86,6 +86,8 @@ public abstract class BaseService {
   static final String PARAM_TYPE_BODY = "body";
 
 
+  static final String FIELDS_SEPARATOR = ", ";
+
   /**
    * Logger instance.
    */

http://git-wip-us.apache.org/repos/asf/ambari/blob/228b9289/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java
index ce9240c..5afb7dc 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/RootServiceService.java
@@ -1,4 +1,4 @@
-/**
+/*
  * 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
@@ -20,6 +20,7 @@ package org.apache.ambari.server.api.services;
 
 import java.util.Collections;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 import javax.ws.rs.GET;
@@ -28,137 +29,325 @@ 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.MediaType;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 
 import org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.controller.ApiModel;
+import org.apache.ambari.server.controller.HostResponse;
+import org.apache.ambari.server.controller.RootServiceComponentResponse;
+import org.apache.ambari.server.controller.RootServiceHostComponentResponse;
+import org.apache.ambari.server.controller.RootServiceResponse;
+import org.apache.ambari.server.controller.internal.HostResourceProvider;
+import org.apache.ambari.server.controller.internal.RootServiceComponentResourceProvider;
+import org.apache.ambari.server.controller.internal.RootServiceHostComponentResourceProvider;
+import org.apache.ambari.server.controller.internal.RootServiceResourceProvider;
 import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.ambari.server.controller.utilities.PropertyHelper;
+import org.apache.http.HttpStatus;
 
-@Path("/services/")
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+@Path("/services")
+@Api(value = "/services", description = "Endpoint for querying root-level services, ie. Ambari Server and Ambari Agents")
 public class RootServiceService extends BaseService {
-  
-  @GET
-  @Produces("text/plain")
-  public Response getServices(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
 
-    return handleRequest(headers, body, ui, Request.Type.GET,
-      createServiceResource(null));
+  private static final String KEY_COMPONENTS = "components";
+  private static final String KEY_HOST_COMPONENTS = "hostComponents";
+
+  private static final String DEFAULT_FIELDS_ROOT_SERVICES =
+    RootServiceResourceProvider.SERVICE_NAME_PROPERTY_ID;
+
+  private static final String DEFAULT_FIELDS_ROOT_SERVICE =
+    RootServiceResourceProvider.SERVICE_NAME_PROPERTY_ID + FIELDS_SEPARATOR +
+      KEY_COMPONENTS + PropertyHelper.EXTERNAL_PATH_SEP + RootServiceComponentResourceProvider.COMPONENT_NAME_PROPERTY_ID + FIELDS_SEPARATOR +
+      KEY_COMPONENTS + PropertyHelper.EXTERNAL_PATH_SEP + RootServiceComponentResourceProvider.SERVICE_NAME_PROPERTY_ID;
+
+  private static final String DEFAULT_FIELDS_ROOT_SERVICE_COMPONENTS =
+    RootServiceComponentResourceProvider.COMPONENT_NAME_PROPERTY_ID + FIELDS_SEPARATOR +
+    RootServiceComponentResourceProvider.SERVICE_NAME_PROPERTY_ID;
+
+  private static final String DEFAULT_FIELDS_ROOT_SERVICE_COMPONENT =
+    RootServiceComponentResourceProvider.ALL_PROPERTIES + FIELDS_SEPARATOR +
+    KEY_HOST_COMPONENTS + PropertyHelper.EXTERNAL_PATH_SEP + RootServiceHostComponentResourceProvider.COMPONENT_NAME_PROPERTY_ID + FIELDS_SEPARATOR +
+    KEY_HOST_COMPONENTS + PropertyHelper.EXTERNAL_PATH_SEP + RootServiceHostComponentResourceProvider.HOST_NAME_PROPERTY_ID + FIELDS_SEPARATOR +
+    KEY_HOST_COMPONENTS + PropertyHelper.EXTERNAL_PATH_SEP + RootServiceHostComponentResourceProvider.SERVICE_NAME_PROPERTY_ID;
+
+  private static final String DEFAULT_FIELDS_ROOT_SERVICE_HOST_COMPONENT =
+    RootServiceHostComponentResourceProvider.COMPONENT_NAME_PROPERTY_ID + FIELDS_SEPARATOR +
+    RootServiceHostComponentResourceProvider.HOST_NAME_PROPERTY_ID + FIELDS_SEPARATOR +
+    RootServiceHostComponentResourceProvider.SERVICE_NAME_PROPERTY_ID;
+
+  private static final String DEFAULT_FIELDS_HOSTS =
+    HostResourceProvider.HOST_HOST_NAME_PROPERTY_ID;
+
+  private static final String DEFAULT_FIELDS_HOST =
+    HostResourceProvider.ALL_PROPERTIES;
+
+  @GET
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Returns the list of root-level services",
+    response = RootServiceResponseWrapper.class, responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY,
+      defaultValue = DEFAULT_FIELDS_ROOT_SERVICES),
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
+  public Response getRootServices(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    ResourceInstance resource = createServiceResource(null);
+    return handleRequest(headers, body, ui, Request.Type.GET, resource);
   }
   
   @GET
   @Path("{serviceName}")
-  @Produces("text/plain")
-  public Response getService(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-      @PathParam("serviceName") String serviceName) {
-
-    return handleRequest(headers, body, ui, Request.Type.GET,
-      createServiceResource(serviceName));
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Returns information about the given root-level service, including a list of its components",
+    response = RootServiceResponseWithComponentList.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY,
+      defaultValue = DEFAULT_FIELDS_ROOT_SERVICE),
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
+  public Response getRootService(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+    @ApiParam(value = "service name", required = true) @PathParam("serviceName") String serviceName
+  ) {
+    ResourceInstance resource = createServiceResource(serviceName);
+    return handleRequest(headers, body, ui, Request.Type.GET, resource);
   }
 
   @GET
-  @Path("{serviceName}/components/{componentName}/hostComponents")
-  @Produces("text/plain")
-  public Response getRootHostComponents(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-      @PathParam("serviceName") String serviceName,
-      @PathParam("componentName") String componentName) {
-
-    return handleRequest(headers, body, ui, Request.Type.GET,
-      createHostComponentResource(serviceName, null, componentName));
-  }
-  
-  
-  @GET
-  @Path("{serviceName}/hosts/")
-  @Produces("text/plain")
+  @Path("{serviceName}/hosts")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Returns the list of hosts for the given root-level service",
+    response = HostResponse.Wrapper.class, responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY,
+      defaultValue = DEFAULT_FIELDS_HOSTS),
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response getRootHosts(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-
-    return handleRequest(headers, body, ui, Request.Type.GET,
-      createHostResource(null));
+    ResourceInstance resource = createHostResource(null);
+    return handleRequest(headers, body, ui, Request.Type.GET, resource);
   }
   
   @GET
   @Path("{serviceName}/hosts/{hostName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Returns information about the given host", response = HostResponse.Wrapper.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY,
+      defaultValue = DEFAULT_FIELDS_HOST),
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response getRootHost(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-      @PathParam("hostName") String hostName) {
-
-    return handleRequest(headers, body, ui, Request.Type.GET,
-      createHostResource(hostName));
+    @ApiParam(value = "host name", required = true) @PathParam("hostName") String hostName
+  ) {
+    ResourceInstance resource = createHostResource(hostName);
+    return handleRequest(headers, body, ui, Request.Type.GET, resource);
   }
   
+  @GET
+  @Path("{serviceName}/hosts/{hostName}/hostComponents")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Returns the list of components for the given root-level service on the given host",
+    response = RootServiceHostComponentResponseWrapper.class, responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY,
+      defaultValue = DEFAULT_FIELDS_ROOT_SERVICE_HOST_COMPONENT),
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
+  public Response getRootServiceHostComponents(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+    @ApiParam(value = "service name", required = true) @PathParam("serviceName") String serviceName,
+    @ApiParam(value = "host name", required = true) @PathParam("hostName") String hostName
+  ) {
+    ResourceInstance resource = createHostComponentResource(serviceName, hostName, null);
+    return handleRequest(headers, body, ui, Request.Type.GET, resource);
+  }
   
-  protected ResourceInstance createHostResource(String hostName) {
-    return createResource(Resource.Type.Host, Collections.singletonMap(Resource.Type.Host, hostName));
+  @GET
+  @Path("{serviceName}/hosts/{hostName}/hostComponents/{hostComponent}")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Returns information about the given component for the given root-level service on the given host",
+    response = RootServiceHostComponentResponseWrapper.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY,
+      defaultValue = DEFAULT_FIELDS_ROOT_SERVICE_HOST_COMPONENT),
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
+  public Response getRootServiceHostComponent(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+    @ApiParam(value = "service name", required = true) @PathParam("serviceName") String serviceName,
+    @ApiParam(value = "host name", required = true) @PathParam("hostName") String hostName,
+    @ApiParam(value = "component name", required = true) @PathParam("hostComponent") String hostComponent
+  ) {
+    ResourceInstance resource = createHostComponentResource(serviceName, hostName, hostComponent);
+    return handleRequest(headers, body, ui, Request.Type.GET, resource);
   }
-
   
   @GET
-  @Path("{serviceName}/hosts/{hostName}/hostComponents/")
-  @Produces("text/plain")
-  public Response getRootHostComponent(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-      @PathParam("serviceName") String serviceName,
-      @PathParam("hostName") String hostName) {
-
-    return handleRequest(headers, body, ui, Request.Type.GET,
-      createHostComponentResource(serviceName, hostName, null));
+  @Path("{serviceName}/components")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Returns the list of components for the given root-level service",
+    response = RootServiceComponentResponseWrapper.class, responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY,
+      defaultValue = DEFAULT_FIELDS_ROOT_SERVICE_COMPONENTS),
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
+  public Response getRootServiceComponents(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+    @ApiParam(value = "service name", required = true) @PathParam("serviceName") String serviceName
+  ) {
+    ResourceInstance resource = createServiceComponentResource(serviceName, null);
+    return handleRequest(headers, body, ui, Request.Type.GET, resource);
   }
   
   @GET
-  @Path("{serviceName}/hosts/{hostName}/hostComponents/{hostComponent}")
-  @Produces("text/plain")
-  public Response getRootHostComponent(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-      @PathParam("serviceName") String serviceName,
-      @PathParam("hostName") String hostName,
-      @PathParam("hostComponent") String hostComponent) {
+  @Path("{serviceName}/components/{componentName}")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Returns information about the given component for the given root-level service",
+    response = RootServiceComponentWithHostComponentList.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY,
+      defaultValue = DEFAULT_FIELDS_ROOT_SERVICE_COMPONENT),
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
+  public Response getRootServiceComponent(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+    @ApiParam(value = "service name", required = true) @PathParam("serviceName") String serviceName,
+    @ApiParam(value = "component name", required = true) @PathParam("componentName") String componentName
+  ) {
+    ResourceInstance resource = createServiceComponentResource(serviceName, componentName);
+    return handleRequest(headers, body, ui, Request.Type.GET, resource);
+  }
+
+  @GET
+  @Path("{serviceName}/components/{componentName}/hostComponents")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Returns the list of hosts for the given root-level service component",
+    response = RootServiceHostComponentResponseWrapper.class, responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY,
+      defaultValue = DEFAULT_FIELDS_ROOT_SERVICE_HOST_COMPONENT),
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
+  public Response getRootServiceComponentHosts(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+    @ApiParam(value = "service name", required = true) @PathParam("serviceName") String serviceName,
+    @ApiParam(value = "component name", required = true) @PathParam("componentName") String componentName
+  ) {
+    ResourceInstance resource = createHostComponentResource(serviceName, null, componentName);
+    return handleRequest(headers, body, ui, Request.Type.GET, resource);
+  }
 
-    return handleRequest(headers, body, ui, Request.Type.GET,
-      createHostComponentResource(serviceName, hostName, hostComponent));
+  protected ResourceInstance createServiceResource(String serviceName) {
+    Map<Resource.Type, String> mapIds = Collections.singletonMap(Resource.Type.RootService, serviceName);
+    return createResource(Resource.Type.RootService, mapIds);
   }
   
-  
+  protected ResourceInstance createServiceComponentResource(String serviceName, String componentName) {
+    Map<Resource.Type, String> mapIds = new HashMap<>();
+    mapIds.put(Resource.Type.RootService, serviceName);
+    mapIds.put(Resource.Type.RootServiceComponent, componentName);
+    return createResource(Resource.Type.RootServiceComponent, mapIds);
+  }
+
+  protected ResourceInstance createHostResource(String hostName) {
+    return createResource(Resource.Type.Host, Collections.singletonMap(Resource.Type.Host, hostName));
+  }
+
   protected ResourceInstance createHostComponentResource(String serviceName, String hostName, String componentName) {
-    
-    Map<Resource.Type,String> mapIds = new HashMap<>();
+    Map<Resource.Type, String> mapIds = new HashMap<>();
     mapIds.put(Resource.Type.RootService, serviceName);
     mapIds.put(Resource.Type.Host, hostName);
     mapIds.put(Resource.Type.RootServiceComponent, componentName);
-
     return createResource(Resource.Type.RootServiceHostComponent, mapIds);
   }
 
-  @GET
-  @Path("{serviceName}/components/")
-  @Produces("text/plain")
-  public Response getServiceComponents(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-      @PathParam("serviceName") String serviceName) {
+  private interface RootServiceResponseWrapper extends ApiModel {
+    @ApiModelProperty(name = RootServiceResourceProvider.RESPONSE_KEY)
+    @SuppressWarnings("unused")
+    RootServiceResponse getRootServiceResponse();
+  }
 
-    return handleRequest(headers, body, ui, Request.Type.GET,
-      createServiceComponentResource(serviceName, null));
+  private interface RootServiceResponseWithComponentList extends RootServiceResponseWrapper {
+    @ApiModelProperty(name = KEY_COMPONENTS)
+    @SuppressWarnings("unused")
+    List<RootServiceComponentResponseWrapper> getComponents();
   }
-  
-  @GET
-  @Path("{serviceName}/components/{componentName}")
-  @Produces("text/plain")
-  public Response getServiceComponent(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-      @PathParam("serviceName") String serviceName,
-      @PathParam("componentName") String componentName) {
 
-    return handleRequest(headers, body, ui, Request.Type.GET,
-        createServiceComponentResource(serviceName, componentName));
+  private interface RootServiceComponentResponseWrapper extends ApiModel {
+    @ApiModelProperty(name = RootServiceComponentResourceProvider.RESPONSE_KEY)
+    @SuppressWarnings("unused")
+    RootServiceComponentResponse getRootServiceComponentResponse();
   }
-  
-  protected ResourceInstance createServiceResource(String serviceName) {
-    return createResource(Resource.Type.RootService,
-        Collections.singletonMap(Resource.Type.RootService, serviceName));
+
+  private interface RootServiceComponentWithHostComponentList extends RootServiceComponentResponseWrapper {
+    @ApiModelProperty(name = KEY_HOST_COMPONENTS)
+    @SuppressWarnings("unused")
+    List<RootServiceHostComponentResponseWrapper> getHostComponents();
   }
-  
-  protected ResourceInstance createServiceComponentResource(String serviceName,
-      String componentName) {
-    
-    Map<Resource.Type,String> mapIds = new HashMap<>();
-    mapIds.put(Resource.Type.RootService, serviceName);
-    mapIds.put(Resource.Type.RootServiceComponent, componentName);
 
-    return createResource(Resource.Type.RootServiceComponent, mapIds);
+  private interface RootServiceHostComponentResponseWrapper extends ApiModel {
+    @ApiModelProperty(name = RootServiceHostComponentResourceProvider.RESPONSE_KEY)
+    @SuppressWarnings("unused")
+    RootServiceHostComponentResponse getRootServiceHostComponentResponse();
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/228b9289/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index 751ce08..4c8154e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -4839,11 +4839,6 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
       String serviceName  = request.getServiceName();
       try {
         Set<RootServiceComponentResponse> rootServiceComponents = getRootServiceComponents(request);
-
-        for (RootServiceComponentResponse serviceComponentResponse : rootServiceComponents) {
-          serviceComponentResponse.setServiceName(serviceName);
-        }
-
         response.addAll(rootServiceComponents);
       } catch (AmbariException e) {
         if (requests.size() == 1) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/228b9289/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceComponentResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceComponentResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceComponentResponse.java
index 4845c78..11fc0fd 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceComponentResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceComponentResponse.java
@@ -15,71 +15,69 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
-
 package org.apache.ambari.server.controller;
 
 import java.util.Map;
+import java.util.Objects;
+
+import org.apache.ambari.server.controller.internal.RootServiceComponentResourceProvider;
+
+import io.swagger.annotations.ApiModelProperty;
 
 public class RootServiceComponentResponse {
 
-  private String serviceName;
-  private String componentName;
-  private Map<String, String> properties;
-  private String componentVersion;
+  private final String serviceName;
+  private final String componentName;
+  private final Map<String, String> properties;
+  private final String componentVersion;
+  private final long serverClock = System.currentTimeMillis() / 1000L;
 
-  public RootServiceComponentResponse(String componentName, String componentVersion, Map<String, String> properties) {
+  public RootServiceComponentResponse(String serviceName, String componentName, String componentVersion, Map<String, String> properties) {
+    this.serviceName = serviceName;
     this.componentName = componentName;
-    this.setComponentVersion(componentVersion); 
-    this.setProperties(properties);
-    
+    this.componentVersion = componentVersion;
+    this.properties = properties;
   }
 
+  @ApiModelProperty(name = RootServiceComponentResourceProvider.SERVICE_NAME)
   public String getServiceName() {
     return serviceName;
   }
 
-  public void setServiceName(String serviceName) {
-    this.serviceName = serviceName;
-  }
-
+  @ApiModelProperty(name = RootServiceComponentResourceProvider.COMPONENT_NAME)
   public String getComponentName() {
     return componentName;
   }
 
+  @ApiModelProperty(name = RootServiceComponentResourceProvider.PROPERTIES)
   public Map<String, String> getProperties() {
     return properties;
   }
 
-  public void setProperties(Map<String, String> properties) {
-    this.properties = properties;
-  }
-  
+  @ApiModelProperty(name = RootServiceComponentResourceProvider.COMPONENT_VERSION)
   public String getComponentVersion() {
     return componentVersion;
   }
 
-  public void setComponentVersion(String componentVersion) {
-    this.componentVersion = componentVersion;
-  }
+  @ApiModelProperty(name = RootServiceComponentResourceProvider.SERVER_CLOCK)
+  public long getServerClock() { return serverClock; }
   
   @Override
   public boolean equals(Object o) {
     if (this == o) return true;
     if (o == null || getClass() != o.getClass()) return false;
 
-    RootServiceComponentResponse that = (RootServiceComponentResponse) o;
-
-    return !(componentName != null ? !componentName.equals(that.componentName) : that.componentName != null) &&
-        !(componentVersion != null ? !componentVersion.equals(that.componentVersion) : that.componentVersion != null) &&
-        !(properties != null ? !properties.equals(that.properties) : that.properties != null);
+    RootServiceComponentResponse other = (RootServiceComponentResponse) o;
 
+    return Objects.equals(serviceName, other.serviceName) &&
+      Objects.equals(componentName, other.componentName) &&
+      Objects.equals(componentVersion, other.componentVersion) &&
+      Objects.equals(properties, other.properties);
   }
 
   @Override
   public int hashCode() {
-    int result = 31 + (componentName != null ? componentName.hashCode() : 0);
-    result += (componentVersion != null ? componentVersion.hashCode() : 0);
-    return result;
+    return Objects.hash(serviceName, componentName, componentVersion);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/228b9289/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceHostComponentResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceHostComponentResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceHostComponentResponse.java
index 6cbc30c..6f35610 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceHostComponentResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceHostComponentResponse.java
@@ -1,4 +1,4 @@
-/**
+/*
  * 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
@@ -19,20 +19,25 @@
 package org.apache.ambari.server.controller;
 
 import java.util.Map;
+import java.util.Objects;
 
-public class RootServiceHostComponentResponse {
+import org.apache.ambari.server.controller.internal.RootServiceHostComponentResourceProvider;
+
+import io.swagger.annotations.ApiModelProperty;
 
-  private String serviceName;
-  private String hostName;
-  private String componentName;
-  private String componentState;
-  private String componentVersion;
-  private Map<String, String> properties;
+public class RootServiceHostComponentResponse {
 
+  private final String serviceName;
+  private final String hostName;
+  private final String componentName;
+  private final String componentState;
+  private final String componentVersion;
+  private final Map<String, String> properties;
 
-  public RootServiceHostComponentResponse(String hostName, String componentName, String componentState,
+  public RootServiceHostComponentResponse(String serviceName, String hostName, String componentName, String componentState,
       String componentVersion,
       Map<String, String> properties) {
+    this.serviceName = serviceName;
     this.hostName = hostName;
     this.componentName = componentName;
     this.componentState = componentState;
@@ -40,63 +45,54 @@ public class RootServiceHostComponentResponse {
     this.properties = properties;
   }
 
+  @ApiModelProperty(name = RootServiceHostComponentResourceProvider.SERVICE_NAME)
   public String getServiceName() {
     return serviceName;
   }
 
-  public void setServiceName(String serviceName) {
-    this.serviceName = serviceName;
-  }
-
+  @ApiModelProperty(name = RootServiceHostComponentResourceProvider.HOST_NAME)
   public String getHostName() {
     return hostName;
   }
 
+  @ApiModelProperty(name = RootServiceHostComponentResourceProvider.COMPONENT_NAME)
   public String getComponentName() {
     return componentName;
   }
 
-  public void setComponentName(String componentName) {
-    this.componentName = componentName;
+  @ApiModelProperty(name = RootServiceHostComponentResourceProvider.COMPONENT_STATE)
+  public String getComponentState() {
+    return componentState;
+  }
+
+  @ApiModelProperty(name = RootServiceHostComponentResourceProvider.COMPONENT_VERSION)
+  public String getComponentVersion() {
+    return componentVersion;
   }
 
+  @ApiModelProperty(name = RootServiceHostComponentResourceProvider.PROPERTIES)
   public Map<String, String> getProperties() {
     return properties;
   }
 
-  public void setProperties(Map<String, String> properties) {
-    this.properties = properties;
-  }
-  
   @Override
   public boolean equals(Object o) {
     if (this == o) return true;
     if (o == null || getClass() != o.getClass()) return false;
 
-    RootServiceHostComponentResponse that = (RootServiceHostComponentResponse) o;
-
-    return !(hostName != null ? !hostName.equals(that.hostName) : that.hostName != null) &&
-        !(componentName != null ? !componentName.equals(that.componentName) : that.componentName != null) &&
-        !(componentState != null ? !componentState.equals(that.componentState) : that.componentState != null) &&
-        !(componentVersion != null ? !componentVersion.equals(that.componentVersion) : that.componentVersion != null) &&
-        !(properties != null ? !properties.equals(that.properties) : that.properties != null);
+    RootServiceHostComponentResponse other = (RootServiceHostComponentResponse) o;
 
+    return Objects.equals(serviceName, other.serviceName) &&
+      Objects.equals(hostName, other.hostName) &&
+      Objects.equals(componentName, other.componentName) &&
+      Objects.equals(componentState, other.componentState) &&
+      Objects.equals(componentVersion, other.componentVersion) &&
+      Objects.equals(properties, other.properties);
   }
 
   @Override
   public int hashCode() {
-    int result = 31 + (hostName != null ? hostName.hashCode() : 0);
-    result = result + (componentName != null ? componentName.hashCode() : 0);
-    result = result + (componentState != null ? componentState.hashCode() : 0);
-    result = result + (componentVersion != null ? componentVersion.hashCode() : 0);
-    return result;
-  }
-
-  public String getComponentState() {
-    return componentState;
+    return Objects.hash(serviceName, hostName, componentName, componentVersion, componentState);
   }
 
-  public String getComponentVersion() {
-    return componentVersion;
-  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/228b9289/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponse.java
index 736ffff..43b8950 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponse.java
@@ -1,4 +1,4 @@
-/**
+/*
  * 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
@@ -18,14 +18,21 @@
 
 package org.apache.ambari.server.controller;
 
+import java.util.Objects;
+
+import org.apache.ambari.server.controller.internal.RootServiceResourceProvider;
+
+import io.swagger.annotations.ApiModelProperty;
+
 public class RootServiceResponse {
 
-  private String serviceName;
+  private final String serviceName;
 
   public RootServiceResponse(String serviceName) {
     this.serviceName = serviceName;
   }
 
+  @ApiModelProperty(name = RootServiceResourceProvider.SERVICE_NAME)
   public String getServiceName() {
     return serviceName;
   }
@@ -35,21 +42,14 @@ public class RootServiceResponse {
     if (this == o) return true;
     if (o == null || getClass() != o.getClass()) return false;
 
-    RootServiceResponse that = (RootServiceResponse) o;
+    RootServiceResponse other = (RootServiceResponse) o;
 
-    if (serviceName != null ?
-        !serviceName.equals(that.serviceName) : that.serviceName != null) {
-      return false;
-    }
-    
-    return true;
+    return Objects.equals(serviceName, other.serviceName);
   }
 
   @Override
   public int hashCode() {
-    int result = 1;
-    result = 31 + (serviceName != null ? serviceName.hashCode() : 0);
-    return result;
+    return Objects.hash(serviceName);
   }
 
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/228b9289/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java
index 2ceb769..714fbed 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/RootServiceResponseFactory.java
@@ -84,7 +84,7 @@ public class RootServiceResponseFactory extends
   public Set<RootServiceComponentResponse> getRootServiceComponents(
       RootServiceComponentRequest request) throws ObjectNotFoundException {
     Set<RootServiceComponentResponse> response = new HashSet<>();
-    
+
     String serviceName = request.getServiceName();
     String componentName = request.getComponentName();
     Services service;
@@ -109,13 +109,13 @@ public class RootServiceResponseFactory extends
       catch (IllegalArgumentException ex) {
         throw new ObjectNotFoundException("Component name: " + componentName);
       }
-      response = Collections.singleton(new RootServiceComponentResponse(component.toString(),
+      response = Collections.singleton(new RootServiceComponentResponse(serviceName, component.toString(),
                                        getComponentVersion(componentName, null),
                                        getComponentProperties(componentName)));
     } else {
     
       for (Components component: service.getComponents())    
-        response.add(new RootServiceComponentResponse(component.toString(),
+        response.add(new RootServiceComponentResponse(serviceName, component.toString(),
                      getComponentVersion(component.name(), null),
                      getComponentProperties(component.name())));
       }
@@ -198,8 +198,10 @@ public class RootServiceResponseFactory extends
   public Set<RootServiceHostComponentResponse> getRootServiceHostComponent(RootServiceHostComponentRequest request, Set<HostResponse> hosts) throws AmbariException {
     Set<RootServiceHostComponentResponse> response = new HashSet<>();
 
-    Set<RootServiceComponentResponse> rootServiceComponents = 
-        getRootServiceComponents(new RootServiceComponentRequest(request.getServiceName(), request.getComponentName()));
+    String serviceName = request.getServiceName();
+    String componentName = request.getComponentName();
+    Set<RootServiceComponentResponse> rootServiceComponents =
+        getRootServiceComponents(new RootServiceComponentRequest(serviceName, componentName));
 
     //Cartesian product with hosts and components
     for (RootServiceComponentResponse component : rootServiceComponents) {
@@ -207,7 +209,7 @@ public class RootServiceResponseFactory extends
       Set<HostResponse> filteredHosts = new HashSet<>(hosts);
       
       //Make some filtering of hosts if need
-      if (component.getComponentName().equals(Components.AMBARI_SERVER.name()))
+      if (component.getComponentName().equals(Components.AMBARI_SERVER.name())) {
         CollectionUtils.filter(filteredHosts, new Predicate() {
           @Override
           public boolean evaluate(Object arg0) {
@@ -215,15 +217,17 @@ public class RootServiceResponseFactory extends
             return hostResponse.getHostname().equals(StageUtils.getHostName());
           }
         });
+      }
       
       for (HostResponse host : filteredHosts) {
-        
-        if (component.getComponentName().equals(Components.AMBARI_SERVER.name()))
-          response.add(new RootServiceHostComponentResponse(host.getHostname(), component.getComponentName(),
-            RUNNING_STATE, getComponentVersion(component.getComponentName(), host), component.getProperties()));
-        else
-          response.add(new RootServiceHostComponentResponse(host.getHostname(), component.getComponentName(),
-            host.getHostState().toString(), getComponentVersion(component.getComponentName(), host), component.getProperties()));
+        String state;
+        if (component.getComponentName().equals(Components.AMBARI_SERVER.name())) {
+          state = RUNNING_STATE;
+        } else {
+          state = host.getHostState().toString();
+        }
+        String componentVersion = getComponentVersion(componentName, host);
+        response.add(new RootServiceHostComponentResponse(serviceName, host.getHostname(), componentName, state, componentVersion, component.getProperties()));
       }
     }
     

http://git-wip-us.apache.org/repos/asf/ambari/blob/228b9289/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
index 8a78911..747aac3 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
@@ -73,6 +73,7 @@ import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.collect.ImmutableSet;
 import com.google.inject.Inject;
 import com.google.inject.assistedinject.Assisted;
 import com.google.inject.assistedinject.AssistedInject;
@@ -88,6 +89,7 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
 
   // Hosts
   public static final String RESPONSE_KEY = "Hosts";
+  public static final String ALL_PROPERTIES = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "*";
 
   public static final String CLUSTER_NAME_PROPERTY_ID = "cluster_name";
   public static final String CPU_COUNT_PROPERTY_ID = "cpu_count";
@@ -145,9 +147,7 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
   protected static final String FORCE_DELETE_COMPONENTS = "force_delete_components";
 
 
-  private static Set<String> pkPropertyIds =
-    new HashSet<>(Arrays.asList(new String[]{
-      HOST_HOST_NAME_PROPERTY_ID}));
+  private static final Set<String> PK_PROPERTY_IDS = ImmutableSet.of(HOST_HOST_NAME_PROPERTY_ID);
 
   @Inject
   private OsFamily osFamily;
@@ -358,7 +358,7 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
 
   @Override
   protected Set<String> getPKPropertyIds() {
-    return pkPropertyIds;
+    return PK_PROPERTY_IDS;
   }
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/228b9289/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java
index fe95210..1397182 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java
@@ -18,7 +18,6 @@
 
 package org.apache.ambari.server.controller.internal;
 
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Map;
@@ -39,26 +38,26 @@ import org.apache.ambari.server.controller.spi.SystemException;
 import org.apache.ambari.server.controller.spi.UnsupportedPropertyException;
 import org.apache.ambari.server.controller.utilities.PropertyHelper;
 
-public class RootServiceComponentResourceProvider extends
-    ReadOnlyResourceProvider {
-  
-  public static final String SERVICE_NAME_PROPERTY_ID = PropertyHelper
-      .getPropertyId("RootServiceComponents", "service_name");
-  
-  public static final String COMPONENT_NAME_PROPERTY_ID = PropertyHelper
-      .getPropertyId("RootServiceComponents", "component_name");
-  
-  public static final String COMPONENT_VERSION_PROPERTY_ID = PropertyHelper
-      .getPropertyId("RootServiceComponents", "component_version");
-  
-  public static final String PROPERTIES_PROPERTY_ID = PropertyHelper
-      .getPropertyId("RootServiceComponents", "properties");
-  
-  public static final String PROPERTIES_SERVER_CLOCK = PropertyHelper
-      .getPropertyId("RootServiceComponents", "server_clock");
-  
-  private Set<String> pkPropertyIds = new HashSet<>(
-    Arrays.asList(new String[]{SERVICE_NAME_PROPERTY_ID, COMPONENT_NAME_PROPERTY_ID}));
+import com.google.common.collect.ImmutableSet;
+
+public class RootServiceComponentResourceProvider extends ReadOnlyResourceProvider {
+
+  public static final String RESPONSE_KEY = "RootServiceComponents";
+  public static final String ALL_PROPERTIES = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "*";
+
+  public static final String SERVICE_NAME = "service_name";
+  public static final String COMPONENT_NAME = "component_name";
+  public static final String COMPONENT_VERSION = "component_version";
+  public static final String PROPERTIES = "properties";
+  public static final String SERVER_CLOCK = "server_clock";
+
+  public static final String SERVICE_NAME_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + SERVICE_NAME;
+  public static final String COMPONENT_NAME_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + COMPONENT_NAME;
+  public static final String COMPONENT_VERSION_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + COMPONENT_VERSION;
+  public static final String PROPERTIES_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + PROPERTIES;
+  public static final String SERVER_CLOCK_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + SERVER_CLOCK;
+
+  private static final Set<String> PK_PROPERTY_IDS = ImmutableSet.of(SERVICE_NAME_PROPERTY_ID, COMPONENT_NAME_PROPERTY_ID);
 
   protected RootServiceComponentResourceProvider(Set<String> propertyIds,
       Map<Type, String> keyPropertyIds,
@@ -95,21 +94,13 @@ public class RootServiceComponentResourceProvider extends
     for (RootServiceComponentResponse response : responses) {
       Resource resource = new ResourceImpl(Resource.Type.RootServiceComponent);
 
-      setResourceProperty(resource, SERVICE_NAME_PROPERTY_ID,
-          response.getServiceName(), requestedIds);
-      
-      setResourceProperty(resource, COMPONENT_NAME_PROPERTY_ID,
-          response.getComponentName(), requestedIds);
-      
-      setResourceProperty(resource, PROPERTIES_PROPERTY_ID,
-          response.getProperties(), requestedIds);
-      
-      setResourceProperty(resource, COMPONENT_VERSION_PROPERTY_ID,
-          response.getComponentVersion(), requestedIds);
+      setResourceProperty(resource, SERVICE_NAME_PROPERTY_ID, response.getServiceName(), requestedIds);
+      setResourceProperty(resource, COMPONENT_NAME_PROPERTY_ID, response.getComponentName(), requestedIds);
+      setResourceProperty(resource, PROPERTIES_PROPERTY_ID, response.getProperties(), requestedIds);
+      setResourceProperty(resource, COMPONENT_VERSION_PROPERTY_ID, response.getComponentVersion(), requestedIds);
       
-      if(response.getComponentName().equals(Components.AMBARI_SERVER.name())){
-        setResourceProperty(resource, PROPERTIES_SERVER_CLOCK,
-            System.currentTimeMillis() / 1000L, requestedIds);
+      if (Components.AMBARI_SERVER.name().equals(response.getComponentName())) {
+        setResourceProperty(resource, SERVER_CLOCK_PROPERTY_ID, response.getServerClock(), requestedIds);
       }      
 
       resources.add(resource);
@@ -125,7 +116,7 @@ public class RootServiceComponentResourceProvider extends
 
   @Override
   protected Set<String> getPKPropertyIds() {
-    return pkPropertyIds;
+    return PK_PROPERTY_IDS;
   }
 
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/228b9289/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProvider.java
index d5c33c1..591f984 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProvider.java
@@ -18,7 +18,6 @@
 
 package org.apache.ambari.server.controller.internal;
 
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Map;
@@ -40,26 +39,27 @@ import org.apache.ambari.server.controller.spi.SystemException;
 import org.apache.ambari.server.controller.spi.UnsupportedPropertyException;
 import org.apache.ambari.server.controller.utilities.PropertyHelper;
 
-public class RootServiceHostComponentResourceProvider extends
-    ReadOnlyResourceProvider {
-  
-  public static final String SERVICE_NAME_PROPERTY_ID = PropertyHelper
-      .getPropertyId("RootServiceHostComponents", "service_name");
-  public static final String HOST_NAME_PROPERTY_ID = PropertyHelper
-      .getPropertyId("RootServiceHostComponents", "host_name");
-  public static final String COMPONENT_NAME_PROPERTY_ID = PropertyHelper
-      .getPropertyId("RootServiceHostComponents", "component_name");
-  public static final String COMPONENT_VERSION_PROPERTY_ID = PropertyHelper
-      .getPropertyId("RootServiceHostComponents", "component_version");
-  public static final String COMPONENT_STATE_PROPERTY_ID = PropertyHelper
-      .getPropertyId("RootServiceHostComponents", "component_state");
-  public static final String PROPERTIES_PROPERTY_ID = PropertyHelper
-      .getPropertyId("RootServiceHostComponents", "properties");
-  
-  
-  private Set<String> pkPropertyIds = new HashSet<>(
-    Arrays.asList(new String[]{SERVICE_NAME_PROPERTY_ID, HOST_NAME_PROPERTY_ID, COMPONENT_NAME_PROPERTY_ID}));
+import com.google.common.collect.ImmutableSet;
+
+public class RootServiceHostComponentResourceProvider extends ReadOnlyResourceProvider {
+
+  public static final String RESPONSE_KEY = "RootServiceHostComponents";
 
+  public static final String SERVICE_NAME = "service_name";
+  public static final String HOST_NAME = "host_name";
+  public static final String COMPONENT_NAME = "component_name";
+  public static final String COMPONENT_VERSION = "component_version";
+  public static final String COMPONENT_STATE = "component_state";
+  public static final String PROPERTIES = "properties";
+
+  public static final String SERVICE_NAME_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + SERVICE_NAME;
+  public static final String HOST_NAME_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + HOST_NAME;
+  public static final String COMPONENT_NAME_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + COMPONENT_NAME;
+  public static final String COMPONENT_VERSION_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + COMPONENT_VERSION;
+  public static final String COMPONENT_STATE_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + COMPONENT_STATE;
+  public static final String PROPERTIES_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + PROPERTIES;
+
+  private static final Set<String> PK_PROPERTY_IDS = ImmutableSet.of(SERVICE_NAME_PROPERTY_ID, HOST_NAME_PROPERTY_ID, COMPONENT_NAME_PROPERTY_ID);
 
   public RootServiceHostComponentResourceProvider(Set<String> propertyIds,
       Map<Type, String> keyPropertyIds,
@@ -97,23 +97,12 @@ public class RootServiceHostComponentResourceProvider extends
     for (RootServiceHostComponentResponse response : responses) {
       Resource resource = new ResourceImpl(Resource.Type.RootServiceHostComponent);
 
-      setResourceProperty(resource, SERVICE_NAME_PROPERTY_ID,
-          response.getServiceName(), requestedIds);
-      
-      setResourceProperty(resource, HOST_NAME_PROPERTY_ID,
-          response.getHostName(), requestedIds);
-      
-      setResourceProperty(resource, COMPONENT_NAME_PROPERTY_ID,
-          response.getComponentName(), requestedIds);
-      
-      setResourceProperty(resource, COMPONENT_STATE_PROPERTY_ID,
-          response.getComponentState(), requestedIds);
-      
-      setResourceProperty(resource, COMPONENT_VERSION_PROPERTY_ID,
-          response.getComponentVersion(), requestedIds);
-      
-      setResourceProperty(resource, PROPERTIES_PROPERTY_ID,
-          response.getProperties(), requestedIds);
+      setResourceProperty(resource, SERVICE_NAME_PROPERTY_ID, response.getServiceName(), requestedIds);
+      setResourceProperty(resource, HOST_NAME_PROPERTY_ID, response.getHostName(), requestedIds);
+      setResourceProperty(resource, COMPONENT_NAME_PROPERTY_ID, response.getComponentName(), requestedIds);
+      setResourceProperty(resource, COMPONENT_STATE_PROPERTY_ID, response.getComponentState(), requestedIds);
+      setResourceProperty(resource, COMPONENT_VERSION_PROPERTY_ID, response.getComponentVersion(), requestedIds);
+      setResourceProperty(resource, PROPERTIES_PROPERTY_ID, response.getProperties(), requestedIds);
 
       resources.add(resource);
     }
@@ -129,7 +118,7 @@ public class RootServiceHostComponentResourceProvider extends
 
   @Override
   protected Set<String> getPKPropertyIds() {
-    return pkPropertyIds;
+    return PK_PROPERTY_IDS;
   }
 
   // Get the root service host components for the given set of requests
@@ -137,13 +126,8 @@ public class RootServiceHostComponentResourceProvider extends
       Set<RootServiceHostComponentRequest> requests) throws AmbariException {
     Set<RootServiceHostComponentResponse> response = new HashSet<>();
     for (RootServiceHostComponentRequest request : requests) {
-      String serviceName = request.getServiceName();
       try {
         Set<RootServiceHostComponentResponse> rootServiceHostComponents = getRootServiceHostComponents(request);
-        for (RootServiceHostComponentResponse rootServiceHostComponentResponse : rootServiceHostComponents ) {
-          rootServiceHostComponentResponse.setServiceName(serviceName);
-        }
-
         response.addAll(rootServiceHostComponents);
       } catch (AmbariException e) {
         if (requests.size() == 1) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/228b9289/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceResourceProvider.java
index 80f720c..f967443 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceResourceProvider.java
@@ -18,7 +18,6 @@
 
 package org.apache.ambari.server.controller.internal;
 
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashSet;
 import java.util.Map;
@@ -38,13 +37,15 @@ import org.apache.ambari.server.controller.spi.SystemException;
 import org.apache.ambari.server.controller.spi.UnsupportedPropertyException;
 import org.apache.ambari.server.controller.utilities.PropertyHelper;
 
+import com.google.common.collect.ImmutableSet;
+
 public class RootServiceResourceProvider extends ReadOnlyResourceProvider {
-  
-  public static final String SERVICE_NAME_PROPERTY_ID = PropertyHelper
-      .getPropertyId("RootService", "service_name");
 
-  private Set<String> pkPropertyIds = new HashSet<>(
-    Arrays.asList(new String[]{SERVICE_NAME_PROPERTY_ID}));
+  public static final String RESPONSE_KEY = "RootService";
+  public static final String SERVICE_NAME = "service_name";
+  public static final String SERVICE_NAME_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + SERVICE_NAME;
+
+  private static final Set<String> PK_PROPERTY_IDS = ImmutableSet.of(SERVICE_NAME_PROPERTY_ID);
 
   protected RootServiceResourceProvider(Set<String> propertyIds,
       Map<Type, String> keyPropertyIds,
@@ -80,10 +81,7 @@ public class RootServiceResourceProvider extends ReadOnlyResourceProvider {
 
     for (RootServiceResponse response : responses) {
       Resource resource = new ResourceImpl(Resource.Type.RootService);
-
-      setResourceProperty(resource, SERVICE_NAME_PROPERTY_ID,
-          response.getServiceName(), requestedIds);
-
+      setResourceProperty(resource, SERVICE_NAME_PROPERTY_ID, response.getServiceName(), requestedIds);
       resources.add(resource);
     }
 
@@ -96,7 +94,7 @@ public class RootServiceResourceProvider extends ReadOnlyResourceProvider {
 
   @Override
   protected Set<String> getPKPropertyIds() {
-    return pkPropertyIds ;
+    return PK_PROPERTY_IDS;
   }
 
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/228b9289/ambari-server/src/test/java/org/apache/ambari/server/api/services/RootServiceServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/RootServiceServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/RootServiceServiceTest.java
index 64898c8..90725f7 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/RootServiceServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/RootServiceServiceTest.java
@@ -42,31 +42,31 @@ public class RootServiceServiceTest extends BaseServiceTest {
     
     //getServices
     RootServiceService service = new TestRootServiceService(null, null, null);
-    Method m = service.getClass().getMethod("getServices", String.class, HttpHeaders.class, UriInfo.class);
+    Method m = service.getClass().getMethod("getRootServices", String.class, HttpHeaders.class, UriInfo.class);
     Object[] args = new Object[] {null, getHttpHeaders(), getUriInfo()};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
     
     //getService
     service = new TestRootServiceService("AMBARI", null, null);
-    m = service.getClass().getMethod("getService", String.class, HttpHeaders.class, UriInfo.class, String.class);
+    m = service.getClass().getMethod("getRootService", String.class, HttpHeaders.class, UriInfo.class, String.class);
     args = new Object[] {null, getHttpHeaders(), getUriInfo(), "AMBARI"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
     
     //getServiceComponents
     service = new TestRootServiceService("AMBARI", null, null);
-    m = service.getClass().getMethod("getServiceComponents", String.class, HttpHeaders.class, UriInfo.class, String.class);
+    m = service.getClass().getMethod("getRootServiceComponents", String.class, HttpHeaders.class, UriInfo.class, String.class);
     args = new Object[] {null, getHttpHeaders(), getUriInfo(), "AMBARI"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
     
     //getServiceComponent
     service = new TestRootServiceService("AMBARI", "AMBARI_SERVER", null);
-    m = service.getClass().getMethod("getServiceComponent", String.class, HttpHeaders.class, UriInfo.class, String.class, String.class);
+    m = service.getClass().getMethod("getRootServiceComponent", String.class, HttpHeaders.class, UriInfo.class, String.class, String.class);
     args = new Object[] {null, getHttpHeaders(), getUriInfo(), "AMBARI", "AMBARI_SERVER"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
     
     //getRootHostComponents
     service = new TestRootServiceService("AMBARI", "AMBARI_SERVER", null);
-    m = service.getClass().getMethod("getRootHostComponents", String.class, HttpHeaders.class, UriInfo.class, String.class, String.class);
+    m = service.getClass().getMethod("getRootServiceComponentHosts", String.class, HttpHeaders.class, UriInfo.class, String.class, String.class);
     args = new Object[] {null, getHttpHeaders(), getUriInfo(), "AMBARI", "AMBARI_SERVER"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, service, m, args, null));
     
@@ -125,7 +125,6 @@ public class RootServiceServiceTest extends BaseServiceTest {
       return getTestResource();
     }
     
-    
     @Override
     RequestFactory getRequestFactory() {
       return getTestRequestFactory();

http://git-wip-us.apache.org/repos/asf/ambari/blob/228b9289/ambari-server/src/test/java/org/apache/ambari/server/controller/RootServiceResponseFactoryTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/RootServiceResponseFactoryTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/RootServiceResponseFactoryTest.java
index e9b4aa7..e36077f 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/RootServiceResponseFactoryTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/RootServiceResponseFactoryTest.java
@@ -109,8 +109,7 @@ public class RootServiceResponseFactoryTest {
     RootServiceResponseFactory.Components ambariServerComponent = RootServiceResponseFactory.Components.AMBARI_SERVER;
 
     // Request null service name, not-null component name
-    request = new RootServiceComponentRequest(null,
-        ambariServerComponent.name());
+    request = new RootServiceComponentRequest(null, ambariServerComponent.name());
 
     try {
       rootServiceComponents = responseFactory.getRootServiceComponents(request);
@@ -119,8 +118,8 @@ public class RootServiceResponseFactoryTest {
     }
 
     // Request existent service name, null component name
-    request = new RootServiceComponentRequest(
-        RootServiceResponseFactory.Services.AMBARI.name(), null);
+    String serviceName = RootServiceResponseFactory.Services.AMBARI.name();
+    request = new RootServiceComponentRequest(serviceName, null);
 
     rootServiceComponents = responseFactory.getRootServiceComponents(request);
     assertEquals(
@@ -142,7 +141,7 @@ public class RootServiceResponseFactoryTest {
         }
       } else {
         assertTrue(rootServiceComponents.contains(new RootServiceComponentResponse(
-            component.name(), RootServiceResponseFactory.NOT_APPLICABLE,
+            serviceName, component.name(), RootServiceResponseFactory.NOT_APPLICABLE,
             Collections.<String, String> emptyMap())));
       }
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/228b9289/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProviderTest.java
index eb6f08e..f60f982 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProviderTest.java
@@ -1,4 +1,4 @@
-/**
+/*
  * 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
@@ -25,6 +25,7 @@ import static org.easymock.EasyMock.verify;
 
 import java.util.Collections;
 import java.util.HashSet;
+import java.util.Map;
 import java.util.Set;
 
 import org.apache.ambari.server.controller.AmbariManagementController;
@@ -50,13 +51,15 @@ public class RootServiceComponentResourceProviderTest {
     AmbariManagementController managementController = createMock(AmbariManagementController.class);
 
     Set<RootServiceComponentResponse> allResponse = new HashSet<>();
-    allResponse.add(new RootServiceComponentResponse("component1", "1.1.1", Collections.<String,String>emptyMap()));
-    allResponse.add(new RootServiceComponentResponse("component2", "1.1.1", Collections.<String,String>emptyMap()));
-    allResponse.add(new RootServiceComponentResponse("component3", "1.1.1", Collections.<String,String>emptyMap()));
-    allResponse.add(new RootServiceComponentResponse(RootServiceResponseFactory.Components.AMBARI_SERVER.name(), "1.1.1", Collections.<String,String>emptyMap()));
+    String serviceName = RootServiceResponseFactory.Services.AMBARI.name();
+    Map<String, String> emptyMap = Collections.emptyMap();
+    allResponse.add(new RootServiceComponentResponse(serviceName, "component1", "1.1.1", emptyMap));
+    allResponse.add(new RootServiceComponentResponse(serviceName, "component2", "1.1.1", emptyMap));
+    allResponse.add(new RootServiceComponentResponse(serviceName, "component3", "1.1.1", emptyMap));
+    allResponse.add(new RootServiceComponentResponse(serviceName, RootServiceResponseFactory.Components.AMBARI_SERVER.name(), "1.1.1", emptyMap));
 
     Set<RootServiceComponentResponse> nameResponse = new HashSet<>();
-    nameResponse.add(new RootServiceComponentResponse("component4", "1.1.1", Collections.<String,String>emptyMap()));
+    nameResponse.add(new RootServiceComponentResponse(serviceName, "component4", "1.1.1", emptyMap));
 
 
     // set expectations
@@ -77,7 +80,7 @@ public class RootServiceComponentResourceProviderTest {
     propertyIds.add(RootServiceComponentResourceProvider.COMPONENT_NAME_PROPERTY_ID);
     propertyIds.add(RootServiceComponentResourceProvider.PROPERTIES_PROPERTY_ID);
     propertyIds.add(RootServiceComponentResourceProvider.COMPONENT_VERSION_PROPERTY_ID);
-    propertyIds.add(RootServiceComponentResourceProvider.PROPERTIES_SERVER_CLOCK);
+    propertyIds.add(RootServiceComponentResourceProvider.SERVER_CLOCK_PROPERTY_ID);
 
     // create the request
     Request request = PropertyHelper.getReadRequest(propertyIds);
@@ -89,14 +92,14 @@ public class RootServiceComponentResourceProviderTest {
     for (Resource resource : resources) {
       String componentName = (String) resource.getPropertyValue(RootServiceComponentResourceProvider.COMPONENT_NAME_PROPERTY_ID);
       String componentVersion = (String) resource.getPropertyValue(RootServiceComponentResourceProvider.COMPONENT_VERSION_PROPERTY_ID);
-      Long server_clock = (Long) resource.getPropertyValue(RootServiceComponentResourceProvider.PROPERTIES_SERVER_CLOCK);
+      Long server_clock = (Long) resource.getPropertyValue(RootServiceComponentResourceProvider.SERVER_CLOCK_PROPERTY_ID);
       if (componentName.equals(RootServiceResponseFactory.Components.AMBARI_SERVER.name())){
         Assert.assertNotNull(server_clock);
       } else {
         Assert.assertNull(server_clock);
       }
       
-      Assert.assertTrue(allResponse.contains(new RootServiceComponentResponse(componentName, componentVersion, Collections.<String,String>emptyMap())));
+      Assert.assertTrue(allResponse.contains(new RootServiceComponentResponse(serviceName, componentName, componentVersion, emptyMap)));
     }
 
     // get service named service4


[17/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java
new file mode 100644
index 0000000..ad9c485
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserService.java
@@ -0,0 +1,193 @@
+/**
+ * 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.users;
+
+import java.util.Collections;
+
+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 org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.api.services.BaseService;
+import org.apache.ambari.server.api.services.Request;
+import org.apache.ambari.server.controller.UserResponse;
+import org.apache.ambari.server.controller.spi.Resource;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+/**
+ * Service responsible for user requests.
+ */
+@Path("/users/")
+@Api(value = "Users", description = "Endpoint for user specific operations")
+public class UserService extends BaseService {
+
+  /**
+   * Gets all users.
+   * Handles: GET /users requests.
+   */
+  @GET
+  @Produces("text/plain")
+  @ApiOperation(value = "Get all users", notes = "Returns details of all users.", response = UserResponse.class, responseContainer = "List")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter user details", defaultValue = "Users/*", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "sortBy", value = "Sort users (asc | desc)", defaultValue = "Users/user_name.desc", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
+    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation", response = UserResponse.class, responseContainer = "List")}
+  )
+  public Response getUsers(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET, createUserResource(null));
+  }
+
+  /**
+   * Gets a single user.
+   * Handles: GET /users/{username} requests
+   *
+   * @param headers     http headers
+   * @param ui          uri info
+   * @param userName    the username
+   * @return information regarding the created user
+   */
+  @GET
+  @Path("{userName}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Get single user", notes = "Returns user details.", response = UserResponse.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter user details", defaultValue = "Users", dataType = "string", paramType = "query")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation", response = UserResponse.class)}
+  )
+  public Response getUser(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                          @ApiParam(value = "user name", required = true, defaultValue = "admin") @PathParam("userName") String userName) {
+    return handleRequest(headers, body, ui, Request.Type.GET, createUserResource(userName));
+  }
+
+  /**
+   * Creates a user.
+   * Handles: POST /users
+   *
+   * @param headers     http headers
+   * @param ui          uri info
+   * @return information regarding the created user
+   */
+  @POST
+  @Produces("text/plain")
+  public Response createUser(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.POST, createUserResource(null));
+  }
+
+  /**
+   * Creates a user.
+   * Handles: POST /users/{username}
+   *
+   * @param headers     http headers
+   * @param ui          uri info
+   * @param userName    the username
+   * @return information regarding the created user
+   */
+  @POST
+  @Path("{userName}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Create new user", notes = "Creates user resource.")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.UserRequest", paramType = "body")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation"),
+    @ApiResponse(code = 500, message = "Server Error")}
+  )
+  public Response createUser(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                             @ApiParam(value = "user name", required = true) @PathParam("userName") String userName) {
+    return handleRequest(headers, body, ui, Request.Type.POST, createUserResource(userName));
+  }
+
+  /**
+   * Updates a specific user.
+   * Handles: PUT /users/{userName}
+   *
+   * @param headers     http headers
+   * @param ui          uri info
+   * @param userName   the username
+   * @return information regarding the updated user
+   */
+  @PUT
+  @Path("{userName}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Update user detail", notes = "Updates user resource.")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.UserRequest", paramType = "body")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation"),
+    @ApiResponse(code = 500, message = "Server Error")}
+  )
+  public Response updateUser(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                             @ApiParam(value = "user name", required = true) @PathParam("userName") String userName) {
+
+    return handleRequest(headers, body, ui, Request.Type.PUT, createUserResource(userName));
+  }
+
+  /**
+   * Deletes a user.
+   * Handles:  DELETE /users/{userName}
+   */
+  @DELETE
+  @Path("{userName}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Delete single user", notes = "Delete user resource.")
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation"),
+    @ApiResponse(code = 500, message = "Server Error")}
+  )
+  public Response deleteUser(@Context HttpHeaders headers, @Context UriInfo ui,
+                             @ApiParam(value = "user name", required = true) @PathParam("userName") String userName) {
+    return handleRequest(headers, null, ui, Request.Type.DELETE, createUserResource(userName));
+  }
+
+  /**
+   * Create a user resource instance.
+   *
+   * @param userName  user name
+   *
+   * @return a user resource instance
+   */
+  private ResourceInstance createUserResource(String userName) {
+    return createResource(Resource.Type.User,
+        Collections.singletonMap(Resource.Type.User, userName));
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewDataMigrationService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewDataMigrationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewDataMigrationService.java
new file mode 100644
index 0000000..388f454
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewDataMigrationService.java
@@ -0,0 +1,113 @@
+/**
+ * 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.views;
+
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Response;
+
+import org.apache.ambari.server.api.services.BaseService;
+import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
+import org.apache.ambari.server.view.ViewDataMigrationUtility;
+import org.apache.ambari.server.view.ViewRegistry;
+import org.apache.ambari.view.migration.ViewDataMigrationException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+/**
+ * Service responsible for data migration between view instances.
+ */
+@Api(tags = "Views", description = "Endpoint for view specific operations")
+@Path("/views/{viewName}/versions/{version}/instances/{instanceName}/migrate")
+public class ViewDataMigrationService extends BaseService {
+  /**
+   * Logger.
+   */
+  private static final Log LOG = LogFactory.getLog(ViewDataMigrationService.class);
+
+  /**
+   * The singleton view registry.
+   */
+  private ViewRegistry viewRegistry = ViewRegistry.getInstance();
+
+  /**
+   * The view data migration utility.
+   */
+  private ViewDataMigrationUtility viewDataMigrationUtility;
+
+  /**
+   * Migrates view instance persistence data from origin view instance
+   * specified in the path params.
+   *
+   * @param viewName           view id
+   * @param viewVersion        version id
+   * @param instanceName       instance id
+   * @param originViewVersion  the origin view version
+   * @param originInstanceName the origin view instance name
+   */
+  @PUT
+  @Path("{originVersion}/{originInstanceName}")
+  @ApiOperation(value = "Migrate view instance data", notes = "Migrates view instance persistence data from origin view instance specified in the path params.")
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation"),
+    @ApiResponse(code = 500, message = "Server Error")}
+  )
+  public Response migrateData( @ApiParam(value = "view name") @PathParam("viewName") String viewName,
+                               @ApiParam(value = "view version") @PathParam("viewVersion") String viewVersion,
+                               @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName,
+                               @ApiParam(value = "origin version") @PathParam("originVersion") String originViewVersion,
+                               @ApiParam(value = "origin instance name") @PathParam("originInstanceName") String originInstanceName)
+      throws ViewDataMigrationException {
+
+    if (!viewRegistry.checkAdmin()) {
+      throw new WebApplicationException(Response.Status.FORBIDDEN);
+    }
+
+    LOG.info("Data Migration to view instance " + viewName + "/" + viewVersion + "/" + instanceName +
+        " from " + viewName + "/" + originViewVersion + "/" + originInstanceName);
+
+    ViewInstanceEntity instanceDefinition = viewRegistry.getInstanceDefinition(
+        viewName, viewVersion, instanceName);
+    ViewInstanceEntity originInstanceDefinition = viewRegistry.getInstanceDefinition(
+        viewName, originViewVersion, originInstanceName);
+
+    getViewDataMigrationUtility().migrateData(instanceDefinition, originInstanceDefinition, false);
+
+    Response.ResponseBuilder builder = Response.status(Response.Status.OK);
+    return builder.build();
+  }
+
+  protected ViewDataMigrationUtility getViewDataMigrationUtility() {
+    if (viewDataMigrationUtility == null) {
+      viewDataMigrationUtility = new ViewDataMigrationUtility(viewRegistry);
+    }
+    return viewDataMigrationUtility;
+  }
+
+  protected void setViewDataMigrationUtility(ViewDataMigrationUtility viewDataMigrationUtility) {
+    this.viewDataMigrationUtility = viewDataMigrationUtility;
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewExternalSubResourceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewExternalSubResourceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewExternalSubResourceService.java
new file mode 100644
index 0000000..bca0f05
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewExternalSubResourceService.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.views;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.ws.rs.GET;
+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 org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.api.services.BaseService;
+import org.apache.ambari.server.api.services.Request;
+import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.ambari.server.orm.entities.ViewEntity;
+import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
+
+/**
+ * Service responsible for view sub-resource requests.
+ */
+public class ViewExternalSubResourceService  extends BaseService {
+
+  /**
+   * The resource type.
+   */
+  private final Resource.Type type;
+
+  /**
+   * The view name.
+   */
+  private final String viewName;
+
+  /**
+   * The view version.
+   */
+  private final String version;
+
+  /**
+   * The instance name.
+   */
+  private final String instanceName;
+
+  /**
+   * Mapping of resource names to services.
+   */
+  private final Map<String, Object> resourceServiceMap = new HashMap<String, Object>();
+
+
+  // ----- Constructors ------------------------------------------------------
+
+  public ViewExternalSubResourceService(Resource.Type type, ViewInstanceEntity viewInstanceDefinition) {
+    ViewEntity viewEntity = viewInstanceDefinition.getViewEntity();
+
+    this.type         = type;
+    this.viewName     = viewEntity.getCommonName();
+    this.version      = viewEntity.getVersion();
+    this.instanceName = viewInstanceDefinition.getName();
+  }
+
+  /**
+   * Handles URL: /resources
+   * Get all external resources for a view.
+   *
+   * @param headers  http headers
+   * @param ui       uri info
+   *
+   * @return instance collection resource representation
+   */
+  @GET
+  @Produces("text/plain")
+  public Response getResources(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET,
+        createResource(viewName, instanceName));
+  }
+
+  /**
+   * Handles: GET /resources/{resourceName} Get a specific external resource.
+   *
+   * @param resourceName  resource name
+   *
+   * @return resource service instance representation
+   *
+   * @throws IllegalArgumentException if the given resource name is unknown
+   */
+  @Path("{resourceName}")
+  public Object getResource(@PathParam("resourceName") String resourceName) throws IOException {
+
+    Object service = resourceServiceMap.get(resourceName);
+    if (service == null) {
+      throw new IllegalArgumentException("A resource type " + resourceName + " for view instance " +
+          viewName + "/" + instanceName + " can not be found.");
+    }
+
+    return service;
+  }
+
+
+  // ----- helper methods ----------------------------------------------------
+
+  /**
+   * Register a sub-resource service.
+   *
+   * @param resourceName  the resource name
+   * @param service       the service
+   */
+  public void addResourceService(String resourceName, Object service) {
+    resourceServiceMap.put(resourceName, service);
+  }
+
+  /**
+   * Create an view instance resource.
+   *
+   * @param viewName      view name
+   * @param instanceName  instance name
+   *
+   * @return a view instance resource
+   */
+  private ResourceInstance createResource(String viewName, String instanceName) {
+    Map<Resource.Type,String> mapIds = new HashMap<Resource.Type, String>();
+    mapIds.put(Resource.Type.View, viewName);
+    mapIds.put(Resource.Type.ViewVersion, version);
+    mapIds.put(Resource.Type.ViewInstance, instanceName);
+    return createResource(type, mapIds);
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
new file mode 100644
index 0000000..9657c0e
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewInstanceService.java
@@ -0,0 +1,313 @@
+/*
+ * 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.views;
+
+import java.util.HashMap;
+import java.util.Map;
+
+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.WebApplicationException;
+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 org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.api.services.BaseService;
+import org.apache.ambari.server.api.services.Request;
+import org.apache.ambari.server.controller.ViewInstanceResponse;
+import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
+import org.apache.ambari.server.security.authorization.AuthorizationException;
+import org.apache.ambari.server.view.ViewRegistry;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+/**
+ * Service responsible for instances resource requests.
+ */
+@Path("/views/{viewName}/versions/{version}/instances")
+@Api(tags = "Views", description = "Endpoint for view specific operations")
+public class ViewInstanceService extends BaseService {
+  /**
+   * The view registry;
+   */
+  private final ViewRegistry viewRegistry = ViewRegistry.getInstance();
+
+  /**
+   * Handles URL: /views/{viewName}/versions/{version}/instances
+   * Get all instances for a view.
+   *
+   * @param headers    http headers
+   * @param ui         uri info
+   * @param viewName   view id
+   * @param version    version id
+   *
+   * @return instance collection resource representation
+   */
+  @GET
+  @Produces("text/plain")
+  @ApiOperation(value = "Get all view instances", notes = "Returns all instances for a view version.", response = ViewInstanceResponse.class, responseContainer = "List")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter view instance details", defaultValue = "ViewInstanceInfo/*", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "sortBy", value = "Sort users (asc | desc)", defaultValue = "ViewInstanceInfo/instance_name.desc", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
+    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation", response = ViewInstanceResponse.class, responseContainer = "List")}
+  )
+  public Response getServices(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                              @PathParam("viewName") String viewName, @PathParam("version") String version) throws AuthorizationException {
+    return handleRequest(headers, body, ui, Request.Type.GET, createResource(viewName, version, null));
+  }
+
+
+  /**
+   * Handles URL: /views/{viewName}/versions/{version}/instances/{instanceID}
+   * Get a specific instance.
+   *
+   * @param headers       http headers
+   * @param ui            uri info
+   * @param viewName      view id
+   * @param version       version id
+   * @param instanceName  instance id
+   *
+   * @return instance resource representation
+   */
+  @GET
+  @Path("{instanceName}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Get single view instance", notes = "Returns view instance details.", response = ViewInstanceResponse.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter view instance details", defaultValue = "ViewInstanceInfo", dataType = "string", paramType = "query")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation", response = ViewInstanceResponse.class)}
+  )
+  public Response getService(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                             @ApiParam(value = "view name") @PathParam("viewName") String viewName, @PathParam("version") String version,
+                             @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName) throws AuthorizationException {
+    return handleRequest(headers, body, ui, Request.Type.GET, createResource(viewName, version, instanceName));
+  }
+
+
+  /**
+   * Handles: POST /views/{viewName}/versions/{version}/instances/{instanceId}
+   * Create a specific instance.
+   *
+   * @param body          http body
+   * @param headers       http headers
+   * @param ui            uri info
+   * @param viewName      view id
+   * @param version       version id
+   * @param instanceName  instance id
+   *
+   * @return information regarding the created instance
+   */
+  @POST
+  @Path("{instanceName}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Create view instance", notes = "Creates view instance resource.")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.ViewInstanceRequest", paramType = "body")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation"),
+    @ApiResponse(code = 500, message = "Server Error")}
+  )
+  public Response createService(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                                @ApiParam(value = "view name") @PathParam("viewName") String viewName, @PathParam("version") String version,
+                                @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName) throws AuthorizationException {
+    return handleRequest(headers, body, ui, Request.Type.POST, createResource(viewName, version, instanceName));
+  }
+
+  /**
+   * Handles: POST /views/{viewName}/versions/{version}/instances
+   * Create multiple instances.
+   *
+   * @param body       http body
+   * @param headers    http headers
+   * @param ui         uri info
+   * @param viewName   view id
+   * @param version    version id
+   *
+   * @return information regarding the created instances
+   */
+  @POST
+  @Produces("text/plain")
+  public Response createServices(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                                 @PathParam("viewName") String viewName, @PathParam("version") String version) throws AuthorizationException {
+    return handleRequest(headers, body, ui, Request.Type.POST, createResource(viewName, version, null));
+  }
+
+  /**
+   * Handles: PUT /views/{viewName}/versions/{version}/instances/{instanceId}
+   * Update a specific instance.
+   *
+   * @param body          http body
+   * @param headers       http headers
+   * @param ui            uri info
+   * @param viewName   view id
+   * @param version    version id
+   * @param instanceName  instance id
+   *
+   * @return information regarding the updated instance
+   */
+  @PUT
+  @Path("{instanceName}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Update view instance detail", notes = "Updates view instance resource.")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.ViewInstanceRequest", paramType = "body")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation"),
+    @ApiResponse(code = 500, message = "Server Error")}
+  )
+  public Response updateService(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                                @ApiParam(value = "view name") @PathParam("viewName") String viewName, @PathParam("version") String version,
+                                @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName) throws AuthorizationException {
+    return handleRequest(headers, body, ui, Request.Type.PUT, createResource(viewName, version, instanceName));
+  }
+
+  /**
+   * Handles: PUT /views/{viewName}/versions/{version}/instances
+   * Update multiple instances.
+   *
+   * @param body     http body
+   * @param headers  http headers
+   * @param ui       uri info
+   * @param viewName   view id
+   * @param version    version id
+   *
+   * @return information regarding the updated instance
+   */
+  @PUT
+  @Produces("text/plain")
+  public Response updateServices(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                                 @PathParam("viewName") String viewName, @PathParam("version") String version) throws AuthorizationException {
+    return handleRequest(headers, body, ui, Request.Type.PUT, createResource(viewName, version, null));
+  }
+
+  /**
+   * Handles: DELETE /views/{viewName}/versions/{version}/instances/{instanceId}
+   * Delete a specific instance.
+   *
+   * @param headers       http headers
+   * @param ui            uri info
+   * @param viewName   view id
+   * @param version    version id
+   * @param instanceName  instance id
+   *
+   * @return information regarding the deleted instance
+   */
+  @DELETE
+  @Path("{instanceName}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Delete view instance", notes = "Delete view resource.")
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation"),
+    @ApiResponse(code = 500, message = "Server Error")}
+  )
+  public Response deleteService(@Context HttpHeaders headers, @Context UriInfo ui,
+                                @ApiParam(value = "view name") @PathParam("viewName") String viewName, @PathParam("version") String version,
+                                @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName) throws AuthorizationException {
+    return handleRequest(headers, null, ui, Request.Type.DELETE, createResource(viewName, version, instanceName));
+  }
+
+  /**
+   * Get the sub-resource
+   *
+   * @param instanceName  the instance id
+   *
+   * @return the service
+   */
+  @Path("{instanceName}/{resources}")
+  public Object getResourceHandler(@Context javax.ws.rs.core.Request request,
+                                   @PathParam("viewName") String viewName, @PathParam("version") String version,
+                                   @PathParam("instanceName") String instanceName,
+                                   @PathParam("resources") String resources) {
+
+    hasPermission(viewName, version, Request.Type.valueOf(request.getMethod()), instanceName);
+
+    ViewInstanceEntity instanceDefinition =
+        ViewRegistry.getInstance().getInstanceDefinition(viewName, version, instanceName);
+
+    if (instanceDefinition == null) {
+      throw new IllegalArgumentException("A view instance " +
+          viewName + "/" + instanceName + " can not be found.");
+    }
+
+    Object service = instanceDefinition.getService(resources);
+
+    if (service == null) {
+      throw new IllegalArgumentException("A resource type " + resources + " for view instance " +
+          viewName + "/" + instanceName + " can not be found.");
+    }
+    return service;
+  }
+
+  // ----- helper methods ----------------------------------------------------
+
+  /**
+   * Create an view instance resource.
+   *
+   * @param viewName      view name
+   * @param instanceName  instance name
+   *
+   * @return a view instance resource
+   */
+  private ResourceInstance createResource(String viewName, String viewVersion, String instanceName) {
+    Map<Resource.Type, String> mapIds = new HashMap<Resource.Type, String>();
+    mapIds.put(Resource.Type.View, viewName);
+    mapIds.put(Resource.Type.ViewVersion, viewVersion);
+    mapIds.put(Resource.Type.ViewInstance, instanceName);
+    return createResource(Resource.Type.ViewInstance, mapIds);
+  }
+
+  /**
+   * Determine whether or not the access specified by the given request type
+   * is permitted for the current user on the view instance resource identified
+   * by the given instance name.
+   *
+   * @param requestType   the request method type
+   * @param instanceName  the name of the view instance resource
+   *
+   * @throws WebApplicationException if access is forbidden
+   */
+  private void hasPermission(String viewName, String version, Request.Type requestType, String instanceName) {
+    if (!viewRegistry.checkPermission(viewName, version, instanceName, requestType == Request.Type.GET)) {
+      throw new WebApplicationException(Response.Status.FORBIDDEN);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java
new file mode 100644
index 0000000..cbc037b
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPermissionService.java
@@ -0,0 +1,208 @@
+/**
+ * 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.views;
+
+import java.util.HashMap;
+import java.util.Map;
+
+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 org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.api.services.BaseService;
+import org.apache.ambari.server.api.services.Request;
+import org.apache.ambari.server.controller.ViewPermissionResponse;
+import org.apache.ambari.server.controller.spi.Resource;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+
+/**
+ * Service responsible for custom view permission resource requests.
+ */
+@Path("/views/{viewName}/versions/{version}/permissions")
+@Api(value = "Views", description = "Endpoint for view specific operations")
+public class ViewPermissionService extends BaseService {
+
+  /**
+   * Handles: GET  /permissions
+   * Get all permissions.
+   *
+   * @param headers    http headers
+   * @param ui         uri info
+   * @param viewName   view id
+   * @param version    version id
+   *
+   * @return permission collection resource representation
+   */
+  @GET
+  @Produces("text/plain")
+  @ApiOperation(value = "Get all permissions for a view", notes = "Returns all permission details for the version of a view.", response = ViewPermissionResponse.class, responseContainer = "List")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter privileges", defaultValue = "PermissionInfo/*", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
+    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation", response = ViewPermissionResponse.class, responseContainer = "List")}
+  )
+  public Response getPermissions(@Context HttpHeaders headers, @Context UriInfo ui,
+                                 @ApiParam(value = "view name") @PathParam("viewName") String viewName,
+                                 @ApiParam(value = "view version") @PathParam("version") String version) {
+    return handleRequest(headers, null, ui, Request.Type.GET, createPermissionResource(
+      viewName, version, null));
+  }
+
+  /**
+   * Handles: GET /views/{viewName}/versions/{version}/permissions/{permissionID}
+   * Get a specific permission.
+   *
+   * @param headers        http headers
+   * @param ui             uri info
+   * @param viewName       view id
+   * @param version        version id
+   * @param permissionId   permission id
+   *
+   * @return permission instance representation
+   */
+  @GET
+  @Path("{permissionId}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Get single view permission", notes = "Returns permission details for a single version of a view.", response = ViewPermissionResponse.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter view permission details", defaultValue = "PermissionInfo", dataType = "string", paramType = "query")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation", response = ViewPermissionResponse.class)}
+  )
+  public Response getPermission(@Context HttpHeaders headers, @Context UriInfo ui,
+                                @ApiParam(value = "view name") @PathParam("viewName") String viewName,
+                                @ApiParam(value = "view version") @PathParam("version") String version,
+                                @ApiParam(value = "permission id") @PathParam("permissionId") String permissionId) {
+
+    return handleRequest(headers, null, ui, Request.Type.GET, createPermissionResource(
+        viewName, version, permissionId));
+  }
+
+  /**
+   * Handles: POST /views/{viewName}/versions/{version}/permissions/{permissionID}
+   * Create a specific permission.
+   *
+   * @param headers        http headers
+   * @param ui             uri info
+   * @param viewName       view id
+   * @param version        version id
+   * @param permissionId   permission id
+   *
+   * @return information regarding the created permission
+   */
+  @POST
+  @Path("{permissionId}")
+  @Produces("text/plain")
+  public Response createPermission(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                                   @ApiParam(value = "view name") @PathParam("viewName") String viewName,
+                                   @ApiParam(value = "view version") @PathParam("version") String version,
+                                   @ApiParam(value = "permission id") @PathParam("permissionId") String permissionId) {
+
+    return handleRequest(headers, body, ui, Request.Type.POST, createPermissionResource(
+        viewName, version, permissionId));
+  }
+
+  /**
+   * Handles: PUT /views/{viewName}/versions/{version}/permissions/{permissionID}
+   * Update a specific permission.
+   *
+   * @param headers       http headers
+   * @param ui            uri info
+   * @param viewName      view id
+   * @param version       version id
+   * @param permissionId  permission id
+   * @return information regarding the updated permission
+   */
+  @PUT
+  @Path("{permissionId}")
+  @Produces("text/plain")
+  public Response updatePermission(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                                   @ApiParam(value = "view name") @PathParam("viewName") String viewName,
+                                   @ApiParam(value = "view version") @PathParam("version") String version,
+                                   @ApiParam(value = "permission id") @PathParam("permissionId") String permissionId) {
+
+    return handleRequest(headers, body, ui, Request.Type.PUT, createPermissionResource(
+        viewName, version, permissionId));
+  }
+
+  /**
+   * Handles: DELETE /views/{viewName}/versions/{version}/permissions/{permissionID}
+   * Delete a specific permission.
+   *
+   * @param headers       http headers
+   * @param ui            uri info
+   * @param viewName      view id
+   * @param version       version id
+   * @param permissionId  permission id
+   *
+   * @return information regarding the deleted permission
+   */
+  @DELETE
+  @Path("{permissionId}")
+  @Produces("text/plain")
+  public Response deletePermission(@Context HttpHeaders headers, @Context UriInfo ui,
+                                   @ApiParam(value = "view name") @PathParam("viewName") String viewName,
+                                   @ApiParam(value = "view version") @PathParam("version") String version,
+                                   @ApiParam(value = "permission id") @PathParam("permissionId") String permissionId) {
+
+    return handleRequest(headers, null, ui, Request.Type.DELETE, createPermissionResource(
+        viewName, version, permissionId));
+  }
+
+
+  // ----- helper methods ----------------------------------------------------
+
+  /**
+   * Create a permission resource.
+   *
+   * @param permissionId permission name
+   *
+   * @return a permission resource instance
+   */
+  protected ResourceInstance createPermissionResource(String viewName, String viewVersion, String permissionId) {
+    Map<Resource.Type,String> mapIds = new HashMap<Resource.Type, String>();
+    mapIds.put(Resource.Type.View, viewName);
+    mapIds.put(Resource.Type.ViewVersion, viewVersion);
+    mapIds.put(Resource.Type.ViewPermission, permissionId);
+
+    return createResource(Resource.Type.ViewPermission, mapIds);
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPrivilegeService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPrivilegeService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPrivilegeService.java
new file mode 100644
index 0000000..e6d817f
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewPrivilegeService.java
@@ -0,0 +1,268 @@
+/**
+ * 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 privileges and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.api.services.views;
+
+import java.util.HashMap;
+import java.util.Map;
+
+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 org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.api.services.BaseService;
+import org.apache.ambari.server.api.services.Request;
+import org.apache.ambari.server.controller.ViewPrivilegeResponse;
+import org.apache.ambari.server.controller.spi.Resource;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+/**
+ *  Service responsible for view privilege resource requests.
+ */
+@Api(tags = "Views", description = "Endpoint for view specific operations")
+@Path("/views/{viewName}/versions/{version}/instances/{instanceName}/privileges")
+public class ViewPrivilegeService extends BaseService {
+  /**
+   * Handles: GET  /views/{viewName}/versions/{version}/instances/{instanceName}/privileges
+   * Get all privileges.
+   *
+   * @param headers       http headers
+   * @param ui            uri info
+   * @param viewName      view id
+   * @param version       version id
+   * @param instanceName  instance id
+   *
+   * @return privilege collection representation
+   */
+  @GET
+  @Produces("text/plain")
+  @ApiOperation(value = "Get all view instance privileges", notes = "Returns all privileges for the resource.", response = ViewPrivilegeResponse.class, responseContainer = "List")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter privileges", defaultValue = "PrivilegeInfo/*", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "sortBy", value = "Sort privileges (asc | desc)", defaultValue = "PrivilegeInfo/user_name.asc", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
+    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
+  })
+  public Response getPrivileges(@Context HttpHeaders headers, @Context UriInfo ui,
+                                @ApiParam(value = "view name") @PathParam("viewName") String viewName,
+                                @ApiParam(value = "view version") @PathParam("version") String version,
+                                @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName) {
+    return handleRequest(headers, null, ui, Request.Type.GET, createPrivilegeResource(viewName, version, instanceName,null));
+  }
+
+  /**
+   * Handles: GET /views/{viewName}/versions/{version}/instances/{instanceName}/privileges/{privilegeID}
+   * Get a specific privilege.
+   *
+   * @param headers        http headers
+   * @param ui             uri info
+   * @param viewName       view id
+   * @param version        version id
+   * @param instanceName   instance id
+   * @param privilegeId    privilege id
+   *
+   * @return privilege instance representation
+   */
+  @GET
+  @Path("/{privilegeId}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Get single view instance privilege", notes = "Returns privilege details.", response = ViewPrivilegeResponse.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter privilege details", defaultValue = "PrivilegeInfo", dataType = "string", paramType = "query")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation", response = ViewPrivilegeResponse.class)}
+  )
+  public Response getPrivilege(@Context HttpHeaders headers, @Context UriInfo ui,
+                               @ApiParam(value = "view name") @PathParam("viewName") String viewName,
+                               @ApiParam(value = "view version") @PathParam("version") String version,
+                               @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName,
+                               @ApiParam(value = "privilege id", required = true) @PathParam("privilegeId") String privilegeId) {
+
+    return handleRequest(headers, null, ui, Request.Type.GET, createPrivilegeResource(viewName, version, instanceName,privilegeId));
+  }
+
+  /**
+   * Handles: POST /views/{viewName}/versions/{version}/instances/{instanceName}/privileges
+   * Create a privilege.
+   *
+   * @param body          request body
+   * @param headers       http headers
+   * @param ui            uri info
+   * @param viewName      view id
+   * @param version       version id
+   * @param instanceName  instance id
+   *
+   * @return information regarding the created privilege
+   */
+  @POST
+  @Produces("text/plain")
+  @ApiOperation(value = "Create view instance privilege", notes = "Create privilege resource for view instance.")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.ViewPrivilegeRequest", paramType = "body")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation"),
+    @ApiResponse(code = 500, message = "Server Error")}
+  )
+  public Response createPrivilege(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                                  @ApiParam(value = "view name") @PathParam("viewName") String viewName,
+                                  @ApiParam(value = "view version") @PathParam("version") String version,
+                                  @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName) {
+
+    return handleRequest(headers, body, ui, Request.Type.POST, createPrivilegeResource(viewName, version, instanceName,null));
+  }
+
+  /**
+   * Handles: PUT /views/{viewName}/versions/{version}/instances/{instanceName}/privileges/{privilegeID}
+   * Update a specific privilege.
+   *
+   * @param headers       http headers
+   * @param ui            uri info
+   * @param viewName      view id
+   * @param version       version id
+   * @param instanceName  instance id
+   * @param privilegeId   privilege id
+   *
+   * @return information regarding the updated privilege
+   */
+  @PUT
+  // Remove comments when the below API call is fixed
+  /*@Path("{privilegeId}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Update view instance privilege", notes = "Update privilege resource for view instance.")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.ViewPrivilegeRequest", paramType = "body")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation"),
+    @ApiResponse(code = 500, message = "Server Error")}
+  ) */
+  public Response updatePrivilege(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                                  @ApiParam(value = "view name") @PathParam("viewName") String viewName,
+                                  @ApiParam(value = "view version") @PathParam("version") String version,
+                                  @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName,
+                                  @ApiParam(value = "privilege id") @PathParam("privilegeId") String privilegeId) {
+
+    return handleRequest(headers, body, ui, Request.Type.PUT, createPrivilegeResource(viewName, version, instanceName, privilegeId));
+  }
+
+  /**
+   * Handles: PUT /views/{viewName}/versions/{version}/instances/{instanceName}/privileges
+   * Update a set of privileges for the resource.
+   *
+   * @param body          request body
+   * @param headers       http headers
+   * @param ui            uri info
+   * @param viewName      view id
+   * @param version       version id
+   * @param instanceName  instance id
+   *
+   * @return information regarding the updated privileges
+   */
+  @PUT
+  @Produces("text/plain")
+  public Response updatePrivileges(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                                   @ApiParam(value = "view name") @PathParam("viewName") String viewName,
+                                   @ApiParam(value = "view version") @PathParam("version") String version,
+                                   @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName) {
+    return handleRequest(headers, body, ui, Request.Type.PUT, createPrivilegeResource(viewName, version, instanceName,null));
+  }
+
+  /**
+   * Handles: DELETE /views/{viewName}/versions/{version}/instances/{instanceName}/privileges
+   * Delete privileges.
+   *
+   * @param body          request body
+   * @param headers       http headers
+   * @param ui            uri info
+   * @param viewName      view id
+   * @param version       version id
+   * @param instanceName  instance id
+   *
+   * @return information regarding the deleted privileges
+   */
+  @DELETE
+  @Produces("text/plain")
+  public Response deletePrivileges(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                                   @ApiParam(value = "view name") @PathParam("viewName") String viewName,
+                                   @ApiParam(value = "view version") @PathParam("viewVersion") String version,
+                                   @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName) {
+
+    return handleRequest(headers, body, ui, Request.Type.DELETE, createPrivilegeResource(viewName, version, instanceName,null));
+  }
+
+  /**
+   * Handles: DELETE /views/{viewName}/versions/{version}/instances/{instanceName}/privileges/{privilegeID}
+   * Delete a specific privilege.
+   *
+   * @param headers       http headers
+   * @param ui            uri info
+   * @param viewName      view id
+   * @param version       version id
+   * @param instanceName  instance id
+   * @param privilegeId   privilege id
+   *
+   * @return information regarding the deleted privilege
+   */
+  @DELETE
+  @Path("{privilegeId}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Delete view instance privilege", notes = "Delete view instance privilege resource.")
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation"),
+    @ApiResponse(code = 500, message = "Server Error")}
+  )
+  public Response deletePrivilege(@Context HttpHeaders headers, @Context UriInfo ui,
+                                  @ApiParam(value = "view name") @PathParam("viewName") String viewName,
+                                  @ApiParam(value = "view version") @PathParam("version") String version,
+                                  @ApiParam(value = "instance name") @PathParam("instanceName") String instanceName,
+                                  @ApiParam(value = "privilege id") @PathParam("privilegeId") String privilegeId) {
+
+    return handleRequest(headers, null, ui, Request.Type.DELETE, createPrivilegeResource(viewName, version, instanceName, privilegeId));
+  }
+
+
+  protected ResourceInstance createPrivilegeResource(String viewName, String viewVersion, String instanceName, String privilegeId) {
+    Map<Resource.Type,String> mapIds = new HashMap<Resource.Type, String>();
+    mapIds.put(Resource.Type.View, viewName);
+    mapIds.put(Resource.Type.ViewVersion, viewVersion);
+    mapIds.put(Resource.Type.ViewInstance, instanceName);
+    mapIds.put(Resource.Type.ViewPrivilege, privilegeId);
+
+    return createResource(Resource.Type.ViewPrivilege, mapIds);
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewService.java
new file mode 100644
index 0000000..1936d5b
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewService.java
@@ -0,0 +1,181 @@
+/**
+ * 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.views;
+
+import java.util.Collections;
+
+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 org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.api.services.BaseService;
+import org.apache.ambari.server.api.services.Request;
+import org.apache.ambari.server.controller.ViewResponse;
+import org.apache.ambari.server.controller.spi.Resource;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+
+/**
+ * Service responsible for view resource requests.
+ */
+@Path("/views/")
+@Api(value = "Views", description = "Endpoint for view specific operations")
+public class ViewService extends BaseService {
+
+  /**
+   * Handles: GET  /views
+   * Get all views.
+   *
+   * @param headers  http headers
+   * @param ui       uri info
+   *
+   * @return view collection resource representation
+   */
+  @GET
+  @Produces("text/plain")
+  @ApiOperation(value = "Get all views", notes = "Returns details of all views.", response = ViewResponse.class, responseContainer = "List")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter view details", defaultValue = "ViewInfo/*", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "sortBy", value = "Sort users (asc | desc)", defaultValue = "ViewInfo/view_name.asc", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
+    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation", response = ViewResponse.class, responseContainer = "List")}
+  )
+  public Response getViews(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
+    return handleRequest(headers, body, ui, Request.Type.GET, createViewResource(null));
+  }
+
+  /**
+   * Handles: GET /views/{viewID}
+   * Get a specific view.
+   *
+   * @param headers    http headers
+   * @param ui         uri info
+   * @param viewName   view id
+   *
+   * @return view instance representation
+   */
+  @GET
+  @Path("{viewName}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Get single view", notes = "Returns view details.", response = ViewResponse.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter view details", defaultValue = "ViewInfo", dataType = "string", paramType = "query")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation", response = ViewResponse.class)}
+  )
+  public Response getView(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                          @ApiParam(value = "view name", required = true) @PathParam("viewName") String viewName) {
+
+    return handleRequest(headers, body, ui, Request.Type.GET, createViewResource(viewName));
+  }
+
+
+  /**
+   * Handles: POST /views/{viewID}
+   * Create a specific view.
+   *
+   * @param headers    http headers
+   * @param ui         uri info
+   * @param viewName   view id
+   *
+   * @return information regarding the created view
+   */
+  @POST
+  @Path("{viewName}")
+  @Produces("text/plain")
+  public Response createView(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                                @PathParam("viewName") String viewName) {
+
+    return handleRequest(headers, body, ui, Request.Type.POST, createViewResource(viewName));
+  }
+
+  /**
+   * Handles: PUT /views/{viewID}
+   * Update a specific view.
+   *
+   * @param headers   http headers
+   * @param ui        uri info
+   * @param viewName  view id
+   *
+   * @return information regarding the updated view
+   */
+  @PUT
+  @Path("{viewName}")
+  @Produces("text/plain")
+  public Response updateView(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                             @ApiParam(value = "view name", required = true) @PathParam("viewName") String viewName) {
+
+    return handleRequest(headers, body, ui, Request.Type.PUT, createViewResource(viewName));
+  }
+
+  /**
+   * Handles: DELETE /views/{viewID}
+   * Delete a specific view.
+   *
+   * @param headers   http headers
+   * @param ui        uri info
+   * @param viewName  view id
+   *
+   * @return information regarding the deleted view
+   */
+  @DELETE
+  @Path("{viewName}")
+  @Produces("text/plain")
+  public Response deleteView(@Context HttpHeaders headers, @Context UriInfo ui,
+                             @ApiParam(value = "view name", required = true) @PathParam("viewName") String viewName) {
+
+    return handleRequest(headers, null, ui, Request.Type.DELETE, createViewResource(viewName));
+  }
+
+
+  // ----- helper methods ----------------------------------------------------
+
+  /**
+   * Create a view resource.
+   *
+   * @param viewName view name
+   *
+   * @return a view resource instance
+   */
+  private ResourceInstance createViewResource(String viewName) {
+    return createResource(Resource.Type.View,
+        Collections.singletonMap(Resource.Type.View, viewName));
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewSubResourceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewSubResourceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewSubResourceService.java
new file mode 100644
index 0000000..081d699
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewSubResourceService.java
@@ -0,0 +1,136 @@
+/**
+ * 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.views;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.api.services.BaseService;
+import org.apache.ambari.server.api.services.Request;
+import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.ambari.server.orm.entities.ViewEntity;
+import org.apache.ambari.server.orm.entities.ViewInstanceEntity;
+import org.apache.ambari.view.ViewResourceHandler;
+
+/**
+ * View sub-resource service.
+ */
+public class ViewSubResourceService extends BaseService implements ViewResourceHandler {
+  /**
+   * The type of the sub-resource.
+   */
+  private final Resource.Type type;
+
+  /**
+   * The associated view name.
+   */
+  private final String viewName;
+
+  /**
+   * The view version.
+   */
+  private final String version;
+
+  /**
+   * The associated view instance name.
+   */
+  private final String instanceName;
+
+
+  // ----- Constructors ------------------------------------------------------
+
+  /**
+   * Construct a view sub-resource service.
+   */
+  public ViewSubResourceService(Resource.Type type, ViewInstanceEntity viewInstanceDefinition) {
+    ViewEntity viewEntity = viewInstanceDefinition.getViewEntity();
+
+    this.type         = type;
+    this.viewName     = viewEntity.getCommonName();
+    this.version      = viewEntity.getVersion();
+    this.instanceName = viewInstanceDefinition.getName();
+  }
+
+
+  // ----- ViewResourceHandler -----------------------------------------------
+
+  @Override
+  public Response handleRequest(HttpHeaders headers, UriInfo ui,
+                                RequestType requestType, MediaType mediaType,
+                                String resourceId) {
+    return handleRequest(headers, null, ui, getRequestType(requestType),
+        getMediaType(mediaType), createResource(resourceId));
+  }
+
+  @Override
+  public Response handleRequest(HttpHeaders headers, UriInfo ui, String resourceId) {
+    return handleRequest(headers, null, ui, Request.Type.GET,
+        createResource(resourceId));
+  }
+
+
+  // ----- helper methods ----------------------------------------------------
+
+  // create a resource with the given id
+  protected ResourceInstance createResource(String resourceId) {
+    Map<Resource.Type,String> mapIds = new HashMap<Resource.Type,String>();
+
+    mapIds.put(Resource.Type.View, viewName);
+    mapIds.put(Resource.Type.ViewVersion, version);
+    mapIds.put(Resource.Type.ViewInstance, instanceName);
+
+    if (resourceId != null) {
+      mapIds.put(type, resourceId);
+    }
+    return super.createResource(type, mapIds);
+  }
+
+  // get the internal request type from the view API request type
+  private Request.Type getRequestType(RequestType type) {
+    switch (type) {
+      case GET:
+        return Request.Type.GET;
+      case POST:
+        return Request.Type.POST;
+      case PUT:
+        return Request.Type.PUT;
+      case DELETE:
+        return Request.Type.DELETE;
+      case QUERY_POST:
+        return Request.Type.QUERY_POST;
+    }
+    throw new IllegalArgumentException("Unknown resource type " + type);
+  }
+
+  // get the JAX-RS media type from the view media type
+  private javax.ws.rs.core.MediaType getMediaType(MediaType type) {
+    switch (type) {
+      case TEXT_PLAIN:
+        return javax.ws.rs.core.MediaType.TEXT_PLAIN_TYPE;
+      case APPLICATION_JSON:
+        return javax.ws.rs.core.MediaType.APPLICATION_JSON_TYPE;
+    }
+    throw new IllegalArgumentException("Unknown media type " + type);
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewVersionService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewVersionService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewVersionService.java
new file mode 100644
index 0000000..ed6ddb1
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/views/ViewVersionService.java
@@ -0,0 +1,208 @@
+/**
+ * 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.views;
+
+import java.util.HashMap;
+import java.util.Map;
+
+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 org.apache.ambari.server.api.resources.ResourceInstance;
+import org.apache.ambari.server.api.services.BaseService;
+import org.apache.ambari.server.api.services.Request;
+import org.apache.ambari.server.controller.ViewVersionResponse;
+import org.apache.ambari.server.controller.spi.Resource;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
+
+
+/**
+ * Service responsible for view version resource requests.
+ */
+@Path("/views/{viewName}/versions")
+@Api(value = "Views", description = "Endpoint for view specific operations")
+public class ViewVersionService extends BaseService {
+
+  /**
+   * Handles: GET  /views/{viewName}/versions
+   * Get all views versions.
+   *
+   * @param headers  http headers
+   * @param ui       uri info
+   * @param viewName   view id
+   *
+   * @return view collection resource representation
+   */
+  @GET
+  @Produces("text/plain")
+  @ApiOperation(value = "Get all versions for a view", notes = "Returns details of all versions for a view.", response = ViewVersionResponse.class, responseContainer = "List")
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter view version details", defaultValue = "ViewVersionInfo/*", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "sortBy", value = "Sort users (asc | desc)", defaultValue = "ViewVersionInfo/version.desc", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "page_size", value = "The number of resources to be returned for the paged response.", defaultValue = "10", dataType = "integer", paramType = "query"),
+    @ApiImplicitParam(name = "from", value = "The starting page resource (inclusive). Valid values are :offset | \"start\"", defaultValue = "0", dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = "to", value = "The ending page resource (inclusive). Valid values are :offset | \"end\"", dataType = "string", paramType = "query")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation", response = ViewVersionResponse.class, responseContainer = "List")}
+  )
+  public Response getVersions(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                              @ApiParam(value = "view name") @PathParam("viewName") String viewName) {
+
+    return handleRequest(headers, body, ui, Request.Type.GET, createResource(viewName, null));
+  }
+
+
+  /**
+   * Handles: GET /views/{viewName}/versions/{version}
+   * Get a specific view version.
+   *
+   * @param headers  http headers
+   * @param ui       uri info
+   * @param viewName   view id
+   * @param version  version id
+   *
+   * @return view instance representation
+   */
+  @GET
+  @Path("{version}")
+  @Produces("text/plain")
+  @ApiOperation(value = "Get single view version", notes = "Returns view details.", response = ViewVersionResponse.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = "fields", value = "Filter view details", defaultValue = "ViewVersionInfo", dataType = "string", paramType = "query")
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = 200, message = "Successful operation", response = ViewVersionResponse.class)}
+  )
+  public Response getVersions(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                              @ApiParam(value = "view name") @PathParam("viewName") String viewName,
+                              @PathParam("version") String version) {
+
+    return handleRequest(headers, body, ui, Request.Type.GET, createResource(viewName, version));
+  }
+
+  /**
+   * Handles: POST /views/{viewName}/versions/{version}
+   * Create a specific view version.
+   *
+   * @param headers    http headers
+   * @param ui         uri info
+   * @param viewName   view id
+   * @param version    the version
+   *
+   * @return information regarding the created view
+   */
+  @POST
+  @Path("{version}")
+  @Produces("text/plain")
+  public Response createVersions(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                                 @ApiParam(value = "view name") @PathParam("viewName") String viewName,
+                                 @PathParam("version") String version) {
+
+    return handleRequest(headers, body, ui, Request.Type.POST, createResource(viewName, version));
+  }
+
+  /**
+   * Handles: PUT /views/{viewName}/versions/{version}
+   * Update a specific view version.
+   *
+   * @param headers   http headers
+   * @param ui        uri info
+   * @param viewName  view id
+   * @param version   the version
+   *
+   * @return information regarding the updated view
+   */
+  @PUT
+  @Path("{version}")
+  @Produces("text/plain")
+  public Response updateVersions(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+                                 @ApiParam(value = "view name") @PathParam("viewName") String viewName,
+                                 @PathParam("version") String version) {
+
+    return handleRequest(headers, body, ui, Request.Type.PUT, createResource(viewName, version));
+  }
+
+  /**
+   * Handles: DELETE /views/{viewName}/versions/{version}
+   * Delete a specific view version.
+   *
+   * @param headers   http headers
+   * @param ui        uri info
+   * @param viewName   view id
+   * @param version   version id
+   *
+   * @return information regarding the deleted view version
+   */
+  @DELETE
+  @Path("{version}")
+  @Produces("text/plain")
+  public Response deleteVersions(@Context HttpHeaders headers, @Context UriInfo ui,
+                                 @PathParam("viewName") String viewName, @PathParam("version") String version) {
+
+    return handleRequest(headers, null, ui, Request.Type.DELETE, createResource(viewName, version));
+  }
+
+
+  /**
+   * Get the permissions sub-resource
+   *
+   * @param version  the version
+   *
+   * @return the permission service
+
+  @Path("{version}/permissions")
+  public ViewPermissionService getPermissionHandler(@PathParam("version") String version) {
+
+    return new ViewPermissionService(viewName, version);
+  }
+
+
+  // ----- helper methods ----------------------------------------------------
+
+  /**
+   * Create a view resource.
+   *
+   * @param viewName view name
+   *
+   * @return a view resource instance
+   */
+  private ResourceInstance createResource(String viewName, String version) {
+    Map<Resource.Type,String> mapIds = new HashMap<Resource.Type, String>();
+    mapIds.put(Resource.Type.View, viewName);
+    mapIds.put(Resource.Type.ViewVersion, version);
+    return createResource(Resource.Type.ViewVersion, mapIds);
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/ActiveWidgetLayoutRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ActiveWidgetLayoutRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ActiveWidgetLayoutRequest.java
new file mode 100644
index 0000000..b137abd
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ActiveWidgetLayoutRequest.java
@@ -0,0 +1,66 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import java.util.List;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.ambari.server.api.services.users.ActiveWidgetLayoutService;
+
+import io.swagger.annotations.ApiModelProperty;
+
+
+/**
+ * Wrapper class for request body schema of {@link ActiveWidgetLayoutService#updateServices(String, HttpHeaders, UriInfo, String)}
+ */
+public class ActiveWidgetLayoutRequest implements ApiModel {
+   private List<WidgetLayoutIdWrapper> widgetLayouts;
+
+  /**
+   * Returns all widget layouts
+   * @return widget layouts
+   */
+  @ApiModelProperty(name = "WidgetLayouts")
+  public List<WidgetLayoutIdWrapper> getWidgetLayouts() {
+    return widgetLayouts;
+  }
+
+  private class WidgetLayoutIdWrapper {
+    private Long id;
+
+    /**
+     * Returns widget layout id
+     * @return {@link #id}
+     */
+    public Long getId() {
+      return id;
+    }
+
+    /**
+     * Sets widget layout id
+     * @param id
+     */
+    public void setId(Long id) {
+      this.id = id;
+    }
+
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/ActiveWidgetLayoutResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ActiveWidgetLayoutResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ActiveWidgetLayoutResponse.java
new file mode 100644
index 0000000..c18b55a
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ActiveWidgetLayoutResponse.java
@@ -0,0 +1,142 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import java.util.HashMap;
+import java.util.List;
+
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.ambari.server.api.services.users.ActiveWidgetLayoutService;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response schema for endpoint {@link ActiveWidgetLayoutService#getServices(String, HttpHeaders, UriInfo, String)}
+ */
+public class ActiveWidgetLayoutResponse implements ApiModel {
+
+  private final Long id;
+  private final String clusterName;
+  private final String displayName;
+  private final String layoutName;
+  private final String scope;
+  private final String sectionName;
+  private final String userName;
+  private List<HashMap<String, WidgetResponse>> widgets;
+
+  /**
+   *
+   * @param id
+   * @param clusterName   cluster name
+   * @param displayName   display name
+   * @param layoutName    layout name
+   * @param sectionName   section name
+   * @param scope         scope
+   * @param userName      user name
+   * @param widgets       widgets
+   */
+  public ActiveWidgetLayoutResponse(Long id, String clusterName, String displayName, String layoutName, String sectionName, String scope, String userName, List<HashMap<String, WidgetResponse>> widgets) {
+    this.id = id;
+    this.clusterName = clusterName;
+    this.displayName = displayName;
+    this.layoutName = layoutName;
+    this.sectionName = sectionName;
+    this.scope = scope;
+    this.userName = userName;
+    this.widgets = widgets;
+  }
+
+  /**
+   * Returns id for the widget layout
+   * @return widget layout id
+   */
+  @ApiModelProperty(name = "WidgetLayoutInfo/id", hidden=true)
+  public Long getId() {
+    return id;
+  }
+
+  /**
+   * Returns cluster name for the widget layout
+   * @return cluster name
+   */
+  @ApiModelProperty(name = "WidgetLayoutInfo/cluster_name")
+  public String getClusterName() {
+    return clusterName;
+  }
+
+  /**
+   * Returns display name for the widget layout
+   * @return  display name
+   */
+  @ApiModelProperty(name = "WidgetLayoutInfo/display_name")
+  public String getDisplayName() {
+    return displayName;
+  }
+
+  /**
+   * Returns layout name
+   * @return  layout name
+   */
+  @ApiModelProperty(name = "WidgetLayoutInfo/layout_name")
+  public String getLayoutName() {
+    return layoutName;
+  }
+
+  /**
+   * Returns scope
+   * @return scope
+   */
+  @ApiModelProperty(name = "WidgetLayoutInfo/scope")
+  public String getScope() {
+    return scope;
+  }
+
+  /**
+   * Returns section name
+   * @return section name
+   */
+  @ApiModelProperty(name = "WidgetLayoutInfo/section_name")
+  public String getSectionName() {
+    return sectionName;
+  }
+
+  /**
+   * Returns user name
+   * @return user name
+   */
+  @ApiModelProperty(name = "WidgetLayoutInfo/user_name")
+  public String getUserName() {
+    return userName;
+  }
+
+  /**
+   * Returns widgets of the layout
+   * @return  widgets
+   */
+  @ApiModelProperty(name = "WidgetLayoutInfo/widgets")
+  public List<HashMap<String, WidgetResponse>> getWidgets() {
+    return widgets;
+  }
+
+  public void setWidgets(List<HashMap<String, WidgetResponse>> widgets) {
+    this.widgets = widgets;
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-server/src/main/java/org/apache/ambari/server/controller/ApiModel.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ApiModel.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ApiModel.java
new file mode 100644
index 0000000..ffca19e
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ApiModel.java
@@ -0,0 +1,28 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import org.apache.ambari.server.controller.internal.BaseProvider;
+
+/**
+ * inherits from swagger {@link ApiModel}
+ * This should be a return type for getResponse method in {@link BaseProvider}
+ */
+@io.swagger.annotations.ApiModel
+public interface ApiModel {
+}


[34/49] ambari git commit: AMBARI-20970. Integrate StackService resource with swagger (Balazs Bence Sari via adoroszlai)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/controller/ExtensionLinkResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ExtensionLinkResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ExtensionLinkResponse.java
index 99c9ce9..c4f3941 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ExtensionLinkResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ExtensionLinkResponse.java
@@ -24,80 +24,32 @@ import java.util.Set;
 
 import org.apache.ambari.server.stack.Validable;
 
+import io.swagger.annotations.ApiModelProperty;
+
 /**
  * An extension version is like a stack version but it contains custom services.  Linking an extension
  * version to the current stack version allows the cluster to install the custom services contained in
  * the extension version.
  */
-public class ExtensionLinkResponse implements Validable {
-
-  private String linkId;
-
-  private String stackName;
-
-  private String stackVersion;
-
-  private String extensionName;
-
-  private String extensionVersion;
+public class ExtensionLinkResponse implements Validable, ApiModel {
 
+  private ExtensionLinkResponseInfo extensionLinkResponseInfo;
   private boolean valid;
-
   private Set<String> errorSet = new HashSet<>();
 
   public ExtensionLinkResponse(String linkId, String stackName, String stackVersion, String extensionName,
-                              String extensionVersion, boolean valid, Collection<String> errorSet) {
-
-    setLinkId(linkId);
-    setStackName(stackName);
-    setStackVersion(stackVersion);
-    setExtensionName(extensionName);
-    setExtensionVersion(extensionVersion);
-    setValid(valid);
-    addErrors(errorSet);
-  }
-
-  public String getLinkId() {
-    return linkId;
-  }
-
-  public void setLinkId(String linkId) {
-    this.linkId = linkId;
-  }
-
-  public String getStackName() {
-    return stackName;
-  }
-
-  public void setStackName(String stackName) {
-    this.stackName = stackName;
-  }
-
-  public String getStackVersion() {
-    return stackVersion;
-  }
-
-  public void setStackVersion(String stackVersion) {
-    this.stackVersion = stackVersion;
-  }
-
-  public String getExtensionName() {
-    return extensionName;
+                               String extensionVersion, boolean valid, Collection<String> errorSet) {
+    extensionLinkResponseInfo = new ExtensionLinkResponseInfo(linkId, stackName, stackVersion, extensionName,
+        extensionVersion, valid, errorSet);
   }
 
-  public void setExtensionName(String extensionName) {
-    this.extensionName = extensionName;
-  }
-
-  public String getExtensionVersion() {
-    return extensionVersion;
-  }
-
-  public void setExtensionVersion(String extensionVersion) {
-    this.extensionVersion = extensionVersion;
+  @ApiModelProperty(name = "ExtensionLink")
+  public ExtensionLinkResponseInfo getExtensionLinkResponseInfo() {
+    return extensionLinkResponseInfo;
   }
 
   @Override
+  @ApiModelProperty(hidden = true)
   public boolean isValid() {
     return valid;
   }
@@ -113,6 +65,7 @@ public class ExtensionLinkResponse implements Validable {
   }
 
   @Override
+  @ApiModelProperty(hidden = true)
   public Collection<String> getErrors() {
     return errorSet;
   }
@@ -121,4 +74,70 @@ public class ExtensionLinkResponse implements Validable {
   public void addErrors(Collection<String> errors) {
     this.errorSet.addAll(errors);
   }
+
+  public class ExtensionLinkResponseInfo {
+    public ExtensionLinkResponseInfo(String linkId, String stackName, String stackVersion, String extensionName,
+                                 String extensionVersion, boolean valid, Collection<String> errorSet) {
+
+      setLinkId(linkId);
+      setStackName(stackName);
+      setStackVersion(stackVersion);
+      setExtensionName(extensionName);
+      setExtensionVersion(extensionVersion);
+      setValid(valid);
+      addErrors(errorSet);
+    }
+
+    private String linkId;
+    private String stackName;
+    private String stackVersion;
+    private String extensionName;
+    private String extensionVersion;
+
+    @ApiModelProperty(name = "link_id")
+    public String getLinkId() {
+      return linkId;
+    }
+
+    public void setLinkId(String linkId) {
+      this.linkId = linkId;
+    }
+
+    @ApiModelProperty(name = "stack_name")
+    public String getStackName() {
+      return stackName;
+    }
+
+    public void setStackName(String stackName) {
+      this.stackName = stackName;
+    }
+
+    @ApiModelProperty(name = "stack_version")
+    public String getStackVersion() {
+      return stackVersion;
+    }
+
+    public void setStackVersion(String stackVersion) {
+      this.stackVersion = stackVersion;
+    }
+
+    @ApiModelProperty(name = "extension_name")
+    public String getExtensionName() {
+      return extensionName;
+    }
+
+    public void setExtensionName(String extensionName) {
+      this.extensionName = extensionName;
+    }
+
+    @ApiModelProperty(name = "extension_version")
+    public String getExtensionVersion() {
+      return extensionVersion;
+    }
+
+    public void setExtensionVersion(String extensionVersion) {
+      this.extensionVersion = extensionVersion;
+    }
+
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/controller/QuickLinksResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/QuickLinksResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/QuickLinksResponse.java
new file mode 100644
index 0000000..c5eb4fd
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/QuickLinksResponse.java
@@ -0,0 +1,56 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import org.apache.ambari.server.state.quicklinks.QuickLinksConfiguration;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response schema for endpoint {@link org.apache.ambari.server.api.services.StacksService#getStackServiceQuickLinksConfiguration(
+ *          String, javax.ws.rs.core.HttpHeaders, javax.ws.rs.core.UriInfo, String, String, String, String)}
+
+ * The interface is not actually implemented, it only carries swagger annotations.
+ */
+public interface QuickLinksResponse extends ApiModel {
+
+  @ApiModelProperty(name = "QuickLinkInfo")
+  public QuickLinksResponseInfo getQuickLinksResponseInfo();
+
+  public interface QuickLinksResponseInfo {
+    @ApiModelProperty(name = "file_name")
+    String getFileName();
+
+    @ApiModelProperty(name = "service_name")
+    String getServiceName();
+
+    @ApiModelProperty(name = "stack_name")
+    String getStackName();
+
+    @ApiModelProperty(name = "stack_version")
+    String getStackVersion();
+
+    @ApiModelProperty(name = "default")
+    boolean isDefault();
+
+    @ApiModelProperty(name = "quicklink_data")
+    QuickLinksConfiguration getQuickLinkData();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/controller/StackArtifactResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackArtifactResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackArtifactResponse.java
new file mode 100644
index 0000000..279798e
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackArtifactResponse.java
@@ -0,0 +1,52 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import java.util.Map;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response schema for endpoint {@link org.apache.ambari.server.api.services.StacksService#getStackArtifact}
+ *
+ * The interface is not actually implemented, it only carries swagger annotations.
+ */
+public interface StackArtifactResponse extends ApiModel {
+
+  @ApiModelProperty(name = "Artifacts")
+  Artifacts getArtifacts();
+
+  @ApiModelProperty(name = "artifact_data")
+  Map<String, Object> getArtifactData();
+
+  interface Artifacts {
+    @ApiModelProperty(name = "artifact_name")
+    String getArtifactName();
+
+    @ApiModelProperty(name = "service_name")
+    String getServiceName();
+
+    @ApiModelProperty(name = "stack_name")
+    String getStackName();
+
+    @ApiModelProperty(name = "stack_version")
+    String getStackVersion();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/controller/StackConfigurationDependencyResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackConfigurationDependencyResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackConfigurationDependencyResponse.java
index 14aab3b..7bea5e2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackConfigurationDependencyResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackConfigurationDependencyResponse.java
@@ -19,6 +19,8 @@
 package org.apache.ambari.server.controller;
 
 
+import io.swagger.annotations.ApiModelProperty;
+
 public class StackConfigurationDependencyResponse {
 
   private String stackName;
@@ -40,6 +42,7 @@ public class StackConfigurationDependencyResponse {
     this.dependencyType = dependencyType;
   }
 
+  @ApiModelProperty(name = "stack_name")
   public String getStackName() {
     return stackName;
   }
@@ -48,6 +51,7 @@ public class StackConfigurationDependencyResponse {
     this.stackName = stackName;
   }
 
+  @ApiModelProperty(name = "stack_version")
   public String getStackVersion() {
     return stackVersion;
   }
@@ -56,6 +60,7 @@ public class StackConfigurationDependencyResponse {
     this.stackVersion = stackVersion;
   }
 
+  @ApiModelProperty(name = "service_name")
   public String getServiceName() {
     return serviceName;
   }
@@ -64,6 +69,7 @@ public class StackConfigurationDependencyResponse {
     this.serviceName = serviceName;
   }
 
+  @ApiModelProperty(name = "property_name")
   public String getPropertyName() {
     return propertyName;
   }
@@ -72,6 +78,7 @@ public class StackConfigurationDependencyResponse {
     this.propertyName = propertyName;
   }
 
+  @ApiModelProperty(name = "dependency_name")
   public String getDependencyName() {
     return dependencyName;
   }
@@ -80,6 +87,7 @@ public class StackConfigurationDependencyResponse {
     this.dependencyName = dependencyName;
   }
 
+  @ApiModelProperty(name = "dependency_type")
   public String getDependencyType() {
     return dependencyType;
   }
@@ -87,4 +95,13 @@ public class StackConfigurationDependencyResponse {
   public void setDependencyType(String dependencyType) {
     this.dependencyType = dependencyType;
   }
+
+  /**
+   * Interface to help correct Swagger documentation generation
+   */
+  public interface StackConfigurationDependencyResponseSwagger extends ApiModel {
+    @ApiModelProperty(name = "StackConfigurationDependency")
+    public StackConfigurationDependencyResponse getStackConfigurationDependencyResponse();
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/controller/StackConfigurationResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackConfigurationResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackConfigurationResponse.java
index 0338ed9..7954192 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackConfigurationResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackConfigurationResponse.java
@@ -26,6 +26,9 @@ import org.apache.ambari.server.state.PropertyDependencyInfo;
 import org.apache.ambari.server.state.PropertyInfo.PropertyType;
 import org.apache.ambari.server.state.ValueAttributesInfo;
 
+import io.swagger.annotations.ApiModelProperty;
+
+
 public class StackConfigurationResponse {
 
   /**
@@ -90,6 +93,7 @@ public class StackConfigurationResponse {
   private Boolean isRequired;
   private Set<PropertyType> propertyTypes;
 
+  @ApiModelProperty(name = "stack_name")
   public String getStackName() {
     return stackName;
   }
@@ -98,6 +102,7 @@ public class StackConfigurationResponse {
     this.stackName = stackName;
   }
 
+  @ApiModelProperty(name = "stack_version")
   public String getStackVersion() {
     return stackVersion;
   }
@@ -106,6 +111,7 @@ public class StackConfigurationResponse {
     this.stackVersion = stackVersion;
   }
 
+  @ApiModelProperty(name = "service_name")
   public String getServiceName() {
     return serviceName;
   }
@@ -114,6 +120,7 @@ public class StackConfigurationResponse {
     this.serviceName = serviceName;
   }
 
+  @ApiModelProperty(name = "property_name")
   public String getPropertyName() {
     return propertyName;
   }
@@ -122,6 +129,7 @@ public class StackConfigurationResponse {
     this.propertyName = propertyName;
   }
 
+  @ApiModelProperty(name = "property_value")
   public String getPropertyValue() {
     return propertyValue;
   }
@@ -130,6 +138,7 @@ public class StackConfigurationResponse {
     this.propertyValue = propertyValue;
   }
 
+  @ApiModelProperty(name = "property_description")
   public String getPropertyDescription() {
     return propertyDescription;
   }
@@ -138,6 +147,7 @@ public class StackConfigurationResponse {
     this.propertyDescription = propertyDescription;
   }
 
+  @ApiModelProperty(name = "property_display_name")
   public String getPropertyDisplayName() {
     return propertyDisplayName;
   }
@@ -153,7 +163,8 @@ public class StackConfigurationResponse {
   public String getType() {
     return type;
   }
-  
+
+  @ApiModelProperty(name = "type")
   public void setType(String type) {
     this.type = type;
   }
@@ -163,6 +174,7 @@ public class StackConfigurationResponse {
    *
    * @return Map of attribute name to attribute value
    */
+  @ApiModelProperty(hidden = true)
   public Map<String, String> getPropertyAttributes() {
     return propertyAttributes;
   }
@@ -181,6 +193,7 @@ public class StackConfigurationResponse {
    *
    * @return value attributes
    */
+  @ApiModelProperty(name = "property_value_attributes")
   public ValueAttributesInfo getPropertyValueAttributes() {
     return propertyValueAttributes;
   }
@@ -199,6 +212,7 @@ public class StackConfigurationResponse {
    *
    * @return depends on properties set
    */
+  @ApiModelProperty(name = "dependencies")
   public Set<PropertyDependencyInfo> getDependsOnProperties() {
     return dependsOnProperties;
   }
@@ -216,6 +230,7 @@ public class StackConfigurationResponse {
    * Is property a isRequired property
    * @return True/False
    */
+  @ApiModelProperty(hidden = true)
   public Boolean isRequired() {
     return isRequired;
   }
@@ -232,6 +247,7 @@ public class StackConfigurationResponse {
    * Get type of property as set in the stack definition.
    * @return Property type.
    */
+  @ApiModelProperty(name = "property_type")
   public Set<PropertyType> getPropertyType() {
     return propertyTypes;
   }
@@ -239,4 +255,12 @@ public class StackConfigurationResponse {
   public void setPropertyType(Set<PropertyType> propertyTypes) {
     this.propertyTypes = propertyTypes;
   }
+
+  /**
+   * Interface to help correct Swagger documentation generation
+   */
+  public interface StackConfigurationResponseSwagger extends ApiModel {
+    @ApiModelProperty(name = "StackConfigurations")
+    public StackConfigurationResponse getStackConfigurationResponse();
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/controller/StackResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackResponse.java
index 1901337..56f5904 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackResponse.java
@@ -19,6 +19,8 @@
 package org.apache.ambari.server.controller;
 
 
+import io.swagger.annotations.ApiModelProperty;
+
 public class StackResponse {
 
   private String stackName;
@@ -27,6 +29,7 @@ public class StackResponse {
     setStackName(stackName);
   }
 
+  @ApiModelProperty(name = "stack_name")
   public String getStackName() {
     return stackName;
   }
@@ -54,4 +57,13 @@ public class StackResponse {
     return getStackName().equals(stackResponse.getStackName());
   }
 
+  /**
+   * Interface to help correct Swagger documentation generation
+   */
+  public interface StackResponseSwagger extends ApiModel {
+    @ApiModelProperty(name = "Stacks")
+    public StackResponse getStackResponse();
+  }
+
 }
+

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceArtifactResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceArtifactResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceArtifactResponse.java
new file mode 100644
index 0000000..0a531a7
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceArtifactResponse.java
@@ -0,0 +1,53 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import java.util.Map;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response schema for endpoint {@link org.apache.ambari.server.api.services.StacksService#getStackServiceArtifact(
+ *        String, javax.ws.rs.core.HttpHeaders, javax.ws.rs.core.UriInfo, String, String, String, String)}
+ *
+ * The interface is not actually implemented, it only carries swagger annotations.
+ */
+public interface StackServiceArtifactResponse extends ApiModel {
+
+  @ApiModelProperty(name = "Artifacts")
+  Artifacts getArtifacts();
+
+  @ApiModelProperty(name = "artifact_data")
+  Map<String, Object> getArtifactData();
+
+  interface Artifacts {
+    @ApiModelProperty(name = "artifact_name")
+    String getArtifactName();
+
+    @ApiModelProperty(name = "service_name")
+    String getServiceName();
+
+    @ApiModelProperty(name = "stack_name")
+    String getStackName();
+
+    @ApiModelProperty(name = "stack_version")
+    String getStackVersion();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceComponentResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceComponentResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceComponentResponse.java
index b48fad3..d1dea0d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceComponentResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceComponentResponse.java
@@ -27,6 +27,8 @@ import org.apache.ambari.server.state.BulkCommandDefinition;
 import org.apache.ambari.server.state.ComponentInfo;
 import org.apache.ambari.server.state.CustomCommandDefinition;
 
+import io.swagger.annotations.ApiModelProperty;
+
 /**
  * Stack service component response.
  */
@@ -197,6 +199,7 @@ public class StackServiceComponentResponse {
    *
    * @return stack name
    */
+  @ApiModelProperty(name = "stack_name")
   public String getStackName() {
     return stackName;
   }
@@ -215,6 +218,7 @@ public class StackServiceComponentResponse {
    *
    * @return stack version
    */
+  @ApiModelProperty(name = "stack_version")
   public String getStackVersion() {
     return stackVersion;
   }
@@ -233,6 +237,7 @@ public class StackServiceComponentResponse {
    *
    * @return service name
    */
+  @ApiModelProperty(name = "service_name")
   public String getServiceName() {
     return serviceName;
   }
@@ -251,6 +256,7 @@ public class StackServiceComponentResponse {
    *
    * @return component name
    */
+  @ApiModelProperty(name = "component_name")
   public String getComponentName() {
     return componentName;
   }
@@ -270,6 +276,7 @@ public class StackServiceComponentResponse {
    * @return component display name
    */
 
+  @ApiModelProperty(name = "display_name")
   public String getComponentDisplayName() {
     return componentDisplayName;
   }
@@ -288,6 +295,7 @@ public class StackServiceComponentResponse {
    *
    * @return component category
    */
+  @ApiModelProperty(name = "component_category")
   public String getComponentCategory() {
     return componentCategory;
   }
@@ -306,6 +314,7 @@ public class StackServiceComponentResponse {
    *
    * @return whether the component is a client component
    */
+  @ApiModelProperty(name = "is_client")
   public boolean isClient() {
     return isClient;
   }
@@ -324,6 +333,7 @@ public class StackServiceComponentResponse {
    *
    * @return whether the component is a master component
    */
+  @ApiModelProperty(name = "is_master")
   public boolean isMaster() {
     return isMaster;
   }
@@ -342,6 +352,7 @@ public class StackServiceComponentResponse {
    *
    * @return component cardinality requirement
    */
+  @ApiModelProperty(name = "cardinality")
   public String getCardinality() {
     return cardinality;
   }
@@ -361,6 +372,7 @@ public class StackServiceComponentResponse {
    *
    * @return Whether the components needs to advertise a version
    */
+  @ApiModelProperty(name = "advertise_version")
   public boolean isVersionAdvertised() {
     return versionAdvertised;
   }
@@ -379,6 +391,7 @@ public class StackServiceComponentResponse {
    *
    * @return Whether the components can be decommissioned
    */
+  @ApiModelProperty(name = "decommission_allowed")
   public boolean isDecommissionAlllowed() {
     if (decommissionAllowed != null && decommissionAllowed.equals("true")) {
       return true;
@@ -401,6 +414,7 @@ public class StackServiceComponentResponse {
    *
    * @return Whether the components can be reassigned
    */
+  @ApiModelProperty(name = "reassign_allowed")
   public boolean isReassignAlllowed() {
     if (reassignAllowed != null && reassignAllowed.equals("true")) {
       return true;
@@ -423,6 +437,7 @@ public class StackServiceComponentResponse {
    *
    * @return True or false.
    */
+  @ApiModelProperty(name = "recovery_enabled")
   public boolean isRecoveryEnabled() {
     return recoveryEnabled;
   }
@@ -442,6 +457,7 @@ public class StackServiceComponentResponse {
    *
    * @return auto deploy information
    */
+  @ApiModelProperty(hidden = true)
   public AutoDeployInfo getAutoDeploy() {
     return autoDeploy;
   }
@@ -460,10 +476,12 @@ public class StackServiceComponentResponse {
    *
    * @return the commands or an empty list (never {@code null}).
    */
+  @ApiModelProperty(name = "custom_commands")
   public List<String> getCustomCommands() {
     return customCommands;
   }
 
+  @ApiModelProperty(name = "has_bulk_commands_definition")
   public boolean hasBulkCommands(){
     return hasBulkCommands;
   }
@@ -472,7 +490,16 @@ public class StackServiceComponentResponse {
     return bulkCommandsDisplayName == null ? "":bulkCommandsDisplayName;
   }
 
+  @ApiModelProperty(name = "bulk_commands_master_component_namen")
   public String getBulkCommandsMasterComponentName(){
     return bulkCommandMasterComponentName == null ? "":bulkCommandMasterComponentName;
   }
+
+  /**
+   * Interface to help correct Swagger documentation generation
+   */
+  public interface StackServiceComponentResponseSwagger extends ApiModel {
+    @ApiModelProperty(name = "StackServiceComponents")
+    public StackServiceComponentResponse getStackServiceComponentResponse();
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceResponse.java
index 8e4200d..c3e10d9 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackServiceResponse.java
@@ -28,6 +28,8 @@ import java.util.Set;
 import org.apache.ambari.server.state.CustomCommandDefinition;
 import org.apache.ambari.server.state.ServiceInfo;
 
+import io.swagger.annotations.ApiModelProperty;
+
 public class StackServiceResponse {
 
   private String stackName;
@@ -108,16 +110,13 @@ public class StackServiceResponse {
     }
 
     kerberosDescriptorFile = service.getKerberosDescriptorFile();
-
     serviceProperties = service.getServiceProperties();
-
     credentialStoreSupported = service.isCredentialStoreSupported();
-
     credentialStoreEnabled = service.isCredentialStoreEnabled();
-
     isSupportDeleteViaUI = service.isSupportDeleteViaUI();
   }
 
+  @ApiModelProperty(name = "selection")
   public ServiceInfo.Selection getSelection() {
     return selection;
   }
@@ -126,6 +125,7 @@ public class StackServiceResponse {
     this.selection = selection;
   }
 
+  @ApiModelProperty(name = "stack_name")
   public String getStackName() {
     return stackName;
   }
@@ -134,6 +134,7 @@ public class StackServiceResponse {
     this.stackName = stackName;
   }
 
+  @ApiModelProperty(name = "stack_version")
   public String getStackVersion() {
     return stackVersion;
   }
@@ -142,6 +143,7 @@ public class StackServiceResponse {
     this.stackVersion = stackVersion;
   }
 
+  @ApiModelProperty(name = "service_name")
   public String getServiceName() {
     return serviceName;
   }
@@ -150,6 +152,7 @@ public class StackServiceResponse {
     this.serviceName = serviceName;
   }
 
+  @ApiModelProperty(name = "service_type")
   public String getServiceType() {
     return serviceType;
   }
@@ -158,6 +161,7 @@ public class StackServiceResponse {
     this.serviceType = serviceType;
   }
 
+  @ApiModelProperty(name = "display_name")
   public String getServiceDisplayName() {
     return serviceDisplayName;
   }
@@ -166,6 +170,7 @@ public class StackServiceResponse {
     this.serviceDisplayName = serviceDisplayName;
   }
 
+  @ApiModelProperty(name = "user_name")
   public String getUserName() {
     return userName;
   }
@@ -174,6 +179,7 @@ public class StackServiceResponse {
     this.userName = userName;
   }
 
+  @ApiModelProperty(name = "comments")
   public String getComments() {
     return comments;
   }
@@ -182,6 +188,7 @@ public class StackServiceResponse {
     this.comments = comments;
   }
 
+  @ApiModelProperty(name = "service_version")
   public String getServiceVersion() {
     return serviceVersion;
   }
@@ -190,14 +197,17 @@ public class StackServiceResponse {
     this.serviceVersion = serviceVersion;
   }
 
+  @ApiModelProperty(name = "config_types")
   public Map<String, Map<String, Map<String, String>>> getConfigTypes() {
     return configTypes;
   }
 
+  @ApiModelProperty(hidden = true)
   public Set<String> getExcludedConfigTypes() {
     return excludedConfigTypes;
   }
 
+  @ApiModelProperty(name = "required_services")
   public List<String> getRequiredServices() {
     return requiredServices;
   }
@@ -212,6 +222,7 @@ public class StackServiceResponse {
    * @return a File pointing to the service-level Kerberos descriptor, or null if no relevant file is
    * available
    */
+  @ApiModelProperty(hidden =  true)
   public File getKerberosDescriptorFile() {
     return kerberosDescriptorFile;
   }
@@ -235,6 +246,7 @@ public class StackServiceResponse {
    *         {@code false} otherwise.
    *
    */
+  @ApiModelProperty(name = "service_check_supported")
   public boolean isServiceCheckSupported() {
     return serviceCheckSupported;
   }
@@ -244,6 +256,7 @@ public class StackServiceResponse {
    *
    * @return the commands or an empty list (never {@code null}).
    */
+  @ApiModelProperty(name = "custom_commands")
   public List<String> getCustomCommands() {
     return customCommands;
   }
@@ -252,6 +265,7 @@ public class StackServiceResponse {
    * Get the service properties of this service.
    * @return the properties or an empty map (never {@code null}).
    */
+  @ApiModelProperty(name = "properties")
   public Map<String, String> getServiceProperties() {
     return serviceProperties;
   }
@@ -261,6 +275,7 @@ public class StackServiceResponse {
    *
    * @return true or false.
    */
+  @ApiModelProperty(name = "credential_store_supported")
   public boolean isCredentialStoreSupported() {
     return credentialStoreSupported;
   }
@@ -279,6 +294,7 @@ public class StackServiceResponse {
    *
    * @return true or false
    */
+  @ApiModelProperty(name = "credential_store_enabled")
   public boolean isCredentialStoreEnabled() {
     return credentialStoreEnabled;
   }
@@ -297,6 +313,7 @@ public class StackServiceResponse {
    *
    * @return true or false
    */
+  @ApiModelProperty(name = "credential_store_required")
   public boolean isCredentialStoreRequired() {
     return credentialStoreRequired;
   }
@@ -310,7 +327,13 @@ public class StackServiceResponse {
     this.credentialStoreRequired = credentialStoreRequired;
   }
 
+  @ApiModelProperty(hidden = true)
   public boolean isSupportDeleteViaUI(){
     return isSupportDeleteViaUI;
   }
+
+  public interface StackServiceResponseSwagger extends ApiModel {
+    @ApiModelProperty(name = "StackServices")
+    public StackServiceResponse getStackServiceResponse();
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/controller/StackVersionResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackVersionResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackVersionResponse.java
index 3c65d05..584944e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/StackVersionResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/StackVersionResponse.java
@@ -27,28 +27,12 @@ import java.util.Set;
 
 import org.apache.ambari.server.stack.Validable;
 
+import io.swagger.annotations.ApiModelProperty;
 
 public class StackVersionResponse implements Validable{
 
   private String minJdk;
   private String maxJdk;
-
-  public String getMinJdk() {
-    return minJdk;
-  }
-
-  public void setMinJdk(String minJdk) {
-    this.minJdk = minJdk;
-  }
-
-  public String getMaxJdk() {
-    return maxJdk;
-  }
-
-  public void setMaxJdk(String maxJdk) {
-    this.maxJdk = maxJdk;
-  }
-
   private String stackName;
   private String stackVersion;
   private String minUpgradeVersion;
@@ -93,6 +77,7 @@ public class StackVersionResponse implements Validable{
   }
 
   @Override
+  @ApiModelProperty(name = "valid")
   public boolean isValid() {
     return valid;
   }
@@ -110,6 +95,7 @@ public class StackVersionResponse implements Validable{
   }
 
   @Override
+  @ApiModelProperty(name = "stack-errors")
   public Collection<String> getErrors() {
     return errorSet;
   }   
@@ -117,8 +103,25 @@ public class StackVersionResponse implements Validable{
   @Override
   public void addErrors(Collection<String> errors) {
     this.errorSet.addAll(errors);
-  }  
-  
+  }
+
+  @ApiModelProperty(name = "min_jdk")
+  public String getMinJdk() { return minJdk; }
+
+  public void setMinJdk(String minJdk) {
+    this.minJdk = minJdk;
+  }
+
+  @ApiModelProperty(name = "max_jdk")
+  public String getMaxJdk() {
+    return maxJdk;
+  }
+
+  public void setMaxJdk(String maxJdk) {
+    this.maxJdk = maxJdk;
+  }
+
+  @ApiModelProperty(name = "stack_name")
   public String getStackName() {
     return stackName;
   }
@@ -127,6 +130,7 @@ public class StackVersionResponse implements Validable{
     this.stackName = stackName;
   }
 
+  @ApiModelProperty(name = "stack_version")
   public String getStackVersion() {
     return stackVersion;
   }
@@ -135,6 +139,7 @@ public class StackVersionResponse implements Validable{
     this.stackVersion = stackVersion;
   }
 
+  @ApiModelProperty(name = "min_upgrade_version")
   public String getMinUpgradeVersion() {
     return minUpgradeVersion;
   }
@@ -143,6 +148,7 @@ public class StackVersionResponse implements Validable{
     this.minUpgradeVersion = minUpgradeVersion;
   }
 
+  @ApiModelProperty(name = "active")
   public boolean isActive() {
     return active;
   }
@@ -151,6 +157,7 @@ public class StackVersionResponse implements Validable{
     this.active = active;
   }
 
+  @ApiModelProperty(name = "parent_stack_version")
   public String getParentVersion() {
     return parentVersion;
   }
@@ -158,6 +165,8 @@ public class StackVersionResponse implements Validable{
   public void setParentVersion(String parentVersion) {
     this.parentVersion = parentVersion;
   }
+
+  @ApiModelProperty(name = "config_types")
   public Map<String, Map<String, Map<String, String>>> getConfigTypes() {
     return configTypes;
   }
@@ -172,6 +181,7 @@ public class StackVersionResponse implements Validable{
    * @return a File pointing to the stack-level Kerberos descriptor, or null if no relevant file is
    * available
    */
+  @ApiModelProperty(hidden = true)
   public File getStackKerberosDescriptorFile() {
     return stackKerberosDescriptorFile;
   }
@@ -192,6 +202,7 @@ public class StackVersionResponse implements Validable{
    * @return a Collection of Files pointing to the stack-specific service-level Kerberos descriptor
    * files, or null if no relevant files are available
    */
+  @ApiModelProperty(hidden = true)
   public Collection<File> getServiceKerberosDescriptorFiles() {
     return serviceKerberosDescriptorFiles;
   }
@@ -216,7 +227,17 @@ public class StackVersionResponse implements Validable{
   /**
    * @return the upgrade pack names for the stack version
    */
+  @ApiModelProperty(name = "upgrade_packs")
   public Set<String> getUpgradePacks() {
     return upgradePacks;
   }
+
+
+  /**
+   * Interface to help correct Swagger documentation generation
+   */
+  public interface StackVersionResponseSwagger extends ApiModel {
+    @ApiModelProperty(name = "Versions")
+    public StackVersionResponse getStackVersionResponse();
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/controller/ThemeResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ThemeResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ThemeResponse.java
new file mode 100644
index 0000000..5822b58
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ThemeResponse.java
@@ -0,0 +1,56 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+
+import org.apache.ambari.server.state.theme.Theme;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response schema for endpoint {@link org.apache.ambari.server.api.services.StacksService#getStackService(String,
+ *                              javax.ws.rs.core.HttpHeaders, javax.ws.rs.core.UriInfo, String, String, String)}
+ */
+public interface ThemeResponse extends ApiModel {
+
+  @ApiModelProperty(name = "ThemeInfo")
+  ThemeInfoResponse getThemeInfo();
+
+
+  interface ThemeInfoResponse {
+    @ApiModelProperty(name = "default")
+    boolean isDefault();
+
+    @ApiModelProperty(name = "file_name")
+    String getFileName();
+
+    @ApiModelProperty(name = "service_name")
+    String getServiceName();
+
+    @ApiModelProperty(name = "stack_name")
+    String getStackName();
+
+    @ApiModelProperty(name = "stack_version")
+    String getStackVersion();
+
+    @ApiModelProperty(name = "theme_data")
+    Theme getThemeData();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewInstanceResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewInstanceResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewInstanceResponse.java
index d0a5206..b17d7d5 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewInstanceResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ViewInstanceResponse.java
@@ -1,4 +1,4 @@
-/**
+ /**
  * 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

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/state/QuickLinksConfigurationInfo.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/QuickLinksConfigurationInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/state/QuickLinksConfigurationInfo.java
index d4bdce8..dfcb91c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/QuickLinksConfigurationInfo.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/QuickLinksConfigurationInfo.java
@@ -24,13 +24,16 @@ import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlTransient;
 
+import org.apache.ambari.server.controller.ApiModel;
 import org.apache.ambari.server.state.quicklinks.QuickLinks;
 
+import io.swagger.annotations.ApiModelProperty;
+
 /**
  * Wrapper for quickLinksConfiguration description
  */
 @XmlAccessorType(XmlAccessType.FIELD)
-public class QuickLinksConfigurationInfo {
+public class QuickLinksConfigurationInfo implements ApiModel {
 
   private String fileName;
   @XmlElement(name = "default")
@@ -61,6 +64,7 @@ public class QuickLinksConfigurationInfo {
       '}';
   }
 
+  @ApiModelProperty(name = "file_name")
   public String getFileName() {
     return fileName;
   }
@@ -69,6 +73,7 @@ public class QuickLinksConfigurationInfo {
     this.fileName = fileName;
   }
 
+  @ApiModelProperty(name = "default")
   public Boolean getIsDefault() {
     return isDefault;
   }
@@ -77,6 +82,7 @@ public class QuickLinksConfigurationInfo {
     this.isDefault = isDefault;
   }
 
+  @ApiModelProperty(hidden = true)
   public Boolean isDeleted() {
     return deleted;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java
index 353dd86..24c2d94 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java
@@ -41,7 +41,7 @@ import com.google.common.collect.ListMultimap;
 import com.google.common.collect.Multimaps;
 import com.google.common.io.Files;
 
-public class StackInfo implements Comparable<StackInfo>, Validable{
+public class StackInfo implements Comparable<StackInfo>, Validable {
   private String minJdk;
   private String maxJdk;
   private String name;

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/state/ValueAttributesInfo.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ValueAttributesInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ValueAttributesInfo.java
index c41cd9a..f5387a0 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/ValueAttributesInfo.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ValueAttributesInfo.java
@@ -26,12 +26,29 @@ import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlElementWrapper;
 import javax.xml.bind.annotation.XmlElements;
 
+import org.apache.ambari.server.controller.ApiModel;
 import org.codehaus.jackson.annotate.JsonProperty;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
+import io.swagger.annotations.ApiModelProperty;
+
 @XmlAccessorType(XmlAccessType.FIELD)
 @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-public class ValueAttributesInfo {
+public class ValueAttributesInfo implements ApiModel {
+  public static final String EMPTY_VALUE_VALID = "empty-value-valid";
+  public static final String UI_ONLY_PROPERTY = "ui-only-property";
+  public static final String READ_ONLY = "read-only";
+  public static final String EDITABLE_ONLY_AT_INSTALL = "editable-only-at-install";
+  public static final String SHOW_PROPERTY_NAME = "show-property-name";
+  public static final String INCREMENT_STEP = "increment-step";
+  public static final String SELECTION_CARDINALITY = "selection_cardinality";
+  public static final String PROPERTY_FILE_NAME = "property-file-name";
+  public static final String PROPERTY_FILE_TYPE = "property-file-type";
+  public static final String ENTRIES = "entries";
+  public static final String HIDDEN = "hidden";
+  public static final String ENTRIES_EDITABLE = "entries_editable";
+  public static final String USER_GROUPS = "user-groups";
+  public static final String KEYSTORE = "keystore";
   private String type;
   private String maximum;
   private String minimum;
@@ -41,63 +58,64 @@ public class ValueAttributesInfo {
   private Boolean overridable;
   private String copy;
 
-  @XmlElement(name = "empty-value-valid")
-  @JsonProperty("empty_value_valid")
+  @XmlElement(name = EMPTY_VALUE_VALID)
+  @JsonProperty(EMPTY_VALUE_VALID)
   private Boolean emptyValueValid;
 
-  @XmlElement(name = "ui-only-property")
-  @JsonProperty("ui_only_property")
+  @XmlElement(name = UI_ONLY_PROPERTY)
+  @JsonProperty(UI_ONLY_PROPERTY)
   private Boolean uiOnlyProperty;
 
-  @XmlElement(name = "read-only")
-  @JsonProperty("read_only")
+  @XmlElement(name = READ_ONLY)
+  @JsonProperty(READ_ONLY)
   private Boolean readOnly;
 
-  @XmlElement(name = "editable-only-at-install")
-  @JsonProperty("editable_only_at_install")
+  @XmlElement(name = EDITABLE_ONLY_AT_INSTALL)
+  @JsonProperty(EDITABLE_ONLY_AT_INSTALL)
   private Boolean editableOnlyAtInstall;
 
-  @XmlElement(name = "show-property-name")
-  @JsonProperty("show_property_name")
+  @XmlElement(name = SHOW_PROPERTY_NAME)
+  @JsonProperty(SHOW_PROPERTY_NAME)
   private Boolean showPropertyName;
 
-  @XmlElement(name = "increment-step")
-  @JsonProperty("increment_step")
+  @XmlElement(name = INCREMENT_STEP)
+  @JsonProperty(INCREMENT_STEP)
   private String incrementStep;
 
-  @XmlElementWrapper(name = "entries")
+  @XmlElementWrapper(name = ENTRIES)
   @XmlElements(@XmlElement(name = "entry"))
   private Collection<ValueEntryInfo> entries;
 
-  @XmlElement(name = "hidden")
+  @XmlElement(name = HIDDEN)
   private String hidden;
 
-  @XmlElement(name = "entries_editable")
+  @XmlElement(name = ENTRIES_EDITABLE)
   private Boolean entriesEditable;
 
-  @XmlElement(name = "selection-cardinality")
-  @JsonProperty("selection_cardinality")
+  @XmlElement(name = SELECTION_CARDINALITY)
+  @JsonProperty(SELECTION_CARDINALITY)
   private String selectionCardinality;
 
-  @XmlElement(name = "property-file-name")
-  @JsonProperty("property-file-name")
+  @XmlElement(name = PROPERTY_FILE_NAME)
+  @JsonProperty(PROPERTY_FILE_NAME)
   private String propertyFileName;
 
-  @XmlElement(name = "property-file-type")
-  @JsonProperty("property-file-type")
+  @XmlElement(name = PROPERTY_FILE_TYPE)
+  @JsonProperty(PROPERTY_FILE_TYPE)
   private String propertyFileType;
 
-  @XmlElementWrapper(name = "user-groups")
+  @XmlElementWrapper(name = USER_GROUPS)
   @XmlElements(@XmlElement(name = "property"))
   private Collection<UserGroupInfo> userGroupEntries;
 
-  @XmlElement(name = "keystore")
+  @XmlElement(name = KEYSTORE)
   private boolean keyStore;
 
   public ValueAttributesInfo() {
 
   }
 
+  @ApiModelProperty(name = "type")
   public String getType() {
     return type;
   }
@@ -106,6 +124,7 @@ public class ValueAttributesInfo {
     this.type = type;
   }
 
+  @ApiModelProperty(name = "maximum")
   public String getMaximum() {
     return maximum;
   }
@@ -114,6 +133,7 @@ public class ValueAttributesInfo {
     this.maximum = maximum;
   }
 
+  @ApiModelProperty(name = "minimum")
   public String getMinimum() {
     return minimum;
   }
@@ -122,6 +142,7 @@ public class ValueAttributesInfo {
     this.minimum = minimum;
   }
 
+  @ApiModelProperty(name = "unit")
   public String getUnit() {
     return unit;
   }
@@ -130,6 +151,7 @@ public class ValueAttributesInfo {
     this.unit = unit;
   }
 
+  @ApiModelProperty(name = ENTRIES)
   public Collection<ValueEntryInfo> getEntries() {
     return entries;
   }
@@ -138,6 +160,7 @@ public class ValueAttributesInfo {
     this.entries = entries;
   }
 
+  @ApiModelProperty(name = "user-group-entries")
   public Collection<UserGroupInfo> getUserGroupEntries() {
     return userGroupEntries;
   }
@@ -146,6 +169,7 @@ public class ValueAttributesInfo {
     this.userGroupEntries = userGroupEntries;
   }
 
+  @ApiModelProperty(name = HIDDEN)
   public String getHidden() {
     return hidden;
   }
@@ -154,6 +178,7 @@ public class ValueAttributesInfo {
     this.hidden = hidden;
   }
 
+  @ApiModelProperty(name = ENTRIES_EDITABLE)
   public Boolean getEntriesEditable() {
     return entriesEditable;
   }
@@ -162,6 +187,7 @@ public class ValueAttributesInfo {
     this.entriesEditable = entriesEditable;
   }
 
+  @ApiModelProperty(name = SELECTION_CARDINALITY)
   public String getSelectionCardinality() {
     return selectionCardinality;
   }
@@ -170,6 +196,7 @@ public class ValueAttributesInfo {
     this.selectionCardinality = selectionCardinality;
   }
 
+  @ApiModelProperty(name = PROPERTY_FILE_NAME)
   public String getPropertyFileName() {
     return propertyFileName;
   }
@@ -178,6 +205,7 @@ public class ValueAttributesInfo {
     this.propertyFileName = propertyFileName;
   }
 
+  @ApiModelProperty(name = PROPERTY_FILE_TYPE)
   public String getPropertyFileType() {
     return propertyFileType;
   }
@@ -186,6 +214,7 @@ public class ValueAttributesInfo {
     this.propertyFileType = propertyFileType;
   }
 
+  @ApiModelProperty(name = INCREMENT_STEP)
   public String getIncrementStep() {
     return incrementStep;
   }
@@ -194,6 +223,7 @@ public class ValueAttributesInfo {
     this.incrementStep = incrementStep;
   }
 
+  @ApiModelProperty(name = "delete")
   public String getDelete() {
     return delete;
   }
@@ -202,6 +232,7 @@ public class ValueAttributesInfo {
     this.delete = delete;
   }
 
+  @ApiModelProperty(name = EMPTY_VALUE_VALID)
   public Boolean getEmptyValueValid() {
     return emptyValueValid;
   }
@@ -210,6 +241,7 @@ public class ValueAttributesInfo {
     this.emptyValueValid = isEmptyValueValid;
   }
 
+  @ApiModelProperty(name = "visible")
   public Boolean getVisible() {
     return visible;
   }
@@ -218,6 +250,7 @@ public class ValueAttributesInfo {
     this.visible = isVisible;
   }
 
+  @ApiModelProperty(name = READ_ONLY)
   public Boolean getReadOnly() {
     return readOnly;
   }
@@ -226,6 +259,7 @@ public class ValueAttributesInfo {
     this.readOnly = isReadOnly;
   }
 
+  @ApiModelProperty(name = EDITABLE_ONLY_AT_INSTALL)
   public Boolean getEditableOnlyAtInstall() {
     return editableOnlyAtInstall;
   }
@@ -234,6 +268,7 @@ public class ValueAttributesInfo {
     this.editableOnlyAtInstall = isEditableOnlyAtInstall;
   }
 
+  @ApiModelProperty(name = "overridable")
   public Boolean getOverridable() {
     return overridable;
   }
@@ -242,6 +277,7 @@ public class ValueAttributesInfo {
     this.overridable = isOverridable;
   }
 
+  @ApiModelProperty(name = SHOW_PROPERTY_NAME)
   public Boolean getShowPropertyName() {
     return showPropertyName;
   }
@@ -250,6 +286,7 @@ public class ValueAttributesInfo {
     this.showPropertyName = isPropertyNameVisible;
   }
 
+  @ApiModelProperty(name = UI_ONLY_PROPERTY)
   public Boolean getUiOnlyProperty() {
     return uiOnlyProperty;
   }
@@ -258,6 +295,7 @@ public class ValueAttributesInfo {
     this.uiOnlyProperty = isUiOnlyProperty;
   }
 
+  @ApiModelProperty(name = "copy")
   public String getCopy() {
     return copy;
   }
@@ -273,6 +311,7 @@ public class ValueAttributesInfo {
    *
    * @return "true", "false"
    */
+  @ApiModelProperty(name = KEYSTORE)
   public boolean isKeyStore() {
     return keyStore;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/state/ValueEntryInfo.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/ValueEntryInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/state/ValueEntryInfo.java
index 7824933..5974529 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/ValueEntryInfo.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/ValueEntryInfo.java
@@ -21,16 +21,20 @@ package org.apache.ambari.server.state;
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 
+import org.apache.ambari.server.controller.ApiModel;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
+import io.swagger.annotations.ApiModelProperty;
+
 @XmlAccessorType(XmlAccessType.FIELD)
 @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
-public class ValueEntryInfo {
+public class ValueEntryInfo implements ApiModel {
 
   private String value;
   private String label;
   private String description;
 
+  @ApiModelProperty(name = "value")
   public String getValue() {
     return value;
   }
@@ -39,6 +43,7 @@ public class ValueEntryInfo {
     this.value = value;
   }
 
+  @ApiModelProperty(name = "label")
   public String getLabel() {
     return label;
   }
@@ -47,6 +52,7 @@ public class ValueEntryInfo {
     this.label = label;
   }
 
+  @ApiModelProperty(name = "description")
   public String getDescription() {
     return description;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/state/theme/ConfigCondition.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/ConfigCondition.java b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/ConfigCondition.java
index a28d149..b47dfcc 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/ConfigCondition.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/ConfigCondition.java
@@ -20,14 +20,17 @@ package org.apache.ambari.server.state.theme;
 
 import java.util.List;
 
+import org.apache.ambari.server.controller.ApiModel;
 import org.apache.ambari.server.state.ValueAttributesInfo;
 import org.codehaus.jackson.annotate.JsonIgnoreProperties;
 import org.codehaus.jackson.annotate.JsonProperty;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
+import io.swagger.annotations.ApiModelProperty;
+
 @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown = true)
-public class ConfigCondition {
+public class ConfigCondition implements ApiModel {
   @JsonProperty("configs")
   private List<String> configs;
   @JsonProperty("resource")
@@ -39,6 +42,7 @@ public class ConfigCondition {
   @JsonProperty("else")
   private ConfigConditionResult elseLabel;
 
+  @ApiModelProperty( name = "configs")
   public List<String> getConfigs() {
     return configs;
   }
@@ -47,6 +51,7 @@ public class ConfigCondition {
     this.configs = configs;
   }
 
+  @ApiModelProperty( name = "if")
   public String getIfLabel() {
     return ifLabel;
   }
@@ -55,6 +60,7 @@ public class ConfigCondition {
     this.ifLabel = ifLabel;
   }
 
+  @ApiModelProperty( name = "then")
   public ConfigConditionResult getThen() {
     return then;
   }
@@ -63,6 +69,7 @@ public class ConfigCondition {
     this.then = then;
   }
 
+  @ApiModelProperty( name = "else")
   public ConfigConditionResult getElseLabel() {
     return elseLabel;
   }
@@ -72,6 +79,7 @@ public class ConfigCondition {
   }
 
 
+  @ApiModelProperty( name = "resource")
   public String getResource() {
     return resource;
   }
@@ -82,10 +90,11 @@ public class ConfigCondition {
 
   @JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
   @JsonIgnoreProperties(ignoreUnknown = true)
-  public static class ConfigConditionResult {
+  public static class ConfigConditionResult implements ApiModel {
     @JsonProperty("property_value_attributes")
     private ValueAttributesInfo propertyValueAttributes;
 
+    @ApiModelProperty( name = "property_value_attributes")
     public ValueAttributesInfo getPropertyValueAttributes() {
       return propertyValueAttributes;
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/state/theme/ConfigPlacement.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/ConfigPlacement.java b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/ConfigPlacement.java
index 3bb8c77..94db995 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/ConfigPlacement.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/ConfigPlacement.java
@@ -25,23 +25,31 @@ import org.codehaus.jackson.annotate.JsonIgnoreProperties;
 import org.codehaus.jackson.annotate.JsonProperty;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
+import io.swagger.annotations.ApiModelProperty;
+
 @JsonSerialize(include= JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown = true)
 public class ConfigPlacement {
-	@JsonProperty("config")
+  private static final String PROPERTY_VALUE_ATTRIBUTES = "property_value_attributes";
+  private static final String CONFIG = "config";
+  private static final String SUBSECTION_NAME = "subsection-name";
+  private static final String SUBSECTION_TAB_NAME = "subsection-tab-name";
+  private static final String DEPENDS_ON = "depends-on";
+
+  @JsonProperty(CONFIG)
 	private String config;
-	@JsonProperty("subsection-name")
+	@JsonProperty(SUBSECTION_NAME)
 	private String subsectionName;
-  @JsonProperty("subsection-tab-name")
+  @JsonProperty(SUBSECTION_TAB_NAME)
   private String subsectionTabName;
 
-  @JsonProperty("property_value_attributes")
+  @JsonProperty(PROPERTY_VALUE_ATTRIBUTES)
   private ValueAttributesInfo propertyValueAttributes;
 
-  @JsonProperty("depends-on")
+  @JsonProperty(DEPENDS_ON)
   private List<ConfigCondition> dependsOn;
 
-
+  @ApiModelProperty(name = CONFIG)
   public String getConfig() {
     return config;
   }
@@ -50,6 +58,7 @@ public class ConfigPlacement {
     this.config = config;
   }
 
+  @ApiModelProperty(name = SUBSECTION_NAME)
   public String getSubsectionName() {
     return subsectionName;
   }
@@ -58,6 +67,7 @@ public class ConfigPlacement {
     this.subsectionName = subsectionName;
   }
 
+  @ApiModelProperty(name = SUBSECTION_TAB_NAME)
   public String getSubsectionTabName() {
     return subsectionTabName;
   }
@@ -66,6 +76,7 @@ public class ConfigPlacement {
     this.subsectionTabName = subsectionTabName;
   }
 
+  @ApiModelProperty(name = PROPERTY_VALUE_ATTRIBUTES)
   public ValueAttributesInfo getPropertyValueAttributes() {
     return propertyValueAttributes;
   }
@@ -74,6 +85,7 @@ public class ConfigPlacement {
     this.propertyValueAttributes = propertyValueAttributes;
   }
 
+  @ApiModelProperty(name = DEPENDS_ON)
   public List<ConfigCondition> getDependsOn() {
     return dependsOn;
   }
@@ -82,6 +94,7 @@ public class ConfigPlacement {
     this.dependsOn = dependsOn;
   }
 
+  @ApiModelProperty(name = "removed")
   public boolean isRemoved() {
     return subsectionName == null;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Layout.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Layout.java b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Layout.java
index 840dbf0..672b540 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Layout.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Layout.java
@@ -28,15 +28,19 @@ import org.codehaus.jackson.annotate.JsonIgnoreProperties;
 import org.codehaus.jackson.annotate.JsonProperty;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
+import io.swagger.annotations.ApiModelProperty;
 
 @JsonSerialize(include= JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown = true)
 public class Layout{
+
 	@JsonProperty("name")
 	private String name;
+
 	@JsonProperty("tabs")
 	private List<Tab> tabs;
 
+  @ApiModelProperty(name = "name")
   public String getName() {
     return name;
   }
@@ -45,6 +49,7 @@ public class Layout{
     this.name = name;
   }
 
+  @ApiModelProperty(name = "tabs")
   public List<Tab> getTabs() {
     return tabs;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Section.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Section.java b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Section.java
index 43d2170..cfc5396 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Section.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Section.java
@@ -24,33 +24,45 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.ambari.server.controller.ApiModel;
 import org.codehaus.jackson.annotate.JsonIgnoreProperties;
 import org.codehaus.jackson.annotate.JsonProperty;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
+import io.swagger.annotations.ApiModelProperty;
 
 @JsonSerialize(include= JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown = true)
-public class Section {
+public class Section implements ApiModel {
+
 	@JsonProperty("subsections")
 	private List<Subsection> subsections;
+
 	@JsonProperty("display-name")
 	private String displayName;
+
 	@JsonProperty("row-index")
 	private String rowIndex;
+
 	@JsonProperty("section-rows")
 	private String sectionRows;
+
 	@JsonProperty("name")
 	private String name;
+
 	@JsonProperty("column-span")
 	private String columnSpan;
+
 	@JsonProperty("section-columns")
 	private String sectionColumns;
+
 	@JsonProperty("column-index")
 	private String columnIndex;
+
 	@JsonProperty("row-span")
 	private String rowSpan;
 
+  @ApiModelProperty(name = "subsections")
   public List<Subsection> getSubsections() {
     return subsections;
   }
@@ -59,6 +71,7 @@ public class Section {
     this.subsections = subsections;
   }
 
+  @ApiModelProperty(name = "display-name")
   public String getDisplayName() {
     return displayName;
   }
@@ -67,6 +80,7 @@ public class Section {
     this.displayName = displayName;
   }
 
+  @ApiModelProperty(name = "row-index")
   public String getRowIndex() {
     return rowIndex;
   }
@@ -75,6 +89,7 @@ public class Section {
     this.rowIndex = rowIndex;
   }
 
+  @ApiModelProperty(name = "section-rows")
   public String getSectionRows() {
     return sectionRows;
   }
@@ -83,6 +98,7 @@ public class Section {
     this.sectionRows = sectionRows;
   }
 
+  @ApiModelProperty(name = "name")
   public String getName() {
     return name;
   }
@@ -91,6 +107,7 @@ public class Section {
     this.name = name;
   }
 
+  @ApiModelProperty(name = "column-span")
   public String getColumnSpan() {
     return columnSpan;
   }
@@ -103,10 +120,12 @@ public class Section {
     return sectionColumns;
   }
 
+  @ApiModelProperty(name = "section-columns")
   public void setSectionColumns(String sectionColumns) {
     this.sectionColumns = sectionColumns;
   }
 
+  @ApiModelProperty(name = "column-index")
   public String getColumnIndex() {
     return columnIndex;
   }
@@ -115,6 +134,7 @@ public class Section {
     this.columnIndex = columnIndex;
   }
 
+  @ApiModelProperty(name = "row-span")
   public String getRowSpan() {
     return rowSpan;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Subsection.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Subsection.java b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Subsection.java
index 62fbfc1..eb94f57 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Subsection.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Subsection.java
@@ -18,13 +18,13 @@
 
 package org.apache.ambari.server.state.theme;
 
-
 import java.util.List;
 
 import org.codehaus.jackson.annotate.JsonIgnoreProperties;
 import org.codehaus.jackson.annotate.JsonProperty;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
+import io.swagger.annotations.ApiModelProperty;
 
 @JsonSerialize(include= JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown = true)
@@ -51,6 +51,7 @@ public class Subsection {
   private List<SubsectionTab> subsectionTabs;
 
 
+  @ApiModelProperty( name = "row-index")
   public String getRowIndex() {
     return rowIndex;
   }
@@ -59,6 +60,7 @@ public class Subsection {
     this.rowIndex = rowIndex;
   }
 
+  @ApiModelProperty( name = "name")
   public String getName() {
     return name;
   }
@@ -67,6 +69,7 @@ public class Subsection {
     this.name = name;
   }
 
+  @ApiModelProperty( name = "column-span")
   public String getColumnSpan() {
     return columnSpan;
   }
@@ -75,6 +78,7 @@ public class Subsection {
     this.columnSpan = columnSpan;
   }
 
+  @ApiModelProperty( name = "row-span")
   public String getRowSpan() {
     return rowSpan;
   }
@@ -83,6 +87,7 @@ public class Subsection {
     this.rowSpan = rowSpan;
   }
 
+  @ApiModelProperty( name = "column-index")
   public String getColumnIndex() {
     return columnIndex;
   }
@@ -91,6 +96,7 @@ public class Subsection {
     this.columnIndex = columnIndex;
   }
 
+  @ApiModelProperty( name = "display-name")
   public String getDisplayName() {
     return displayName;
   }
@@ -99,6 +105,7 @@ public class Subsection {
     this.displayName = displayName;
   }
 
+  @ApiModelProperty( name = "border")
   public String getBorder() {
     return border;
   }
@@ -107,6 +114,7 @@ public class Subsection {
     this.border = border;
   }
 
+  @ApiModelProperty( name = "left-vertical-splitter")
   public Boolean getLeftVerticalSplitter() {
     return leftVerticalSplitter;
   }
@@ -115,6 +123,7 @@ public class Subsection {
     this.leftVerticalSplitter = leftVerticalSplitter;
   }
 
+  @ApiModelProperty( name = "depends-on")
   public List<ConfigCondition> getDependsOn() {
     return dependsOn;
   }
@@ -123,6 +132,7 @@ public class Subsection {
     this.dependsOn = dependsOn;
   }
 
+  @ApiModelProperty( name = "subsection-tab")
   public List<SubsectionTab> getSubsectionTabs() {
     return subsectionTabs;
   }
@@ -131,6 +141,7 @@ public class Subsection {
     this.subsectionTabs = subsectionTabs;
   }
 
+  @ApiModelProperty( name = "removed")
   public boolean isRemoved() {
     return rowIndex == null && rowSpan == null && columnIndex == null && columnSpan == null && dependsOn == null && subsectionTabs == null;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Tab.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Tab.java b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Tab.java
index b949a12..1d1d60c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Tab.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Tab.java
@@ -18,23 +18,27 @@
 
 package org.apache.ambari.server.state.theme;
 
-
-
+import org.apache.ambari.server.controller.ApiModel;
 import org.codehaus.jackson.annotate.JsonIgnoreProperties;
 import org.codehaus.jackson.annotate.JsonProperty;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
+import io.swagger.annotations.ApiModelProperty;
 
 @JsonSerialize(include= JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown = true)
-public class Tab {
+public class Tab implements ApiModel {
+
 	@JsonProperty("display-name")
 	private String displayName;
+
 	@JsonProperty("name")
 	private String name;
+
 	@JsonProperty("layout")
 	private TabLayout tabLayout;
 
+  @ApiModelProperty(name = "display-name")
   public String getDisplayName() {
     return displayName;
   }
@@ -43,6 +47,7 @@ public class Tab {
     this.displayName = displayName;
   }
 
+  @ApiModelProperty(name = "name")
   public String getName() {
     return name;
   }
@@ -51,6 +56,7 @@ public class Tab {
     this.name = name;
   }
 
+  @ApiModelProperty(name = "layout")
   public TabLayout getTabLayout() {
     return tabLayout;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/state/theme/TabLayout.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/TabLayout.java b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/TabLayout.java
index f7d4187..bbf8bb8 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/TabLayout.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/TabLayout.java
@@ -18,7 +18,6 @@
 
 package org.apache.ambari.server.state.theme;
 
-
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -28,17 +27,22 @@ import org.codehaus.jackson.annotate.JsonIgnoreProperties;
 import org.codehaus.jackson.annotate.JsonProperty;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
+import io.swagger.annotations.ApiModelProperty;
 
 @JsonSerialize(include= JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown = true)
 public class TabLayout {
+
 	@JsonProperty("tab-rows")
 	private String tabRows;
+
 	@JsonProperty("sections")
 	private List<Section> sections;
+
 	@JsonProperty("tab-columns")
 	private String tabColumns;
 
+  @ApiModelProperty(name = "tab-rows")
   public String getTabRows() {
     return tabRows;
   }
@@ -47,6 +51,7 @@ public class TabLayout {
     this.tabRows = tabRows;
   }
 
+  @ApiModelProperty(name = "sections")
   public List<Section> getSections() {
     return sections;
   }
@@ -55,6 +60,7 @@ public class TabLayout {
     this.sections = sections;
   }
 
+  @ApiModelProperty(name = "tab-columns")
   public String getTabColumns() {
     return tabColumns;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Theme.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Theme.java b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Theme.java
index 96d2fc0..1217230 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Theme.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Theme.java
@@ -18,14 +18,16 @@
 
 package org.apache.ambari.server.state.theme;
 
-
+import org.apache.ambari.server.controller.ApiModel;
 import org.codehaus.jackson.annotate.JsonIgnoreProperties;
 import org.codehaus.jackson.annotate.JsonProperty;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
+import io.swagger.annotations.ApiModelProperty;
+
 @JsonSerialize(include= JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown = true)
-public class Theme{
+public class Theme implements ApiModel{
 	@JsonProperty("description")
 	private String description;
 	@JsonProperty("name")
@@ -33,6 +35,7 @@ public class Theme{
   @JsonProperty("configuration")
 	private ThemeConfiguration themeConfiguration;
 
+  @ApiModelProperty(name = "description")
   public String getDescription() {
     return description;
   }
@@ -41,6 +44,7 @@ public class Theme{
     this.description = description;
   }
 
+  @ApiModelProperty(name = "name")
   public String getName() {
     return name;
   }
@@ -49,6 +53,7 @@ public class Theme{
     this.name = name;
   }
 
+  @ApiModelProperty(name ="configuration")
   public ThemeConfiguration getThemeConfiguration() {
     return themeConfiguration;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/state/theme/ThemeConfiguration.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/ThemeConfiguration.java b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/ThemeConfiguration.java
index 58fe942..f264b0a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/ThemeConfiguration.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/ThemeConfiguration.java
@@ -18,27 +18,31 @@
 
 package org.apache.ambari.server.state.theme;
 
-
 import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.ambari.server.controller.ApiModel;
 import org.codehaus.jackson.annotate.JsonIgnoreProperties;
 import org.codehaus.jackson.annotate.JsonProperty;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
+import io.swagger.annotations.ApiModelProperty;
 
 @JsonSerialize(include= JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown = true)
-public class ThemeConfiguration{
+public class ThemeConfiguration implements ApiModel {
 	@JsonProperty("placement")
 	private Placement placement;
+
 	@JsonProperty("widgets")
 	private List<WidgetEntry> widgets;
+
 	@JsonProperty("layouts")
 	private List<Layout> layouts;
 
+  @ApiModelProperty(name = "placement")
   public Placement getPlacement() {
     return placement;
   }
@@ -47,6 +51,7 @@ public class ThemeConfiguration{
     this.placement = placement;
   }
 
+  @ApiModelProperty(name = "widgets")
   public List<WidgetEntry> getWidgets() {
     return widgets;
   }
@@ -55,6 +60,7 @@ public class ThemeConfiguration{
     this.widgets = widgets;
   }
 
+  @ApiModelProperty(name = "layouts")
   public List<Layout> getLayouts() {
     return layouts;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Unit.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Unit.java b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Unit.java
index 7bd058c..953939c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Unit.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Unit.java
@@ -18,18 +18,21 @@
 
 package org.apache.ambari.server.state.theme;
 
-
+import org.apache.ambari.server.controller.ApiModel;
 import org.codehaus.jackson.annotate.JsonIgnoreProperties;
 import org.codehaus.jackson.annotate.JsonProperty;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
+import io.swagger.annotations.ApiModelProperty;
 
 @JsonSerialize(include= JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown = true)
-public class Unit {
+public class Unit implements ApiModel {
+
 	@JsonProperty("unit-name")
 	private String unitName;
 
+  @ApiModelProperty(name = "unit-name")
   public String getUnitName() {
     return unitName;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Widget.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Widget.java b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Widget.java
index 1f38d8e..73bd138 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Widget.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/Widget.java
@@ -18,27 +18,32 @@
 
 package org.apache.ambari.server.state.theme;
 
-
 import java.util.List;
 import java.util.Map;
 
+import org.apache.ambari.server.controller.ApiModel;
 import org.codehaus.jackson.annotate.JsonIgnoreProperties;
 import org.codehaus.jackson.annotate.JsonProperty;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
+import io.swagger.annotations.ApiModelProperty;
 
 @JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown = true)
-public class Widget{
+public class Widget implements ApiModel {
 	@JsonProperty("type")
 	private String type;
+
 	@JsonProperty("units")
 	private List<Unit> units;
+
   @JsonProperty("required-properties")
   private Map<String,String> requiredProperties;
+
   @JsonProperty("display-name")
   private String displayName;
 
+  @ApiModelProperty(name = "type")
   public String getType() {
     return type;
   }
@@ -47,6 +52,7 @@ public class Widget{
     this.type = type;
   }
 
+  @ApiModelProperty(name = "units")
   public List<Unit> getUnits() {
     return units;
   }
@@ -55,6 +61,7 @@ public class Widget{
     this.units = units;
   }
 
+  @ApiModelProperty(name = "required-properties")
   public Map<String, String> getRequiredProperties() {
     return requiredProperties;
   }
@@ -63,6 +70,7 @@ public class Widget{
     this.requiredProperties = requiredProperties;
   }
 
+  @ApiModelProperty(name = "display-name")
   public String getDisplayName() {
     return displayName;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/54983ee3/ambari-server/src/main/java/org/apache/ambari/server/state/theme/WidgetEntry.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/WidgetEntry.java b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/WidgetEntry.java
index 9e9c068..6aac03f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/theme/WidgetEntry.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/theme/WidgetEntry.java
@@ -18,21 +18,23 @@
 
 package org.apache.ambari.server.state.theme;
 
-
-
+import org.apache.ambari.server.controller.ApiModel;
 import org.codehaus.jackson.annotate.JsonIgnoreProperties;
 import org.codehaus.jackson.annotate.JsonProperty;
 import org.codehaus.jackson.map.annotate.JsonSerialize;
 
+import io.swagger.annotations.ApiModelProperty;
 
 @JsonSerialize(include= JsonSerialize.Inclusion.NON_NULL)
 @JsonIgnoreProperties(ignoreUnknown = true)
-public class WidgetEntry {
+public class WidgetEntry implements ApiModel {
 	@JsonProperty("config")
 	private String config;
+
 	@JsonProperty("widget")
 	private Widget widget;
 
+  @ApiModelProperty(name = "config")
   public String getConfig() {
     return config;
   }
@@ -41,6 +43,7 @@ public class WidgetEntry {
     this.config = config;
   }
 
+  @ApiModelProperty(name = "widget")
   public Widget getWidget() {
     return widget;
   }


[25/49] ambari git commit: AMBARI-20624. Misc fixes for ambari-server swagger integration prototype. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/docs/api/generated/swagger.json
----------------------------------------------------------------------
diff --git a/ambari-server/docs/api/generated/swagger.json b/ambari-server/docs/api/generated/swagger.json
new file mode 100644
index 0000000..f7dbb6b
--- /dev/null
+++ b/ambari-server/docs/api/generated/swagger.json
@@ -0,0 +1,2305 @@
+{
+  "swagger" : "2.0",
+  "info" : {
+    "description" : "Ambari REST APIs has inherent support for querying, sorting and pagination",
+    "version" : "v1",
+    "title" : "Swagger spec for Ambari REST API",
+    "license" : {
+      "name" : "Apache License, Version 2.0",
+      "url" : "http://www.apache.org/licenses/LICENSE-2.0"
+    }
+  },
+  "basePath" : "/api/v1",
+  "tags" : [ {
+    "name" : "Groups",
+    "description" : "Endpoint for group specific operations"
+  }, {
+    "name" : "Users",
+    "description" : "Endpoint for user specific operations"
+  }, {
+    "name" : "Views"
+  } ],
+  "schemes" : [ "http", "https" ],
+  "paths" : {
+    "/groups" : {
+      "get" : {
+        "tags" : [ "Groups" ],
+        "summary" : "Get all groups",
+        "description" : "Returns details of all groups.",
+        "operationId" : "GroupService#getGroups",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter group details",
+          "required" : false,
+          "type" : "string",
+          "default" : "Groups/*"
+        }, {
+          "name" : "sortBy",
+          "in" : "query",
+          "description" : "Sort groups (asc | desc)",
+          "required" : false,
+          "type" : "string",
+          "default" : "Groups/group_name.asc"
+        }, {
+          "name" : "page_size",
+          "in" : "query",
+          "description" : "The number of resources to be returned for the paged response.",
+          "required" : false,
+          "type" : "integer",
+          "default" : 10
+        }, {
+          "name" : "from",
+          "in" : "query",
+          "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+          "required" : false,
+          "type" : "string",
+          "default" : "0"
+        }, {
+          "name" : "to",
+          "in" : "query",
+          "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+          "required" : false,
+          "type" : "string"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful retrieval of all group entries",
+            "schema" : {
+              "type" : "array",
+              "items" : {
+                "$ref" : "#/definitions/GroupResponse"
+              }
+            }
+          }
+        }
+      },
+      "post" : {
+        "tags" : [ "Groups" ],
+        "summary" : "Create new group",
+        "description" : "Creates group resource.",
+        "operationId" : "GroupService#createGroup",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "in" : "body",
+          "name" : "body",
+          "description" : "input parameters in json form",
+          "required" : true,
+          "schema" : {
+            "$ref" : "#/definitions/GroupRequest"
+          }
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "successful operation"
+          },
+          "500" : {
+            "description" : "Server Error"
+          }
+        }
+      }
+    },
+    "/groups/{groupName}" : {
+      "get" : {
+        "tags" : [ "Groups" ],
+        "summary" : "Get group",
+        "description" : "Returns group details.",
+        "operationId" : "GroupService#getGroup",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "groupName",
+          "in" : "path",
+          "description" : "group name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter group details",
+          "required" : false,
+          "type" : "string",
+          "default" : "Groups"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful retrieval of group resource",
+            "schema" : {
+              "$ref" : "#/definitions/GroupResponse"
+            }
+          }
+        }
+      },
+      "delete" : {
+        "tags" : [ "Groups" ],
+        "summary" : "Delete group",
+        "description" : "Delete group resource.",
+        "operationId" : "GroupService#deleteGroup",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "groupName",
+          "in" : "path",
+          "description" : "group name",
+          "required" : true,
+          "type" : "string"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation"
+          },
+          "500" : {
+            "description" : "Server Error"
+          }
+        }
+      }
+    },
+    "/groups/{groupName}/members" : {
+      "get" : {
+        "tags" : [ "Groups" ],
+        "summary" : "Get all group members",
+        "description" : "Returns details of all members.",
+        "operationId" : "MemberService#getMembers",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "groupName",
+          "in" : "path",
+          "description" : "group name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter member details",
+          "required" : false,
+          "type" : "string",
+          "default" : "MemberInfo/*"
+        }, {
+          "name" : "sortBy",
+          "in" : "query",
+          "description" : "Sort members (asc | desc)",
+          "required" : false,
+          "type" : "string",
+          "default" : "MemberInfo/user_name.asc"
+        }, {
+          "name" : "page_size",
+          "in" : "query",
+          "description" : "The number of resources to be returned for the paged response.",
+          "required" : false,
+          "type" : "integer",
+          "default" : 10
+        }, {
+          "name" : "from",
+          "in" : "query",
+          "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+          "required" : false,
+          "type" : "string",
+          "default" : "0"
+        }, {
+          "name" : "to",
+          "in" : "query",
+          "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+          "required" : false,
+          "type" : "string"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation",
+            "schema" : {
+              "type" : "array",
+              "items" : {
+                "$ref" : "#/definitions/MemberResponse"
+              }
+            }
+          }
+        }
+      },
+      "put" : {
+        "tags" : [ "Groups" ],
+        "summary" : "Update group members",
+        "description" : "Updates group member resources.",
+        "operationId" : "MemberService#updateMembers",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "groupName",
+          "in" : "path",
+          "description" : "group name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "in" : "body",
+          "name" : "body",
+          "description" : "input parameters in json form",
+          "required" : true,
+          "schema" : {
+            "$ref" : "#/definitions/MemberRequest"
+          }
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation"
+          },
+          "500" : {
+            "description" : "Server Error"
+          }
+        }
+      }
+    },
+    "/groups/{groupName}/members/{userName}" : {
+      "get" : {
+        "tags" : [ "Groups" ],
+        "summary" : "Get group member",
+        "description" : "Returns member details.",
+        "operationId" : "MemberService#getMember",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "groupName",
+          "in" : "path",
+          "description" : "group name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "userName",
+          "in" : "path",
+          "description" : "user name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter member details",
+          "required" : false,
+          "type" : "string",
+          "default" : "MemberInfo"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation",
+            "schema" : {
+              "$ref" : "#/definitions/MemberResponse"
+            }
+          }
+        }
+      },
+      "delete" : {
+        "tags" : [ "Groups" ],
+        "summary" : "Delete group member",
+        "description" : "Delete member resource.",
+        "operationId" : "MemberService#deleteMember",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "groupName",
+          "in" : "path",
+          "description" : "group name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "userName",
+          "in" : "path",
+          "description" : "user name",
+          "required" : true,
+          "type" : "string"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation"
+          },
+          "500" : {
+            "description" : "Server Error"
+          }
+        }
+      }
+    },
+    "/groups/{groupName}/privileges" : {
+      "get" : {
+        "tags" : [ "Groups" ],
+        "summary" : "Get all privileges",
+        "description" : "Returns all privileges for group.",
+        "operationId" : "GroupPrivilegeService#getPrivileges",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "groupName",
+          "in" : "path",
+          "description" : "group name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter user privileges",
+          "required" : false,
+          "type" : "string",
+          "default" : "PrivilegeInfo/*"
+        }, {
+          "name" : "sortBy",
+          "in" : "query",
+          "description" : "Sort user privileges (asc | desc)",
+          "required" : false,
+          "type" : "string",
+          "default" : "PrivilegeInfo/user_name.asc"
+        }, {
+          "name" : "page_size",
+          "in" : "query",
+          "description" : "The number of resources to be returned for the paged response.",
+          "required" : false,
+          "type" : "integer",
+          "default" : 10
+        }, {
+          "name" : "from",
+          "in" : "query",
+          "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+          "required" : false,
+          "type" : "string",
+          "default" : "0"
+        }, {
+          "name" : "to",
+          "in" : "query",
+          "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+          "required" : false,
+          "type" : "string"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "successful operation",
+            "schema" : {
+              "type" : "array",
+              "items" : {
+                "$ref" : "#/definitions/GroupPrivilegeResponse"
+              }
+            }
+          }
+        }
+      }
+    },
+    "/groups/{groupName}/privileges/{privilegeId}" : {
+      "get" : {
+        "tags" : [ "Groups" ],
+        "summary" : "Get group privilege",
+        "description" : "Returns group privilege details.",
+        "operationId" : "GroupPrivilegeService#getPrivilege",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "groupName",
+          "in" : "path",
+          "description" : "group name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "privilegeId",
+          "in" : "path",
+          "description" : "privilege id",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter group privilege details",
+          "required" : false,
+          "type" : "string",
+          "default" : "PrivilegeInfo/*"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation",
+            "schema" : {
+              "$ref" : "#/definitions/PrivilegeResponse"
+            }
+          }
+        }
+      }
+    },
+    "/users" : {
+      "get" : {
+        "tags" : [ "Users" ],
+        "summary" : "Get all users",
+        "description" : "Returns details of all users.",
+        "operationId" : "UserService#getUsers",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter user details",
+          "required" : false,
+          "type" : "string",
+          "default" : "Users/*"
+        }, {
+          "name" : "sortBy",
+          "in" : "query",
+          "description" : "Sort users (asc | desc)",
+          "required" : false,
+          "type" : "string",
+          "default" : "Users/user_name.desc"
+        }, {
+          "name" : "page_size",
+          "in" : "query",
+          "description" : "The number of resources to be returned for the paged response.",
+          "required" : false,
+          "type" : "integer",
+          "default" : 10
+        }, {
+          "name" : "from",
+          "in" : "query",
+          "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+          "required" : false,
+          "type" : "string",
+          "default" : "0"
+        }, {
+          "name" : "to",
+          "in" : "query",
+          "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+          "required" : false,
+          "type" : "string"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation",
+            "schema" : {
+              "type" : "array",
+              "items" : {
+                "$ref" : "#/definitions/UserResponse"
+              }
+            }
+          }
+        }
+      }
+    },
+    "/users/{userName}" : {
+      "get" : {
+        "tags" : [ "Users" ],
+        "summary" : "Get single user",
+        "description" : "Returns user details.",
+        "operationId" : "UserService#getUser",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "userName",
+          "in" : "path",
+          "description" : "user name",
+          "required" : true,
+          "type" : "string",
+          "default" : "admin"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter user details",
+          "required" : false,
+          "type" : "string",
+          "default" : "Users"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation",
+            "schema" : {
+              "$ref" : "#/definitions/UserResponse"
+            }
+          }
+        }
+      },
+      "post" : {
+        "tags" : [ "Users" ],
+        "summary" : "Create new user",
+        "description" : "Creates user resource.",
+        "operationId" : "UserService#createUser",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "userName",
+          "in" : "path",
+          "description" : "user name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "in" : "body",
+          "name" : "body",
+          "description" : "input parameters in json form",
+          "required" : true,
+          "schema" : {
+            "$ref" : "#/definitions/UserRequest"
+          }
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation"
+          },
+          "500" : {
+            "description" : "Server Error"
+          }
+        }
+      },
+      "put" : {
+        "tags" : [ "Users" ],
+        "summary" : "Update user detail",
+        "description" : "Updates user resource.",
+        "operationId" : "UserService#updateUser",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "userName",
+          "in" : "path",
+          "description" : "user name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "in" : "body",
+          "name" : "body",
+          "description" : "input parameters in json form",
+          "required" : true,
+          "schema" : {
+            "$ref" : "#/definitions/UserRequest"
+          }
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation"
+          },
+          "500" : {
+            "description" : "Server Error"
+          }
+        }
+      },
+      "delete" : {
+        "tags" : [ "Users" ],
+        "summary" : "Delete single user",
+        "description" : "Delete user resource.",
+        "operationId" : "UserService#deleteUser",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "userName",
+          "in" : "path",
+          "description" : "user name",
+          "required" : true,
+          "type" : "string"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation"
+          },
+          "500" : {
+            "description" : "Server Error"
+          }
+        }
+      }
+    },
+    "/users/{userName}/activeWidgetLayouts" : {
+      "get" : {
+        "tags" : [ "Users" ],
+        "summary" : "Get user widget layouts",
+        "description" : "Returns all active widget layouts for user.",
+        "operationId" : "ActiveWidgetLayoutService#getServices",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "userName",
+          "in" : "path",
+          "description" : "user name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter user layout details",
+          "required" : false,
+          "type" : "string",
+          "default" : "WidgetLayoutInfo/*"
+        }, {
+          "name" : "sortBy",
+          "in" : "query",
+          "description" : "Sort layouts (asc | desc)",
+          "required" : false,
+          "type" : "string",
+          "default" : "WidgetLayoutInfo/user_name.asc"
+        }, {
+          "name" : "page_size",
+          "in" : "query",
+          "description" : "The number of resources to be returned for the paged response.",
+          "required" : false,
+          "type" : "integer",
+          "default" : 10
+        }, {
+          "name" : "from",
+          "in" : "query",
+          "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+          "required" : false,
+          "type" : "string",
+          "default" : "0"
+        }, {
+          "name" : "to",
+          "in" : "query",
+          "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+          "required" : false,
+          "type" : "string"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "successful operation",
+            "schema" : {
+              "type" : "array",
+              "items" : {
+                "$ref" : "#/definitions/ActiveWidgetLayoutResponse"
+              }
+            }
+          }
+        }
+      },
+      "put" : {
+        "tags" : [ "Users" ],
+        "summary" : "Update user widget layouts",
+        "description" : "Updates user widget layout.",
+        "operationId" : "ActiveWidgetLayoutService#updateServices",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "userName",
+          "in" : "path",
+          "description" : "user name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "in" : "body",
+          "name" : "body",
+          "description" : "input parameters in json form",
+          "required" : true,
+          "schema" : {
+            "$ref" : "#/definitions/ActiveWidgetLayoutRequest"
+          }
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation"
+          },
+          "500" : {
+            "description" : "Server Error"
+          }
+        }
+      }
+    },
+    "/users/{userName}/authorizations" : {
+      "get" : {
+        "tags" : [ "Users" ],
+        "summary" : "Get all authorizations",
+        "description" : "Returns all authorization for user.",
+        "operationId" : "UserAuthorizationService#getAuthorizations",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "userName",
+          "in" : "path",
+          "description" : "user name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter user authorization details",
+          "required" : false,
+          "type" : "string",
+          "default" : "AuthorizationInfo/*"
+        }, {
+          "name" : "sortBy",
+          "in" : "query",
+          "description" : "Sort user authorizations (asc | desc)",
+          "required" : false,
+          "type" : "string",
+          "default" : "AuthorizationInfo/user_name.asc"
+        }, {
+          "name" : "page_size",
+          "in" : "query",
+          "description" : "The number of resources to be returned for the paged response.",
+          "required" : false,
+          "type" : "integer",
+          "default" : 10
+        }, {
+          "name" : "from",
+          "in" : "query",
+          "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+          "required" : false,
+          "type" : "string",
+          "default" : "0"
+        }, {
+          "name" : "to",
+          "in" : "query",
+          "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+          "required" : false,
+          "type" : "string"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "successful operation",
+            "schema" : {
+              "type" : "array",
+              "items" : {
+                "$ref" : "#/definitions/UserAuthorizationResponse"
+              }
+            }
+          }
+        }
+      }
+    },
+    "/users/{userName}/authorizations/{authorization_id}" : {
+      "get" : {
+        "tags" : [ "Users" ],
+        "summary" : "Get user authorization",
+        "description" : "Returns user authorization details.",
+        "operationId" : "UserAuthorizationService#getAuthorization",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "userName",
+          "in" : "path",
+          "description" : "user name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "authorization_id",
+          "in" : "path",
+          "description" : "Authorization Id",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter user authorization details",
+          "required" : false,
+          "type" : "string",
+          "default" : "AuthorizationInfo/*"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation",
+            "schema" : {
+              "$ref" : "#/definitions/UserAuthorizationResponse"
+            }
+          }
+        }
+      }
+    },
+    "/users/{userName}/privileges" : {
+      "get" : {
+        "tags" : [ "Users" ],
+        "summary" : "Get all privileges",
+        "description" : "Returns all privileges for user.",
+        "operationId" : "UserPrivilegeService#getPrivileges",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "userName",
+          "in" : "path",
+          "description" : "user name",
+          "required" : true,
+          "type" : "string",
+          "default" : "admin"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter user privileges",
+          "required" : false,
+          "type" : "string",
+          "default" : "PrivilegeInfo/*"
+        }, {
+          "name" : "sortBy",
+          "in" : "query",
+          "description" : "Sort user privileges (asc | desc)",
+          "required" : false,
+          "type" : "string",
+          "default" : "PrivilegeInfo/user_name.asc"
+        }, {
+          "name" : "page_size",
+          "in" : "query",
+          "description" : "The number of resources to be returned for the paged response.",
+          "required" : false,
+          "type" : "integer",
+          "default" : 10
+        }, {
+          "name" : "from",
+          "in" : "query",
+          "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+          "required" : false,
+          "type" : "string",
+          "default" : "0"
+        }, {
+          "name" : "to",
+          "in" : "query",
+          "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+          "required" : false,
+          "type" : "string"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "successful operation",
+            "schema" : {
+              "type" : "array",
+              "items" : {
+                "$ref" : "#/definitions/UserPrivilegeResponse"
+              }
+            }
+          }
+        }
+      }
+    },
+    "/users/{userName}/privileges/{privilegeId}" : {
+      "get" : {
+        "tags" : [ "Users" ],
+        "summary" : "Get user privilege",
+        "description" : "Returns user privilege details.",
+        "operationId" : "UserPrivilegeService#getPrivilege",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "userName",
+          "in" : "path",
+          "description" : "user name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "privilegeId",
+          "in" : "path",
+          "description" : "privilege id",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter user privilege details",
+          "required" : false,
+          "type" : "string",
+          "default" : "PrivilegeInfo/*"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation",
+            "schema" : {
+              "$ref" : "#/definitions/UserPrivilegeResponse"
+            }
+          }
+        }
+      }
+    },
+    "/views" : {
+      "get" : {
+        "tags" : [ "Views" ],
+        "summary" : "Get all views",
+        "description" : "Returns details of all views.",
+        "operationId" : "ViewService#getViews",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter view details",
+          "required" : false,
+          "type" : "string",
+          "default" : "ViewInfo/*"
+        }, {
+          "name" : "sortBy",
+          "in" : "query",
+          "description" : "Sort users (asc | desc)",
+          "required" : false,
+          "type" : "string",
+          "default" : "ViewInfo/view_name.asc"
+        }, {
+          "name" : "page_size",
+          "in" : "query",
+          "description" : "The number of resources to be returned for the paged response.",
+          "required" : false,
+          "type" : "integer",
+          "default" : 10
+        }, {
+          "name" : "from",
+          "in" : "query",
+          "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+          "required" : false,
+          "type" : "string",
+          "default" : "0"
+        }, {
+          "name" : "to",
+          "in" : "query",
+          "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+          "required" : false,
+          "type" : "string"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation",
+            "schema" : {
+              "type" : "array",
+              "items" : {
+                "$ref" : "#/definitions/ViewResponse"
+              }
+            }
+          }
+        }
+      }
+    },
+    "/views/{viewName}" : {
+      "get" : {
+        "tags" : [ "Views" ],
+        "summary" : "Get single view",
+        "description" : "Returns view details.",
+        "operationId" : "ViewService#getView",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "viewName",
+          "in" : "path",
+          "description" : "view name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter view details",
+          "required" : false,
+          "type" : "string",
+          "default" : "ViewInfo"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation",
+            "schema" : {
+              "$ref" : "#/definitions/ViewResponse"
+            }
+          }
+        }
+      }
+    },
+    "/views/{viewName}/versions" : {
+      "get" : {
+        "tags" : [ "Views" ],
+        "summary" : "Get all versions for a view",
+        "description" : "Returns details of all versions for a view.",
+        "operationId" : "ViewVersionService#getVersions",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "viewName",
+          "in" : "path",
+          "description" : "view name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter view version details",
+          "required" : false,
+          "type" : "string",
+          "default" : "ViewVersionInfo/*"
+        }, {
+          "name" : "sortBy",
+          "in" : "query",
+          "description" : "Sort users (asc | desc)",
+          "required" : false,
+          "type" : "string",
+          "default" : "ViewVersionInfo/version.desc"
+        }, {
+          "name" : "page_size",
+          "in" : "query",
+          "description" : "The number of resources to be returned for the paged response.",
+          "required" : false,
+          "type" : "integer",
+          "default" : 10
+        }, {
+          "name" : "from",
+          "in" : "query",
+          "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+          "required" : false,
+          "type" : "string",
+          "default" : "0"
+        }, {
+          "name" : "to",
+          "in" : "query",
+          "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+          "required" : false,
+          "type" : "string"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation",
+            "schema" : {
+              "type" : "array",
+              "items" : {
+                "$ref" : "#/definitions/ViewVersionResponse"
+              }
+            }
+          }
+        }
+      }
+    },
+    "/views/{viewName}/versions/{version}" : {
+      "get" : {
+        "tags" : [ "Views" ],
+        "summary" : "Get single view version",
+        "description" : "Returns view details.",
+        "operationId" : "ViewVersionService#getVersion",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "viewName",
+          "in" : "path",
+          "description" : "view name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "version",
+          "in" : "path",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter view details",
+          "required" : false,
+          "type" : "string",
+          "default" : "ViewVersionInfo"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation",
+            "schema" : {
+              "$ref" : "#/definitions/ViewVersionResponse"
+            }
+          }
+        }
+      }
+    },
+    "/views/{viewName}/versions/{version}/instances" : {
+      "get" : {
+        "tags" : [ "Views" ],
+        "summary" : "Get all view instances",
+        "description" : "Returns all instances for a view version.",
+        "operationId" : "ViewInstanceService#getServices",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "viewName",
+          "in" : "path",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "version",
+          "in" : "path",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter view instance details",
+          "required" : false,
+          "type" : "string",
+          "default" : "ViewInstanceInfo/*"
+        }, {
+          "name" : "sortBy",
+          "in" : "query",
+          "description" : "Sort users (asc | desc)",
+          "required" : false,
+          "type" : "string",
+          "default" : "ViewInstanceInfo/instance_name.desc"
+        }, {
+          "name" : "page_size",
+          "in" : "query",
+          "description" : "The number of resources to be returned for the paged response.",
+          "required" : false,
+          "type" : "integer",
+          "default" : 10
+        }, {
+          "name" : "from",
+          "in" : "query",
+          "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+          "required" : false,
+          "type" : "string",
+          "default" : "0"
+        }, {
+          "name" : "to",
+          "in" : "query",
+          "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+          "required" : false,
+          "type" : "string"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation",
+            "schema" : {
+              "type" : "array",
+              "items" : {
+                "$ref" : "#/definitions/ViewInstanceResponse"
+              }
+            }
+          }
+        }
+      }
+    },
+    "/views/{viewName}/versions/{version}/instances/{instanceName}" : {
+      "get" : {
+        "tags" : [ "Views" ],
+        "summary" : "Get single view instance",
+        "description" : "Returns view instance details.",
+        "operationId" : "ViewInstanceService#getService",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "viewName",
+          "in" : "path",
+          "description" : "view name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "version",
+          "in" : "path",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "instanceName",
+          "in" : "path",
+          "description" : "instance name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter view instance details",
+          "required" : false,
+          "type" : "string",
+          "default" : "ViewInstanceInfo"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation",
+            "schema" : {
+              "$ref" : "#/definitions/ViewInstanceResponse"
+            }
+          }
+        }
+      },
+      "post" : {
+        "tags" : [ "Views" ],
+        "summary" : "Create view instance",
+        "description" : "Creates view instance resource.",
+        "operationId" : "ViewInstanceService#createService",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "viewName",
+          "in" : "path",
+          "description" : "view name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "version",
+          "in" : "path",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "instanceName",
+          "in" : "path",
+          "description" : "instance name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "in" : "body",
+          "name" : "body",
+          "description" : "input parameters in json form",
+          "required" : true,
+          "schema" : {
+            "$ref" : "#/definitions/ViewInstanceRequest"
+          }
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation"
+          },
+          "500" : {
+            "description" : "Server Error"
+          }
+        }
+      },
+      "put" : {
+        "tags" : [ "Views" ],
+        "summary" : "Update view instance detail",
+        "description" : "Updates view instance resource.",
+        "operationId" : "ViewInstanceService#updateService",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "viewName",
+          "in" : "path",
+          "description" : "view name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "version",
+          "in" : "path",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "instanceName",
+          "in" : "path",
+          "description" : "instance name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "in" : "body",
+          "name" : "body",
+          "description" : "input parameters in json form",
+          "required" : true,
+          "schema" : {
+            "$ref" : "#/definitions/ViewInstanceRequest"
+          }
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation"
+          },
+          "500" : {
+            "description" : "Server Error"
+          }
+        }
+      },
+      "delete" : {
+        "tags" : [ "Views" ],
+        "summary" : "Delete view instance",
+        "description" : "Delete view resource.",
+        "operationId" : "ViewInstanceService#deleteService",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "viewName",
+          "in" : "path",
+          "description" : "view name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "version",
+          "in" : "path",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "instanceName",
+          "in" : "path",
+          "description" : "instance name",
+          "required" : true,
+          "type" : "string"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation"
+          },
+          "500" : {
+            "description" : "Server Error"
+          }
+        }
+      }
+    },
+    "/views/{viewName}/versions/{version}/instances/{instanceName}/migrate/{originVersion}/{originInstanceName}" : {
+      "put" : {
+        "tags" : [ "Views" ],
+        "summary" : "Migrate view instance data",
+        "description" : "Migrates view instance persistence data from origin view instance specified in the path params.",
+        "operationId" : "ViewDataMigrationService#migrateData",
+        "parameters" : [ {
+          "name" : "viewName",
+          "in" : "path",
+          "description" : "view name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "version",
+          "in" : "path",
+          "description" : "view version",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "instanceName",
+          "in" : "path",
+          "description" : "instance name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "originVersion",
+          "in" : "path",
+          "description" : "origin version",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "originInstanceName",
+          "in" : "path",
+          "description" : "origin instance name",
+          "required" : true,
+          "type" : "string"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation"
+          },
+          "500" : {
+            "description" : "Server Error"
+          }
+        }
+      }
+    },
+    "/views/{viewName}/versions/{version}/instances/{instanceName}/privileges" : {
+      "get" : {
+        "tags" : [ "Views" ],
+        "summary" : "Get all view instance privileges",
+        "description" : "Returns all privileges for the resource.",
+        "operationId" : "ViewPrivilegeService#getPrivileges",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "viewName",
+          "in" : "path",
+          "description" : "view name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "version",
+          "in" : "path",
+          "description" : "view version",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "instanceName",
+          "in" : "path",
+          "description" : "instance name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter privileges",
+          "required" : false,
+          "type" : "string",
+          "default" : "PrivilegeInfo/*"
+        }, {
+          "name" : "sortBy",
+          "in" : "query",
+          "description" : "Sort privileges (asc | desc)",
+          "required" : false,
+          "type" : "string",
+          "default" : "PrivilegeInfo/user_name.asc"
+        }, {
+          "name" : "page_size",
+          "in" : "query",
+          "description" : "The number of resources to be returned for the paged response.",
+          "required" : false,
+          "type" : "integer",
+          "default" : 10
+        }, {
+          "name" : "from",
+          "in" : "query",
+          "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+          "required" : false,
+          "type" : "string",
+          "default" : "0"
+        }, {
+          "name" : "to",
+          "in" : "query",
+          "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+          "required" : false,
+          "type" : "string"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "successful operation",
+            "schema" : {
+              "type" : "array",
+              "items" : {
+                "$ref" : "#/definitions/ViewPrivilegeResponse"
+              }
+            }
+          }
+        }
+      },
+      "post" : {
+        "tags" : [ "Views" ],
+        "summary" : "Create view instance privilege",
+        "description" : "Create privilege resource for view instance.",
+        "operationId" : "ViewPrivilegeService#createPrivilege",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "viewName",
+          "in" : "path",
+          "description" : "view name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "version",
+          "in" : "path",
+          "description" : "view version",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "instanceName",
+          "in" : "path",
+          "description" : "instance name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "in" : "body",
+          "name" : "body",
+          "description" : "input parameters in json form",
+          "required" : true,
+          "schema" : {
+            "$ref" : "#/definitions/ViewPrivilegeRequest"
+          }
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation"
+          },
+          "500" : {
+            "description" : "Server Error"
+          }
+        }
+      }
+    },
+    "/views/{viewName}/versions/{version}/instances/{instanceName}/privileges/{privilegeId}" : {
+      "get" : {
+        "tags" : [ "Views" ],
+        "summary" : "Get single view instance privilege",
+        "description" : "Returns privilege details.",
+        "operationId" : "ViewPrivilegeService#getPrivilege",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "viewName",
+          "in" : "path",
+          "description" : "view name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "version",
+          "in" : "path",
+          "description" : "view version",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "instanceName",
+          "in" : "path",
+          "description" : "instance name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "privilegeId",
+          "in" : "path",
+          "description" : "privilege id",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter privilege details",
+          "required" : false,
+          "type" : "string",
+          "default" : "PrivilegeInfo"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation",
+            "schema" : {
+              "$ref" : "#/definitions/ViewPrivilegeResponse"
+            }
+          }
+        }
+      },
+      "delete" : {
+        "tags" : [ "Views" ],
+        "summary" : "Delete view instance privilege",
+        "description" : "Delete view instance privilege resource.",
+        "operationId" : "ViewPrivilegeService#deletePrivilege",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "viewName",
+          "in" : "path",
+          "description" : "view name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "version",
+          "in" : "path",
+          "description" : "view version",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "instanceName",
+          "in" : "path",
+          "description" : "instance name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "privilegeId",
+          "in" : "path",
+          "description" : "privilege id",
+          "required" : true,
+          "type" : "string"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation"
+          },
+          "500" : {
+            "description" : "Server Error"
+          }
+        }
+      }
+    },
+    "/views/{viewName}/versions/{version}/permissions" : {
+      "get" : {
+        "tags" : [ "Views" ],
+        "summary" : "Get all permissions for a view",
+        "description" : "Returns all permission details for the version of a view.",
+        "operationId" : "ViewPermissionService#getPermissions",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "viewName",
+          "in" : "path",
+          "description" : "view name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "version",
+          "in" : "path",
+          "description" : "view version",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter privileges",
+          "required" : false,
+          "type" : "string",
+          "default" : "PermissionInfo/*"
+        }, {
+          "name" : "page_size",
+          "in" : "query",
+          "description" : "The number of resources to be returned for the paged response.",
+          "required" : false,
+          "type" : "integer",
+          "default" : 10
+        }, {
+          "name" : "from",
+          "in" : "query",
+          "description" : "The starting page resource (inclusive). Valid values are :offset | \"start\"",
+          "required" : false,
+          "type" : "string",
+          "default" : "0"
+        }, {
+          "name" : "to",
+          "in" : "query",
+          "description" : "The ending page resource (inclusive). Valid values are :offset | \"end\"",
+          "required" : false,
+          "type" : "string"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation",
+            "schema" : {
+              "type" : "array",
+              "items" : {
+                "$ref" : "#/definitions/ViewPermissionResponse"
+              }
+            }
+          }
+        }
+      }
+    },
+    "/views/{viewName}/versions/{version}/permissions/{permissionId}" : {
+      "get" : {
+        "tags" : [ "Views" ],
+        "summary" : "Get single view permission",
+        "description" : "Returns permission details for a single version of a view.",
+        "operationId" : "ViewPermissionService#getPermission",
+        "produces" : [ "text/plain" ],
+        "parameters" : [ {
+          "name" : "viewName",
+          "in" : "path",
+          "description" : "view name",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "version",
+          "in" : "path",
+          "description" : "view version",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "permissionId",
+          "in" : "path",
+          "description" : "permission id",
+          "required" : true,
+          "type" : "string"
+        }, {
+          "name" : "fields",
+          "in" : "query",
+          "description" : "Filter view permission details",
+          "required" : false,
+          "type" : "string",
+          "default" : "PermissionInfo"
+        } ],
+        "responses" : {
+          "200" : {
+            "description" : "Successful operation",
+            "schema" : {
+              "$ref" : "#/definitions/ViewPermissionResponse"
+            }
+          }
+        }
+      }
+    }
+  },
+  "definitions" : {
+    "ActiveWidgetLayoutRequest" : {
+      "type" : "object",
+      "properties" : {
+        "WidgetLayouts" : {
+          "type" : "array",
+          "items" : {
+            "$ref" : "#/definitions/WidgetLayoutIdWrapper"
+          }
+        }
+      }
+    },
+    "ActiveWidgetLayoutResponse" : {
+      "type" : "object",
+      "properties" : {
+        "WidgetLayoutInfo/cluster_name" : {
+          "type" : "string"
+        },
+        "WidgetLayoutInfo/display_name" : {
+          "type" : "string"
+        },
+        "WidgetLayoutInfo/layout_name" : {
+          "type" : "string"
+        },
+        "WidgetLayoutInfo/scope" : {
+          "type" : "string"
+        },
+        "WidgetLayoutInfo/section_name" : {
+          "type" : "string"
+        },
+        "WidgetLayoutInfo/user_name" : {
+          "type" : "string"
+        },
+        "WidgetLayoutInfo/widgets" : {
+          "type" : "array",
+          "items" : {
+            "type" : "object",
+            "additionalProperties" : {
+              "$ref" : "#/definitions/WidgetResponse"
+            }
+          }
+        }
+      }
+    },
+    "GroupPrivilegeResponse" : {
+      "type" : "object",
+      "required" : [ "PrivilegeInfo/group_name" ],
+      "properties" : {
+        "PrivilegeInfo/permission_label" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/privilege_id" : {
+          "type" : "integer",
+          "format" : "int32"
+        },
+        "PrivilegeInfo/permission_name" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/principal_type" : {
+          "type" : "string",
+          "enum" : [ "USER", "GROUP", "ROLE" ]
+        },
+        "PrivilegeInfo/principal_name" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/type" : {
+          "type" : "string",
+          "enum" : [ "AMBARI", "CLUSTER", "VIEW" ]
+        },
+        "PrivilegeInfo/cluster_name" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/view_name" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/version" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/instance_name" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/group_name" : {
+          "type" : "string"
+        }
+      }
+    },
+    "GroupRequest" : {
+      "type" : "object",
+      "required" : [ "Groups/group_name" ],
+      "properties" : {
+        "Groups/group_name" : {
+          "type" : "string"
+        }
+      }
+    },
+    "GroupResponse" : {
+      "type" : "object",
+      "properties" : {
+        "Groups/group_name" : {
+          "type" : "string"
+        },
+        "Groups/ldap_group" : {
+          "type" : "boolean",
+          "default" : false
+        },
+        "Groups/group_type" : {
+          "type" : "string",
+          "enum" : [ "LOCAL", "LDAP", "JWT", "PAM" ]
+        }
+      }
+    },
+    "MemberRequest" : {
+      "type" : "object",
+      "required" : [ "MemberInfo/group_name", "MemberInfo/user_name" ],
+      "properties" : {
+        "MemberInfo/group_name" : {
+          "type" : "string"
+        },
+        "MemberInfo/user_name" : {
+          "type" : "string"
+        }
+      }
+    },
+    "MemberResponse" : {
+      "type" : "object",
+      "properties" : {
+        "MemberInfo/group_name" : {
+          "type" : "string"
+        },
+        "MemberInfo/user_name" : {
+          "type" : "string"
+        }
+      }
+    },
+    "ParameterConfig" : {
+      "type" : "object",
+      "properties" : {
+        "name" : {
+          "type" : "string"
+        },
+        "description" : {
+          "type" : "string"
+        },
+        "label" : {
+          "type" : "string"
+        },
+        "placeholder" : {
+          "type" : "string"
+        },
+        "defaultValue" : {
+          "type" : "string",
+          "xml" : {
+            "name" : "default-value"
+          }
+        },
+        "clusterConfig" : {
+          "type" : "string",
+          "xml" : {
+            "name" : "cluster-config"
+          }
+        },
+        "required" : {
+          "type" : "boolean",
+          "default" : false
+        },
+        "masked" : {
+          "type" : "boolean",
+          "default" : false
+        }
+      }
+    },
+    "PrivilegeResponse" : {
+      "type" : "object",
+      "properties" : {
+        "PrivilegeInfo/permission_label" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/privilege_id" : {
+          "type" : "integer",
+          "format" : "int32"
+        },
+        "PrivilegeInfo/permission_name" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/principal_type" : {
+          "type" : "string",
+          "enum" : [ "USER", "GROUP", "ROLE" ]
+        },
+        "PrivilegeInfo/principal_name" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/type" : {
+          "type" : "string",
+          "enum" : [ "AMBARI", "CLUSTER", "VIEW" ]
+        },
+        "PrivilegeInfo/cluster_name" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/view_name" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/version" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/instance_name" : {
+          "type" : "string"
+        }
+      }
+    },
+    "UserAuthorizationResponse" : {
+      "type" : "object",
+      "required" : [ "AuthorizationInfo/user_name" ],
+      "properties" : {
+        "AuthorizationInfo/authorization_id" : {
+          "type" : "string"
+        },
+        "AuthorizationInfo/authorization_name" : {
+          "type" : "string"
+        },
+        "AuthorizationInfo/resource_type" : {
+          "type" : "string"
+        },
+        "AuthorizationInfo/user_name" : {
+          "type" : "string"
+        },
+        "AuthorizationInfo/cluster_name" : {
+          "type" : "string"
+        },
+        "AuthorizationInfo/view_name" : {
+          "type" : "string"
+        },
+        "AuthorizationInfo/view_version" : {
+          "type" : "string"
+        },
+        "AuthorizationInfo/view_instance_name" : {
+          "type" : "string"
+        }
+      }
+    },
+    "UserPrivilegeResponse" : {
+      "type" : "object",
+      "required" : [ "PrivilegeInfo/user_name" ],
+      "properties" : {
+        "PrivilegeInfo/permission_label" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/privilege_id" : {
+          "type" : "integer",
+          "format" : "int32"
+        },
+        "PrivilegeInfo/permission_name" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/principal_type" : {
+          "type" : "string",
+          "enum" : [ "USER", "GROUP", "ROLE" ]
+        },
+        "PrivilegeInfo/principal_name" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/type" : {
+          "type" : "string",
+          "enum" : [ "AMBARI", "CLUSTER", "VIEW" ]
+        },
+        "PrivilegeInfo/cluster_name" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/view_name" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/version" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/instance_name" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/user_name" : {
+          "type" : "string"
+        }
+      }
+    },
+    "UserRequest" : {
+      "type" : "object",
+      "properties" : {
+        "Users/password" : {
+          "type" : "string"
+        },
+        "Users/old_password" : {
+          "type" : "string"
+        },
+        "Users/active" : {
+          "type" : "boolean",
+          "default" : false
+        },
+        "Users/admin" : {
+          "type" : "boolean",
+          "default" : false
+        }
+      }
+    },
+    "UserResponse" : {
+      "type" : "object",
+      "required" : [ "Users/user_name" ],
+      "properties" : {
+        "Users/user_type" : {
+          "type" : "string",
+          "enum" : [ "LOCAL", "LDAP", "JWT", "PAM" ]
+        },
+        "Users/groups" : {
+          "type" : "array",
+          "uniqueItems" : true,
+          "items" : {
+            "type" : "string"
+          }
+        },
+        "Users/user_name" : {
+          "type" : "string"
+        },
+        "Users/active" : {
+          "type" : "boolean",
+          "default" : false
+        },
+        "Users/admin" : {
+          "type" : "boolean",
+          "default" : false
+        },
+        "Users/ldap_user" : {
+          "type" : "boolean",
+          "default" : false
+        }
+      }
+    },
+    "ValidationResult" : {
+      "type" : "object",
+      "properties" : {
+        "valid" : {
+          "type" : "boolean",
+          "default" : false
+        },
+        "detail" : {
+          "type" : "string"
+        }
+      }
+    },
+    "ViewInfo" : {
+      "type" : "object",
+      "properties" : {
+        "view_name" : {
+          "type" : "string"
+        }
+      }
+    },
+    "ViewInstanceRequest" : {
+      "type" : "object",
+      "properties" : {
+        "ViewInstanceInfo" : {
+          "$ref" : "#/definitions/ViewInstanceRequestInfo"
+        }
+      }
+    },
+    "ViewInstanceRequestInfo" : {
+      "type" : "object",
+      "properties" : {
+        "label" : {
+          "type" : "string"
+        },
+        "description" : {
+          "type" : "string"
+        },
+        "visible" : {
+          "type" : "boolean",
+          "default" : false
+        },
+        "icon_path" : {
+          "type" : "string"
+        },
+        "icon64_path" : {
+          "type" : "string"
+        },
+        "properties" : {
+          "type" : "object",
+          "additionalProperties" : {
+            "type" : "string"
+          }
+        },
+        "instance_data" : {
+          "type" : "object",
+          "additionalProperties" : {
+            "type" : "string"
+          }
+        },
+        "cluster_handle" : {
+          "type" : "integer",
+          "format" : "int32"
+        },
+        "cluster_type" : {
+          "type" : "string",
+          "enum" : [ "LOCAL_AMBARI", "REMOTE_AMBARI", "NONE" ]
+        }
+      }
+    },
+    "ViewInstanceResponse" : {
+      "type" : "object",
+      "properties" : {
+        "ViewInstanceInfo" : {
+          "$ref" : "#/definitions/ViewInstanceResponseInfo"
+        }
+      }
+    },
+    "ViewInstanceResponseInfo" : {
+      "type" : "object",
+      "properties" : {
+        "view_name" : {
+          "type" : "string"
+        },
+        "version" : {
+          "type" : "string"
+        },
+        "instance_name" : {
+          "type" : "string"
+        },
+        "label" : {
+          "type" : "string"
+        },
+        "description" : {
+          "type" : "string"
+        },
+        "visible" : {
+          "type" : "boolean",
+          "default" : false
+        },
+        "icon_path" : {
+          "type" : "string"
+        },
+        "icon64_path" : {
+          "type" : "string"
+        },
+        "properties" : {
+          "type" : "object",
+          "additionalProperties" : {
+            "type" : "string"
+          }
+        },
+        "instance_data" : {
+          "type" : "object",
+          "additionalProperties" : {
+            "type" : "string"
+          }
+        },
+        "cluster_handle" : {
+          "type" : "integer",
+          "format" : "int32"
+        },
+        "cluster_type" : {
+          "type" : "string",
+          "enum" : [ "LOCAL_AMBARI", "REMOTE_AMBARI", "NONE" ]
+        },
+        "context_path" : {
+          "type" : "string"
+        },
+        "static" : {
+          "type" : "boolean",
+          "default" : false
+        },
+        "short_url" : {
+          "type" : "string"
+        },
+        "short_url_name" : {
+          "type" : "string"
+        },
+        "validation_result" : {
+          "$ref" : "#/definitions/ValidationResult"
+        },
+        "property_validation_results" : {
+          "type" : "object",
+          "additionalProperties" : {
+            "$ref" : "#/definitions/ValidationResult"
+          }
+        }
+      }
+    },
+    "ViewPermissionInfo" : {
+      "type" : "object",
+      "properties" : {
+        "view_name" : {
+          "type" : "string"
+        },
+        "version" : {
+          "type" : "string"
+        },
+        "permission_id" : {
+          "type" : "integer",
+          "format" : "int32"
+        },
+        "permission_name" : {
+          "type" : "string"
+        },
+        "resource_name" : {
+          "type" : "string"
+        }
+      }
+    },
+    "ViewPermissionResponse" : {
+      "type" : "object",
+      "properties" : {
+        "ViewPermissionInfo" : {
+          "$ref" : "#/definitions/ViewPermissionInfo"
+        }
+      }
+    },
+    "ViewPrivilegeRequest" : {
+      "type" : "object",
+      "properties" : {
+        "PrivilegeInfo/permission_name" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/principal_type" : {
+          "type" : "string",
+          "enum" : [ "USER", "GROUP", "ROLE" ]
+        },
+        "PrivilegeInfo/principal_name" : {
+          "type" : "string"
+        }
+      }
+    },
+    "ViewPrivilegeResponse" : {
+      "type" : "object",
+      "properties" : {
+        "PrivilegeInfo/permission_label" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/privilege_id" : {
+          "type" : "integer",
+          "format" : "int32"
+        },
+        "PrivilegeInfo/permission_name" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/principal_type" : {
+          "type" : "string",
+          "enum" : [ "USER", "GROUP", "ROLE" ]
+        },
+        "PrivilegeInfo/principal_name" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/view_name" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/version" : {
+          "type" : "string"
+        },
+        "PrivilegeInfo/instance_name" : {
+          "type" : "string"
+        }
+      }
+    },
+    "ViewResponse" : {
+      "type" : "object",
+      "properties" : {
+        "ViewInfo" : {
+          "$ref" : "#/definitions/ViewInfo"
+        }
+      }
+    },
+    "ViewVersionInfo" : {
+      "type" : "object",
+      "properties" : {
+        "archive" : {
+          "type" : "string"
+        },
+        "build_number" : {
+          "type" : "string"
+        },
+        "cluster_configurable" : {
+          "type" : "boolean",
+          "default" : false
+        },
+        "description" : {
+          "type" : "string"
+        },
+        "label" : {
+          "type" : "string"
+        },
+        "masker_class" : {
+          "type" : "string"
+        },
+        "max_ambari_version" : {
+          "type" : "string"
+        },
+        "min_ambari_version" : {
+          "type" : "string"
+        },
+        "parameters" : {
+          "type" : "array",
+          "items" : {
+            "$ref" : "#/definitions/ParameterConfig"
+          }
+        },
+        "status" : {
+          "type" : "string",
+          "enum" : [ "PENDING", "DEPLOYING", "DEPLOYED", "ERROR" ]
+        },
+        "status_detail" : {
+          "type" : "string"
+        },
+        "system" : {
+          "type" : "boolean",
+          "default" : false
+        },
+        "version" : {
+          "type" : "string"
+        },
+        "view_name" : {
+          "type" : "string"
+        }
+      }
+    },
+    "ViewVersionResponse" : {
+      "type" : "object",
+      "properties" : {
+        "ViewVersionInfo" : {
+          "$ref" : "#/definitions/ViewVersionInfo"
+        }
+      }
+    },
+    "WidgetLayoutIdWrapper" : {
+      "type" : "object",
+      "properties" : {
+        "id" : {
+          "type" : "integer",
+          "format" : "int64"
+        }
+      }
+    },
+    "WidgetResponse" : {
+      "type" : "object",
+      "properties" : {
+        "id" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "widgetName" : {
+          "type" : "string"
+        },
+        "widgetType" : {
+          "type" : "string"
+        },
+        "metrics" : {
+          "type" : "string"
+        },
+        "timeCreated" : {
+          "type" : "integer",
+          "format" : "int64"
+        },
+        "author" : {
+          "type" : "string"
+        },
+        "description" : {
+          "type" : "string"
+        },
+        "displayName" : {
+          "type" : "string"
+        },
+        "scope" : {
+          "type" : "string"
+        },
+        "widgetValues" : {
+          "type" : "string"
+        },
+        "properties" : {
+          "type" : "string"
+        },
+        "clusterName" : {
+          "type" : "string"
+        }
+      }
+    }
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index 618d21f..fbc2b9f 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -35,6 +35,8 @@
     <resource_management.install.dir>/usr/lib/ambari-server/lib/resource_management</resource_management.install.dir>
     <jinja.install.dir>/usr/lib/ambari-server/lib/ambari_jinja2</jinja.install.dir>
     <simplejson.install.dir>/usr/lib/ambari-server/lib/ambari_simplejson</simplejson.install.dir>
+    <swagger.spec.dir>docs/api/generated/</swagger.spec.dir>
+    <swagger.generated.resources.dir>${project.build.directory}/generated-sources/swagger</swagger.generated.resources.dir>
     <ambari-web-dir>${basedir}/../ambari-web/public</ambari-web-dir>
     <ambari-admin-dir>${basedir}/../ambari-admin</ambari-admin-dir>
     <contrib-views-dir>${basedir}/../contrib/views</contrib-views-dir>
@@ -256,6 +258,42 @@
               </resources>
             </configuration>
           </execution>
+          <execution>
+            <id>copy-swagger-spec</id>
+            <phase>compile</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${ambari-web-dir}/api-docs</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>${swagger.spec.dir}/</directory>
+                  <includes>
+                    <include>swagger.json</include>
+                  </includes>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
+          <execution>
+            <id>copy-swagger-generated-html</id>
+            <phase>process-classes</phase>
+            <goals>
+              <goal>copy-resources</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${swagger.spec.dir}</outputDirectory>
+              <resources>
+                <resource>
+                  <directory>${swagger.generated.resources.dir}/</directory>
+                  <includes>
+                    <include>index.html</include>
+                  </includes>
+                </resource>
+              </resources>
+            </configuration>
+          </execution>
         </executions>
       </plugin>
       <plugin>
@@ -309,7 +347,7 @@
             <exclude>src/main/resources/stacks/BIGTOP/0.8/services/HDFS/package/scripts/balancer-emulator/balancer-err.log</exclude>
             <exclude>src/main/resources/stacks/PHD/3.0.0.0/services/HDFS/package/scripts/balancer-emulator/balancer.log</exclude>
             <exclude>src/main/resources/stacks/PHD/3.0.0.0/services/HDFS/package/scripts/balancer-emulator/balancer-err.log</exclude>
-            <exclude>docs/api/asciidoc/**</exclude>
+            <exclude>${swagger.spec.dir}/**</exclude>
             <exclude>**/SMARTSENSE/**</exclude>
             <exclude>conf/unix/ca.config</exclude>
             <exclude>conf/unix/krb5JAASLogin.conf</exclude>
@@ -373,7 +411,7 @@
                   <name>Apache License, Version 2.0</name>
                 </license>
               </info>
-              <swaggerDirectory>${ambari-web-dir}/api-docs</swaggerDirectory>
+              <swaggerDirectory>${swagger.spec.dir}</swaggerDirectory>
             </apiSource>
           </apiSources>
         </configuration>
@@ -387,21 +425,21 @@
         </executions>
       </plugin>
       <plugin>
-        <groupId>io.github.robwin</groupId>
-        <artifactId>swagger2markup-maven-plugin</artifactId>
-        <version>0.9.3</version>
-        <configuration>
-          <inputDirectory>${ambari-web-dir}/api-docs</inputDirectory>
-          <swaggerFile>swagger.json</swaggerFile>
-          <outputDirectory>docs/api/asciidoc</outputDirectory>
-          <markupLanguage>asciidoc</markupLanguage>
-        </configuration>
+        <groupId>io.swagger</groupId>
+        <artifactId>swagger-codegen-maven-plugin</artifactId>
+        <version>2.2.2</version>
         <executions>
           <execution>
+            <id>generate-swagger-html2</id>
             <phase>process-classes</phase>
             <goals>
-              <goal>process-swagger</goal>
+              <goal>generate</goal>
             </goals>
+            <configuration>
+              <inputSpec>${swagger.spec.dir}/swagger.json</inputSpec>
+              <language>html2</language>
+              <output>${swagger.generated.resources.dir}</output>
+            </configuration>
           </execution>
         </executions>
       </plugin>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupPrivilegeService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupPrivilegeService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupPrivilegeService.java
index 8a23885..72f4d82 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupPrivilegeService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupPrivilegeService.java
@@ -62,7 +62,7 @@ public class GroupPrivilegeService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Get all privileges", notes = "Returns all privileges for group.", response = GroupPrivilegeResponse.class, responseContainer = "List")
+  @ApiOperation(value = "Get all privileges", nickname = "GroupPrivilegeService#getPrivileges", notes = "Returns all privileges for group.", response = GroupPrivilegeResponse.class, responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter user privileges", defaultValue = "PrivilegeInfo/*", dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "sortBy", value = "Sort user privileges (asc | desc)", defaultValue = "PrivilegeInfo/user_name.asc", dataType = "string", paramType = "query"),
@@ -90,14 +90,14 @@ public class GroupPrivilegeService extends BaseService {
   @GET
   @Path("{privilegeId}")
   @Produces("text/plain")
-  @ApiOperation(value = "Get group privilege", notes = "Returns group privilege details.", response = GroupPrivilegeResponse.class)
+  @ApiOperation(value = "Get group privilege", nickname = "GroupPrivilegeService#getPrivilege", notes = "Returns group privilege details.", response = GroupPrivilegeResponse.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter group privilege details", defaultValue = "PrivilegeInfo/*", dataType = "string", paramType = "query")
   })
   @ApiResponses(value = {
     @ApiResponse(code = 200, message = "Successful operation", response = PrivilegeResponse.class)}
   )
-  public Response getPrivilege(@Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "user name", required = true) @PathParam ("userName") String groupName,
+  public Response getPrivilege(@Context HttpHeaders headers, @Context UriInfo ui, @ApiParam(value = "group name", required = true) @PathParam ("groupName") String groupName,
                                @ApiParam(value = "privilege id", required = true) @PathParam("privilegeId") String privilegeId) {
     return handleRequest(headers, null, ui, Request.Type.GET, createPrivilegeResource(groupName, privilegeId));
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupService.java
index ad9db28..6f48403 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/GroupService.java
@@ -59,7 +59,7 @@ public class GroupService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Get all groups", notes = "Returns details of all groups.", response = GroupResponse.class, responseContainer = "List")
+  @ApiOperation(value = "Get all groups", nickname = "GroupService#getGroups", notes = "Returns details of all groups.", response = GroupResponse.class, responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter group details", defaultValue = "Groups/*", dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "sortBy", value = "Sort groups (asc | desc)", defaultValue = "Groups/group_name.asc", dataType = "string", paramType = "query"),
@@ -86,7 +86,7 @@ public class GroupService extends BaseService {
   @GET
   @Path("{groupName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Get group", notes = "Returns group details.", response = GroupResponse.class)
+  @ApiOperation(value = "Get group", nickname = "GroupService#getGroup", notes = "Returns group details.", response = GroupResponse.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter group details", defaultValue = "Groups", dataType = "string", paramType = "query")
   })
@@ -108,7 +108,7 @@ public class GroupService extends BaseService {
    */
    @POST
    @Produces("text/plain")
-   @ApiOperation(value = "Create new group", notes = "Creates group resource.")
+   @ApiOperation(value = "Create new group", nickname = "GroupService#createGroup", notes = "Creates group resource.")
    @ApiImplicitParams({
      @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.GroupRequest", paramType = "body")
    })
@@ -152,7 +152,7 @@ public class GroupService extends BaseService {
   @DELETE
   @Path("{groupName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Delete group", notes = "Delete group resource.")
+  @ApiOperation(value = "Delete group", nickname = "GroupService#deleteGroup", notes = "Delete group resource.")
   @ApiResponses(value = {
     @ApiResponse(code = 200, message = "Successful operation"),
     @ApiResponse(code = 500, message = "Server Error")}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/MemberService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/MemberService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/MemberService.java
index ec02511..0ccc472 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/MemberService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/groups/MemberService.java
@@ -98,7 +98,7 @@ public class MemberService extends BaseService {
    @DELETE
    @Path("{userName}")
    @Produces("text/plain")
-   @ApiOperation(value = "Delete group member", notes = "Delete member resource.")
+   @ApiOperation(value = "Delete group member", nickname = "MemberService#deleteMember", notes = "Delete member resource.")
    @ApiResponses(value = {
      @ApiResponse(code = 200, message = "Successful operation"),
      @ApiResponse(code = 500, message = "Server Error")}
@@ -119,7 +119,7 @@ public class MemberService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Get all group members", notes = "Returns details of all members.", response = MemberResponse.class, responseContainer = "List")
+  @ApiOperation(value = "Get all group members", nickname = "MemberService#getMembers", notes = "Returns details of all members.", response = MemberResponse.class, responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter member details", defaultValue = "MemberInfo/*", dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "sortBy", value = "Sort members (asc | desc)", defaultValue = "MemberInfo/user_name.asc", dataType = "string", paramType = "query"),
@@ -147,7 +147,7 @@ public class MemberService extends BaseService {
   @GET
   @Path("{userName}")
   @Produces("text/plain")
-  @ApiOperation(value = "Get group member", notes = "Returns member details.", response = MemberResponse.class)
+  @ApiOperation(value = "Get group member", nickname = "MemberService#getMember", notes = "Returns member details.", response = MemberResponse.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter member details", defaultValue = "MemberInfo", dataType = "string", paramType = "query")
   })
@@ -170,7 +170,7 @@ public class MemberService extends BaseService {
    */
   @PUT
   @Produces("text/plain")
-  @ApiOperation(value = "Update group members", notes = "Updates group member resources.", responseContainer = "List")
+  @ApiOperation(value = "Update group members", nickname = "MemberService#updateMembers", notes = "Updates group member resources.", responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.MemberRequest", paramType = "body")
   })

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/ActiveWidgetLayoutService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/ActiveWidgetLayoutService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/ActiveWidgetLayoutService.java
index 30714d4..3dea1ca 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/ActiveWidgetLayoutService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/ActiveWidgetLayoutService.java
@@ -64,7 +64,7 @@ public class ActiveWidgetLayoutService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Get user widget layouts", notes = "Returns all active widget layouts for user.", response = ActiveWidgetLayoutResponse.class, responseContainer = "List")
+  @ApiOperation(value = "Get user widget layouts", nickname = "ActiveWidgetLayoutService#getServices", notes = "Returns all active widget layouts for user.", response = ActiveWidgetLayoutResponse.class, responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter user layout details", defaultValue = "WidgetLayoutInfo/*", dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "sortBy", value = "Sort layouts (asc | desc)", defaultValue = "WidgetLayoutInfo/user_name.asc", dataType = "string", paramType = "query"),
@@ -88,7 +88,7 @@ public class ActiveWidgetLayoutService extends BaseService {
    */
   @PUT
   @Produces("text/plain")
-  @ApiOperation(value = "Update user widget layouts", notes = "Updates user widget layout.")
+  @ApiOperation(value = "Update user widget layouts", nickname = "ActiveWidgetLayoutService#updateServices", notes = "Updates user widget layout.")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "body", value = "input parameters in json form", required = true, dataType = "org.apache.ambari.server.controller.ActiveWidgetLayoutRequest", paramType = "body")
   })

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserAuthorizationService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserAuthorizationService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserAuthorizationService.java
index e6fda46..195f2e7 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserAuthorizationService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserAuthorizationService.java
@@ -67,7 +67,7 @@ public class UserAuthorizationService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Get all authorizations", notes = "Returns all authorization for user.", response = UserAuthorizationResponse.class, responseContainer = "List")
+  @ApiOperation(value = "Get all authorizations", nickname = "UserAuthorizationService#getAuthorizations", notes = "Returns all authorization for user.", response = UserAuthorizationResponse.class, responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter user authorization details", defaultValue = "AuthorizationInfo/*", dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "sortBy", value = "Sort user authorizations (asc | desc)", defaultValue = "AuthorizationInfo/user_name.asc", dataType = "string", paramType = "query"),
@@ -93,7 +93,7 @@ public class UserAuthorizationService extends BaseService {
   @GET
   @Path("{authorization_id}")
   @Produces("text/plain")
-  @ApiOperation(value = "Get user authorization", notes = "Returns user authorization details.", response = UserAuthorizationResponse.class)
+  @ApiOperation(value = "Get user authorization", nickname = "UserAuthorizationService#getAuthorization", notes = "Returns user authorization details.", response = UserAuthorizationResponse.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter user authorization details", defaultValue = "AuthorizationInfo/*", dataType = "string", paramType = "query")
   })

http://git-wip-us.apache.org/repos/asf/ambari/blob/3cb45e84/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserPrivilegeService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserPrivilegeService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserPrivilegeService.java
index d6b4b29..293b45f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserPrivilegeService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/users/UserPrivilegeService.java
@@ -63,7 +63,7 @@ public class UserPrivilegeService extends BaseService {
    */
   @GET
   @Produces("text/plain")
-  @ApiOperation(value = "Get all privileges", notes = "Returns all privileges for user.", response = UserPrivilegeResponse.class, responseContainer = "List")
+  @ApiOperation(value = "Get all privileges", nickname = "UserPrivilegeService#getPrivileges", notes = "Returns all privileges for user.", response = UserPrivilegeResponse.class, responseContainer = "List")
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter user privileges", defaultValue = "PrivilegeInfo/*", dataType = "string", paramType = "query"),
     @ApiImplicitParam(name = "sortBy", value = "Sort user privileges (asc | desc)", defaultValue = "PrivilegeInfo/user_name.asc", dataType = "string", paramType = "query"),
@@ -91,7 +91,7 @@ public class UserPrivilegeService extends BaseService {
   @GET
   @Path("{privilegeId}")
   @Produces("text/plain")
-  @ApiOperation(value = "Get user privilege", notes = "Returns user privilege details.", response = UserPrivilegeResponse.class)
+  @ApiOperation(value = "Get user privilege", nickname = "UserPrivilegeService#getPrivilege", notes = "Returns user privilege details.", response = UserPrivilegeResponse.class)
   @ApiImplicitParams({
     @ApiImplicitParam(name = "fields", value = "Filter user privilege details", defaultValue = "PrivilegeInfo/*", dataType = "string", paramType = "query")
   })


[03/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/swagger-ui.js
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/swagger-ui.js b/ambari-web/api-docs/swagger-ui.js
new file mode 100644
index 0000000..c644c64
--- /dev/null
+++ b/ambari-web/api-docs/swagger-ui.js
@@ -0,0 +1,22644 @@
+/**
+ * swagger-ui - Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API
+ * @version v2.1.1-M2
+ * @link http://swagger.io
+ * @license Apache 2.0
+ */
+(function(){this["Handlebars"] = this["Handlebars"] || {};
+this["Handlebars"]["templates"] = this["Handlebars"]["templates"] || {};
+this["Handlebars"]["templates"]["apikey_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "<div class='auth_button' id='apikey_button'>\n    <!--img class='auth_icon' alt='apply api key' src='images/apikey.jpeg'-->\n</div>\n<div class='auth_container' id='apikey_container'>\n  <div class='key_input_container'>\n    <div class='auth_label'>"
+    + escapeExpression(((helper = (helper = helpers.keyName || (depth0 != null ? depth0.keyName : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"keyName","hash":{},"data":data}) : helper)))
+    + "</div>\n    <input placeholder=\"api_key\" class=\"auth_input\" id=\"input_apiKey_entry\" name=\"apiKey\" type=\"text\"/>\n    <div class='auth_submit'><a class='auth_submit_button' id=\"apply_api_key\" href=\"#\">apply</a></div>\n  </div>\n</div>\n\n";
+},"useData":true});
+this["Handlebars"]["templates"]["basic_auth_button_view"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+  return "<div class='auth_button' id='basic_auth_button'><img class='auth_icon' src='images/password.jpeg'></div>\n<div class='auth_container' id='basic_auth_container'>\n  <div class='key_input_container'>\n    <div class=\"auth_label\">Username</div>\n    <input placeholder=\"username\" class=\"auth_input\" id=\"input_username\" name=\"username\" type=\"text\"/>\n    <div class=\"auth_label\">Password</div>\n    <input placeholder=\"password\" class=\"auth_input\" id=\"input_password\" name=\"password\" type=\"password\"/>\n    <div class='auth_submit'><a class='auth_submit_button' id=\"apply_basic_auth\" href=\"#\">apply</a></div>\n  </div>\n</div>\n\n";
+  },"useData":true});
+this["Handlebars"]["templates"]["content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
+  var stack1, buffer = "";
+  stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer;
+},"2":function(depth0,helpers,partials,data) {
+  var stack1, lambda=this.lambda, buffer = "	<option value=\"";
+  stack1 = lambda(depth0, depth0);
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "\">";
+  stack1 = lambda(depth0, depth0);
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "</option>\n";
+},"4":function(depth0,helpers,partials,data) {
+  return "  <option value=\"application/json\">application/json</option>\n";
+  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+  var stack1, buffer = "<label for=\"contentType\"></label>\n<select name=\"contentType\">\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(4, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "</select>\n";
+},"useData":true});
+'use strict';
+
+
+$(function () {
+
+  // Helper function for vertically aligning DOM elements
+  // http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/
+  $.fn.vAlign = function () {
+    return this.each(function () {
+      var ah = $(this).height();
+      var ph = $(this).parent().height();
+      var mh = (ph - ah) / 2;
+      $(this).css('margin-top', mh);
+    });
+  };
+
+  $.fn.stretchFormtasticInputWidthToParent = function () {
+    return this.each(function () {
+      var p_width = $(this).closest("form").innerWidth();
+      var p_padding = parseInt($(this).closest("form").css('padding-left'), 10) + parseInt($(this).closest('form').css('padding-right'), 10);
+      var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10);
+      $(this).css('width', p_width - p_padding - this_padding);
+    });
+  };
+
+  $('form.formtastic li.string input, form.formtastic textarea').stretchFormtasticInputWidthToParent();
+
+  // Vertically center these paragraphs
+  // Parent may need a min-height for this to work..
+  $('ul.downplayed li div.content p').vAlign();
+
+  // When a sandbox form is submitted..
+  $("form.sandbox").submit(function () {
+
+    var error_free = true;
+
+    // Cycle through the forms required inputs
+    $(this).find("input.required").each(function () {
+
+      // Remove any existing error styles from the input
+      $(this).removeClass('error');
+
+      // Tack the error style on if the input is empty..
+      if ($(this).val() === '') {
+        $(this).addClass('error');
+        $(this).wiggle();
+        error_free = false;
+      }
+
+    });
+
+    return error_free;
+  });
+
+});
+
+function clippyCopiedCallback() {
+  $('#api_key_copied').fadeIn().delay(1000).fadeOut();
+
+  // var b = $("#clippy_tooltip_" + a);
+  // b.length != 0 && (b.attr("title", "copied!").trigger("tipsy.reload"), setTimeout(function() {
+  //   b.attr("title", "copy to clipboard")
+  // },
+  // 500))
+}
+
+// Logging function that accounts for browsers that don't have window.console
+function log() {
+  log.history = log.history || [];
+  log.history.push(arguments);
+  if (this.console) {
+    console.log(Array.prototype.slice.call(arguments)[0]);
+  }
+}
+
+// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913)
+if (Function.prototype.bind && console && typeof console.log === "object") {
+  [
+    "log", "info", "warn", "error", "assert", "dir", "clear", "profile", "profileEnd"
+  ].forEach(function (method) {
+      console[method] = this.bind(console[method], console);
+    }, Function.prototype.call);
+}
+
+window.Docs = {
+
+  shebang: function () {
+
+    // If shebang has an operation nickname in it..
+    // e.g. /docs/#!/words/get_search
+    var fragments = $.param.fragment().split('/');
+    fragments.shift(); // get rid of the bang
+
+    switch (fragments.length) {
+      case 1:
+        break;
+      case 2:
+        var target = '#resources_nav [data-resource] [data-endpoint=' + fragments[0] + '_' + fragments[1] + ']',
+          n = $('#swagger_sidebar').find(target),
+          attr = n.attr('data-selected');
+
+        if (typeof attr == typeof undefined) {
+          n.trigger("click");
+        }
+        break;
+    }
+
+  }
+
+};
+
+'use strict';
+
+Handlebars.registerHelper('sanitize', function(html) {
+    // Strip the script tags from the html, and return it as a Handlebars.SafeString
+    html = html.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '');
+    return new Handlebars.SafeString(html);
+});
+this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
+  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = "                        <span class=\"info_title\">"
+    + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0))
+    + "</span>\n                        <span class=\"markdown\">";
+  stack1 = lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.description : stack1), depth0);
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "</span>\n";
+},"3":function(depth0,helpers,partials,data) {
+  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
+  return "                        <span class='info_email'>\n                            Contact: <a href=\"mailto:"
+    + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1), depth0))
+    + "?subject="
+    + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0))
+    + "\">"
+    + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1), depth0))
+    + "</a>\n                        </span><br><br>\n";
+},"5":function(depth0,helpers,partials,data) {
+  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;
+  return "                    <span style=\"font-variant: small-caps\">api version</span>: "
+    + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1), depth0))
+    + "\n";
+},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div id=\"swagger_sidebar\">\n    <div class=\"sticky-nav-placeholder\">\n        <div class=\"sticky-nav\">\n            <div class=\"mobile-nav\">\n                <span class=\"select-label\">API Reference: </span><span data-selected-value></span>\n            </div>\n\n            <div class=\"token-generator hide\">\n                <span data-close class=\"icon-budicon-471\"></span>\n                <label for=\"input-api-token\">Url</label>\n                <input type=\"text\" autocorrect=\"off\" class=\"ui-form-control\" id=\"input_baseUrl\"\n                       placeholder=\"http://example.com/api\">\n\n                <div class=\"scope-selector\">\n                    <label for=\"scopes\">Token</label>\n\n                    <div class=\"area controls\">\n                        <input type=\"text\" autocorrect=\"off\" class=\"ui-form-
 control\" id=\"input_apiKey\"\n                               placeholder=\"Enter api key or token\">\n                    </div>\n\n                    <div class=\"area cta\">\n                        <div data-add-scope id=\"explore\" class=\"btn\"><span class=\"icon-budicon-519\"></span>\n                        </div>\n                    </div>\n                </div>\n\n            </div>\n            <div data-navigator>\n                <div data-resource=\"\" label=\"Tools\">\n                    <div class=\"item\" data-tg-switch=\"\">Swagger resource <span class=\"status\"></span></div>\n                </div>\n                <div id=\"resources_nav\">\n                </div>\n            </div>\n\n            <p class=\"changes-disclaimer\">\n                <span class='info' id='api_info'>\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.info : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "\n                </span>\n\n                <span class='info' id='api_info'>\n";
+  stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "                </span>\n\n                <span style=\"font-variant: small-caps\">base url</span>: "
+    + escapeExpression(((helper = (helper = helpers.basePath || (depth0 != null ? depth0.basePath : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"basePath","hash":{},"data":data}) : helper)))
+    + "\n";
+  stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "            </p>\n        </div>\n    </div>\n</div>\n\n<div id='resources_container'>\n    <ul id='resources' class=\"samples-collapsed\"></ul>\n</div>\n";
+},"useData":true});
+this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
+  return "deprecated";
+  },"3":function(depth0,helpers,partials,data) {
+  return "                <h4>Warning: Deprecated</h4>\n";
+  },"5":function(depth0,helpers,partials,data) {
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, buffer = "                <div class=\"markdown action-summary\">";
+  stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "</div>\n";
+},"7":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "                    <h4 data-control data-parm-toggle data-toggle=\"collapse\"\n                        data-target=\"#parm-"
+    + escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper)))
+    + "_"
+    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))
+    + "\">\n                        Parameters\n                    </h4>\n\n                    <div data-content class=\"operation-params collapse in\" id=\"parm-"
+    + escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper)))
+    + "_"
+    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))
+    + "\">\n                    </div>\n\n";
+},"9":function(depth0,helpers,partials,data) {
+  return "                        <div class=\"auth\">\n";
+  },"11":function(depth0,helpers,partials,data) {
+  var stack1, buffer = "                            <div id=\"api_information_panel\" style=\"top: 526px; left: 776px; display: none;\">\n";
+  stack1 = helpers.each.call(depth0, depth0, {"name":"each","hash":{},"fn":this.program(12, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "                            </div>\n";
+},"12":function(depth0,helpers,partials,data) {
+  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = "                                    <div title='";
+  stack1 = lambda((depth0 != null ? depth0.description : depth0), depth0);
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "'>"
+    + escapeExpression(lambda((depth0 != null ? depth0.scope : depth0), depth0))
+    + "</div>\n";
+},"14":function(depth0,helpers,partials,data) {
+  return "                            <button type=\"button\" class=\"api-ic ic-off btn btn-default pull-right\">Oauth</button>\n                        </div>\n";
+  },"16":function(depth0,helpers,partials,data) {
+  return "                        <div class=\"response-content-type\"/>\n";
+  },"18":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "                    <div style=\"margin:0;padding:0;display:inline\"></div>\n                    <h4 data-control data-toggle=\"collapse\" data-target=\"#response-"
+    + escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper)))
+    + "_"
+    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))
+    + "\">\n                        Response Messages\n                    </h4>\n\n                    <div data-content class=\"responses-wrapper collapse in\" id=\"response-"
+    + escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper)))
+    + "_"
+    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))
+    + "\">\n                        <table class=\"fullwidth\">\n                            <tbody class=\"operation-status\">\n                            </tbody>\n                        </table>\n                    </div>\n";
+},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+  var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = "<ul class='operations'>\n    <li class='"
+    + escapeExpression(((helper = (helper = helpers.method || (depth0 != null ? depth0.method : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"method","hash":{},"data":data}) : helper)))
+    + " operation' id='"
+    + escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper)))
+    + "_"
+    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))
+    + "'>\n        <div class='content'>\n            <div class='heading'>\n                <h2 class='operation-title'>"
+    + escapeExpression(((helper = (helper = helpers.summary || (depth0 != null ? depth0.summary : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"summary","hash":{},"data":data}) : helper)))
+    + "</h2>\n\n                <h3>\n                    <span class='http_method'>\n                        <a href='#!/"
+    + escapeExpression(((helper = (helper = helpers.encodedParentId || (depth0 != null ? depth0.encodedParentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"encodedParentId","hash":{},"data":data}) : helper)))
+    + "/"
+    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))
+    + "'>"
+    + escapeExpression(((helper = (helper = helpers.method || (depth0 != null ? depth0.method : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"method","hash":{},"data":data}) : helper)))
+    + "</a>\n                    </span>\n                    <span class='path'>\n                        <a href='#!/"
+    + escapeExpression(((helper = (helper = helpers.encodedParentId || (depth0 != null ? depth0.encodedParentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"encodedParentId","hash":{},"data":data}) : helper)))
+    + "/"
+    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))
+    + "'\n                           class=\"";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.deprecated : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "\">"
+    + escapeExpression(((helper = (helper = helpers.path || (depth0 != null ? depth0.path : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"path","hash":{},"data":data}) : helper)))
+    + "</a>\n                    </span>\n                </h3>\n            </div>\n\n            <a href=\"javascript:;\" class=\"toggle-samples\" data-toggle=\"tooltip\" data-placement=\"left\"\n               data-original-title title>\n                <span class=\"text\">Show samples</span><span class=\"circle-icon\"></span>\n            </a>\n\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.deprecated : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.description : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "\n\n            <form accept-charset=\"UTF-8\" class=\"sandbox\">\n\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.parameters : depth0), {"name":"if","hash":{},"fn":this.program(7, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "\n                <h4 data-control data-toggle=\"collapse\" data-target=\"#test-"
+    + escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper)))
+    + "_"
+    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))
+    + "\">\n                    Test this endpoint\n                </h4>\n\n                <div id=\"test-"
+    + escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper)))
+    + "_"
+    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))
+    + "\">\n                    <div class=\"sandbox_header collapse in\" data-content>\n                        <input class=\"submit btn btn-primary\" name=\"commit\" type=\"submit\" value=\"Try\"\n                               data-target=\"#get_clients-modal-request\">\n                        <a href=\"#\" class=\"response_hider hide\" style=\"display: inline;\">Hide Response</a>\n                        <!--small class=\"curl-copy-message hide\" style=\"display:none;\">Copied to clipboard</small-->\n                        <!--span class=\"response_throbber hide\" style=\"display: none;\"></span-->\n\n";
+  stack1 = ((helper = (helper = helpers.oauth || (depth0 != null ? depth0.oauth : depth0)) != null ? helper : helperMissing),(options={"name":"oauth","hash":{},"fn":this.program(9, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper));
+  if (!helpers.oauth) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "\n";
+  stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.oauth : depth0), {"name":"each","hash":{},"fn":this.program(11, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "\n";
+  stack1 = ((helper = (helper = helpers.oauth || (depth0 != null ? depth0.oauth : depth0)) != null ? helper : helperMissing),(options={"name":"oauth","hash":{},"fn":this.program(14, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper));
+  if (!helpers.oauth) { stack1 = blockHelperMissing.call(depth0, stack1, options); }
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "\n                    </div>\n\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.type : depth0), {"name":"if","hash":{},"fn":this.program(16, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "\n                </div>\n\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.responseMessages : depth0), {"name":"if","hash":{},"fn":this.program(18, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "            </form>\n\n        </div>\n\n        <div class=\"samples\">\n                <span class=\"model-signature\">\n                </span>\n        </div>\n\n        <div class=\"modal\" id=\"modal-"
+    + escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper)))
+    + "_"
+    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))
+    + "\">\n            <div class=\"modal-dialog\">\n                <div class=\"modal-content\">\n                    <div class=\"modal-header\">\n                        <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n                            <span aria-hidden=\"true\">×</span>\n                        </button>\n                        <h3 class=\"modal-title\">\n                            "
+    + escapeExpression(((helper = (helper = helpers.summary || (depth0 != null ? depth0.summary : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"summary","hash":{},"data":data}) : helper)))
+    + "\n                            <span class=\"http_method\">\n                                <span class=\"text\">\n                                    "
+    + escapeExpression(((helper = (helper = helpers.method || (depth0 != null ? depth0.method : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"method","hash":{},"data":data}) : helper)))
+    + "\n                                </span>\n                            </span>\n                        </h3>\n                    </div>\n                    <div class=\"modal-body\">\n                        <div class='response'>\n                            <h5>Request URL</h5>\n\n                            <div class='block request_url'></div>\n                            <h5>Response Body</h5>\n\n                            <div class='block response_body'></div>\n                            <h5>Response Code</h5>\n\n                            <div class='block response_code'></div>\n                            <h5>Response Headers</h5>\n\n                            <div class='block response_headers'></div>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </li>\n</ul>";
+},"useData":true});
+this["Handlebars"]["templates"]["param_list"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
+  return " multiple='multiple'";
+  },"3":function(depth0,helpers,partials,data) {
+  return "";
+},"5":function(depth0,helpers,partials,data) {
+  var stack1, buffer = "";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.program(6, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer;
+},"6":function(depth0,helpers,partials,data) {
+  return "                        <option selected=\"\" value=''></option>\n";
+  },"8":function(depth0,helpers,partials,data) {
+  var stack1, buffer = "";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isDefault : depth0), {"name":"if","hash":{},"fn":this.program(9, data),"inverse":this.program(11, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer;
+},"9":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "                    <option selected=\"\" value='"
+    + escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
+    + "'>"
+    + escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
+    + " (default)</option>\n";
+},"11":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "                    <option value='"
+    + escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
+    + "'>"
+    + escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))
+    + "</option>\n";
+},"13":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "                <code class=\"code-signature\">"
+    + escapeExpression(((helper = (helper = helpers.type || (depth0 != null ? depth0.type : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper)))
+    + "</code>\n";
+},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div class=\"param-property hide\" data-label=\"name\">"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "</div>\n<div class=\"param-property\" data-label='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'>\n    <div>\n        <select ";
+  stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}));
+  if (stack1 != null) { buffer += stack1; }
+  buffer += " class='parameter ui-form-control' name='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'  data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-original-title='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'>\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.program(5, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  stack1 = helpers.each.call(depth0, ((stack1 = (depth0 != null ? depth0.allowableValues : depth0)) != null ? stack1.descriptiveValues : stack1), {"name":"each","hash":{},"fn":this.program(8, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "        </select>\n        <div class=\"small-description\">\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.type : depth0), {"name":"if","hash":{},"fn":this.program(13, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "            <div class=\"markdown\">"
+    + escapeExpression(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)))
+    + "</div>\n        </div>\n    </div>\n</div>\n\n";
+},"useData":true});
+this["Handlebars"]["templates"]["param_readonly_required"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "            <textarea class='body-textarea ui-form-control' readonly='readonly' placeholder='(required)' name='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'  data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'>"
+    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
+    + "</textarea>\n            <div class=\"parameter-content-type\"/>\n";
+},"3":function(depth0,helpers,partials,data) {
+  var stack1, buffer = "";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.program(6, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer;
+},"4":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "                "
+    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
+    + "\n";
+},"6":function(depth0,helpers,partials,data) {
+  return "                (empty)\n";
+  },"8":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "                <code class=\"code-signature\">"
+    + escapeExpression(((helper = (helper = helpers.type || (depth0 != null ? depth0.type : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper)))
+    + "</code>\n";
+},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div class=\"param-property hide\" data-label=\"name\">"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "</div>\n<div class=\"param-property\" data-label='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'>\n    <div>\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "        <div class=\"small-description\">\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.type : depth0), {"name":"if","hash":{},"fn":this.program(8, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "            <div class=\"markdown\">"
+    + escapeExpression(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)))
+    + "</div>\n        </div>\n    </div>\n</div>\n";
+},"useData":true});
+this["Handlebars"]["templates"]["param_readonly"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "            <textarea class='body-textarea ui-form-control' readonly='readonly' name='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'  data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'>"
+    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
+    + "</textarea>\n            <div class=\"parameter-content-type\"/>\n";
+},"3":function(depth0,helpers,partials,data) {
+  var stack1, buffer = "";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.program(6, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer;
+},"4":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "                "
+    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
+    + "\n";
+},"6":function(depth0,helpers,partials,data) {
+  return "                (empty)\n";
+  },"8":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "                <code class=\"code-signature\">"
+    + escapeExpression(((helper = (helper = helpers.type || (depth0 != null ? depth0.type : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper)))
+    + "</code>\n";
+},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div class=\"param-property hide\" data-label=\"name\">"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "</div>\n<div class=\"param-property\" data-label='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'>\n    <div>\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "        <div class=\"small-description\">\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.type : depth0), {"name":"if","hash":{},"fn":this.program(8, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "            <div class=\"markdown\">"
+    + escapeExpression(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)))
+    + "</div>\n        </div>\n    </div>\n</div>\n";
+},"useData":true});
+this["Handlebars"]["templates"]["param_required"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
+  var stack1, buffer = "";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(4, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer;
+},"2":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "            <input type=\"file\" name='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'/>\n";
+},"4":function(depth0,helpers,partials,data) {
+  var stack1, buffer = "";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer;
+},"5":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "                <div class=\"editor_holder\"></div>\n                <textarea class='body-textarea ui-form-control required' placeholder='(required)' name='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'  data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'>"
+    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
+    + "</textarea>\n                <div class=\"parameter-content-type\"/>\n";
+},"7":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "                <textarea class='body-textarea ui-form-control required' placeholder='(required)' name='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "' data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'></textarea>\n                <div class=\"editor_holder\"></div>\n                <br/>\n                <div class=\"parameter-content-type\"/>\n";
+},"9":function(depth0,helpers,partials,data) {
+  var stack1, buffer = "";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.program(12, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer;
+},"10":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "            <input class='parameter ui-form-control required' type='file' name='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'/>\n";
+},"12":function(depth0,helpers,partials,data) {
+  var stack1, buffer = "";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(13, data),"inverse":this.program(15, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer;
+},"13":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "                <input class='parameter ui-form-control required' minlength='1' name='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "' placeholder='(required)' type='"
+    + escapeExpression(((helper = (helper = helpers.inputType || (depth0 != null ? depth0.inputType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"inputType","hash":{},"data":data}) : helper)))
+    + "' value='"
+    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
+    + "' data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-original-title='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'/>\n";
+},"15":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "                <input class='parameter ui-form-control required' minlength='1' name='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "' placeholder='(required)' type='"
+    + escapeExpression(((helper = (helper = helpers.inputType || (depth0 != null ? depth0.inputType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"inputType","hash":{},"data":data}) : helper)))
+    + "' value='' data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-original-title='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'/>\n";
+},"17":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "            <code class=\"code-signature\">"
+    + escapeExpression(((helper = (helper = helpers.type || (depth0 != null ? depth0.type : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper)))
+    + "</code>\n";
+},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div class=\"param-property hide\">"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "</div>\n<div class=\"param-property\" data-label='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'>\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(9, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "    <div class=\"small-description\">\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.type : depth0), {"name":"if","hash":{},"fn":this.program(17, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "        <div class=\"markdown\">"
+    + escapeExpression(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)))
+    + "</div>\n    </div>\n</div>\n\n";
+},"useData":true});
+this["Handlebars"]["templates"]["param"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(4, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "        <div class=\"small-description\">\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.type : depth0), {"name":"if","hash":{},"fn":this.program(9, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "            <div class=\"markdown\">"
+    + escapeExpression(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)))
+    + "</div>\n        </div>\n";
+},"2":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "            <input type=\"file\" name='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'/>\n\n            <div class=\"parameter-content-type\"/>\n";
+},"4":function(depth0,helpers,partials,data) {
+  var stack1, buffer = "";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer;
+},"5":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "                <div class=\"editor_holder\"></div>\n\n                <textarea class='body-textarea ui-form-control' name='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "' data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'>"
+    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
+    + "</textarea>\n                <div class=\"parameter-content-type\"/>\n";
+},"7":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "                <textarea class='body-textarea ui-form-control' name='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "' data-toggle=\"tooltip\" data-placement=\"top\" title=\"\" data-original-title='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'></textarea>\n                <div class=\"editor_holder\"></div>\n                <div class=\"parameter-content-type\"/>\n";
+},"9":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "                <code class=\"code-signature\">"
+    + escapeExpression(((helper = (helper = helpers.type || (depth0 != null ? depth0.type : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper)))
+    + "</code>\n";
+},"11":function(depth0,helpers,partials,data) {
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(12, data),"inverse":this.program(14, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "        <div class=\"small-description\">\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.type : depth0), {"name":"if","hash":{},"fn":this.program(9, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "            <div class=\"markdown\">"
+    + escapeExpression(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)))
+    + "</div>\n        </div>\n";
+},"12":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "\n            <label class=\"btn btn-primary\" for=\"my-file-selector\">\n                <input id=\"my-file-selector\" type=\"file\" style=\"display:none;\" name='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'>\n                Choose file\n            </label>\n            <div class=\"parameter-content-type\"/>\n";
+},"14":function(depth0,helpers,partials,data) {
+  var stack1, buffer = "";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(15, data),"inverse":this.program(17, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer;
+},"15":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "                <input class='parameter ui-form-control' minlength='0' name='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "' placeholder='' type='"
+    + escapeExpression(((helper = (helper = helpers.inputType || (depth0 != null ? depth0.inputType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"inputType","hash":{},"data":data}) : helper)))
+    + "' value='"
+    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))
+    + "'  data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-original-title='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'/>\n";
+},"17":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "                <input class='parameter ui-form-control' minlength='0' name='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "' placeholder='' type='"
+    + escapeExpression(((helper = (helper = helpers.inputType || (depth0 != null ? depth0.inputType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"inputType","hash":{},"data":data}) : helper)))
+    + "' value=''  data-toggle=\"tooltip\" data-placement=\"right\" title=\"\" data-original-title='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'/>\n";
+},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div class=\"param-property hide\">"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "</div>\n<div class=\"param-property\" data-label='"
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))
+    + "'>\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(11, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "</div>";
+},"useData":true});
+this["Handlebars"]["templates"]["parameter_content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
+  var stack1, buffer = "";
+  stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.consumes : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer;
+},"2":function(depth0,helpers,partials,data) {
+  var stack1, lambda=this.lambda, buffer = "                <option value=\"";
+  stack1 = lambda(depth0, depth0);
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "\">";
+  stack1 = lambda(depth0, depth0);
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "</option>\n";
+},"4":function(depth0,helpers,partials,data) {
+  return "            <option value=\"application/json\">application/json</option>\n";
+  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+  var stack1, buffer = "<div>\n    <label for=\"parameterContentType\">Content type:</label>\n    <select class=\"parameter ui-form-control\" name=\"parameterContentType\">\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.consumes : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(4, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "    </select>\n</div>\n";
+},"useData":true});
+this["Handlebars"]["templates"]["resource"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return "<ul class='endpoints' id='"
+    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
+    + "_endpoint_list'>\n</ul>";
+},"useData":true});
+this["Handlebars"]["templates"]["response_content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
+  var stack1, buffer = "";
+  stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer;
+},"2":function(depth0,helpers,partials,data) {
+  var stack1, lambda=this.lambda, buffer = "                        <option value=\"";
+  stack1 = lambda(depth0, depth0);
+  if (stack1 != null) { buffer += stack1; }
+  buffer += "\">";
+  stack1 = lambda(depth0, depth0);
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "</option>\n";
+},"4":function(depth0,helpers,partials,data) {
+  return "                    <option value=\"application/json\">application/json</option>\n";
+  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+  var stack1, buffer = "<div class=\"parameter-item\">\n    <div class=\"param-property hide\" data-label=\"name\">Response Type</div>\n    <div class=\"param-property\" data-label=\"Response Type\">\n        <div>\n            <select class=\"parameter ui-form-control\" name=\"responseContentType\">\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(4, data),"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "            </select>\n        </div>\n    </div>\n</div>\n\n";
+},"useData":true});
+this["Handlebars"]["templates"]["sidebar_header"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+  return "";
+},"useData":true});
+this["Handlebars"]["templates"]["sidebar_item"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;
+  return escapeExpression(((helper = (helper = helpers.summary || (depth0 != null ? depth0.summary : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"summary","hash":{},"data":data}) : helper)))
+    + "\n";
+},"useData":true});
+this["Handlebars"]["templates"]["signature"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "    <h4 class=\"schema-title collapsed\" data-control data-toggle=\"collapse\"\n        data-target=\"#schema-"
+    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
+    + "\">"
+    + escapeExpression(((helper = (helper = helpers.type || (depth0 != null ? depth0.type : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper)))
+    + " Schema</h4>\n    <div data-content class=\"collapse\" id=\"schema-"
+    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
+    + "\">\n        <div class=\"description\">\n            ";
+  stack1 = ((helper = (helper = helpers.signature || (depth0 != null ? depth0.signature : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signature","hash":{},"data":data}) : helper));
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "\n        </div>\n    </div>\n";
+},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<h4 class=\"sample-title\" data-control data-toggle=\"collapse\"\n    data-target=\"#sample-"
+    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
+    + "\">"
+    + escapeExpression(((helper = (helper = helpers.type || (depth0 != null ? depth0.type : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"type","hash":{},"data":data}) : helper)))
+    + " Sample</h4>\n<div data-content class=\"collapse in\" id=\"sample-"
+    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))
+    + "\">\n    <div class=\"snippet\">\n        <pre><code>"
+    + escapeExpression(((helper = (helper = helpers.sampleJSON || (depth0 != null ? depth0.sampleJSON : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"sampleJSON","hash":{},"data":data}) : helper)))
+    + "</code></pre>\n    </div>\n</div>\n\n";
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.signature : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});
+  if (stack1 != null) { buffer += stack1; }
+  return buffer;
+},"useData":true});
+this["Handlebars"]["templates"]["status_code"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td style=\"width: 20px;\"><strong>"
+    + escapeExpression(((helper = (helper = helpers.code || (depth0 != null ? depth0.code : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"code","hash":{},"data":data}) : helper)))
+    + "</strong></td>\n<td>";
+  stack1 = ((helper = (helper = helpers.message || (depth0 != null ? depth0.message : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"message","hash":{},"data":data}) : helper));
+  if (stack1 != null) { buffer += stack1; }
+  return buffer + "</td>\n";
+},"useData":true});
+/**
+ * swagger-client - swagger-client is a javascript client for use with swaggering APIs.
+ * @version v2.1.6-M2
+ * @link http://swagger.io
+ * @license apache 2.0
+ */
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.SwaggerClient = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+'use strict';
+
+var auth = require('./lib/auth');
+var helpers = require('./lib/helpers');
+var SwaggerClient = require('./lib/client');
+var deprecationWrapper = function (url, options) {
+  helpers.log('This is deprecated, use "new SwaggerClient" instead.');
+
+  return new SwaggerClient(url, options);
+};
+
+/* Here for IE8 Support */
+if (!Array.prototype.indexOf) {
+  Array.prototype.indexOf = function(obj, start) {
+    for (var i = (start || 0), j = this.length; i < j; i++) {
+      if (this[i] === obj) { return i; }
+    }
+    return -1;
+  };
+}
+
+/* Here for IE8 Support */
+if (!String.prototype.trim) {
+  String.prototype.trim = function () {
+    return this.replace(/^\s+|\s+$/g, '');
+  };
+}
+
+/* Here for node 10.x support */
+if (!String.prototype.endsWith) {
+  String.prototype.endsWith = function(suffix) {
+    return this.indexOf(suffix, this.length - suffix.length) !== -1;
+  };
+}
+
+module.exports = SwaggerClient;
+
+SwaggerClient.ApiKeyAuthorization = auth.ApiKeyAuthorization;
+SwaggerClient.PasswordAuthorization = auth.PasswordAuthorization;
+SwaggerClient.CookieAuthorization = auth.CookieAuthorization;
+SwaggerClient.SwaggerApi = deprecationWrapper;
+SwaggerClient.SwaggerClient = deprecationWrapper;
+
+},{"./lib/auth":2,"./lib/client":3,"./lib/helpers":4}],2:[function(require,module,exports){
+'use strict';
+
+var btoa = require('btoa'); // jshint ignore:line
+var CookieJar = require('cookiejar');
+
+/**
+ * SwaggerAuthorizations applys the correct authorization to an operation being executed
+ */
+var SwaggerAuthorizations = module.exports.SwaggerAuthorizations = function () {
+  this.authz = {};
+};
+
+SwaggerAuthorizations.prototype.add = function (name, auth) {
+  this.authz[name] = auth;
+
+  return auth;
+};
+
+SwaggerAuthorizations.prototype.remove = function (name) {
+  return delete this.authz[name];
+};
+
+SwaggerAuthorizations.prototype.apply = function (obj, authorizations) {
+  var status = null;
+  var key, name, value, result;
+
+  // Apply all authorizations if there were no authorizations to apply
+  if (typeof authorizations === 'undefined') {
+    for (key in this.authz) {
+      value = this.authz[key];
+      result = value.apply(obj, authorizations);
+
+      if (result === true) {
+        status = true;
+      }
+    }
+  } else {
+    // 2.0 support
+    if (Array.isArray(authorizations)) {
+      for (var i = 0; i < authorizations.length; i++) {
+        var auth = authorizations[i];
+
+        for (name in auth) {
+          for (key in this.authz) {
+            if (key === name) {
+              value = this.authz[key];
+              result = value.apply(obj, authorizations);
+
+              if (result === true) {
+                status = true;
+              }
+            }
+          }
+        }
+      }
+    } else {
+      // 1.2 support
+      for (name in authorizations) {
+        for (key in this.authz) {
+          if (key === name) {
+            value = this.authz[key];
+            result = value.apply(obj, authorizations);
+
+            if (result === true) {
+              status = true;
+            }
+          }
+        }
+      }
+    }
+  }
+
+  return status;
+};
+
+/**
+ * ApiKeyAuthorization allows a query param or header to be injected
+ */
+var ApiKeyAuthorization = module.exports.ApiKeyAuthorization = function (name, value, type) {
+  this.name = name;
+  this.value = value;
+  this.type = type;
+};
+
+ApiKeyAuthorization.prototype.apply = function (obj) {
+  if (this.type === 'query') {
+    if (obj.url.indexOf('?') > 0) {
+      obj.url = obj.url + '&' + this.name + '=' + this.value;
+    } else {
+      obj.url = obj.url + '?' + this.name + '=' + this.value;
+    }
+
+    return true;
+  } else if (this.type === 'header') {
+    obj.headers[this.name] = this.value;
+
+    return true;
+  }
+};
+
+var CookieAuthorization = module.exports.CookieAuthorization = function (cookie) {
+  this.cookie = cookie;
+};
+
+CookieAuthorization.prototype.apply = function (obj) {
+  obj.cookieJar = obj.cookieJar || new CookieJar();
+  obj.cookieJar.setCookie(this.cookie);
+
+  return true;
+};
+
+/**
+ * Password Authorization is a basic auth implementation
+ */
+var PasswordAuthorization = module.exports.PasswordAuthorization = function (name, username, password) {
+  this.name = name;
+  this.username = username;
+  this.password = password;
+};
+
+PasswordAuthorization.prototype.apply = function (obj) {
+  obj.headers.Authorization = 'Basic ' + btoa(this.username + ':' + this.password);
+
+  return true;
+};
+
+},{"btoa":16,"cookiejar":17}],3:[function(require,module,exports){
+'use strict';
+
+var _ = {
+  bind: require('lodash-compat/function/bind'),
+  cloneDeep: require('lodash-compat/lang/cloneDeep'),
+  find: require('lodash-compat/collection/find'),
+  forEach: require('lodash-compat/collection/forEach'),
+  indexOf: require('lodash-compat/array/indexOf'),
+  isArray: require('lodash-compat/lang/isArray'),
+  isFunction: require('lodash-compat/lang/isFunction'),
+  isPlainObject: require('lodash-compat/lang/isPlainObject'),
+  isUndefined: require('lodash-compat/lang/isUndefined')
+};
+var auth = require('./auth');
+var helpers = require('./helpers');
+var Model = require('./types/model');
+var Operation = require('./types/operation');
+var OperationGroup = require('./types/operationGroup');
+var Resolver = require('./resolver');
+var SwaggerHttp = require('./http');
+var SwaggerSpecConverter = require('./spec-converter');
+
+// We have to keep track of the function/property names to avoid collisions for tag names which are used to allow the
+// following usage: 'client.{tagName}'
+var reservedClientTags = [
+  'apis',
+  'authorizationScheme',
+  'authorizations',
+  'basePath',
+  'build',
+  'buildFrom1_1Spec',
+  'buildFrom1_2Spec',
+  'buildFromSpec',
+  'clientAuthorizations',
+  'convertInfo',
+  'debug',
+  'defaultErrorCallback',
+  'defaultSuccessCallback',
+  'fail',
+  'failure',
+  'finish',
+  'help',
+  'idFromOp',
+  'info',
+  'initialize',
+  'isBuilt',
+  'isValid',
+  'modelPropertyMacro',
+  'models',
+  'modelsArray',
+  'options',
+  'parameterMacro',
+  'parseUri',
+  'progress',
+  'resourceCount',
+  'sampleModels',
+  'selfReflect',
+  'setConsolidatedModels',
+  'spec',
+  'supportedSubmitMethods',
+  'swaggerRequestHeaders',
+  'tagFromLabel',
+  'url',
+  'useJQuery'
+];
+// We have to keep track of the function/property names to avoid collisions for tag names which are used to allow the
+// following usage: 'client.apis.{tagName}'
+var reservedApiTags = [
+  'apis',
+  'asCurl',
+  'description',
+  'externalDocs',
+  'help',
+  'label',
+  'name',
+  'operation',
+  'operations',
+  'operationsArray',
+  'path',
+  'tag'
+];
+var supportedOperationMethods = ['delete', 'get', 'head', 'options', 'patch', 'post', 'put'];
+var SwaggerClient = module.exports = function (url, options) {
+  this.authorizationScheme = null;
+  this.authorizations = null;
+  this.basePath = null;
+  this.debug = false;
+  this.info = null;
+  this.isBuilt = false;
+  this.isValid = false;
+  this.modelsArray = [];
+  this.resourceCount = 0;
+  this.url = null;
+  this.useJQuery = false;
+
+  if (typeof url !== 'undefined') {
+    return this.initialize(url, options);
+  } else {
+    return this;
+  }
+};
+
+SwaggerClient.prototype.initialize = function (url, options) {
+  this.models = {};
+  this.sampleModels = {};
+
+  options = (options || {});
+
+  if (typeof url === 'string') {
+    this.url = url;
+  } else if (typeof url === 'object') {
+    options = url;
+    this.url = options.url;
+  }
+
+  this.swaggerRequestHeaders = options.swaggerRequestHeaders || 'application/json;charset=utf-8,*/*';
+  this.defaultSuccessCallback = options.defaultSuccessCallback || null;
+  this.defaultErrorCallback = options.defaultErrorCallback || null;
+  this.modelPropertyMacro = options.modelPropertyMacro || null;
+  this.parameterMacro = options.modelPropertyMacro || null;
+
+  if (typeof options.success === 'function') {
+    this.success = options.success;
+  }
+
+  if (options.useJQuery) {
+    this.useJQuery = options.useJQuery;
+  }
+
+  if (options.authorizations) {
+    this.clientAuthorizations = options.authorizations;
+  } else {
+    this.clientAuthorizations = new auth.SwaggerAuthorizations();
+  }
+
+  this.options = options || {};
+
+  this.supportedSubmitMethods = options.supportedSubmitMethods || [];
+  this.failure = options.failure || function () {};
+  this.progress = options.progress || function () {};
+  this.spec = _.cloneDeep(options.spec); // Clone so we do not alter the provided document
+
+  if (typeof options.success === 'function') {
+    this.ready = true;
+    this.build();
+  }
+};
+
+SwaggerClient.prototype.build = function (mock) {
+  if (this.isBuilt) {
+    return this;
+  }
+
+  var self = this;
+
+  this.progress('fetching resource list: ' + this.url);
+
+  var obj = {
+    useJQuery: this.useJQuery,
+    url: this.url,
+    method: 'get',
+    headers: {
+      accept: this.swaggerRequestHeaders
+    },
+    on: {
+      error: function (response) {
+        if (self.url.substring(0, 4) !== 'http') {
+          return self.fail('Please specify the protocol for ' + self.url);
+        } else if (response.status === 0) {
+          return self.fail('Can\'t read from server.  It may not have the appropriate access-control-origin settings.');
+        } else if (response.status === 404) {
+          return self.fail('Can\'t read swagger JSON from ' + self.url);
+        } else {
+          return self.fail(response.status + ' : ' + response.statusText + ' ' + self.url);
+        }
+      },
+      response: function (resp) {
+        var responseObj = resp.obj || JSON.parse(resp.data);
+        self.swaggerVersion = responseObj.swaggerVersion;
+
+        if (responseObj.swagger && parseInt(responseObj.swagger) === 2) {
+          self.swaggerVersion = responseObj.swagger;
+
+          new Resolver().resolve(responseObj, self.buildFromSpec, self);
+
+          self.isValid = true;
+        } else {
+          var converter = new SwaggerSpecConverter();
+          converter.setDocumentationLocation(self.url);
+          converter.convert(responseObj, self.clientAuthorizations, function(spec) {
+            new Resolver().resolve(spec, self.buildFromSpec, self);
+            self.isValid = true;
+          });
+        }
+      }
+    }
+  };
+
+  if (this.spec) {
+    setTimeout(function () {
+      new Resolver().resolve(self.spec, self.buildFromSpec, self);
+   }, 10);
+  } else {
+    this.clientAuthorizations.apply(obj);
+
+    if (mock) {
+      return obj;
+    }
+
+    new SwaggerHttp().execute(obj, this.options);
+  }
+
+  return this;
+};
+
+SwaggerClient.prototype.buildFromSpec = function (response) {
+  if (this.isBuilt) {
+    return this;
+  }
+
+  this.apis = {};
+  this.apisArray = [];
+  this.basePath = response.basePath || '';
+  this.consumes = response.consumes;
+  this.host = response.host || '';
+  this.info = response.info || {};
+  this.produces = response.produces;
+  this.schemes = response.schemes || [];
+  this.securityDefinitions = response.securityDefinitions;
+  this.title = response.title || '';
+
+  if (response.externalDocs) {
+    this.externalDocs = response.externalDocs;
+  }
+
+  // legacy support
+  this.authSchemes = response.securityDefinitions;
+
+  var definedTags = {};
+  var k;
+
+  if (Array.isArray(response.tags)) {
+    definedTags = {};
+
+    for (k = 0; k < response.tags.length; k++) {
+      var t = response.tags[k];
+      definedTags[t.name] = t;
+    }
+  }
+
+  var location;
+
+  if (typeof this.url === 'string') {
+    location = this.parseUri(this.url);
+    if (typeof this.schemes === 'undefined' || this.schemes.length === 0) {
+      this.scheme = location.scheme || 'http';
+    } else {
+      this.scheme = this.schemes[0];
+    }
+
+    if (typeof this.host === 'undefined' || this.host === '') {
+      this.host = location.host;
+
+      if (location.port) {
+        this.host = this.host + ':' + location.port;
+      }
+    }
+  }
+  else {
+    if (typeof this.schemes === 'undefined' || this.schemes.length === 0) {
+      this.scheme = 'http';
+    }
+    else {
+      this.scheme = this.schemes[0];
+    }
+  }
+
+  this.definitions = response.definitions;
+
+  var key;
+
+  for (key in this.definitions) {
+    var model = new Model(key, this.definitions[key], this.models, this.modelPropertyMacro);
+
+    if (model) {
+      this.models[key] = model;
+    }
+  }
+
+  // get paths, create functions for each operationId
+  var self = this;
+
+  // Bind help to 'client.apis'
+  self.apis.help = _.bind(self.help, self);
+
+  _.forEach(response.paths, function (pathObj, path) {
+    // Only process a path if it's an object
+    if (!_.isPlainObject(pathObj)) {
+      return;
+    }
+
+    _.forEach(supportedOperationMethods, function (method) {
+      var operation = pathObj[method];
+
+      if (_.isUndefined(operation)) {
+        // Operation does not exist
+        return;
+      } else if (!_.isPlainObject(operation)) {
+        // Operation exists but it is not an Operation Object.  Since this is invalid, log it.
+        helpers.log('The \'' + method + '\' operation for \'' + path + '\' path is not an Operation Object');
+
+        return;
+      }
+      
+      var tags = operation.tags;
+
+      if (_.isUndefined(tags) || !_.isArray(tags) || tags.length === 0) {
+        tags = operation.tags = [ 'default' ];
+      }
+
+      var operationId = self.idFromOp(path, method, operation);
+      var operationObject = new Operation(self,
+        operation.scheme,
+        operationId,
+        method,
+        path,
+        operation,
+        self.definitions,
+        self.models,
+        self.clientAuthorizations);
+
+      // bind self operation's execute command to the api
+      _.forEach(tags, function (tag) {
+        var clientProperty = _.indexOf(reservedClientTags, tag) > -1 ? '_' + tag : tag;
+        var apiProperty = _.indexOf(reservedApiTags, tag) > -1 ? '_' + tag : tag;
+        var operationGroup = self[clientProperty];
+
+        if (clientProperty !== tag) {
+          helpers.log('The \'' + tag + '\' tag conflicts with a SwaggerClient function/property name.  Use \'client.' +
+                      clientProperty + '\' or \'client.apis.' + tag + '\' instead of \'client.' + tag + '\'.');
+        }
+
+        if (apiProperty !== tag) {
+          helpers.log('The \'' + tag + '\' tag conflicts with a SwaggerClient operation function/property name.  Use ' +
+                      '\'client.apis.' + apiProperty + '\' instead of \'client.apis.' + tag + '\'.');
+        }
+
+        if (_.indexOf(reservedApiTags, operationId) > -1) {
+          helpers.log('The \'' + operationId + '\' operationId conflicts with a SwaggerClient operation ' +
+                      'function/property name.  Use \'client.apis.' + apiProperty + '._' + operationId +
+                      '\' instead of \'client.apis.' + apiProperty + '.' + operationId + '\'.');
+
+          operationId = '_' + operationId;
+          operationObject.nickname = operationId; // So 'client.apis.[tag].operationId.help() works properly
+        }
+
+        if (_.isUndefined(operationGroup)) {
+          operationGroup = self[clientProperty] = self.apis[apiProperty] = {};
+
+          operationGroup.operations = {};
+          operationGroup.label = apiProperty;
+          operationGroup.apis = {};
+
+          var tagDef = definedTags[tag];
+
+          if (!_.isUndefined(tagDef)) {
+            operationGroup.description = tagDef.description;
+            operationGroup.externalDocs = tagDef.externalDocs;
+          }
+
+          self[clientProperty].help = _.bind(self.help, operationGroup);
+          self.apisArray.push(new OperationGroup(tag, operationGroup.description, operationGroup.externalDocs, operationObject));
+        }
+
+        // Bind tag help
+        if (!_.isFunction(operationGroup.help)) {
+          operationGroup.help = _.bind(self.help, operationGroup);
+        }
+
+        // bind to the apis object
+        self.apis[apiProperty][operationId] = operationGroup[operationId] = _.bind(operationObject.execute,
+                                                                                  operation

<TRUNCATED>

[49/49] ambari git commit: Merge branch 'ambari-rest-api-explorer' into trunk

Posted by ad...@apache.org.
Merge branch 'ambari-rest-api-explorer' into trunk


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

Branch: refs/heads/trunk
Commit: 0d688106a59a6d96d5ca6d7e50146d4c9418f5b1
Parents: 7c92953 651bdcb
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Tue May 23 11:56:59 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Tue May 23 11:56:59 2017 +0200

----------------------------------------------------------------------
 LICENSE.txt                                     |    17 +
 ambari-server/checkstyle.xml                    |     1 +
 ambari-server/docs/api/generated/index.html     | 17421 +++++++++++++
 ambari-server/docs/api/generated/swagger.json   |  2305 ++
 ambari-server/pom.xml                           |   121 +-
 ambari-server/src/main/assemblies/server.xml    |     2 +-
 .../server/api/services/ActionService.java      |    98 +-
 .../api/services/ActiveWidgetLayoutService.java |    76 -
 .../ambari/server/api/services/BaseService.java |    41 +
 .../server/api/services/BlueprintService.java   |   105 +-
 .../api/services/ClusterRequestSwagger.java     |    30 +
 .../server/api/services/ClusterService.java     |   305 +-
 .../api/services/GroupPrivilegeService.java     |    77 -
 .../server/api/services/GroupService.java       |   155 -
 .../ambari/server/api/services/HostService.java |   188 +-
 .../server/api/services/MemberService.java      |   163 -
 .../server/api/services/RequestService.java     |   105 +-
 .../server/api/services/RootServiceService.java |   363 +-
 .../server/api/services/ServiceService.java     |   293 +-
 .../api/services/SettingRequestSwagger.java     |    30 +
 .../server/api/services/SettingService.java     |   126 +-
 .../server/api/services/StacksService.java      |   730 +-
 .../api/services/UserAuthorizationService.java  |   103 -
 .../api/services/UserPrivilegeService.java      |    79 -
 .../ambari/server/api/services/UserService.java |   175 -
 .../api/services/ViewDataMigrationService.java  |   122 -
 .../ViewExternalSubResourceService.java         |   146 -
 .../api/services/ViewInstanceService.java       |   282 -
 .../api/services/ViewPermissionService.java     |   186 -
 .../api/services/ViewPrivilegeService.java      |    55 -
 .../ambari/server/api/services/ViewService.java |   162 -
 .../api/services/ViewSubResourceService.java    |   134 -
 .../server/api/services/ViewVersionService.java |   199 -
 .../services/groups/GroupPrivilegeService.java  |   113 +
 .../api/services/groups/GroupService.java       |   177 +
 .../api/services/groups/MemberService.java      |   200 +
 .../users/ActiveWidgetLayoutService.java        |   111 +
 .../users/UserAuthorizationService.java         |   120 +
 .../services/users/UserPrivilegeService.java    |   113 +
 .../server/api/services/users/UserService.java  |   193 +
 .../views/ViewDataMigrationService.java         |   113 +
 .../views/ViewExternalSubResourceService.java   |   148 +
 .../api/services/views/ViewInstanceService.java |   313 +
 .../services/views/ViewPermissionService.java   |   208 +
 .../services/views/ViewPrivilegeService.java    |   268 +
 .../server/api/services/views/ViewService.java  |   181 +
 .../services/views/ViewSubResourceService.java  |   136 +
 .../api/services/views/ViewVersionService.java  |   208 +
 .../request/eventcreator/HostEventCreator.java  |     4 +-
 .../ambari/server/controller/ActionRequest.java |    19 +
 .../server/controller/ActionRequestSwagger.java |    31 +
 .../server/controller/ActionResponse.java       |    20 +-
 .../controller/ActiveWidgetLayoutRequest.java   |    66 +
 .../controller/ActiveWidgetLayoutResponse.java  |   142 +
 .../AmbariManagementControllerImpl.java         |     7 +-
 .../ambari/server/controller/ApiModel.java      |    28 +
 .../server/controller/BlueprintSwagger.java     |    91 +
 .../controller/ClusterArtifactRequest.java      |    46 +
 .../controller/ClusterArtifactResponse.java     |    49 +
 .../server/controller/ClusterRequest.java       |   111 +-
 .../server/controller/ClusterResponse.java      |   106 +-
 .../ClusterServiceArtifactRequest.java          |    46 +
 .../ClusterServiceArtifactResponse.java         |    52 +
 .../controller/ComponentDependencyResponse.java |    64 +
 .../controller/ExtensionLinkResponse.java       |   137 +-
 .../controller/GroupPrivilegeResponse.java      |    61 +
 .../ambari/server/controller/GroupRequest.java  |     5 +-
 .../ambari/server/controller/GroupResponse.java |     7 +-
 .../ambari/server/controller/HostRequest.java   |    72 +-
 .../ambari/server/controller/HostResponse.java  |   287 +-
 .../ambari/server/controller/MemberRequest.java |     4 +
 .../server/controller/MemberResponse.java       |     6 +-
 .../server/controller/PrivilegeResponse.java    |   175 +
 .../server/controller/QuickLinksResponse.java   |    56 +
 .../server/controller/RequestPostRequest.java   |    96 +
 .../server/controller/RequestPostResponse.java  |    43 +
 .../server/controller/RequestPutRequest.java    |    33 +
 .../server/controller/RequestRequest.java       |     6 +
 .../server/controller/RequestResponse.java      |   100 +
 .../RootServiceComponentResponse.java           |    56 +-
 .../RootServiceHostComponentResponse.java       |    72 +-
 .../server/controller/RootServiceResponse.java  |    24 +-
 .../controller/RootServiceResponseFactory.java  |    29 +-
 .../server/controller/ServiceRequest.java       |     8 +
 .../controller/ServiceRequestSwagger.java       |    31 +
 .../server/controller/ServiceResponse.java      |    19 +-
 .../server/controller/SettingRequest.java       |    69 +
 .../server/controller/SettingResponse.java      |    90 +
 .../controller/StackArtifactResponse.java       |    52 +
 .../StackConfigurationDependencyResponse.java   |    17 +
 .../controller/StackConfigurationResponse.java  |    26 +-
 .../ambari/server/controller/StackResponse.java |    12 +
 .../StackServiceArtifactResponse.java           |    53 +
 .../StackServiceComponentResponse.java          |    27 +
 .../server/controller/StackServiceResponse.java |    31 +-
 .../server/controller/StackVersionResponse.java |    59 +-
 .../ambari/server/controller/ThemeResponse.java |    56 +
 .../controller/UserAuthorizationResponse.java   |   153 +
 .../controller/UserPrivilegeResponse.java       |    61 +
 .../ambari/server/controller/UserRequest.java   |    17 +-
 .../ambari/server/controller/UserResponse.java  |    48 +-
 .../server/controller/ViewInstanceRequest.java  |   209 +
 .../server/controller/ViewInstanceResponse.java |   198 +
 .../controller/ViewPermissionResponse.java      |   122 +
 .../server/controller/ViewPrivilegeRequest.java |    79 +
 .../controller/ViewPrivilegeResponse.java       |    55 +
 .../ambari/server/controller/ViewResponse.java  |    82 +
 .../server/controller/ViewVersionResponse.java  |   234 +
 .../ActiveWidgetLayoutResourceProvider.java     |    59 +-
 .../internal/ArtifactResourceProvider.java      |    33 +-
 .../internal/ClusterResourceProvider.java       |    90 +-
 .../GroupPrivilegeResourceProvider.java         |    80 +-
 .../internal/HostResourceProvider.java          |   194 +-
 .../controller/internal/HostStatusHelper.java   |     7 +-
 .../internal/ProvisionClusterRequest.java       |     4 +-
 .../internal/RequestResourceFilter.java         |     3 +-
 .../internal/RequestResourceProvider.java       |    74 +-
 .../RootServiceComponentResourceProvider.java   |    63 +-
 ...ootServiceHostComponentResourceProvider.java |    72 +-
 .../internal/RootServiceResourceProvider.java   |    20 +-
 .../internal/ScaleClusterRequest.java           |    10 +-
 .../internal/SettingResourceProvider.java       |    64 +-
 .../UserAuthorizationResourceProvider.java      |    64 +-
 .../internal/UserPrivilegeResourceProvider.java |    82 +-
 .../ViewPermissionResourceProvider.java         |    44 +-
 .../internal/ViewVersionResourceProvider.java   |    61 +-
 .../controller/utilities/PropertyHelper.java    |     2 +-
 .../orm/entities/PrincipalTypeEntity.java       |    12 +-
 .../server/security/authorization/User.java     |    12 +
 .../server/state/ClusterHealthReport.java       |    43 +-
 .../state/QuickLinksConfigurationInfo.java      |     8 +-
 .../apache/ambari/server/state/StackInfo.java   |     2 +-
 .../server/state/ValueAttributesInfo.java       |    87 +-
 .../ambari/server/state/ValueEntryInfo.java     |     8 +-
 .../ambari/server/state/host/HostImpl.java      |     5 +-
 .../server/state/theme/ConfigCondition.java     |    13 +-
 .../server/state/theme/ConfigPlacement.java     |    25 +-
 .../ambari/server/state/theme/Layout.java       |     5 +
 .../ambari/server/state/theme/Section.java      |    22 +-
 .../ambari/server/state/theme/Subsection.java   |    13 +-
 .../apache/ambari/server/state/theme/Tab.java   |    12 +-
 .../ambari/server/state/theme/TabLayout.java    |     8 +-
 .../apache/ambari/server/state/theme/Theme.java |     9 +-
 .../server/state/theme/ThemeConfiguration.java  |    10 +-
 .../apache/ambari/server/state/theme/Unit.java  |     7 +-
 .../ambari/server/state/theme/Widget.java       |    12 +-
 .../ambari/server/state/theme/WidgetEntry.java  |     9 +-
 .../ambari/server/topology/AmbariContext.java   |     2 +-
 .../ambari/server/topology/HostRequest.java     |     2 +-
 .../apache/ambari/server/view/ViewRegistry.java |     4 +-
 .../services/ActiveWidgetLayoutServiceTest.java |    75 -
 .../server/api/services/ClusterServiceTest.java |    30 +-
 .../api/services/GroupPrivilegeServiceTest.java |   111 -
 .../server/api/services/GroupServiceTest.java   |     1 +
 .../server/api/services/HostServiceTest.java    |     2 +-
 .../server/api/services/MemberServiceTest.java  |   110 -
 .../api/services/RootServiceServiceTest.java    |    11 +-
 .../server/api/services/SettingServiceTest.java |     2 +-
 .../services/UserAuthorizationServiceTest.java  |   100 -
 .../api/services/UserPrivilegeServiceTest.java  |   124 -
 .../services/ViewDataMigrationServiceTest.java  |    81 -
 .../ViewExternalSubResourceServiceTest.java     |    50 -
 .../api/services/ViewPermissionServiceTest.java |   101 -
 .../services/ViewSubResourceServiceTest.java    |     1 +
 .../views/ViewDataMigrationServiceTest.java     |    81 +
 .../ViewExternalSubResourceServiceTest.java     |    50 +
 .../request/creator/HostEventCreatorTest.java   |     4 +-
 .../AmbariManagementControllerTest.java         |   134 +-
 .../server/controller/ClusterRequestTest.java   |    16 -
 .../server/controller/ClusterResponseTest.java  |    11 +-
 .../RootServiceResponseFactoryTest.java         |     9 +-
 .../internal/AbstractResourceProviderTest.java  |     5 +-
 .../internal/ClusterResourceProviderTest.java   |    20 +-
 .../GroupPrivilegeResourceProviderTest.java     |    13 +-
 .../internal/HostResourceProviderTest.java      |    74 +-
 .../internal/ProvisionClusterRequestTest.java   |     6 +-
 ...ootServiceComponentResourceProviderTest.java |    21 +-
 ...erviceHostComponentResourceProviderTest.java |    11 +-
 .../internal/ScaleClusterRequestTest.java       |    14 +-
 .../UserPrivilegeResourceProviderTest.java      |    13 +-
 .../server/state/cluster/ClusterTest.java       |     6 +-
 .../server/topology/TopologyManagerTest.java    |     4 +-
 ambari-web/api-docs/css/api-explorer.css        |  2423 ++
 ambari-web/api-docs/css/index.css               | 17430 +++++++++++++
 ambari-web/api-docs/css/print.css               |  1167 +
 ambari-web/api-docs/css/reset.css               |   125 +
 ambari-web/api-docs/css/screen.css              |     9 +
 ambari-web/api-docs/css/standalone.css          |   293 +
 ambari-web/api-docs/css/typography.css          |    26 +
 .../api-docs/fonts/droid-sans-v6-latin-700.eot  |   Bin 0 -> 22922 bytes
 .../api-docs/fonts/droid-sans-v6-latin-700.svg  |   411 +
 .../api-docs/fonts/droid-sans-v6-latin-700.ttf  |   Bin 0 -> 40513 bytes
 .../api-docs/fonts/droid-sans-v6-latin-700.woff |   Bin 0 -> 25992 bytes
 .../fonts/droid-sans-v6-latin-700.woff2         |   Bin 0 -> 11480 bytes
 .../fonts/droid-sans-v6-latin-regular.eot       |   Bin 0 -> 22008 bytes
 .../fonts/droid-sans-v6-latin-regular.svg       |   403 +
 .../fonts/droid-sans-v6-latin-regular.ttf       |   Bin 0 -> 39069 bytes
 .../fonts/droid-sans-v6-latin-regular.woff      |   Bin 0 -> 24868 bytes
 .../fonts/droid-sans-v6-latin-regular.woff2     |   Bin 0 -> 11304 bytes
 ambari-web/api-docs/images/Swagger_explorer.png |   Bin 0 -> 108087 bytes
 .../api-docs/images/Swagger_explorer_min.png    |   Bin 0 -> 46646 bytes
 ambari-web/api-docs/images/explorer_icons.png   |   Bin 0 -> 5763 bytes
 ambari-web/api-docs/images/favicon-16x16.png    |   Bin 0 -> 645 bytes
 ambari-web/api-docs/images/favicon-32x32.png    |   Bin 0 -> 1654 bytes
 ambari-web/api-docs/images/favicon.ico          |   Bin 0 -> 5430 bytes
 .../api-docs/images/json_editor_integration.png |   Bin 0 -> 63019 bytes
 ambari-web/api-docs/images/logo_small.png       |   Bin 0 -> 770 bytes
 ambari-web/api-docs/images/pet_store_api.png    |   Bin 0 -> 824 bytes
 ambari-web/api-docs/images/senodio.png          |   Bin 0 -> 22838 bytes
 ambari-web/api-docs/images/throbber.gif         |   Bin 0 -> 9257 bytes
 ambari-web/api-docs/images/wordnik_api.png      |   Bin 0 -> 980 bytes
 ambari-web/api-docs/index.html                  |   241 +
 ambari-web/api-docs/lib/backbone-min.js         |    15 +
 ambari-web/api-docs/lib/bootstrap.min.js        |     6 +
 ambari-web/api-docs/lib/handlebars-2.0.0.js     |    28 +
 ambari-web/api-docs/lib/highlight.7.3.pack.js   |     1 +
 ambari-web/api-docs/lib/jquery-1.8.0.min.js     |     2 +
 ambari-web/api-docs/lib/jquery.ba-bbq.min.js    |    18 +
 ambari-web/api-docs/lib/jquery.slideto.min.js   |     1 +
 ambari-web/api-docs/lib/jquery.wiggle.min.js    |     8 +
 ambari-web/api-docs/lib/jsoneditor.js           |  7287 ++++++
 ambari-web/api-docs/lib/marked.js               |  1272 +
 ambari-web/api-docs/lib/swagger-oauth.js        |   286 +
 ambari-web/api-docs/lib/underscore-min.js       |     6 +
 ambari-web/api-docs/lib/underscore-min.map      |     1 +
 ambari-web/api-docs/o2c.html                    |    20 +
 ambari-web/api-docs/swagger-ui.js               | 22644 +++++++++++++++++
 ambari-web/api-docs/swagger-ui.min.js           |    12 +
 ambari-web/brunch-config.js                     |     3 +-
 ambari-web/pom.xml                              |     1 +
 utility/checkstyle.xml                          |    38 +
 utility/pom.xml                                 |     5 +-
 .../apache/ambari/annotations/ApiIgnore.java    |    29 +
 .../UndocumentedRestApiOperationCheck.java      |    76 +
 ...dTransactionalOnPrivateMethodsCheckTest.java |     4 +-
 .../UndocumentedRestApiOperationCheckTest.java  |    53 +
 .../checkstyle/InputRestApiOperation.java       |   138 +
 237 files changed, 83457 insertions(+), 4628 deletions(-)
----------------------------------------------------------------------



[47/49] ambari git commit: Merge remote-tracking branch 'origin/trunk' into ambari-rest-api-explorer

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/assemblies/server.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
index 5dfc148,05c4bad..ca9cf4c
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/RequestRequest.java
@@@ -39,8 -37,9 +39,10 @@@ public class RequestRequest 
  
    private String abortReason;
  
+   private boolean removePendingHostRequests = false;
+ 
  
 +  @ApiModelProperty(name = "request_status", notes = "Only valid value is ABORTED.")
    public HostRoleStatus getStatus() {
      return status;
    }

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ArtifactResourceProvider.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
----------------------------------------------------------------------
diff --cc ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
index 1fc4bd5,d82ff25..f41eb26
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
@@@ -91,40 -92,42 +92,44 @@@ public class RequestResourceProvider ex
  
    // ----- Property ID constants ---------------------------------------------
    // Requests
 -  public static final String REQUEST_CLUSTER_NAME_PROPERTY_ID = "Requests/cluster_name";
 -  public static final String REQUEST_CLUSTER_ID_PROPERTY_ID = "Requests/cluster_id";
 -  public static final String REQUEST_ID_PROPERTY_ID = "Requests/id";
 -  protected static final String REQUEST_STATUS_PROPERTY_ID = "Requests/request_status";
 -  protected static final String REQUEST_ABORT_REASON_PROPERTY_ID = "Requests/abort_reason";
 -  protected static final String REQUEST_CONTEXT_ID = "Requests/request_context";
 -  public static final String REQUEST_SOURCE_SCHEDULE = "Requests/request_schedule";
 -  public static final String REQUEST_SOURCE_SCHEDULE_ID = "Requests/request_schedule/schedule_id";
 -  public static final String REQUEST_SOURCE_SCHEDULE_HREF = "Requests/request_schedule/href";
 -  protected static final String REQUEST_TYPE_ID = "Requests/type";
 -  protected static final String REQUEST_INPUTS_ID = "Requests/inputs";
 -  protected static final String REQUEST_CLUSTER_HOST_INFO_ID = "Requests/cluster_host_info";
 -  protected static final String REQUEST_RESOURCE_FILTER_ID = "Requests/resource_filters";
 -  protected static final String REQUEST_OPERATION_LEVEL_ID = "Requests/operation_level";
 -  protected static final String REQUEST_CREATE_TIME_ID = "Requests/create_time";
 -  protected static final String REQUEST_START_TIME_ID = "Requests/start_time";
 -  protected static final String REQUEST_END_TIME_ID = "Requests/end_time";
 -  protected static final String REQUEST_EXCLUSIVE_ID = "Requests/exclusive";
 -  protected static final String REQUEST_TASK_CNT_ID = "Requests/task_count";
 -  protected static final String REQUEST_FAILED_TASK_CNT_ID = "Requests/failed_task_count";
 -  protected static final String REQUEST_ABORTED_TASK_CNT_ID = "Requests/aborted_task_count";
 -  protected static final String REQUEST_TIMED_OUT_TASK_CNT_ID = "Requests/timed_out_task_count";
 -  protected static final String REQUEST_COMPLETED_TASK_CNT_ID = "Requests/completed_task_count";
 -  protected static final String REQUEST_QUEUED_TASK_CNT_ID = "Requests/queued_task_count";
 -  protected static final String REQUEST_PROGRESS_PERCENT_ID = "Requests/progress_percent";
 -  protected static final String REQUEST_REMOVE_PENDING_HOST_REQUESTS_ID = "Requests/remove_pending_host_requests";
 -  protected static final String REQUEST_PENDING_HOST_REQUEST_COUNT_ID = "Requests/pending_host_request_count";
 +  public static final String REQUESTS = "Requests";
 +  public static final String REQUEST_INFO = "RequestInfo";
 +  public static final String REQUEST_CLUSTER_NAME_PROPERTY_ID = REQUESTS + "/cluster_name";
 +  public static final String REQUEST_CLUSTER_ID_PROPERTY_ID = REQUESTS + "/cluster_id";
 +  public static final String REQUEST_ID_PROPERTY_ID = REQUESTS + "/id";
 +  public static final String REQUEST_STATUS_PROPERTY_ID = REQUESTS + "/request_status";
 +  public static final String REQUEST_ABORT_REASON_PROPERTY_ID = REQUESTS + "/abort_reason";
 +  public static final String REQUEST_CONTEXT_ID = REQUESTS + "/request_context";
 +  public static final String REQUEST_SOURCE_SCHEDULE = REQUESTS + "/request_schedule";
 +  public static final String REQUEST_SOURCE_SCHEDULE_ID = REQUESTS + "/request_schedule/schedule_id";
 +  public static final String REQUEST_SOURCE_SCHEDULE_HREF = REQUESTS + "/request_schedule/href";
 +  public static final String REQUEST_TYPE_ID = REQUESTS + "/type";
 +  public static final String REQUEST_INPUTS_ID = REQUESTS + "/inputs";
++  public static final String REQUEST_CLUSTER_HOST_INFO_ID = REQUESTS + "/cluster_host_info";
 +  public static final String REQUEST_RESOURCE_FILTER_ID = REQUESTS + "/resource_filters";
 +  public static final String REQUEST_OPERATION_LEVEL_ID = REQUESTS + "/operation_level";
 +  public static final String REQUEST_CREATE_TIME_ID = REQUESTS + "/create_time";
 +  public static final String REQUEST_START_TIME_ID = REQUESTS + "/start_time";
 +  public static final String REQUEST_END_TIME_ID = REQUESTS + "/end_time";
 +  public static final String REQUEST_EXCLUSIVE_ID = REQUESTS + "/exclusive";
 +  public static final String REQUEST_TASK_CNT_ID = REQUESTS + "/task_count";
 +  public static final String REQUEST_FAILED_TASK_CNT_ID = REQUESTS + "/failed_task_count";
 +  public static final String REQUEST_ABORTED_TASK_CNT_ID = REQUESTS + "/aborted_task_count";
 +  public static final String REQUEST_TIMED_OUT_TASK_CNT_ID = REQUESTS + "/timed_out_task_count";
 +  public static final String REQUEST_COMPLETED_TASK_CNT_ID = REQUESTS + "/completed_task_count";
 +  public static final String REQUEST_QUEUED_TASK_CNT_ID = REQUESTS + "/queued_task_count";
 +  public static final String REQUEST_PROGRESS_PERCENT_ID = REQUESTS + "/progress_percent";
++  public static final String REQUEST_REMOVE_PENDING_HOST_REQUESTS_ID = REQUESTS + "/remove_pending_host_requests";
++  public static final String REQUEST_PENDING_HOST_REQUEST_COUNT_ID = REQUESTS + "/pending_host_request_count";
 +  public static final String COMMAND_ID = "command";
 +  public static final String SERVICE_ID = "service_name";
 +  public static final String COMPONENT_ID = "component_name";
 +  public static final String HOSTS_ID = "hosts"; // This is actually a list of hosts
 +  public static final String HOSTS_PREDICATE = "hosts_predicate";
 +  public static final String ACTION_ID = "action";
 +  public static final String INPUTS_ID = "parameters";
 +  public static final String EXLUSIVE_ID = "exclusive";
+ 
 -  protected static final String COMMAND_ID = "command";
 -  protected static final String SERVICE_ID = "service_name";
 -  protected static final String COMPONENT_ID = "component_name";
 -  protected static final String HOSTS_ID = "hosts"; // This is actually a list of hosts
 -  protected static final String HOSTS_PREDICATE = "hosts_predicate";
 -  protected static final String ACTION_ID = "action";
 -  protected static final String INPUTS_ID = "parameters";
 -  protected static final String EXLUSIVE_ID = "exclusive";
    private static Set<String> pkPropertyIds =
      new HashSet<>(Arrays.asList(new String[]{
        REQUEST_ID_PROPERTY_ID}));

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/state/StackInfo.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/state/ValueAttributesInfo.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
----------------------------------------------------------------------
diff --cc ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
index 7e4c4c2,cbd5de3..83ba0bb
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
@@@ -8998,9 -9017,11 +8997,11 @@@ public class AmbariManagementController
  
      Assert.assertNull(topologyHostInfoDAO.findByHostname(host1));
  
+     Long firstHostId = clusters.getHost(host1).getHostId();
+ 
      // Deletion without specifying cluster should be successful
      requests.clear();
 -    requests.add(new HostRequest(host1, null, null));
 +    requests.add(new HostRequest(host1, null));
      try {
        HostResourceProviderTest.deleteHosts(controller, requests);
      } catch (Exception e) {
@@@ -9011,9 -9032,13 +9012,13 @@@
      Assert.assertFalse(clusters.getClustersForHost(host1).contains(cluster));
      Assert.assertNull(topologyHostInfoDAO.findByHostname(host1));
  
+     // verify there are no host role commands for the host
+     List<HostRoleCommandEntity> tasks = hostRoleCommandDAO.findByHostId(firstHostId);
+     assertEquals(0, tasks.size());
+ 
      // Case 3: Delete host that is still part of the cluster, and specify the cluster_name in the request
      requests.clear();
 -    requests.add(new HostRequest(host2, cluster1, null));
 +    requests.add(new HostRequest(host2, cluster1));
      try {
        HostResourceProviderTest.deleteHosts(controller, requests);
      } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
----------------------------------------------------------------------
diff --cc ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
index 01dd8e3,8772b24..78752dc
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
@@@ -1127,9 -1145,11 +1127,11 @@@ public class HostResourceProviderTest e
      HostResponse response = createNiceMock(HostResponse.class);
  
      Set<Cluster> setCluster = Collections.singleton(cluster);
+     Map<String, DesiredConfig> desiredConfigs = new HashMap<>();
+     Map<String, HostConfig> desiredHostConfigs = new HashMap<>();
  
      // requests
 -    HostRequest request1 = new HostRequest("host1", "cluster1", Collections.<String, String>emptyMap());
 +    HostRequest request1 = new HostRequest("host1", "cluster1");
  
      Set<HostRequest> setRequests = new HashSet<>();
      setRequests.add(request1);

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequestTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ScaleClusterRequestTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-server/src/test/java/org/apache/ambari/server/topology/TopologyManagerTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/ambari/blob/651bdcbd/ambari-web/pom.xml
----------------------------------------------------------------------


[40/49] ambari git commit: AMBARI-21035. Integrate ClusterService with Swagger (adoroszlai)

Posted by ad...@apache.org.
AMBARI-21035. Integrate ClusterService with Swagger (adoroszlai)


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

Branch: refs/heads/trunk
Commit: 275525b212d8f9ae306d83417b8f94d035a67474
Parents: 228b928
Author: Attila Doroszlai <ad...@hortonworks.com>
Authored: Tue May 16 11:14:24 2017 +0200
Committer: Attila Doroszlai <ad...@hortonworks.com>
Committed: Wed May 17 10:17:12 2017 +0200

----------------------------------------------------------------------
 .../server/api/services/ClusterService.java     | 305 ++++++++++++++-----
 .../ambari/server/api/services/HostService.java |  22 +-
 .../server/api/services/ServiceService.java     |  18 +-
 .../AmbariManagementControllerImpl.java         |   2 +-
 .../controller/ClusterArtifactRequest.java      |  46 +++
 .../controller/ClusterArtifactResponse.java     |  49 +++
 .../server/controller/ClusterRequest.java       | 111 ++-----
 .../server/controller/ClusterResponse.java      | 106 +++----
 .../ClusterServiceArtifactRequest.java          |  34 ++-
 .../ClusterServiceArtifactResponse.java         |  27 +-
 .../internal/ArtifactResourceProvider.java      |  33 +-
 .../internal/ClusterResourceProvider.java       |  90 +++---
 .../internal/ProvisionClusterRequest.java       |   4 +-
 .../server/api/services/ClusterServiceTest.java |  30 +-
 .../AmbariManagementControllerTest.java         |  80 ++---
 .../server/controller/ClusterRequestTest.java   |  16 -
 .../server/controller/ClusterResponseTest.java  |  11 +-
 .../internal/ClusterResourceProviderTest.java   |  20 +-
 .../internal/ProvisionClusterRequestTest.java   |   6 +-
 .../server/state/cluster/ClusterTest.java       |   6 +-
 20 files changed, 591 insertions(+), 425 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
index 5577633..80fcd2e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
@@ -1,4 +1,4 @@
-/**
+/*
  * 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
@@ -31,21 +31,37 @@ 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.MediaType;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.UriInfo;
 
 import org.apache.ambari.server.api.resources.ResourceInstance;
 import org.apache.ambari.server.controller.AmbariServer;
+import org.apache.ambari.server.controller.ClusterArtifactResponse;
+import org.apache.ambari.server.controller.ClusterResponse.ClusterResponseWrapper;
+import org.apache.ambari.server.controller.internal.ClusterResourceProvider;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.state.Clusters;
+import org.apache.http.HttpStatus;
 
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import io.swagger.annotations.ApiResponse;
+import io.swagger.annotations.ApiResponses;
 
 /**
  * Service responsible for cluster resource requests.
  */
-@Path("/clusters/")
+@Path("/clusters")
+@Api(value = "/clusters", description = "Endpoint for cluster-specific operations")
 public class ClusterService extends BaseService {
 
+  private static final String CLUSTER_REQUEST_TYPE = "org.apache.ambari.server.controller.ClusterRequest";
+  private static final String ARTIFACT_REQUEST_TYPE = "org.apache.ambari.server.controller.ClusterArtifactRequest";
+
   /**
    * The clusters utilities.
    */
@@ -85,10 +101,24 @@ public class ClusterService extends BaseService {
    */
   @GET
   @Path("{clusterName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Returns information about a specific cluster", response = ClusterResponseWrapper.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY,
+      defaultValue = ClusterResourceProvider.ALL_PROPERTIES),
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response getCluster(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                             @PathParam("clusterName") String clusterName) {
-    return handleRequest(headers, body, ui, Request.Type.GET, createClusterResource(clusterName));
+    @ApiParam(required = true) @PathParam("clusterName") String clusterName
+  ) {
+    ResourceInstance resource = createClusterResource(clusterName);
+    return handleRequest(headers, body, ui, Request.Type.GET, resource);
   }
 
   /**
@@ -101,9 +131,27 @@ public class ClusterService extends BaseService {
    * @return cluster collection resource representation
    */
   @GET
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Returns all clusters",
+    response = ClusterResponseWrapper.class, responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY,
+      defaultValue = ClusterResourceProvider.CLUSTER_NAME),
+    @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, allowableValues = QUERY_FROM_VALUES, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, allowableValues = QUERY_TO_VALUES, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response getClusters(String body, @Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, body, ui, Request.Type.GET, createClusterResource(null));
+    ResourceInstance resource = createClusterResource(null);
+    return handleRequest(headers, body, ui, Request.Type.GET, resource);
   }
 
   /**
@@ -118,10 +166,25 @@ public class ClusterService extends BaseService {
    */
    @POST
    @Path("{clusterName}")
-   @Produces("text/plain")
+   @Produces(MediaType.TEXT_PLAIN)
+   @ApiOperation(value = "Creates a cluster")
+   @ApiImplicitParams({
+     @ApiImplicitParam(dataType = CLUSTER_REQUEST_TYPE, paramType = PARAM_TYPE_BODY)
+   })
+   @ApiResponses({
+     @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION),
+     @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+     @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+     @ApiResponse(code = HttpStatus.SC_CONFLICT, message = MSG_RESOURCE_ALREADY_EXISTS),
+     @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+     @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+     @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+   })
    public Response createCluster(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                                 @PathParam("clusterName") String clusterName) {
-     return handleRequest(headers, body, ui, Request.Type.POST, createClusterResource(clusterName));
+     @ApiParam(required = true) @PathParam("clusterName") String clusterName
+   ) {
+     ResourceInstance resource = createClusterResource(clusterName);
+     return handleRequest(headers, body, ui, Request.Type.POST, resource);
   }
 
   /**
@@ -136,10 +199,25 @@ public class ClusterService extends BaseService {
    */
   @PUT
   @Path("{clusterName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Updates a cluster")
+  @ApiImplicitParams({
+    @ApiImplicitParam(dataType = CLUSTER_REQUEST_TYPE, paramType = PARAM_TYPE_BODY)
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+    @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response updateCluster(String body, @Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("clusterName") String clusterName) {
-    return handleRequest(headers, body, ui, Request.Type.PUT, createClusterResource(clusterName));
+    @ApiParam(required = true) @PathParam("clusterName") String clusterName
+  ) {
+    ResourceInstance resource = createClusterResource(clusterName);
+    return handleRequest(headers, body, ui, Request.Type.PUT, resource);
   }
 
   /**
@@ -154,10 +232,20 @@ public class ClusterService extends BaseService {
    */
   @DELETE
   @Path("{clusterName}")
-  @Produces("text/plain")
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Deletes a cluster")
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
   public Response deleteCluster(@Context HttpHeaders headers, @Context UriInfo ui,
-                                @PathParam("clusterName") String clusterName) {
-    return handleRequest(headers, null, ui, Request.Type.DELETE, createClusterResource(clusterName));
+    @ApiParam(required = true) @PathParam("clusterName") String clusterName
+  ) {
+    ResourceInstance resource = createClusterResource(clusterName);
+    return handleRequest(headers, null, ui, Request.Type.DELETE, resource);
   }
 
   /**
@@ -173,13 +261,28 @@ public class ClusterService extends BaseService {
    */
   @GET
   @Path("{clusterName}/artifacts")
-  @Produces("text/plain")
-  public Response getArtifacts(String body,
-                               @Context HttpHeaders headers,
-                               @Context UriInfo ui,
-                               @PathParam("clusterName") String clusterName) {
-    return handleRequest(headers, body, ui, Request.Type.GET,
-        createArtifactResource(clusterName, null));
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Returns all artifacts associated with the cluster",
+    response = ClusterArtifactResponse.class, responseContainer = RESPONSE_CONTAINER_LIST)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, allowableValues = QUERY_FROM_VALUES, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, allowableValues = QUERY_TO_VALUES, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
+  public Response getClusterArtifacts(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+    @ApiParam(required = true) @PathParam("clusterName") String clusterName
+  ) {
+    ResourceInstance resource = createArtifactResource(clusterName, null);
+    return handleRequest(headers, body, ui, Request.Type.GET, resource);
   }
 
   /**
@@ -196,13 +299,27 @@ public class ClusterService extends BaseService {
    */
   @GET
   @Path("{clusterName}/artifacts/{artifactName}")
-  @Produces("text/plain")
-  public Response getArtifact(String body,
-                              @Context HttpHeaders headers,
-                              @Context UriInfo ui,
-                              @PathParam("clusterName") String clusterName,
-                              @PathParam("artifactName") String artifactName) {
-    return handleRequest(headers, body, ui, Request.Type.GET, createArtifactResource(clusterName, artifactName));
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Get the details of a cluster artifact",
+    response = ClusterArtifactResponse.class)
+  @ApiImplicitParams({
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY)
+  })
+  @ApiResponses(value = {
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR)
+  })
+  public Response getClusterArtifact(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+    @ApiParam(required = true) @PathParam("clusterName") String clusterName,
+    @ApiParam(required = true) @PathParam("artifactName") String artifactName
+  ) {
+    ResourceInstance resource = createArtifactResource(clusterName, artifactName);
+    return handleRequest(headers, body, ui, Request.Type.GET, resource);
   }
 
   /**
@@ -214,18 +331,30 @@ public class ClusterService extends BaseService {
    * @param ui            uri info
    * @param clusterName   cluster name
    * @param artifactName  artifact name
-   * @return
    */
   @POST
   @Path("{clusterName}/artifacts/{artifactName}")
-  @Produces("text/plain")
-  public Response createArtifact(String body,
-                                 @Context HttpHeaders headers,
-                                 @Context UriInfo ui,
-                                 @PathParam("clusterName") String clusterName,
-                                 @PathParam("artifactName") String artifactName) {
-    return handleRequest(headers, body, ui, Request.Type.POST,
-        createArtifactResource(clusterName, artifactName));
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Creates a cluster artifact")
+  @ApiImplicitParams({
+    @ApiImplicitParam(dataType = ARTIFACT_REQUEST_TYPE, paramType = PARAM_TYPE_BODY)
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+    @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_CONFLICT, message = MSG_RESOURCE_ALREADY_EXISTS),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
+  public Response createClusterArtifact(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+    @ApiParam(required = true) @PathParam("clusterName") String clusterName,
+    @ApiParam(required = true) @PathParam("artifactName") String artifactName
+  ) {
+    ResourceInstance resource = createArtifactResource(clusterName, artifactName);
+    return handleRequest(headers, body, ui, Request.Type.POST, resource);
   }
 
   /**
@@ -240,13 +369,25 @@ public class ClusterService extends BaseService {
    */
   @PUT
   @Path("{clusterName}/artifacts")
-  @Produces("text/plain")
-  public Response updateArtifacts(String body,
-                                  @Context HttpHeaders headers,
-                                  @Context UriInfo ui,
-                                  @PathParam("clusterName") String clusterName) {
-    return handleRequest(headers, body, ui, Request.Type.PUT,
-        createArtifactResource(clusterName, null));
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Updates multiple artifacts")
+  @ApiImplicitParams({
+    @ApiImplicitParam(dataType = ARTIFACT_REQUEST_TYPE, paramType = PARAM_TYPE_BODY, allowMultiple = true)
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+    @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
+  public Response updateClusterArtifacts(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+    @ApiParam(required = true) @PathParam("clusterName") String clusterName
+  ) {
+    ResourceInstance resource = createArtifactResource(clusterName, null);
+    return handleRequest(headers, body, ui, Request.Type.PUT, resource);
   }
 
   /**
@@ -262,14 +403,26 @@ public class ClusterService extends BaseService {
    */
   @PUT
   @Path("{clusterName}/artifacts/{artifactName}")
-  @Produces("text/plain")
-  public Response updateArtifact(String body,
-                                 @Context HttpHeaders headers,
-                                @Context UriInfo ui,
-                                @PathParam("clusterName") String clusterName,
-                                @PathParam("artifactName") String artifactName) {
-    return handleRequest(headers, body, ui, Request.Type.PUT,
-        createArtifactResource(clusterName, artifactName));
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Updates a single artifact")
+  @ApiImplicitParams({
+    @ApiImplicitParam(dataType = ARTIFACT_REQUEST_TYPE, paramType = PARAM_TYPE_BODY)
+  })
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_ACCEPTED, message = MSG_REQUEST_ACCEPTED),
+    @ApiResponse(code = HttpStatus.SC_BAD_REQUEST, message = MSG_INVALID_ARGUMENTS),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
+  public Response updateClusterArtifact(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+    @ApiParam(required = true) @PathParam("clusterName") String clusterName,
+    @ApiParam(required = true) @PathParam("artifactName") String artifactName
+  ) {
+    ResourceInstance resource = createArtifactResource(clusterName, artifactName);
+    return handleRequest(headers, body, ui, Request.Type.PUT, resource);
   }
 
   /**
@@ -285,14 +438,21 @@ public class ClusterService extends BaseService {
    */
   @DELETE
   @Path("{clusterName}/artifacts/{artifactName}")
-  @Produces("text/plain")
-  public Response deleteArtifact(String body,
-                                 @Context HttpHeaders headers,
-                                 @Context UriInfo ui,
-                                 @PathParam("clusterName") String clusterName,
-                                 @PathParam("artifactName") String artifactName) {
-    return handleRequest(headers, body, ui, Request.Type.DELETE,
-        createArtifactResource(clusterName, artifactName));
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Deletes a single artifact")
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
+  public Response deleteClusterArtifact(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+    @ApiParam(required = true) @PathParam("clusterName") String clusterName,
+    @ApiParam(required = true) @PathParam("artifactName") String artifactName
+  ) {
+    ResourceInstance resource = createArtifactResource(clusterName, artifactName);
+    return handleRequest(headers, body, ui, Request.Type.DELETE, resource);
   }
 
   /**
@@ -307,13 +467,20 @@ public class ClusterService extends BaseService {
    */
   @DELETE
   @Path("{clusterName}/artifacts")
-  @Produces("text/plain")
-  public Response deleteArtifacts(String body,
-                                  @Context HttpHeaders headers,
-                                  @Context UriInfo ui,
-                                  @PathParam("clusterName") String clusterName) {
-    return handleRequest(headers, body, ui, Request.Type.DELETE,
-        createArtifactResource(clusterName, null));
+  @Produces(MediaType.TEXT_PLAIN)
+  @ApiOperation(value = "Deletes all artifacts of a cluster that match the provided predicate")
+  @ApiResponses({
+    @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
+    @ApiResponse(code = HttpStatus.SC_NOT_FOUND, message = MSG_RESOURCE_NOT_FOUND),
+    @ApiResponse(code = HttpStatus.SC_UNAUTHORIZED, message = MSG_NOT_AUTHENTICATED),
+    @ApiResponse(code = HttpStatus.SC_FORBIDDEN, message = MSG_PERMISSION_DENIED),
+    @ApiResponse(code = HttpStatus.SC_INTERNAL_SERVER_ERROR, message = MSG_SERVER_ERROR),
+  })
+  public Response deleteClusterArtifacts(String body, @Context HttpHeaders headers, @Context UriInfo ui,
+    @ApiParam(required = true) @PathParam("clusterName") String clusterName
+  ) {
+    ResourceInstance resource = createArtifactResource(clusterName, null);
+    return handleRequest(headers, body, ui, Request.Type.DELETE, resource);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
index e50d70f..0e07ca5 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/HostService.java
@@ -92,7 +92,7 @@ public class HostService extends BaseService {
   @Produces("text/plain")
   @ApiOperation(value = "Returns information about a single host", response = HostResponse.Wrapper.class)
   @ApiImplicitParams({
-    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = "string", paramType = "query"),
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
   })
   @ApiResponses({
     @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
@@ -120,11 +120,11 @@ public class HostService extends BaseService {
   @Produces("text/plain")
   @ApiOperation(value = "Returns a collection of all hosts", response = HostResponse.Wrapper.class, responseContainer = "List")
   @ApiImplicitParams({
-    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, defaultValue = "Hosts/*", dataType = "string", paramType = "query"),
-    @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION, defaultValue = "Hosts/host_name.asc", dataType = "string", paramType = "query"),
-    @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = "integer", paramType = "query"),
-    @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, allowableValues = QUERY_FROM_VALUES, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_INT, paramType = "query"),
-    @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, allowableValues = QUERY_TO_VALUES, dataType = QUERY_TO_TYPE, paramType = "query"),
+    @ApiImplicitParam(name = QUERY_FIELDS, value = QUERY_FILTER_DESCRIPTION, defaultValue = "Hosts/*", dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_SORT, value = QUERY_SORT_DESCRIPTION, defaultValue = "Hosts/host_name.asc", dataType = DATA_TYPE_STRING, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_PAGE_SIZE, value = QUERY_PAGE_SIZE_DESCRIPTION, defaultValue = DEFAULT_PAGE_SIZE, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_FROM, value = QUERY_FROM_DESCRIPTION, allowableValues = QUERY_FROM_VALUES, defaultValue = DEFAULT_FROM, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
+    @ApiImplicitParam(name = QUERY_TO, value = QUERY_TO_DESCRIPTION, allowableValues = QUERY_TO_VALUES, dataType = DATA_TYPE_INT, paramType = PARAM_TYPE_QUERY),
   })
   @ApiResponses({
     @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
@@ -153,7 +153,7 @@ public class HostService extends BaseService {
   @Produces("text/plain")
   @ApiOperation(value = "Creates multiple hosts in a single request")
   @ApiImplicitParams({
-    @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = "body", allowMultiple = true)
+    @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = PARAM_TYPE_BODY, allowMultiple = true)
   })
   @ApiResponses({
     @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION),
@@ -186,7 +186,7 @@ public class HostService extends BaseService {
   @Produces("text/plain")
   @ApiOperation(value = "Creates a host")
   @ApiImplicitParams({
-    @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = "body")
+    @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = PARAM_TYPE_BODY)
   })
   @ApiResponses({
     @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION),
@@ -221,7 +221,7 @@ public class HostService extends BaseService {
   @Produces("text/plain")
   @ApiOperation(value = "Updates a host")
   @ApiImplicitParams({
-    @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = "body")
+    @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = PARAM_TYPE_BODY)
   })
   @ApiResponses({
     @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
@@ -253,7 +253,7 @@ public class HostService extends BaseService {
   @Produces("text/plain")
   @ApiOperation(value = "Updates multiple hosts in a single request")
   @ApiImplicitParams({
-    @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = "body", allowMultiple = true)
+    @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = PARAM_TYPE_BODY, allowMultiple = true)
   })
   @ApiResponses({
     @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
@@ -301,7 +301,7 @@ public class HostService extends BaseService {
   @Produces("text/plain")
   @ApiOperation(value = "Deletes multiple hosts in a single request")
   @ApiImplicitParams({
-    @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = "body", allowMultiple = true)
+    @ApiImplicitParam(dataType = HOST_REQUEST_TYPE, paramType = PARAM_TYPE_BODY, allowMultiple = true)
   })
   @ApiResponses({
     @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),

http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java
index 27de0b4..a28c4aa 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ServiceService.java
@@ -1,4 +1,4 @@
-/**
+/*
  * 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
@@ -155,7 +155,7 @@ public class ServiceService extends BaseService {
       nickname = "ServiceService#createServices"
   )
   @ApiImplicitParams({
-      @ApiImplicitParam(dataType = SERVICE_REQUEST_TYPE, paramType = "body", allowMultiple = false)
+      @ApiImplicitParam(dataType = SERVICE_REQUEST_TYPE, paramType = PARAM_TYPE_BODY)
   })
   @ApiResponses({
       @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION),
@@ -188,7 +188,7 @@ public class ServiceService extends BaseService {
       nickname = "ServiceService#createService"
   )
   @ApiImplicitParams({
-      @ApiImplicitParam(dataType = SERVICE_REQUEST_TYPE, paramType = "body", allowMultiple = true)
+      @ApiImplicitParam(dataType = SERVICE_REQUEST_TYPE, paramType = PARAM_TYPE_BODY, allowMultiple = true)
   })
   @ApiResponses({
       @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION),
@@ -223,7 +223,7 @@ public class ServiceService extends BaseService {
       nickname = "ServiceService#updateService"
   )
   @ApiImplicitParams({
-      @ApiImplicitParam(dataType = SERVICE_REQUEST_TYPE, paramType = "body")
+      @ApiImplicitParam(dataType = SERVICE_REQUEST_TYPE, paramType = PARAM_TYPE_BODY)
   })
   @ApiResponses({
       @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
@@ -254,7 +254,7 @@ public class ServiceService extends BaseService {
       nickname = "ServiceService#updateServices"
   )
   @ApiImplicitParams({
-      @ApiImplicitParam(dataType = SERVICE_REQUEST_TYPE, paramType = "body")
+      @ApiImplicitParam(dataType = SERVICE_REQUEST_TYPE, paramType = PARAM_TYPE_BODY)
   })
   @ApiResponses({
       @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
@@ -339,7 +339,7 @@ public class ServiceService extends BaseService {
       nickname = "ServiceService#createArtifact"
   )
   @ApiImplicitParams({
-      @ApiImplicitParam(dataType = ARTIFACT_REQUEST_TYPE, paramType = "body", allowMultiple = false)
+      @ApiImplicitParam(dataType = ARTIFACT_REQUEST_TYPE, paramType = PARAM_TYPE_BODY)
   })
   @ApiResponses({
       @ApiResponse(code = HttpStatus.SC_CREATED, message = MSG_SUCCESSFUL_OPERATION),
@@ -419,7 +419,7 @@ public class ServiceService extends BaseService {
   @GET
   @Path("{serviceName}/artifacts/{artifactName}")
   @Produces(MediaType.TEXT_PLAIN)
-  @ApiOperation(value = "Get the detais of a service artifact",
+  @ApiOperation(value = "Get the details of a service artifact",
       nickname = "ServiceService#getArtifact",
       response = ClusterServiceArtifactResponse.class,
       responseContainer = RESPONSE_CONTAINER_LIST)
@@ -465,7 +465,7 @@ public class ServiceService extends BaseService {
       nickname = "ServiceService#updateArtifacts"
   )
   @ApiImplicitParams({
-      @ApiImplicitParam(dataType = ARTIFACT_REQUEST_TYPE, paramType = "body")
+      @ApiImplicitParam(dataType = ARTIFACT_REQUEST_TYPE, paramType = PARAM_TYPE_BODY)
   })
   @ApiResponses({
       @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),
@@ -503,7 +503,7 @@ public class ServiceService extends BaseService {
       nickname = "ServiceService#updateArtifact"
   )
   @ApiImplicitParams({
-      @ApiImplicitParam(dataType = ARTIFACT_REQUEST_TYPE, paramType = "body")
+      @ApiImplicitParam(dataType = ARTIFACT_REQUEST_TYPE, paramType = PARAM_TYPE_BODY)
   })
   @ApiResponses({
       @ApiResponse(code = HttpStatus.SC_OK, message = MSG_SUCCESSFUL_OPERATION),

http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index 4c8154e..27bbd6c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -1794,7 +1794,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
       }
 
       ClusterResponse clusterResponse =
-          new ClusterResponse(cluster.getClusterId(), cluster.getClusterName(), null, null, null, null, null, null);
+          new ClusterResponse(cluster.getClusterId(), cluster.getClusterName(), null, null, null, 0, null, null);
 
       Map<String, Collection<ServiceConfigVersionResponse>> map =
         new HashMap<>();

http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterArtifactRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterArtifactRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterArtifactRequest.java
new file mode 100644
index 0000000..a821615
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterArtifactRequest.java
@@ -0,0 +1,46 @@
+/*
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import java.util.Map;
+
+import org.apache.ambari.server.controller.internal.ArtifactResourceProvider;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Request schema for endpoint {@link org.apache.ambari.server.api.services.ClusterService#createClusterArtifact(String,
+ * javax.ws.rs.core.HttpHeaders, javax.ws.rs.core.UriInfo, String, String)}
+ *
+ * The interface is not actually implemented, it only carries swagger annotations.
+ */
+@SuppressWarnings("unused")
+public interface ClusterArtifactRequest extends ApiModel {
+
+  @ApiModelProperty(name = ArtifactResourceProvider.RESPONSE_KEY)
+  ClusterArtifactRequestInfo getClusterArtifactRequestInfo();
+
+  @ApiModelProperty(name = ArtifactResourceProvider.ARTIFACT_DATA_PROPERTY)
+  Map<String, Object> getArtifactData();
+
+  interface ClusterArtifactRequestInfo {
+    @ApiModelProperty(name = ArtifactResourceProvider.ARTIFACT_NAME)
+    String getArtifactName();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterArtifactResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterArtifactResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterArtifactResponse.java
new file mode 100644
index 0000000..c0dab20
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterArtifactResponse.java
@@ -0,0 +1,49 @@
+/*
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
+
+import java.util.Map;
+
+import org.apache.ambari.server.controller.internal.ArtifactResourceProvider;
+
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * Response schema for endpoint {@link org.apache.ambari.server.api.services.ClusterService#getClusterArtifact}
+ *
+ * The interface is not actually implemented, it only carries swagger annotations.
+ */
+public interface ClusterArtifactResponse {
+
+  @ApiModelProperty(name = ArtifactResourceProvider.RESPONSE_KEY)
+  @SuppressWarnings("unused")
+  ClusterArtifactResponseInfo getClusterArtifactResponseInfo();
+
+  @ApiModelProperty(name = ArtifactResourceProvider.ARTIFACT_DATA_PROPERTY)
+  Map<String, Object> getArtifactData();
+
+  interface ClusterArtifactResponseInfo {
+    @ApiModelProperty(name = ArtifactResourceProvider.ARTIFACT_NAME)
+    String getArtifactName();
+
+    @ApiModelProperty(name = ArtifactResourceProvider.CLUSTER_NAME)
+    String getClusterName();
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterRequest.java
index 4d4fd59..56d0b1c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterRequest.java
@@ -22,40 +22,26 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.ambari.server.controller.internal.ClusterResourceProvider;
 import org.apache.ambari.server.state.SecurityType;
 
+import io.swagger.annotations.ApiModelProperty;
+
 /**
  * Used for create Cluster
  */
 public class ClusterRequest {
 
-  private Long clusterId; // for GET
-
-  private String clusterName; // for GET/CREATE/UPDATE
-
-  private String stackVersion; // for CREATE/UPDATE
-
-  private String provisioningState; // for GET/CREATE/UPDATE
-
-  /**
-   * The cluster's security type
-   * <p/>
-   * See {@link org.apache.ambari.server.state.SecurityType} for relevant values.
-   */
+  private final Long clusterId; // for GET
+  private final String clusterName; // for GET/CREATE/UPDATE
+  private final String stackVersion; // for CREATE/UPDATE
+  private final String provisioningState; // for GET/CREATE/UPDATE
   private SecurityType securityType; // for GET/CREATE/UPDATE
-
-  Set<String> hostNames; // CREATE/UPDATE
-
-  private List<ConfigurationRequest> configs = null;
-
-  private ServiceConfigVersionRequest serviceConfigVersionRequest = null;
-
-  /**
-   * The cluster session attributes.
-   */
+  private Set<String> hostNames; // CREATE/UPDATE
+  private List<ConfigurationRequest> configs;
+  private ServiceConfigVersionRequest serviceConfigVersionRequest;
   private final Map<String, Object> sessionAttributes;
-
-  private String repositoryVersion = null;
+  private String repositoryVersion;
 
 
   // ----- Constructors ------------------------------------------------------
@@ -70,10 +56,13 @@ public class ClusterRequest {
     this(clusterId, clusterName, provisioningState, securityType, stackVersion, hostNames, null);
   }
 
+  /**
+   * @param provisioningState whether the cluster is still initializing or has finished with its deployment requests:
+   *                          either {@code INIT} or {@code INSTALLED}, or {@code null} if not set on the request.
+   */
   public ClusterRequest(Long clusterId, String clusterName,
                         String provisioningState, SecurityType securityType, String stackVersion,
                         Set<String> hostNames, Map<String, Object> sessionAttributes) {
-    super();
     this.clusterId         = clusterId;
     this.clusterName       = clusterName;
     this.provisioningState = provisioningState;
@@ -86,16 +75,12 @@ public class ClusterRequest {
 
   // ----- ClusterRequest ----------------------------------------------------
 
-  /**
-   * @return the clusterId
-   */
+  @ApiModelProperty(name = ClusterResourceProvider.CLUSTER_ID)
   public Long getClusterId() {
     return clusterId;
   }
 
-  /**
-   * @return the clusterName
-   */
+  @ApiModelProperty(name = ClusterResourceProvider.CLUSTER_NAME)
   public String getClusterName() {
     return clusterName;
   }
@@ -107,81 +92,31 @@ public class ClusterRequest {
    * @return either {@code INIT} or {@code INSTALLED} or {@code null} if not set
    *         on the request.
    */
+  @ApiModelProperty(name = ClusterResourceProvider.PROVISIONING_STATE)
   public String getProvisioningState(){
     return provisioningState;
   }
 
   /**
-   * Sets whether the cluster is still initializing or has finished with its
-   * deployment requests.
-   *
-   * @param provisioningState
-   *          either {@code INIT} or {@code INSTALLED}, or {@code null} if not
-   *          set on the request.
-   */
-  public void setProvisioningState(String provisioningState) {
-    this.provisioningState = provisioningState;
-  }
-
-  /**
    * Gets the cluster's security type.
-   * <p/>
-   * See {@link org.apache.ambari.server.state.SecurityType} for relevant values.
    *
    * @return a SecurityType declaring the security type; or {@code null} if not set set on the request
    */
+  @ApiModelProperty(name = ClusterResourceProvider.SECURITY_TYPE)
   public SecurityType getSecurityType() {
     return securityType;
   }
 
-  /**
-   * Sets the cluster's security type.
-   * <p/>
-   * See {@link org.apache.ambari.server.state.SecurityType} for relevant values.
-   *
-   * @param securityType a SecurityType declaring the cluster's security type; or {@code null} if not
-   *                     set on the request
-   */
-  public void setSecurityType(SecurityType securityType) {
-    this.securityType = securityType;
-  }
-
-  /**
-   * @return the stackVersion
-   */
+  @ApiModelProperty(name = ClusterResourceProvider.VERSION)
   public String getStackVersion() {
     return stackVersion;
   }
 
-  /**
-   * @param clusterId the clusterId to set
-   */
-  public void setClusterId(Long clusterId) {
-    this.clusterId = clusterId;
-  }
-
-  /**
-   * @param clusterName the clusterName to set
-   */
-  public void setClusterName(String clusterName) {
-    this.clusterName = clusterName;
-  }
-
-  /**
-   * @param stackVersion the stackVersion to set
-   */
-  public void setStackVersion(String stackVersion) {
-    this.stackVersion = stackVersion;
-  }
-
+  @ApiModelProperty(hidden = true)
   public Set<String> getHostNames() {
     return hostNames;
   }
 
-  public void setHostNames(Set<String> hostNames) {
-    this.hostNames = hostNames;
-  }
-
   /**
    * Sets the configs requests (if any).
    *
@@ -196,6 +131,7 @@ public class ClusterRequest {
    * @return the list of configuration requests,
    * or <code>null</code> if none is set.
    */
+  @ApiModelProperty(name = ClusterResourceProvider.DESIRED_CONFIGS)
   public List<ConfigurationRequest> getDesiredConfig() {
     return configs;
   }
@@ -224,6 +160,7 @@ public class ClusterRequest {
     return sb.toString();
   }
 
+  @ApiModelProperty(name = ClusterResourceProvider.DESIRED_SERVICE_CONFIG_VERSIONS)
   public ServiceConfigVersionRequest getServiceConfigVersionRequest() {
     return serviceConfigVersionRequest;
   }
@@ -233,6 +170,7 @@ public class ClusterRequest {
    *
    * @return the session attributes; may be null
    */
+  @ApiModelProperty(hidden = true)
   public Map<String, Object> getSessionAttributes() {
     return sessionAttributes;
   }
@@ -251,6 +189,7 @@ public class ClusterRequest {
   /**
    * @return the repo version to use
    */
+  @ApiModelProperty(name = ClusterResourceProvider.REPO_VERSION)
   public String getRepositoryVersion() {
     return repositoryVersion;
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterResponse.java
index b89bd45..3f75971 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterResponse.java
@@ -1,4 +1,4 @@
-/**
+/*
  * 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
@@ -20,47 +20,36 @@ package org.apache.ambari.server.controller;
 
 import java.util.Collection;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Set;
 
+import org.apache.ambari.server.controller.internal.ClusterResourceProvider;
 import org.apache.ambari.server.state.ClusterHealthReport;
 import org.apache.ambari.server.state.DesiredConfig;
 import org.apache.ambari.server.state.SecurityType;
 import org.apache.ambari.server.state.State;
 
-public class ClusterResponse {
+import io.swagger.annotations.ApiModelProperty;
 
-  private final Long clusterId;
+public class ClusterResponse {
 
+  private final long clusterId;
   private final String clusterName;
-
   private final Set<String> hostNames;
-
   private final String desiredStackVersion;
+  private final State provisioningState;
+  private final SecurityType securityType;
+  private final int totalHosts;
 
   private Map<String, DesiredConfig> desiredConfigs;
-
   private Map<String, Collection<ServiceConfigVersionResponse>> desiredServiceConfigVersions;
-
-  private String provisioningState;
-
-  /**
-   * The cluster's security.
-   * <p/>
-   * See {@link org.apache.ambari.server.state.SecurityType} for relevant values.
-   */
-  private String securityType;
-
-  private Integer totalHosts;
-
   private ClusterHealthReport clusterHealthReport;
+  private Map<String, String> credentialStoreServiceProperties;
 
-  private Map<String, String> credentialStoreServiceProperties = null;
-
-  public ClusterResponse(Long clusterId, String clusterName,
-                         State provisioningState, SecurityType securityType, Set<String> hostNames, Integer totalHosts,
+  public ClusterResponse(long clusterId, String clusterName,
+                         State provisioningState, SecurityType securityType, Set<String> hostNames, int totalHosts,
                          String desiredStackVersion, ClusterHealthReport clusterHealthReport) {
 
-    super();
     this.clusterId = clusterId;
     this.clusterName = clusterName;
     this.hostNames = hostNames;
@@ -69,44 +58,42 @@ public class ClusterResponse {
     this.clusterHealthReport = clusterHealthReport;
 
     if (null != provisioningState) {
-      this.provisioningState = provisioningState.name();
+      this.provisioningState = provisioningState;
+    } else {
+      this.provisioningState = State.UNKNOWN;
     }
 
     if (null == securityType) {
-      this.securityType = SecurityType.NONE.name();
+      this.securityType = SecurityType.NONE;
     } else {
-      this.securityType = securityType.name();
+      this.securityType = securityType;
     }
   }
 
   /**
    * @return the clusterId
    */
-  public Long getClusterId() {
+  @ApiModelProperty(name = ClusterResourceProvider.CLUSTER_ID)
+  public long getClusterId() {
     return clusterId;
   }
 
   /**
    * @return the clusterName
    */
+  @ApiModelProperty(name = ClusterResourceProvider.CLUSTER_NAME)
   public String getClusterName() {
     return clusterName;
   }
 
   /**
-   * @return the host names
-   */
-  public Set<String> getHostNames() {
-    return hostNames;
-  }
-
-  /**
    * Gets whether the cluster is still initializing or has finished with its
    * deployment requests.
    *
    * @return either {@code INIT} or {@code INSTALLED}, never {@code null}.
    */
-  public String getProvisioningState() {
+  @ApiModelProperty(name = ClusterResourceProvider.PROVISIONING_STATE)
+  public State getProvisioningState() {
     return provisioningState;
   }
 
@@ -117,21 +104,11 @@ public class ClusterResponse {
    *
    * @return the cluster's security type
    */
-  public String getSecurityType() {
+  @ApiModelProperty(name = ClusterResourceProvider.SECURITY_TYPE)
+  public SecurityType getSecurityType() {
     return securityType;
   }
 
-  /**
-   * Sets the cluster's security type.
-   * <p/>
-   * See {@link org.apache.ambari.server.state.SecurityType} for relevant values.
-   *
-   * @param securityType a String declaring the cluster's security type
-   */
-  public void setSecurityType(String securityType) {
-    this.securityType = securityType;
-  }
-
   @Override
   public String toString() {
     StringBuilder sb = new StringBuilder();
@@ -165,37 +142,25 @@ public class ClusterResponse {
       return false;
     }
 
-    ClusterResponse that = (ClusterResponse) o;
+    ClusterResponse other = (ClusterResponse) o;
 
-    if (clusterId != null ?
-        !clusterId.equals(that.clusterId) : that.clusterId != null) {
-      return false;
-    }
-    if (clusterName != null ?
-        !clusterName.equals(that.clusterName) : that.clusterName != null) {
-      return false;
-    }
-
-    return true;
+    return Objects.equals(clusterId, other.clusterId) &&
+      Objects.equals(clusterName, other.clusterName);
   }
 
   @Override
   public int hashCode() {
-    int result = clusterId != null ? clusterId.intValue() : 0;
-    result = 71 * result + (clusterName != null ? clusterName.hashCode() : 0);
-    return result;
+    return Objects.hash(clusterId, clusterName);
   }
 
   /**
    * @return the desiredStackVersion
    */
+  @ApiModelProperty(name = ClusterResourceProvider.VERSION)
   public String getDesiredStackVersion() {
     return desiredStackVersion;
   }
 
-  /**
-   * @param configs
-   */
   public void setDesiredConfigs(Map<String, DesiredConfig> configs) {
     desiredConfigs = configs;
   }
@@ -203,6 +168,7 @@ public class ClusterResponse {
   /**
    * @return the desired configs
    */
+  @ApiModelProperty(name = ClusterResourceProvider.DESIRED_CONFIGS)
   public Map<String, DesiredConfig> getDesiredConfigs() {
     return desiredConfigs;
   }
@@ -210,17 +176,20 @@ public class ClusterResponse {
   /**
    * @return total number of hosts in the cluster
    */
-  public Integer getTotalHosts() {
+  @ApiModelProperty(name = ClusterResourceProvider.TOTAL_HOSTS)
+  public int getTotalHosts() {
     return totalHosts;
   }
 
   /**
    * @return cluster health report
    */
+  @ApiModelProperty(name = ClusterResourceProvider.HEALTH_REPORT)
   public ClusterHealthReport getClusterHealthReport() {
     return clusterHealthReport;
   }
 
+  @ApiModelProperty(name = ClusterResourceProvider.DESIRED_SERVICE_CONFIG_VERSIONS)
   public Map<String, Collection<ServiceConfigVersionResponse>> getDesiredServiceConfigVersions() {
     return desiredServiceConfigVersions;
   }
@@ -233,7 +202,14 @@ public class ClusterResponse {
     this.credentialStoreServiceProperties = credentialServiceProperties;
   }
 
+  @ApiModelProperty(name = ClusterResourceProvider.CREDENTIAL_STORE_PROPERTIES)
   public Map<String, String> getCredentialStoreServiceProperties() {
     return credentialStoreServiceProperties;
   }
+
+  public interface ClusterResponseWrapper extends ApiModel {
+    @ApiModelProperty(name = ClusterResourceProvider.RESPONSE_KEY)
+    @SuppressWarnings("unused")
+    ClusterResponse getClusterResponse();
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterServiceArtifactRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterServiceArtifactRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterServiceArtifactRequest.java
index ac37c0f..bc88469 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterServiceArtifactRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterServiceArtifactRequest.java
@@ -1,7 +1,26 @@
+/*
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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;
 
 import java.util.Map;
 
+import org.apache.ambari.server.controller.internal.ArtifactResourceProvider;
+
 import io.swagger.annotations.ApiModelProperty;
 
 /**
@@ -10,17 +29,18 @@ import io.swagger.annotations.ApiModelProperty;
  *
  * The interface is not actually implemented, it only carries swagger annotations.
  */
+@SuppressWarnings("unused")
 public interface ClusterServiceArtifactRequest extends ApiModel {
 
-  @ApiModelProperty(name = "Artifacts")
-  public ClusterServiceArtifactRequestInfo getClusterServiceArtifactRequestInfo();
+  @ApiModelProperty(name = ArtifactResourceProvider.RESPONSE_KEY)
+  ClusterServiceArtifactRequestInfo getClusterServiceArtifactRequestInfo();
 
-  @ApiModelProperty(name = "artifact_data")
-  public Map<String, Object> getArtifactData();
+  @ApiModelProperty(name = ArtifactResourceProvider.ARTIFACT_DATA_PROPERTY)
+  Map<String, Object> getArtifactData();
 
-  public interface ClusterServiceArtifactRequestInfo {
-    @ApiModelProperty(name = "artifact_name")
-    public String getArtifactName();
+  interface ClusterServiceArtifactRequestInfo {
+    @ApiModelProperty(name = ArtifactResourceProvider.ARTIFACT_NAME)
+    String getArtifactName();
   }
 
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterServiceArtifactResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterServiceArtifactResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterServiceArtifactResponse.java
index 29b8c94..de967f2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterServiceArtifactResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ClusterServiceArtifactResponse.java
@@ -1,4 +1,4 @@
-/**
+/*
  * 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
@@ -20,6 +20,8 @@ package org.apache.ambari.server.controller;
 
 import java.util.Map;
 
+import org.apache.ambari.server.controller.internal.ArtifactResourceProvider;
+
 import io.swagger.annotations.ApiModelProperty;
 
 /**
@@ -29,21 +31,22 @@ import io.swagger.annotations.ApiModelProperty;
  */
 public interface ClusterServiceArtifactResponse {
 
-  @ApiModelProperty(name = "Artifacts")
-  public ClusterServiceArtifactResponseInfo getClusterServiceArtifactResponseInfo();
+  @ApiModelProperty(name = ArtifactResourceProvider.RESPONSE_KEY)
+  @SuppressWarnings("unused")
+  ClusterServiceArtifactResponseInfo getClusterServiceArtifactResponseInfo();
 
-  @ApiModelProperty(name = "artifact_data")
-  public Map<String, Object> getArtifactData();
+  @ApiModelProperty(name = ArtifactResourceProvider.ARTIFACT_DATA_PROPERTY)
+  Map<String, Object> getArtifactData();
 
-  public interface ClusterServiceArtifactResponseInfo {
-    @ApiModelProperty(name = "artifact_name")
-    public String getArtifactName();
+  interface ClusterServiceArtifactResponseInfo {
+    @ApiModelProperty(name = ArtifactResourceProvider.ARTIFACT_NAME)
+    String getArtifactName();
 
-    @ApiModelProperty(name = "cluster_name")
-    public String getClusterName();
+    @ApiModelProperty(name = ArtifactResourceProvider.CLUSTER_NAME)
+    String getClusterName();
 
-    @ApiModelProperty(name = "service_name")
-    public String getServiceName();
+    @ApiModelProperty(name = ArtifactResourceProvider.SERVICE_NAME)
+    String getServiceName();
   }
 
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ArtifactResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ArtifactResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ArtifactResourceProvider.java
index a6a731c..cb8c7bb 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ArtifactResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ArtifactResourceProvider.java
@@ -1,4 +1,4 @@
-/**
+/*
  * 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
@@ -61,16 +61,15 @@ import com.google.inject.Inject;
 //todo: implement ExtendedResourceProvider???
 @StaticallyInject
 public class ArtifactResourceProvider extends AbstractResourceProvider {
-  /**
-   * artifact name
-   */
-  public static final String ARTIFACT_NAME_PROPERTY =
-      PropertyHelper.getPropertyId("Artifacts", "artifact_name");
 
-  /**
-   * artifact data
-   */
+  public static final String RESPONSE_KEY = "Artifacts";
+  public static final String ARTIFACT_NAME = "artifact_name";
+  public static final String CLUSTER_NAME = "cluster_name";
+  public static final String SERVICE_NAME = "service_name";
   public static final String ARTIFACT_DATA_PROPERTY = "artifact_data";
+  public static final String ARTIFACT_NAME_PROPERTY = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + ARTIFACT_NAME;
+  public static final String CLUSTER_NAME_PROPERTY = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + CLUSTER_NAME;
+  public static final String SERVICE_NAME_PROPERTY = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + SERVICE_NAME;
 
   /**
    * primary key fields
@@ -118,7 +117,7 @@ public class ArtifactResourceProvider extends AbstractResourceProvider {
   private static ArtifactDAO artifactDAO;
 
 
-  /**
+  /*
    * set resource properties, pk and fk's
    */
   static {
@@ -368,7 +367,7 @@ public class ArtifactResourceProvider extends AbstractResourceProvider {
       public Void invoke() throws AmbariException {
         // flatten out key properties as is expected by createForeignKeyMap()
         Map<String, Object> keyProperties = new HashMap<>();
-        for (Map.Entry<String, Object> entry : resource.getPropertiesMap().get("Artifacts").entrySet()) {
+        for (Map.Entry<String, Object> entry : resource.getPropertiesMap().get(RESPONSE_KEY).entrySet()) {
           keyProperties.put(String.format("Artifacts/%s", entry.getKey()), entry.getValue());
         }
 
@@ -667,7 +666,6 @@ public class ArtifactResourceProvider extends AbstractResourceProvider {
     /**
      * cluster name property name
      */
-    private static final String CLUSTER_NAME = PropertyHelper.getPropertyId("Artifacts", "cluster_name");
 
     @Override
     public void setManagementController(AmbariManagementController controller) {
@@ -681,7 +679,7 @@ public class ArtifactResourceProvider extends AbstractResourceProvider {
 
     @Override
     public String getFKPropertyName() {
-      return CLUSTER_NAME;
+      return CLUSTER_NAME_PROPERTY;
     }
 
     @Override
@@ -708,7 +706,7 @@ public class ArtifactResourceProvider extends AbstractResourceProvider {
     public boolean instanceExists(Map<Resource.Type, String> keyMap,
                                   Map<String, Object> properties) throws AmbariException {
       try {
-        String clusterName = String.valueOf(properties.get(CLUSTER_NAME));
+        String clusterName = String.valueOf(properties.get(CLUSTER_NAME_PROPERTY));
         controller.getClusters().getCluster(clusterName);
         return true;
       } catch (ObjectNotFoundException e) {
@@ -730,7 +728,6 @@ public class ArtifactResourceProvider extends AbstractResourceProvider {
     /**
      * service name property name
      */
-    private static final String SERVICE_NAME = PropertyHelper.getPropertyId("Artifacts", "service_name");
 
     @Override
     public void setManagementController(AmbariManagementController controller) {
@@ -744,7 +741,7 @@ public class ArtifactResourceProvider extends AbstractResourceProvider {
 
     @Override
     public String getFKPropertyName() {
-      return SERVICE_NAME;
+      return SERVICE_NAME_PROPERTY;
     }
 
     @Override
@@ -764,7 +761,7 @@ public class ArtifactResourceProvider extends AbstractResourceProvider {
 
     @Override
     public Map<Resource.Type, String> getForeignKeyInfo() {
-      return Collections.singletonMap(Resource.Type.Cluster, "Artifacts/cluster_name");
+      return Collections.singletonMap(Resource.Type.Cluster, CLUSTER_NAME_PROPERTY);
     }
 
     @Override
@@ -774,7 +771,7 @@ public class ArtifactResourceProvider extends AbstractResourceProvider {
       String clusterName = String.valueOf(properties.get(keyMap.get(Resource.Type.Cluster)));
       try {
         Cluster cluster = controller.getClusters().getCluster(clusterName);
-        cluster.getService(String.valueOf(properties.get(SERVICE_NAME)));
+        cluster.getService(String.valueOf(properties.get(SERVICE_NAME_PROPERTY)));
         return true;
       } catch (ObjectNotFoundException e) {
         // doesn't exist

http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
index ae17de4..cc3234b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
@@ -1,4 +1,4 @@
-/**
+/*
  * 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
@@ -69,28 +69,41 @@ public class ClusterResourceProvider extends AbstractControllerResourceProvider
   // ----- Property ID constants ---------------------------------------------
 
   // Clusters
-  public static final String CLUSTER_ID_PROPERTY_ID = PropertyHelper.getPropertyId("Clusters", "cluster_id");
-  public static final String CLUSTER_NAME_PROPERTY_ID = PropertyHelper.getPropertyId("Clusters", "cluster_name");
-  public static final String CLUSTER_VERSION_PROPERTY_ID = PropertyHelper.getPropertyId("Clusters", "version");
-  public static final String CLUSTER_PROVISIONING_STATE_PROPERTY_ID = PropertyHelper.getPropertyId("Clusters", "provisioning_state");
-  public static final String CLUSTER_SECURITY_TYPE_PROPERTY_ID = PropertyHelper.getPropertyId("Clusters", "security_type");
-  public static final String CLUSTER_DESIRED_CONFIGS_PROPERTY_ID = PropertyHelper.getPropertyId("Clusters", "desired_configs");
-  public static final String CLUSTER_DESIRED_SERVICE_CONFIG_VERSIONS_PROPERTY_ID = PropertyHelper.getPropertyId("Clusters", "desired_service_config_versions");
-  public static final String CLUSTER_TOTAL_HOSTS_PROPERTY_ID = PropertyHelper.getPropertyId("Clusters", "total_hosts");
-  public static final String CLUSTER_HEALTH_REPORT_PROPERTY_ID = PropertyHelper.getPropertyId("Clusters", "health_report");
-  public static final String CLUSTER_CREDENTIAL_STORE_PROPERTIES_PROPERTY_ID = PropertyHelper.getPropertyId("Clusters", "credential_store_properties");
-  public static final String BLUEPRINT_PROPERTY_ID = PropertyHelper.getPropertyId(null, "blueprint");
-  public static final String SECURITY_PROPERTY_ID = PropertyHelper.getPropertyId(null, "security");
-  public static final String CREDENTIALS_PROPERTY_ID = PropertyHelper.getPropertyId(null, "credentials");
-  public static final String QUICKLINKS_PROFILE_PROPERTY_ID = PropertyHelper.getPropertyId(null, "quicklinks_profile");
-  public static final String SESSION_ATTRIBUTES_PROPERTY_ID = "session_attributes";
-
-  public static final String CLUSTER_REPO_VERSION = "Clusters/repository_version";
+  public static final String RESPONSE_KEY = "Clusters";
+  public static final String ALL_PROPERTIES = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + "*";
+  public static final String CLUSTER_ID = "cluster_id";
+  public static final String CLUSTER_NAME = "cluster_name";
+  public static final String VERSION = "version";
+  public static final String PROVISIONING_STATE = "provisioning_state";
+  public static final String SECURITY_TYPE = "security_type";
+  public static final String DESIRED_CONFIGS = "desired_configs";
+  public static final String DESIRED_SERVICE_CONFIG_VERSIONS = "desired_service_config_versions";
+  public static final String TOTAL_HOSTS = "total_hosts";
+  public static final String HEALTH_REPORT = "health_report";
+  public static final String CREDENTIAL_STORE_PROPERTIES = "credential_store_properties";
+  public static final String REPO_VERSION = "repository_version";
+  public static final String CLUSTER_ID_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + CLUSTER_ID;
+  public static final String CLUSTER_NAME_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + CLUSTER_NAME;
+  public static final String CLUSTER_VERSION_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + VERSION;
+  public static final String CLUSTER_PROVISIONING_STATE_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + PROVISIONING_STATE;
+  public static final String CLUSTER_SECURITY_TYPE_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + SECURITY_TYPE;
+  public static final String CLUSTER_DESIRED_CONFIGS_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + DESIRED_CONFIGS;
+  public static final String CLUSTER_DESIRED_SERVICE_CONFIG_VERSIONS_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + DESIRED_SERVICE_CONFIG_VERSIONS;
+  public static final String CLUSTER_TOTAL_HOSTS_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + TOTAL_HOSTS;
+  public static final String CLUSTER_HEALTH_REPORT_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + HEALTH_REPORT;
+  public static final String CLUSTER_CREDENTIAL_STORE_PROPERTIES_PROPERTY_ID = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + CREDENTIAL_STORE_PROPERTIES;
+  public static final String CLUSTER_REPO_VERSION = RESPONSE_KEY + PropertyHelper.EXTERNAL_PATH_SEP + REPO_VERSION;
+
+  static final String BLUEPRINT = "blueprint";
+  private static final String SECURITY = "security";
+  static final String CREDENTIALS = "credentials";
+  private static final String QUICKLINKS_PROFILE = "quicklinks_profile";
+  private static final String SESSION_ATTRIBUTES = "session_attributes";
 
   /**
    * The session attributes property prefix.
    */
-  private static final String SESSION_ATTRIBUTES_PROPERTY_PREFIX = SESSION_ATTRIBUTES_PROPERTY_ID + "/";
+  private static final String SESSION_ATTRIBUTES_PROPERTY_PREFIX = SESSION_ATTRIBUTES + "/";
 
   /**
    * Request info property ID.  Allow internal getResources call to bypass permissions check.
@@ -148,12 +161,12 @@ public class ClusterResourceProvider extends AbstractControllerResourceProvider
     propertyIds.add(CLUSTER_TOTAL_HOSTS_PROPERTY_ID);
     propertyIds.add(CLUSTER_HEALTH_REPORT_PROPERTY_ID);
     propertyIds.add(CLUSTER_CREDENTIAL_STORE_PROPERTIES_PROPERTY_ID);
-    propertyIds.add(BLUEPRINT_PROPERTY_ID);
-    propertyIds.add(SESSION_ATTRIBUTES_PROPERTY_ID);
-    propertyIds.add(SECURITY_PROPERTY_ID);
-    propertyIds.add(CREDENTIALS_PROPERTY_ID);
+    propertyIds.add(BLUEPRINT);
+    propertyIds.add(SESSION_ATTRIBUTES);
+    propertyIds.add(SECURITY);
+    propertyIds.add(CREDENTIALS);
     propertyIds.add(CLUSTER_REPO_VERSION);
-    propertyIds.add(QUICKLINKS_PROFILE_PROPERTY_ID);
+    propertyIds.add(QUICKLINKS_PROFILE);
   }
 
 
@@ -265,23 +278,17 @@ public class ClusterResourceProvider extends AbstractControllerResourceProvider
 
     // Allow internal call to bypass permissions check.
     for (ClusterResponse response : responses) {
-
-      String clusterName = response.getClusterName();
-
       Resource resource = new ResourceImpl(Resource.Type.Cluster);
       setResourceProperty(resource, CLUSTER_ID_PROPERTY_ID, response.getClusterId(), requestedIds);
-      setResourceProperty(resource, CLUSTER_NAME_PROPERTY_ID, clusterName, requestedIds);
-      setResourceProperty(resource, CLUSTER_PROVISIONING_STATE_PROPERTY_ID, response.getProvisioningState(), requestedIds);
-      setResourceProperty(resource, CLUSTER_SECURITY_TYPE_PROPERTY_ID, response.getSecurityType(), requestedIds);
+      setResourceProperty(resource, CLUSTER_NAME_PROPERTY_ID, response.getClusterName(), requestedIds);
+      setResourceProperty(resource, CLUSTER_PROVISIONING_STATE_PROPERTY_ID, response.getProvisioningState().name(), requestedIds);
+      setResourceProperty(resource, CLUSTER_SECURITY_TYPE_PROPERTY_ID, response.getSecurityType().name(), requestedIds);
       setResourceProperty(resource, CLUSTER_DESIRED_CONFIGS_PROPERTY_ID, response.getDesiredConfigs(), requestedIds);
-      setResourceProperty(resource, CLUSTER_DESIRED_SERVICE_CONFIG_VERSIONS_PROPERTY_ID,
-        response.getDesiredServiceConfigVersions(), requestedIds);
+      setResourceProperty(resource, CLUSTER_DESIRED_SERVICE_CONFIG_VERSIONS_PROPERTY_ID, response.getDesiredServiceConfigVersions(), requestedIds);
       setResourceProperty(resource, CLUSTER_TOTAL_HOSTS_PROPERTY_ID, response.getTotalHosts(), requestedIds);
       setResourceProperty(resource, CLUSTER_HEALTH_REPORT_PROPERTY_ID, response.getClusterHealthReport(), requestedIds);
       setResourceProperty(resource, CLUSTER_CREDENTIAL_STORE_PROPERTIES_PROPERTY_ID, response.getCredentialStoreServiceProperties(), requestedIds);
-
-      resource.setProperty(CLUSTER_VERSION_PROPERTY_ID,
-          response.getDesiredStackVersion());
+      setResourceProperty(resource, CLUSTER_VERSION_PROPERTY_ID, response.getDesiredStackVersion(), requestedIds);
 
       if (LOG.isDebugEnabled()) {
         LOG.debug("Adding ClusterResponse to resource"
@@ -424,13 +431,12 @@ public class ClusterResourceProvider extends AbstractControllerResourceProvider
       cr.setRepositoryVersion(properties.get(CLUSTER_REPO_VERSION).toString());
     }
 
-    List<ConfigurationRequest> configRequests = getConfigurationRequests("Clusters", properties);
-
-    ServiceConfigVersionRequest serviceConfigVersionRequest = getServiceConfigVersionRequest("Clusters", properties);
-
-    if (!configRequests.isEmpty())
+    List<ConfigurationRequest> configRequests = getConfigurationRequests(RESPONSE_KEY, properties);
+    if (!configRequests.isEmpty()) {
       cr.setDesiredConfig(configRequests);
+    }
 
+    ServiceConfigVersionRequest serviceConfigVersionRequest = getServiceConfigVersionRequest(RESPONSE_KEY, properties);
     if (serviceConfigVersionRequest != null) {
       cr.setServiceConfigVersionRequest(serviceConfigVersionRequest);
     }
@@ -464,7 +470,7 @@ public class ClusterResourceProvider extends AbstractControllerResourceProvider
   /**
    * Helper method for creating rollback request
    */
-  protected ServiceConfigVersionRequest getServiceConfigVersionRequest(String parentCategory, Map<String, Object> properties) {
+  protected static ServiceConfigVersionRequest getServiceConfigVersionRequest(String parentCategory, Map<String, Object> properties) {
     ServiceConfigVersionRequest serviceConfigVersionRequest = null;
 
     for (Map.Entry<String, Object> entry : properties.entrySet()) {
@@ -519,7 +525,7 @@ public class ClusterResourceProvider extends AbstractControllerResourceProvider
       NoSuchParentResourceException {
 
     LOG.info("Creating Cluster '" + properties.get(CLUSTER_NAME_PROPERTY_ID) +
-        "' based on blueprint '" + String.valueOf(properties.get(BLUEPRINT_PROPERTY_ID)) + "'.");
+        "' based on blueprint '" + String.valueOf(properties.get(BLUEPRINT)) + "'.");
 
     String rawRequestBody = requestInfoProperties.get(Request.REQUEST_INFO_BODY_PROPERTY);
     Map<String, Object> rawBodyMap = jsonSerializer.<Map<String, Object>>fromJson(rawRequestBody, Map.class);

http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequest.java
index 1a14b01..eb02637 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ProvisionClusterRequest.java
@@ -213,7 +213,7 @@ public class ProvisionClusterRequest extends BaseClusterRequest {
   private Map<String, Credential> parseCredentials(Map<String, Object> properties) throws
     InvalidTopologyTemplateException {
     HashMap<String, Credential> credentialHashMap = new HashMap<>();
-    Set<Map<String, String>> credentialsSet = (Set<Map<String, String>>) properties.get(ClusterResourceProvider.CREDENTIALS_PROPERTY_ID);
+    Set<Map<String, String>> credentialsSet = (Set<Map<String, String>>) properties.get(ClusterResourceProvider.CREDENTIALS);
     if (credentialsSet != null) {
       for (Map<String, String> credentialMap : credentialsSet) {
         String alias = Strings.emptyToNull(credentialMap.get("alias"));
@@ -291,7 +291,7 @@ public class ProvisionClusterRequest extends BaseClusterRequest {
    * @throws NoSuchBlueprintException if specified blueprint doesn't exist
    */
   private void parseBlueprint(Map<String, Object> properties) throws NoSuchStackException, NoSuchBlueprintException {
-    String blueprintName = String.valueOf(properties.get(ClusterResourceProvider.BLUEPRINT_PROPERTY_ID));
+    String blueprintName = String.valueOf(properties.get(ClusterResourceProvider.BLUEPRINT));
     // set blueprint field
     setBlueprint(getBlueprintFactory().getBlueprint(blueprintName));
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/275525b2/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java
index cfc43f5..47b6e98 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterServiceTest.java
@@ -1,4 +1,4 @@
-/**
+/*
  * 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
@@ -95,45 +95,45 @@ public class ClusterServiceTest extends BaseServiceTest {
     args = new Object[] {getHttpHeaders(), getUriInfo(), "clusterName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.DELETE, clusterService, m, args, null));
 
-    //createArtifact
+    //createClusterArtifact
     clusterService = new TestClusterService(clusters, "clusterName");
-    m = clusterService.getClass().getMethod("createArtifact", String.class, HttpHeaders.class, UriInfo.class, String.class, String.class);
+    m = clusterService.getClass().getMethod("createClusterArtifact", String.class, HttpHeaders.class, UriInfo.class, String.class, String.class);
     args = new Object[] {"body", getHttpHeaders(), getUriInfo(), "clusterName", "artifactName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.POST, clusterService, m, args, "body"));
 
-    //getArtifact
+    //getClusterArtifact
     clusterService = new TestClusterService(clusters, "clusterName");
-    m = clusterService.getClass().getMethod("getArtifact", String.class, HttpHeaders.class, UriInfo.class, String.class, String.class);
+    m = clusterService.getClass().getMethod("getClusterArtifact", String.class, HttpHeaders.class, UriInfo.class, String.class, String.class);
     args = new Object[] {"body", getHttpHeaders(), getUriInfo(), "clusterName", "artifact_name"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, clusterService, m, args, "body"));
 
-    //getArtifacts
+    //getClusterArtifacts
     clusterService = new TestClusterService(clusters, "clusterName");
-    m = clusterService.getClass().getMethod("getArtifacts", String.class, HttpHeaders.class, UriInfo.class, String.class);
+    m = clusterService.getClass().getMethod("getClusterArtifacts", String.class, HttpHeaders.class, UriInfo.class, String.class);
     args = new Object[] {"body", getHttpHeaders(), getUriInfo(), "clusterName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.GET, clusterService, m, args, "body"));
 
-    //updateArtifact
+    //updateClusterArtifact
     clusterService = new TestClusterService(clusters, "clusterName");
-    m = clusterService.getClass().getMethod("updateArtifact", String.class, HttpHeaders.class, UriInfo.class, String.class, String.class);
+    m = clusterService.getClass().getMethod("updateClusterArtifact", String.class, HttpHeaders.class, UriInfo.class, String.class, String.class);
     args = new Object[] {"body", getHttpHeaders(), getUriInfo(), "clusterName", "artifactName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.PUT, clusterService, m, args, "body"));
 
-    //updateArtifacts
+    //updateClusterArtifacts
     clusterService = new TestClusterService(clusters, "clusterName");
-    m = clusterService.getClass().getMethod("updateArtifacts", String.class, HttpHeaders.class, UriInfo.class, String.class);
+    m = clusterService.getClass().getMethod("updateClusterArtifacts", String.class, HttpHeaders.class, UriInfo.class, String.class);
     args = new Object[] {"body", getHttpHeaders(), getUriInfo(), "clusterName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.PUT, clusterService, m, args, "body"));
 
-    //deleteArtifact
+    //deleteClusterArtifact
     clusterService = new TestClusterService(clusters, "clusterName");
-    m = clusterService.getClass().getMethod("deleteArtifact", String.class, HttpHeaders.class, UriInfo.class, String.class, String.class);
+    m = clusterService.getClass().getMethod("deleteClusterArtifact", String.class, HttpHeaders.class, UriInfo.class, String.class, String.class);
     args = new Object[] {"body", getHttpHeaders(), getUriInfo(), "clusterName", "artifactName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.DELETE, clusterService, m, args, "body"));
 
-    //deleteArtifacts
+    //deleteClusterArtifacts
     clusterService = new TestClusterService(clusters, "clusterName");
-    m = clusterService.getClass().getMethod("deleteArtifacts", String.class, HttpHeaders.class, UriInfo.class, String.class);
+    m = clusterService.getClass().getMethod("deleteClusterArtifacts", String.class, HttpHeaders.class, UriInfo.class, String.class);
     args = new Object[] {"body", getHttpHeaders(), getUriInfo(), "clusterName"};
     listInvocations.add(new ServiceTestInvocation(Request.Type.DELETE, clusterService, m, args, "body"));
 


[04/49] ambari git commit: AMBARI-20436. Create a prototype of ambari-server swagger integration. (jaimin)

Posted by ad...@apache.org.
http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/lib/marked.js
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/lib/marked.js b/ambari-web/api-docs/lib/marked.js
new file mode 100644
index 0000000..c2a678d
--- /dev/null
+++ b/ambari-web/api-docs/lib/marked.js
@@ -0,0 +1,1272 @@
+/**
+ * marked - a markdown parser
+ * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
+ * https://github.com/chjj/marked
+ */
+
+;(function() {
+
+/**
+ * Block-Level Grammar
+ */
+
+var block = {
+  newline: /^\n+/,
+  code: /^( {4}[^\n]+\n*)+/,
+  fences: noop,
+  hr: /^( *[-*_]){3,} *(?:\n+|$)/,
+  heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,
+  nptable: noop,
+  lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,
+  blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,
+  list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,
+  html: /^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,
+  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,
+  table: noop,
+  paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,
+  text: /^[^\n]+/
+};
+
+block.bullet = /(?:[*+-]|\d+\.)/;
+block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;
+block.item = replace(block.item, 'gm')
+  (/bull/g, block.bullet)
+  ();
+
+block.list = replace(block.list)
+  (/bull/g, block.bullet)
+  ('hr', '\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))')
+  ('def', '\\n+(?=' + block.def.source + ')')
+  ();
+
+block.blockquote = replace(block.blockquote)
+  ('def', block.def)
+  ();
+
+block._tag = '(?!(?:'
+  + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code'
+  + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo'
+  + '|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b';
+
+block.html = replace(block.html)
+  ('comment', /<!--[\s\S]*?-->/)
+  ('closed', /<(tag)[\s\S]+?<\/\1>/)
+  ('closing', /<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)
+  (/tag/g, block._tag)
+  ();
+
+block.paragraph = replace(block.paragraph)
+  ('hr', block.hr)
+  ('heading', block.heading)
+  ('lheading', block.lheading)
+  ('blockquote', block.blockquote)
+  ('tag', '<' + block._tag)
+  ('def', block.def)
+  ();
+
+/**
+ * Normal Block Grammar
+ */
+
+block.normal = merge({}, block);
+
+/**
+ * GFM Block Grammar
+ */
+
+block.gfm = merge({}, block.normal, {
+  fences: /^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,
+  paragraph: /^/
+});
+
+block.gfm.paragraph = replace(block.paragraph)
+  ('(?!', '(?!'
+    + block.gfm.fences.source.replace('\\1', '\\2') + '|'
+    + block.list.source.replace('\\1', '\\3') + '|')
+  ();
+
+/**
+ * GFM + Tables Block Grammar
+ */
+
+block.tables = merge({}, block.gfm, {
+  nptable: /^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,
+  table: /^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/
+});
+
+/**
+ * Block Lexer
+ */
+
+function Lexer(options) {
+  this.tokens = [];
+  this.tokens.links = {};
+  this.options = options || marked.defaults;
+  this.rules = block.normal;
+
+  if (this.options.gfm) {
+    if (this.options.tables) {
+      this.rules = block.tables;
+    } else {
+      this.rules = block.gfm;
+    }
+  }
+}
+
+/**
+ * Expose Block Rules
+ */
+
+Lexer.rules = block;
+
+/**
+ * Static Lex Method
+ */
+
+Lexer.lex = function(src, options) {
+  var lexer = new Lexer(options);
+  return lexer.lex(src);
+};
+
+/**
+ * Preprocessing
+ */
+
+Lexer.prototype.lex = function(src) {
+  src = src
+    .replace(/\r\n|\r/g, '\n')
+    .replace(/\t/g, '    ')
+    .replace(/\u00a0/g, ' ')
+    .replace(/\u2424/g, '\n');
+
+  return this.token(src, true);
+};
+
+/**
+ * Lexing
+ */
+
+Lexer.prototype.token = function(src, top, bq) {
+  var src = src.replace(/^ +$/gm, '')
+    , next
+    , loose
+    , cap
+    , bull
+    , b
+    , item
+    , space
+    , i
+    , l;
+
+  while (src) {
+    // newline
+    if (cap = this.rules.newline.exec(src)) {
+      src = src.substring(cap[0].length);
+      if (cap[0].length > 1) {
+        this.tokens.push({
+          type: 'space'
+        });
+      }
+    }
+
+    // code
+    if (cap = this.rules.code.exec(src)) {
+      src = src.substring(cap[0].length);
+      cap = cap[0].replace(/^ {4}/gm, '');
+      this.tokens.push({
+        type: 'code',
+        text: !this.options.pedantic
+          ? cap.replace(/\n+$/, '')
+          : cap
+      });
+      continue;
+    }
+
+    // fences (gfm)
+    if (cap = this.rules.fences.exec(src)) {
+      src = src.substring(cap[0].length);
+      this.tokens.push({
+        type: 'code',
+        lang: cap[2],
+        text: cap[3]
+      });
+      continue;
+    }
+
+    // heading
+    if (cap = this.rules.heading.exec(src)) {
+      src = src.substring(cap[0].length);
+      this.tokens.push({
+        type: 'heading',
+        depth: cap[1].length,
+        text: cap[2]
+      });
+      continue;
+    }
+
+    // table no leading pipe (gfm)
+    if (top && (cap = this.rules.nptable.exec(src))) {
+      src = src.substring(cap[0].length);
+
+      item = {
+        type: 'table',
+        header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */),
+        align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
+        cells: cap[3].replace(/\n$/, '').split('\n')
+      };
+
+      for (i = 0; i < item.align.length; i++) {
+        if (/^ *-+: *$/.test(item.align[i])) {
+          item.align[i] = 'right';
+        } else if (/^ *:-+: *$/.test(item.align[i])) {
+          item.align[i] = 'center';
+        } else if (/^ *:-+ *$/.test(item.align[i])) {
+          item.align[i] = 'left';
+        } else {
+          item.align[i] = null;
+        }
+      }
+
+      for (i = 0; i < item.cells.length; i++) {
+        item.cells[i] = item.cells[i].split(/ *\| */);
+      }
+
+      this.tokens.push(item);
+
+      continue;
+    }
+
+    // lheading
+    if (cap = this.rules.lheading.exec(src)) {
+      src = src.substring(cap[0].length);
+      this.tokens.push({
+        type: 'heading',
+        depth: cap[2] === '=' ? 1 : 2,
+        text: cap[1]
+      });
+      continue;
+    }
+
+    // hr
+    if (cap = this.rules.hr.exec(src)) {
+      src = src.substring(cap[0].length);
+      this.tokens.push({
+        type: 'hr'
+      });
+      continue;
+    }
+
+    // blockquote
+    if (cap = this.rules.blockquote.exec(src)) {
+      src = src.substring(cap[0].length);
+
+      this.tokens.push({
+        type: 'blockquote_start'
+      });
+
+      cap = cap[0].replace(/^ *> ?/gm, '');
+
+      // Pass `top` to keep the current
+      // "toplevel" state. This is exactly
+      // how markdown.pl works.
+      this.token(cap, top, true);
+
+      this.tokens.push({
+        type: 'blockquote_end'
+      });
+
+      continue;
+    }
+
+    // list
+    if (cap = this.rules.list.exec(src)) {
+      src = src.substring(cap[0].length);
+      bull = cap[2];
+
+      this.tokens.push({
+        type: 'list_start',
+        ordered: bull.length > 1
+      });
+
+      // Get each top-level item.
+      cap = cap[0].match(this.rules.item);
+
+      next = false;
+      l = cap.length;
+      i = 0;
+
+      for (; i < l; i++) {
+        item = cap[i];
+
+        // Remove the list item's bullet
+        // so it is seen as the next token.
+        space = item.length;
+        item = item.replace(/^ *([*+-]|\d+\.) +/, '');
+
+        // Outdent whatever the
+        // list item contains. Hacky.
+        if (~item.indexOf('\n ')) {
+          space -= item.length;
+          item = !this.options.pedantic
+            ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '')
+            : item.replace(/^ {1,4}/gm, '');
+        }
+
+        // Determine whether the next list item belongs here.
+        // Backpedal if it does not belong in this list.
+        if (this.options.smartLists && i !== l - 1) {
+          b = block.bullet.exec(cap[i + 1])[0];
+          if (bull !== b && !(bull.length > 1 && b.length > 1)) {
+            src = cap.slice(i + 1).join('\n') + src;
+            i = l - 1;
+          }
+        }
+
+        // Determine whether item is loose or not.
+        // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/
+        // for discount behavior.
+        loose = next || /\n\n(?!\s*$)/.test(item);
+        if (i !== l - 1) {
+          next = item.charAt(item.length - 1) === '\n';
+          if (!loose) loose = next;
+        }
+
+        this.tokens.push({
+          type: loose
+            ? 'loose_item_start'
+            : 'list_item_start'
+        });
+
+        // Recurse.
+        this.token(item, false, bq);
+
+        this.tokens.push({
+          type: 'list_item_end'
+        });
+      }
+
+      this.tokens.push({
+        type: 'list_end'
+      });
+
+      continue;
+    }
+
+    // html
+    if (cap = this.rules.html.exec(src)) {
+      src = src.substring(cap[0].length);
+      this.tokens.push({
+        type: this.options.sanitize
+          ? 'paragraph'
+          : 'html',
+        pre: cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style',
+        text: cap[0]
+      });
+      continue;
+    }
+
+    // def
+    if ((!bq && top) && (cap = this.rules.def.exec(src))) {
+      src = src.substring(cap[0].length);
+      this.tokens.links[cap[1].toLowerCase()] = {
+        href: cap[2],
+        title: cap[3]
+      };
+      continue;
+    }
+
+    // table (gfm)
+    if (top && (cap = this.rules.table.exec(src))) {
+      src = src.substring(cap[0].length);
+
+      item = {
+        type: 'table',
+        header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */),
+        align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),
+        cells: cap[3].replace(/(?: *\| *)?\n$/, '').split('\n')
+      };
+
+      for (i = 0; i < item.align.length; i++) {
+        if (/^ *-+: *$/.test(item.align[i])) {
+          item.align[i] = 'right';
+        } else if (/^ *:-+: *$/.test(item.align[i])) {
+          item.align[i] = 'center';
+        } else if (/^ *:-+ *$/.test(item.align[i])) {
+          item.align[i] = 'left';
+        } else {
+          item.align[i] = null;
+        }
+      }
+
+      for (i = 0; i < item.cells.length; i++) {
+        item.cells[i] = item.cells[i]
+          .replace(/^ *\| *| *\| *$/g, '')
+          .split(/ *\| */);
+      }
+
+      this.tokens.push(item);
+
+      continue;
+    }
+
+    // top-level paragraph
+    if (top && (cap = this.rules.paragraph.exec(src))) {
+      src = src.substring(cap[0].length);
+      this.tokens.push({
+        type: 'paragraph',
+        text: cap[1].charAt(cap[1].length - 1) === '\n'
+          ? cap[1].slice(0, -1)
+          : cap[1]
+      });
+      continue;
+    }
+
+    // text
+    if (cap = this.rules.text.exec(src)) {
+      // Top-level should never reach here.
+      src = src.substring(cap[0].length);
+      this.tokens.push({
+        type: 'text',
+        text: cap[0]
+      });
+      continue;
+    }
+
+    if (src) {
+      throw new
+        Error('Infinite loop on byte: ' + src.charCodeAt(0));
+    }
+  }
+
+  return this.tokens;
+};
+
+/**
+ * Inline-Level Grammar
+ */
+
+var inline = {
+  escape: /^\\([\\`*{}\[\]()#+\-.!_>])/,
+  autolink: /^<([^ >]+(@|:\/)[^ >]+)>/,
+  url: noop,
+  tag: /^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,
+  link: /^!?\[(inside)\]\(href\)/,
+  reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/,
+  nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,
+  strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,
+  em: /^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,
+  code: /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,
+  br: /^ {2,}\n(?!\s*$)/,
+  del: noop,
+  text: /^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/
+};
+
+inline._inside = /(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/;
+inline._href = /\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/;
+
+inline.link = replace(inline.link)
+  ('inside', inline._inside)
+  ('href', inline._href)
+  ();
+
+inline.reflink = replace(inline.reflink)
+  ('inside', inline._inside)
+  ();
+
+/**
+ * Normal Inline Grammar
+ */
+
+inline.normal = merge({}, inline);
+
+/**
+ * Pedantic Inline Grammar
+ */
+
+inline.pedantic = merge({}, inline.normal, {
+  strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,
+  em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/
+});
+
+/**
+ * GFM Inline Grammar
+ */
+
+inline.gfm = merge({}, inline.normal, {
+  escape: replace(inline.escape)('])', '~|])')(),
+  url: /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,
+  del: /^~~(?=\S)([\s\S]*?\S)~~/,
+  text: replace(inline.text)
+    (']|', '~]|')
+    ('|', '|https?://|')
+    ()
+});
+
+/**
+ * GFM + Line Breaks Inline Grammar
+ */
+
+inline.breaks = merge({}, inline.gfm, {
+  br: replace(inline.br)('{2,}', '*')(),
+  text: replace(inline.gfm.text)('{2,}', '*')()
+});
+
+/**
+ * Inline Lexer & Compiler
+ */
+
+function InlineLexer(links, options) {
+  this.options = options || marked.defaults;
+  this.links = links;
+  this.rules = inline.normal;
+  this.renderer = this.options.renderer || new Renderer;
+  this.renderer.options = this.options;
+
+  if (!this.links) {
+    throw new
+      Error('Tokens array requires a `links` property.');
+  }
+
+  if (this.options.gfm) {
+    if (this.options.breaks) {
+      this.rules = inline.breaks;
+    } else {
+      this.rules = inline.gfm;
+    }
+  } else if (this.options.pedantic) {
+    this.rules = inline.pedantic;
+  }
+}
+
+/**
+ * Expose Inline Rules
+ */
+
+InlineLexer.rules = inline;
+
+/**
+ * Static Lexing/Compiling Method
+ */
+
+InlineLexer.output = function(src, links, options) {
+  var inline = new InlineLexer(links, options);
+  return inline.output(src);
+};
+
+/**
+ * Lexing/Compiling
+ */
+
+InlineLexer.prototype.output = function(src) {
+  var out = ''
+    , link
+    , text
+    , href
+    , cap;
+
+  while (src) {
+    // escape
+    if (cap = this.rules.escape.exec(src)) {
+      src = src.substring(cap[0].length);
+      out += cap[1];
+      continue;
+    }
+
+    // autolink
+    if (cap = this.rules.autolink.exec(src)) {
+      src = src.substring(cap[0].length);
+      if (cap[2] === '@') {
+        text = cap[1].charAt(6) === ':'
+          ? this.mangle(cap[1].substring(7))
+          : this.mangle(cap[1]);
+        href = this.mangle('mailto:') + text;
+      } else {
+        text = escape(cap[1]);
+        href = text;
+      }
+      out += this.renderer.link(href, null, text);
+      continue;
+    }
+
+    // url (gfm)
+    if (!this.inLink && (cap = this.rules.url.exec(src))) {
+      src = src.substring(cap[0].length);
+      text = escape(cap[1]);
+      href = text;
+      out += this.renderer.link(href, null, text);
+      continue;
+    }
+
+    // tag
+    if (cap = this.rules.tag.exec(src)) {
+      if (!this.inLink && /^<a /i.test(cap[0])) {
+        this.inLink = true;
+      } else if (this.inLink && /^<\/a>/i.test(cap[0])) {
+        this.inLink = false;
+      }
+      src = src.substring(cap[0].length);
+      out += this.options.sanitize
+        ? escape(cap[0])
+        : cap[0];
+      continue;
+    }
+
+    // link
+    if (cap = this.rules.link.exec(src)) {
+      src = src.substring(cap[0].length);
+      this.inLink = true;
+      out += this.outputLink(cap, {
+        href: cap[2],
+        title: cap[3]
+      });
+      this.inLink = false;
+      continue;
+    }
+
+    // reflink, nolink
+    if ((cap = this.rules.reflink.exec(src))
+        || (cap = this.rules.nolink.exec(src))) {
+      src = src.substring(cap[0].length);
+      link = (cap[2] || cap[1]).replace(/\s+/g, ' ');
+      link = this.links[link.toLowerCase()];
+      if (!link || !link.href) {
+        out += cap[0].charAt(0);
+        src = cap[0].substring(1) + src;
+        continue;
+      }
+      this.inLink = true;
+      out += this.outputLink(cap, link);
+      this.inLink = false;
+      continue;
+    }
+
+    // strong
+    if (cap = this.rules.strong.exec(src)) {
+      src = src.substring(cap[0].length);
+      out += this.renderer.strong(this.output(cap[2] || cap[1]));
+      continue;
+    }
+
+    // em
+    if (cap = this.rules.em.exec(src)) {
+      src = src.substring(cap[0].length);
+      out += this.renderer.em(this.output(cap[2] || cap[1]));
+      continue;
+    }
+
+    // code
+    if (cap = this.rules.code.exec(src)) {
+      src = src.substring(cap[0].length);
+      out += this.renderer.codespan(escape(cap[2], true));
+      continue;
+    }
+
+    // br
+    if (cap = this.rules.br.exec(src)) {
+      src = src.substring(cap[0].length);
+      out += this.renderer.br();
+      continue;
+    }
+
+    // del (gfm)
+    if (cap = this.rules.del.exec(src)) {
+      src = src.substring(cap[0].length);
+      out += this.renderer.del(this.output(cap[1]));
+      continue;
+    }
+
+    // text
+    if (cap = this.rules.text.exec(src)) {
+      src = src.substring(cap[0].length);
+      out += escape(this.smartypants(cap[0]));
+      continue;
+    }
+
+    if (src) {
+      throw new
+        Error('Infinite loop on byte: ' + src.charCodeAt(0));
+    }
+  }
+
+  return out;
+};
+
+/**
+ * Compile Link
+ */
+
+InlineLexer.prototype.outputLink = function(cap, link) {
+  var href = escape(link.href)
+    , title = link.title ? escape(link.title) : null;
+
+  return cap[0].charAt(0) !== '!'
+    ? this.renderer.link(href, title, this.output(cap[1]))
+    : this.renderer.image(href, title, escape(cap[1]));
+};
+
+/**
+ * Smartypants Transformations
+ */
+
+InlineLexer.prototype.smartypants = function(text) {
+  if (!this.options.smartypants) return text;
+  return text
+    // em-dashes
+    .replace(/--/g, '\u2014')
+    // opening singles
+    .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018')
+    // closing singles & apostrophes
+    .replace(/'/g, '\u2019')
+    // opening doubles
+    .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c')
+    // closing doubles
+    .replace(/"/g, '\u201d')
+    // ellipses
+    .replace(/\.{3}/g, '\u2026');
+};
+
+/**
+ * Mangle Links
+ */
+
+InlineLexer.prototype.mangle = function(text) {
+  var out = ''
+    , l = text.length
+    , i = 0
+    , ch;
+
+  for (; i < l; i++) {
+    ch = text.charCodeAt(i);
+    if (Math.random() > 0.5) {
+      ch = 'x' + ch.toString(16);
+    }
+    out += '&#' + ch + ';';
+  }
+
+  return out;
+};
+
+/**
+ * Renderer
+ */
+
+function Renderer(options) {
+  this.options = options || {};
+}
+
+Renderer.prototype.code = function(code, lang, escaped) {
+  if (this.options.highlight) {
+    var out = this.options.highlight(code, lang);
+    if (out != null && out !== code) {
+      escaped = true;
+      code = out;
+    }
+  }
+
+  if (!lang) {
+    return '<pre><code>'
+      + (escaped ? code : escape(code, true))
+      + '\n</code></pre>';
+  }
+
+  return '<pre><code class="'
+    + this.options.langPrefix
+    + escape(lang, true)
+    + '">'
+    + (escaped ? code : escape(code, true))
+    + '\n</code></pre>\n';
+};
+
+Renderer.prototype.blockquote = function(quote) {
+  return '<blockquote>\n' + quote + '</blockquote>\n';
+};
+
+Renderer.prototype.html = function(html) {
+  return html;
+};
+
+Renderer.prototype.heading = function(text, level, raw) {
+  return '<h'
+    + level
+    + ' id="'
+    + this.options.headerPrefix
+    + raw.toLowerCase().replace(/[^\w]+/g, '-')
+    + '">'
+    + text
+    + '</h'
+    + level
+    + '>\n';
+};
+
+Renderer.prototype.hr = function() {
+  return this.options.xhtml ? '<hr/>\n' : '<hr>\n';
+};
+
+Renderer.prototype.list = function(body, ordered) {
+  var type = ordered ? 'ol' : 'ul';
+  return '<' + type + '>\n' + body + '</' + type + '>\n';
+};
+
+Renderer.prototype.listitem = function(text) {
+  return '<li>' + text + '</li>\n';
+};
+
+Renderer.prototype.paragraph = function(text) {
+  return '<p>' + text + '</p>\n';
+};
+
+Renderer.prototype.table = function(header, body) {
+  return '<table>\n'
+    + '<thead>\n'
+    + header
+    + '</thead>\n'
+    + '<tbody>\n'
+    + body
+    + '</tbody>\n'
+    + '</table>\n';
+};
+
+Renderer.prototype.tablerow = function(content) {
+  return '<tr>\n' + content + '</tr>\n';
+};
+
+Renderer.prototype.tablecell = function(content, flags) {
+  var type = flags.header ? 'th' : 'td';
+  var tag = flags.align
+    ? '<' + type + ' style="text-align:' + flags.align + '">'
+    : '<' + type + '>';
+  return tag + content + '</' + type + '>\n';
+};
+
+// span level renderer
+Renderer.prototype.strong = function(text) {
+  return '<strong>' + text + '</strong>';
+};
+
+Renderer.prototype.em = function(text) {
+  return '<em>' + text + '</em>';
+};
+
+Renderer.prototype.codespan = function(text) {
+  return '<code>' + text + '</code>';
+};
+
+Renderer.prototype.br = function() {
+  return this.options.xhtml ? '<br/>' : '<br>';
+};
+
+Renderer.prototype.del = function(text) {
+  return '<del>' + text + '</del>';
+};
+
+Renderer.prototype.link = function(href, title, text) {
+  if (this.options.sanitize) {
+    try {
+      var prot = decodeURIComponent(unescape(href))
+        .replace(/[^\w:]/g, '')
+        .toLowerCase();
+    } catch (e) {
+      return '';
+    }
+    if (prot.indexOf('javascript:') === 0) {
+      return '';
+    }
+  }
+  var out = '<a href="' + href + '"';
+  if (title) {
+    out += ' title="' + title + '"';
+  }
+  out += '>' + text + '</a>';
+  return out;
+};
+
+Renderer.prototype.image = function(href, title, text) {
+  var out = '<img src="' + href + '" alt="' + text + '"';
+  if (title) {
+    out += ' title="' + title + '"';
+  }
+  out += this.options.xhtml ? '/>' : '>';
+  return out;
+};
+
+/**
+ * Parsing & Compiling
+ */
+
+function Parser(options) {
+  this.tokens = [];
+  this.token = null;
+  this.options = options || marked.defaults;
+  this.options.renderer = this.options.renderer || new Renderer;
+  this.renderer = this.options.renderer;
+  this.renderer.options = this.options;
+}
+
+/**
+ * Static Parse Method
+ */
+
+Parser.parse = function(src, options, renderer) {
+  var parser = new Parser(options, renderer);
+  return parser.parse(src);
+};
+
+/**
+ * Parse Loop
+ */
+
+Parser.prototype.parse = function(src) {
+  this.inline = new InlineLexer(src.links, this.options, this.renderer);
+  this.tokens = src.reverse();
+
+  var out = '';
+  while (this.next()) {
+    out += this.tok();
+  }
+
+  return out;
+};
+
+/**
+ * Next Token
+ */
+
+Parser.prototype.next = function() {
+  return this.token = this.tokens.pop();
+};
+
+/**
+ * Preview Next Token
+ */
+
+Parser.prototype.peek = function() {
+  return this.tokens[this.tokens.length - 1] || 0;
+};
+
+/**
+ * Parse Text Tokens
+ */
+
+Parser.prototype.parseText = function() {
+  var body = this.token.text;
+
+  while (this.peek().type === 'text') {
+    body += '\n' + this.next().text;
+  }
+
+  return this.inline.output(body);
+};
+
+/**
+ * Parse Current Token
+ */
+
+Parser.prototype.tok = function() {
+  switch (this.token.type) {
+    case 'space': {
+      return '';
+    }
+    case 'hr': {
+      return this.renderer.hr();
+    }
+    case 'heading': {
+      return this.renderer.heading(
+        this.inline.output(this.token.text),
+        this.token.depth,
+        this.token.text);
+    }
+    case 'code': {
+      return this.renderer.code(this.token.text,
+        this.token.lang,
+        this.token.escaped);
+    }
+    case 'table': {
+      var header = ''
+        , body = ''
+        , i
+        , row
+        , cell
+        , flags
+        , j;
+
+      // header
+      cell = '';
+      for (i = 0; i < this.token.header.length; i++) {
+        flags = { header: true, align: this.token.align[i] };
+        cell += this.renderer.tablecell(
+          this.inline.output(this.token.header[i]),
+          { header: true, align: this.token.align[i] }
+        );
+      }
+      header += this.renderer.tablerow(cell);
+
+      for (i = 0; i < this.token.cells.length; i++) {
+        row = this.token.cells[i];
+
+        cell = '';
+        for (j = 0; j < row.length; j++) {
+          cell += this.renderer.tablecell(
+            this.inline.output(row[j]),
+            { header: false, align: this.token.align[j] }
+          );
+        }
+
+        body += this.renderer.tablerow(cell);
+      }
+      return this.renderer.table(header, body);
+    }
+    case 'blockquote_start': {
+      var body = '';
+
+      while (this.next().type !== 'blockquote_end') {
+        body += this.tok();
+      }
+
+      return this.renderer.blockquote(body);
+    }
+    case 'list_start': {
+      var body = ''
+        , ordered = this.token.ordered;
+
+      while (this.next().type !== 'list_end') {
+        body += this.tok();
+      }
+
+      return this.renderer.list(body, ordered);
+    }
+    case 'list_item_start': {
+      var body = '';
+
+      while (this.next().type !== 'list_item_end') {
+        body += this.token.type === 'text'
+          ? this.parseText()
+          : this.tok();
+      }
+
+      return this.renderer.listitem(body);
+    }
+    case 'loose_item_start': {
+      var body = '';
+
+      while (this.next().type !== 'list_item_end') {
+        body += this.tok();
+      }
+
+      return this.renderer.listitem(body);
+    }
+    case 'html': {
+      var html = !this.token.pre && !this.options.pedantic
+        ? this.inline.output(this.token.text)
+        : this.token.text;
+      return this.renderer.html(html);
+    }
+    case 'paragraph': {
+      return this.renderer.paragraph(this.inline.output(this.token.text));
+    }
+    case 'text': {
+      return this.renderer.paragraph(this.parseText());
+    }
+  }
+};
+
+/**
+ * Helpers
+ */
+
+function escape(html, encode) {
+  return html
+    .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&amp;')
+    .replace(/</g, '&lt;')
+    .replace(/>/g, '&gt;')
+    .replace(/"/g, '&quot;')
+    .replace(/'/g, '&#39;');
+}
+
+function unescape(html) {
+  return html.replace(/&([#\w]+);/g, function(_, n) {
+    n = n.toLowerCase();
+    if (n === 'colon') return ':';
+    if (n.charAt(0) === '#') {
+      return n.charAt(1) === 'x'
+        ? String.fromCharCode(parseInt(n.substring(2), 16))
+        : String.fromCharCode(+n.substring(1));
+    }
+    return '';
+  });
+}
+
+function replace(regex, opt) {
+  regex = regex.source;
+  opt = opt || '';
+  return function self(name, val) {
+    if (!name) return new RegExp(regex, opt);
+    val = val.source || val;
+    val = val.replace(/(^|[^\[])\^/g, '$1');
+    regex = regex.replace(name, val);
+    return self;
+  };
+}
+
+function noop() {}
+noop.exec = noop;
+
+function merge(obj) {
+  var i = 1
+    , target
+    , key;
+
+  for (; i < arguments.length; i++) {
+    target = arguments[i];
+    for (key in target) {
+      if (Object.prototype.hasOwnProperty.call(target, key)) {
+        obj[key] = target[key];
+      }
+    }
+  }
+
+  return obj;
+}
+
+
+/**
+ * Marked
+ */
+
+function marked(src, opt, callback) {
+  if (callback || typeof opt === 'function') {
+    if (!callback) {
+      callback = opt;
+      opt = null;
+    }
+
+    opt = merge({}, marked.defaults, opt || {});
+
+    var highlight = opt.highlight
+      , tokens
+      , pending
+      , i = 0;
+
+    try {
+      tokens = Lexer.lex(src, opt)
+    } catch (e) {
+      return callback(e);
+    }
+
+    pending = tokens.length;
+
+    var done = function(err) {
+      if (err) {
+        opt.highlight = highlight;
+        return callback(err);
+      }
+
+      var out;
+
+      try {
+        out = Parser.parse(tokens, opt);
+      } catch (e) {
+        err = e;
+      }
+
+      opt.highlight = highlight;
+
+      return err
+        ? callback(err)
+        : callback(null, out);
+    };
+
+    if (!highlight || highlight.length < 3) {
+      return done();
+    }
+
+    delete opt.highlight;
+
+    if (!pending) return done();
+
+    for (; i < tokens.length; i++) {
+      (function(token) {
+        if (token.type !== 'code') {
+          return --pending || done();
+        }
+        return highlight(token.text, token.lang, function(err, code) {
+          if (err) return done(err);
+          if (code == null || code === token.text) {
+            return --pending || done();
+          }
+          token.text = code;
+          token.escaped = true;
+          --pending || done();
+        });
+      })(tokens[i]);
+    }
+
+    return;
+  }
+  try {
+    if (opt) opt = merge({}, marked.defaults, opt);
+    return Parser.parse(Lexer.lex(src, opt), opt);
+  } catch (e) {
+    e.message += '\nPlease report this to https://github.com/chjj/marked.';
+    if ((opt || marked.defaults).silent) {
+      return '<p>An error occured:</p><pre>'
+        + escape(e.message + '', true)
+        + '</pre>';
+    }
+    throw e;
+  }
+}
+
+/**
+ * Options
+ */
+
+marked.options =
+marked.setOptions = function(opt) {
+  merge(marked.defaults, opt);
+  return marked;
+};
+
+marked.defaults = {
+  gfm: true,
+  tables: true,
+  breaks: false,
+  pedantic: false,
+  sanitize: false,
+  smartLists: false,
+  silent: false,
+  highlight: null,
+  langPrefix: 'lang-',
+  smartypants: false,
+  headerPrefix: '',
+  renderer: new Renderer,
+  xhtml: false
+};
+
+/**
+ * Expose
+ */
+
+marked.Parser = Parser;
+marked.parser = Parser.parse;
+
+marked.Renderer = Renderer;
+
+marked.Lexer = Lexer;
+marked.lexer = Lexer.lex;
+
+marked.InlineLexer = InlineLexer;
+marked.inlineLexer = InlineLexer.output;
+
+marked.parse = marked;
+
+if (typeof module !== 'undefined' && typeof exports === 'object') {
+  module.exports = marked;
+} else if (typeof define === 'function' && define.amd) {
+  define(function() { return marked; });
+} else {
+  this.marked = marked;
+}
+
+}).call(function() {
+  return this || (typeof window !== 'undefined' ? window : global);
+}());
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/lib/swagger-oauth.js
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/lib/swagger-oauth.js b/ambari-web/api-docs/lib/swagger-oauth.js
new file mode 100644
index 0000000..3b28803
--- /dev/null
+++ b/ambari-web/api-docs/lib/swagger-oauth.js
@@ -0,0 +1,286 @@
+var appName;
+var popupMask;
+var popupDialog;
+var clientId;
+var realm;
+var oauth2KeyName;
+var redirect_uri;
+
+function handleLogin() {
+  var scopes = [];
+
+  var auths = window.swaggerUi.api.authSchemes || window.swaggerUi.api.securityDefinitions;
+  if (auths) {
+    var key;
+    var defs = auths;
+    for (key in defs) {
+      var auth = defs[key];
+      if (auth.type === 'oauth2' && auth.scopes) {
+        oauth2KeyName = key;
+        var scope;
+        if (Array.isArray(auth.scopes)) {
+          // 1.2 support
+          var i;
+          for (i = 0; i < auth.scopes.length; i++) {
+            scopes.push(auth.scopes[i]);
+          }
+        }
+        else {
+          // 2.0 support
+          for (scope in auth.scopes) {
+            scopes.push({scope: scope, description: auth.scopes[scope]});
+          }
+        }
+      }
+    }
+  }
+
+  if (window.swaggerUi.api
+    && window.swaggerUi.api.info) {
+    appName = window.swaggerUi.api.info.title;
+  }
+
+  popupDialog = $(
+    [
+      '<div class="modal api-popup-dialog in" id="credentials-modal" tabindex="-1" role="dialog" aria-labelledby="credentials-modal-label" aria-hidden="false" style="display: block;">',
+      '<div class="modal-dialog">',
+      '<div class="modal-content">',
+      '<div class="modal-header">',
+      '<button type="button" class="close api-popup-cancel" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>',
+      '<h3 class="modal-title" id="credentials-modal-label">Select OAuth2.0 Scopes</h3>',
+      '</div>',
+      '<div class="modal-body">',
+      '<p>Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.',
+      '<a href="#">Learn how to use</a>',
+      '</p>',
+      '<p><strong>' + appName + '</strong> API requires the following scopes. Select which ones you want to grant to Swagger UI.</p>',
+      '<form>',
+      '<div class="api-popup-scopes">',
+      '<div class="scopes">',
+      '</div>',
+      '</div>',
+      '<form>',
+      '<p class="error-msg"></p>',
+      '</div>',
+      '<div class="modal-footer">',
+      '<div class="api-popup-actions"><button class="api-popup-cancel btn btn-default" type="button">Cancel</button><button class="api-popup-authbtn btn btn-primary" type="button">Authorize</button></div>',
+      '</div>',
+      '</div>',
+      '</div>',
+      '</div>'].join(''));
+  $(document.body).append(popupDialog);
+
+  popup = popupDialog.find('.scopes').empty();
+  for (i = 0; i < scopes.length; i++) {
+    scope = scopes[i];
+    str = '<span data-toggle-scope="' + scope.scope + '" class="scope">' + scope.scope + '</span>';
+    popup.append(str);
+  }
+
+  popupDialog.find('scopes').click(function () {
+    popupMask.hide();
+    popupDialog.hide();
+    popupDialog.empty();
+    popupDialog = [];
+  });
+
+  popupDialog.find('[data-toggle-scope]').click(function () {
+    $(this).hasClass("active") ? $(this).removeClass('active') : $(this).addClass('active');
+  });
+
+  popupDialog.find('button.api-popup-cancel').click(function () {
+    popupMask.hide();
+    popupDialog.hide();
+    popupDialog.empty();
+    popupDialog = [];
+  });
+
+  $('button.api-popup-authbtn').unbind();
+  popupDialog.find('button.api-popup-authbtn').click(function () {
+    popupMask.hide();
+    popupDialog.hide();
+
+    var authSchemes = window.swaggerUi.api.authSchemes;
+    var host = window.location;
+    var pathname = location.pathname.substring(0, location.pathname.lastIndexOf("/"));
+    var defaultRedirectUrl = host.protocol + '//' + host.host + pathname + '/o2c.html';
+    var redirectUrl = window.oAuthRedirectUrl || defaultRedirectUrl;
+    var url = null;
+
+    for (var key in authSchemes) {
+      if (authSchemes.hasOwnProperty(key)) {
+        var flow = authSchemes[key].flow;
+
+        if (authSchemes[key].type === 'oauth2' && flow && (flow === 'implicit' || flow === 'accessCode')) {
+          var dets = authSchemes[key];
+          url = dets.authorizationUrl + '?response_type=' + (flow === 'implicit' ? 'token' : 'code');
+          window.swaggerUi.tokenName = dets.tokenName || 'access_token';
+          window.swaggerUi.tokenUrl = (flow === 'accessCode' ? dets.tokenUrl : null);
+        }
+        else if (authSchemes[key].grantTypes) {
+          // 1.2 support
+          var o = authSchemes[key].grantTypes;
+          for (var t in o) {
+            if (o.hasOwnProperty(t) && t === 'implicit') {
+              var dets = o[t];
+              var ep = dets.loginEndpoint.url;
+              url = dets.loginEndpoint.url + '?response_type=token';
+              window.swaggerUi.tokenName = dets.tokenName;
+            }
+            else if (o.hasOwnProperty(t) && t === 'accessCode') {
+              var dets = o[t];
+              var ep = dets.tokenRequestEndpoint.url;
+              url = dets.tokenRequestEndpoint.url + '?response_type=code';
+              window.swaggerUi.tokenName = dets.tokenName;
+            }
+          }
+        }
+      }
+    }
+    var scopes = [];
+    var o = $('.scopes').find('.active');
+    for (k = 0; k < o.length; k++) {
+      var scope = $(o[k]).attr('data-toggle-scope');
+      if (scopes.indexOf(scope) === -1)
+        scopes.push(scope);
+    }
+
+    // Implicit auth recommends a state parameter.
+    var state = Math.random();
+
+    window.enabledScopes = scopes;
+
+    redirect_uri = redirectUrl;
+
+    url += '&redirect_uri=' + encodeURIComponent(redirectUrl);
+    url += '&realm=' + encodeURIComponent(realm);
+    url += '&client_id=' + encodeURIComponent(clientId);
+    url += '&scope=' + encodeURIComponent(scopes.join(' '));
+    url += '&state=' + encodeURIComponent(state);
+
+    window.open(url);
+  });
+
+  popupMask.show();
+  popupDialog.show();
+}
+
+function handleLogout() {
+  for (key in window.authorizations.authz) {
+    window.authorizations.remove(key)
+  }
+  window.enabledScopes = null;
+  var oauthBtn = $('.api-ic');
+  oauthBtn.addClass('btn-default');
+  oauthBtn.removeClass('btn-success');
+  oauthBtn.removeClass('btn-warning');
+
+  oauthBtn.text('oauth');
+
+  $('#input_apiKey').val('');
+}
+
+function initOAuth(opts) {
+  var o = (opts || {});
+  var errors = [];
+
+  appName = (o.appName || errors.push('missing appName'));
+  popupMask = (o.popupMask || $('#api-common-mask'));
+  popupDialog = (o.popupDialog || $('.api-popup-dialog'));
+  clientId = (o.clientId || errors.push('missing client id'));
+  realm = (o.realm || errors.push('missing realm'));
+
+  if (errors.length > 0) {
+    log('auth unable initialize oauth: ' + errors);
+    return;
+  }
+
+  $('pre code').each(function (i, e) {
+    hljs.highlightBlock(e)
+  });
+
+  var oauthBtn = $('.api-ic');
+  oauthBtn.unbind();
+  oauthBtn.click(function (s) {
+    if ($(s.target).hasClass('btn-default'))
+      handleLogin();
+    else {
+      handleLogout();
+    }
+  });
+}
+
+window.processOAuthCode = function processOAuthCode(data) {
+  var params = {
+    'client_id': clientId,
+    'code': data.code,
+    'grant_type': 'authorization_code',
+    'redirect_uri': redirect_uri
+  };
+  $.ajax(
+    {
+      url: window.swaggerUi.tokenUrl,
+      type: "POST",
+      data: params,
+      success: function (data, textStatus, jqXHR) {
+        onOAuthComplete(data);
+      },
+      error: function (jqXHR, textStatus, errorThrown) {
+        onOAuthComplete("");
+      }
+    });
+};
+
+window.onOAuthComplete = function onOAuthComplete(token) {
+  if (token) {
+    if (token.error) {
+      var checkbox = $('input[type=checkbox],.secured')
+      checkbox.each(function (pos) {
+        checkbox[pos].checked = false;
+      });
+      alert(token.error);
+    }
+    else {
+      var b = token[window.swaggerUi.tokenName];
+      if (b) {
+        // if all roles are satisfied
+        var o = null;
+        $.each($('.auth #api_information_panel'), function (k, v) {
+          var children = v;
+          if (children && children.childNodes) {
+            var requiredScopes = [];
+            $.each((children.childNodes), function (k1, v1) {
+              var inner = v1.innerHTML;
+              if (inner)
+                requiredScopes.push(inner);
+            });
+            var diff = [];
+            for (var i = 0; i < requiredScopes.length; i++) {
+              var s = requiredScopes[i];
+              if (window.enabledScopes && window.enabledScopes.indexOf(s) == -1) {
+                diff.push(s);
+              }
+            }
+            if (diff.length > 0) {
+              o = v.parentNode;
+              // sorry, not all scopes are satisfied
+              $(o).find('.api-ic').addClass('btn-warning');
+              $(o).find('.api-ic').removeClass('btn-default');
+              $(o).find('.api-ic').removeClass('btn-success');
+            }
+            else {
+              o = v.parentNode;
+              // all scopes are satisfied
+              $(o).find('.api-ic').addClass('btn-success');
+              $(o).find('.api-ic').removeClass('btn-default');
+              $(o).find('.api-ic').removeClass('btn-warning');
+            }
+          }
+        });
+        $('.api-ic').text('signout');
+        $('#input_apiKey').val(b);
+        window.swaggerUi.api.clientAuthorizations.add(oauth2KeyName, new SwaggerClient.ApiKeyAuthorization('Authorization', 'Bearer ' + b, 'header'));
+      }
+    }
+  }
+};
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/lib/underscore-min.js
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/lib/underscore-min.js b/ambari-web/api-docs/lib/underscore-min.js
new file mode 100644
index 0000000..11f1d96
--- /dev/null
+++ b/ambari-web/api-docs/lib/underscore-min.js
@@ -0,0 +1,6 @@
+//     Underscore.js 1.7.0
+//     http://underscorejs.org
+//     (c) 2009-2014 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
+//     Underscore may be freely distributed under the MIT license.
+(function(){var n=this,t=n._,r=Array.prototype,e=Object.prototype,u=Function.prototype,i=r.push,a=r.slice,o=r.concat,l=e.toString,c=e.hasOwnProperty,f=Array.isArray,s=Object.keys,p=u.bind,h=function(n){return n instanceof h?n:this instanceof h?void(this._wrapped=n):new h(n)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=h),exports._=h):n._=h,h.VERSION="1.7.0";var g=function(n,t,r){if(t===void 0)return n;switch(null==r?3:r){case 1:return function(r){return n.call(t,r)};case 2:return function(r,e){return n.call(t,r,e)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,i){return n.call(t,r,e,u,i)}}return function(){return n.apply(t,arguments)}};h.iteratee=function(n,t,r){return null==n?h.identity:h.isFunction(n)?g(n,t,r):h.isObject(n)?h.matches(n):h.property(n)},h.each=h.forEach=function(n,t,r){if(null==n)return n;t=g(t,r);var e,u=n.length;if(u===+u)for(e=0;u>e;e++)t(n[e],e,n);else{var i=h.keys(n);for(e
 =0,u=i.length;u>e;e++)t(n[i[e]],i[e],n)}return n},h.map=h.collect=function(n,t,r){if(null==n)return[];t=h.iteratee(t,r);for(var e,u=n.length!==+n.length&&h.keys(n),i=(u||n).length,a=Array(i),o=0;i>o;o++)e=u?u[o]:o,a[o]=t(n[e],e,n);return a};var v="Reduce of empty array with no initial value";h.reduce=h.foldl=h.inject=function(n,t,r,e){null==n&&(n=[]),t=g(t,e,4);var u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length,o=0;if(arguments.length<3){if(!a)throw new TypeError(v);r=n[i?i[o++]:o++]}for(;a>o;o++)u=i?i[o]:o,r=t(r,n[u],u,n);return r},h.reduceRight=h.foldr=function(n,t,r,e){null==n&&(n=[]),t=g(t,e,4);var u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;if(arguments.length<3){if(!a)throw new TypeError(v);r=n[i?i[--a]:--a]}for(;a--;)u=i?i[a]:a,r=t(r,n[u],u,n);return r},h.find=h.detect=function(n,t,r){var e;return t=h.iteratee(t,r),h.some(n,function(n,r,u){return t(n,r,u)?(e=n,!0):void 0}),e},h.filter=h.select=function(n,t,r){var e=[];return null==n?e:(t=h.iteratee(t,r),h.each(n,
 function(n,r,u){t(n,r,u)&&e.push(n)}),e)},h.reject=function(n,t,r){return h.filter(n,h.negate(h.iteratee(t)),r)},h.every=h.all=function(n,t,r){if(null==n)return!0;t=h.iteratee(t,r);var e,u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;for(e=0;a>e;e++)if(u=i?i[e]:e,!t(n[u],u,n))return!1;return!0},h.some=h.any=function(n,t,r){if(null==n)return!1;t=h.iteratee(t,r);var e,u,i=n.length!==+n.length&&h.keys(n),a=(i||n).length;for(e=0;a>e;e++)if(u=i?i[e]:e,t(n[u],u,n))return!0;return!1},h.contains=h.include=function(n,t){return null==n?!1:(n.length!==+n.length&&(n=h.values(n)),h.indexOf(n,t)>=0)},h.invoke=function(n,t){var r=a.call(arguments,2),e=h.isFunction(t);return h.map(n,function(n){return(e?t:n[t]).apply(n,r)})},h.pluck=function(n,t){return h.map(n,h.property(t))},h.where=function(n,t){return h.filter(n,h.matches(t))},h.findWhere=function(n,t){return h.find(n,h.matches(t))},h.max=function(n,t,r){var e,u,i=-1/0,a=-1/0;if(null==t&&null!=n){n=n.length===+n.length?n:h.values(n);for(va
 r o=0,l=n.length;l>o;o++)e=n[o],e>i&&(i=e)}else t=h.iteratee(t,r),h.each(n,function(n,r,e){u=t(n,r,e),(u>a||u===-1/0&&i===-1/0)&&(i=n,a=u)});return i},h.min=function(n,t,r){var e,u,i=1/0,a=1/0;if(null==t&&null!=n){n=n.length===+n.length?n:h.values(n);for(var o=0,l=n.length;l>o;o++)e=n[o],i>e&&(i=e)}else t=h.iteratee(t,r),h.each(n,function(n,r,e){u=t(n,r,e),(a>u||1/0===u&&1/0===i)&&(i=n,a=u)});return i},h.shuffle=function(n){for(var t,r=n&&n.length===+n.length?n:h.values(n),e=r.length,u=Array(e),i=0;e>i;i++)t=h.random(0,i),t!==i&&(u[i]=u[t]),u[t]=r[i];return u},h.sample=function(n,t,r){return null==t||r?(n.length!==+n.length&&(n=h.values(n)),n[h.random(n.length-1)]):h.shuffle(n).slice(0,Math.max(0,t))},h.sortBy=function(n,t,r){return t=h.iteratee(t,r),h.pluck(h.map(n,function(n,r,e){return{value:n,index:r,criteria:t(n,r,e)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(r>e||r===void 0)return 1;if(e>r||e===void 0)return-1}return n.index-t.index}),"value")};var m=func
 tion(n){return function(t,r,e){var u={};return r=h.iteratee(r,e),h.each(t,function(e,i){var a=r(e,i,t);n(u,e,a)}),u}};h.groupBy=m(function(n,t,r){h.has(n,r)?n[r].push(t):n[r]=[t]}),h.indexBy=m(function(n,t,r){n[r]=t}),h.countBy=m(function(n,t,r){h.has(n,r)?n[r]++:n[r]=1}),h.sortedIndex=function(n,t,r,e){r=h.iteratee(r,e,1);for(var u=r(t),i=0,a=n.length;a>i;){var o=i+a>>>1;r(n[o])<u?i=o+1:a=o}return i},h.toArray=function(n){return n?h.isArray(n)?a.call(n):n.length===+n.length?h.map(n,h.identity):h.values(n):[]},h.size=function(n){return null==n?0:n.length===+n.length?n.length:h.keys(n).length},h.partition=function(n,t,r){t=h.iteratee(t,r);var e=[],u=[];return h.each(n,function(n,r,i){(t(n,r,i)?e:u).push(n)}),[e,u]},h.first=h.head=h.take=function(n,t,r){return null==n?void 0:null==t||r?n[0]:0>t?[]:a.call(n,0,t)},h.initial=function(n,t,r){return a.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))},h.last=function(n,t,r){return null==n?void 0:null==t||r?n[n.length-1]:a.call(n,Math.max(n.l
 ength-t,0))},h.rest=h.tail=h.drop=function(n,t,r){return a.call(n,null==t||r?1:t)},h.compact=function(n){return h.filter(n,h.identity)};var y=function(n,t,r,e){if(t&&h.every(n,h.isArray))return o.apply(e,n);for(var u=0,a=n.length;a>u;u++){var l=n[u];h.isArray(l)||h.isArguments(l)?t?i.apply(e,l):y(l,t,r,e):r||e.push(l)}return e};h.flatten=function(n,t){return y(n,t,!1,[])},h.without=function(n){return h.difference(n,a.call(arguments,1))},h.uniq=h.unique=function(n,t,r,e){if(null==n)return[];h.isBoolean(t)||(e=r,r=t,t=!1),null!=r&&(r=h.iteratee(r,e));for(var u=[],i=[],a=0,o=n.length;o>a;a++){var l=n[a];if(t)a&&i===l||u.push(l),i=l;else if(r){var c=r(l,a,n);h.indexOf(i,c)<0&&(i.push(c),u.push(l))}else h.indexOf(u,l)<0&&u.push(l)}return u},h.union=function(){return h.uniq(y(arguments,!0,!0,[]))},h.intersection=function(n){if(null==n)return[];for(var t=[],r=arguments.length,e=0,u=n.length;u>e;e++){var i=n[e];if(!h.contains(t,i)){for(var a=1;r>a&&h.contains(arguments[a],i);a++);a===r&&t.p
 ush(i)}}return t},h.difference=function(n){var t=y(a.call(arguments,1),!0,!0,[]);return h.filter(n,function(n){return!h.contains(t,n)})},h.zip=function(n){if(null==n)return[];for(var t=h.max(arguments,"length").length,r=Array(t),e=0;t>e;e++)r[e]=h.pluck(arguments,e);return r},h.object=function(n,t){if(null==n)return{};for(var r={},e=0,u=n.length;u>e;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},h.indexOf=function(n,t,r){if(null==n)return-1;var e=0,u=n.length;if(r){if("number"!=typeof r)return e=h.sortedIndex(n,t),n[e]===t?e:-1;e=0>r?Math.max(0,u+r):r}for(;u>e;e++)if(n[e]===t)return e;return-1},h.lastIndexOf=function(n,t,r){if(null==n)return-1;var e=n.length;for("number"==typeof r&&(e=0>r?e+r+1:Math.min(e,r+1));--e>=0;)if(n[e]===t)return e;return-1},h.range=function(n,t,r){arguments.length<=1&&(t=n||0,n=0),r=r||1;for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),i=0;e>i;i++,n+=r)u[i]=n;return u};var d=function(){};h.bind=function(n,t){var r,e;if(p&&n.bind===p)return p.apply(n,a.c
 all(arguments,1));if(!h.isFunction(n))throw new TypeError("Bind must be called on a function");return r=a.call(arguments,2),e=function(){if(!(this instanceof e))return n.apply(t,r.concat(a.call(arguments)));d.prototype=n.prototype;var u=new d;d.prototype=null;var i=n.apply(u,r.concat(a.call(arguments)));return h.isObject(i)?i:u}},h.partial=function(n){var t=a.call(arguments,1);return function(){for(var r=0,e=t.slice(),u=0,i=e.length;i>u;u++)e[u]===h&&(e[u]=arguments[r++]);for(;r<arguments.length;)e.push(arguments[r++]);return n.apply(this,e)}},h.bindAll=function(n){var t,r,e=arguments.length;if(1>=e)throw new Error("bindAll must be passed function names");for(t=1;e>t;t++)r=arguments[t],n[r]=h.bind(n[r],n);return n},h.memoize=function(n,t){var r=function(e){var u=r.cache,i=t?t.apply(this,arguments):e;return h.has(u,i)||(u[i]=n.apply(this,arguments)),u[i]};return r.cache={},r},h.delay=function(n,t){var r=a.call(arguments,2);return setTimeout(function(){return n.apply(null,r)},t)},h.de
 fer=function(n){return h.delay.apply(h,[n,1].concat(a.call(arguments,1)))},h.throttle=function(n,t,r){var e,u,i,a=null,o=0;r||(r={});var l=function(){o=r.leading===!1?0:h.now(),a=null,i=n.apply(e,u),a||(e=u=null)};return function(){var c=h.now();o||r.leading!==!1||(o=c);var f=t-(c-o);return e=this,u=arguments,0>=f||f>t?(clearTimeout(a),a=null,o=c,i=n.apply(e,u),a||(e=u=null)):a||r.trailing===!1||(a=setTimeout(l,f)),i}},h.debounce=function(n,t,r){var e,u,i,a,o,l=function(){var c=h.now()-a;t>c&&c>0?e=setTimeout(l,t-c):(e=null,r||(o=n.apply(i,u),e||(i=u=null)))};return function(){i=this,u=arguments,a=h.now();var c=r&&!e;return e||(e=setTimeout(l,t)),c&&(o=n.apply(i,u),i=u=null),o}},h.wrap=function(n,t){return h.partial(t,n)},h.negate=function(n){return function(){return!n.apply(this,arguments)}},h.compose=function(){var n=arguments,t=n.length-1;return function(){for(var r=t,e=n[t].apply(this,arguments);r--;)e=n[r].call(this,e);return e}},h.after=function(n,t){return function(){return--
 n<1?t.apply(this,arguments):void 0}},h.before=function(n,t){var r;return function(){return--n>0?r=t.apply(this,arguments):t=null,r}},h.once=h.partial(h.before,2),h.keys=function(n){if(!h.isObject(n))return[];if(s)return s(n);var t=[];for(var r in n)h.has(n,r)&&t.push(r);return t},h.values=function(n){for(var t=h.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=n[t[u]];return e},h.pairs=function(n){for(var t=h.keys(n),r=t.length,e=Array(r),u=0;r>u;u++)e[u]=[t[u],n[t[u]]];return e},h.invert=function(n){for(var t={},r=h.keys(n),e=0,u=r.length;u>e;e++)t[n[r[e]]]=r[e];return t},h.functions=h.methods=function(n){var t=[];for(var r in n)h.isFunction(n[r])&&t.push(r);return t.sort()},h.extend=function(n){if(!h.isObject(n))return n;for(var t,r,e=1,u=arguments.length;u>e;e++){t=arguments[e];for(r in t)c.call(t,r)&&(n[r]=t[r])}return n},h.pick=function(n,t,r){var e,u={};if(null==n)return u;if(h.isFunction(t)){t=g(t,r);for(e in n){var i=n[e];t(i,e,n)&&(u[e]=i)}}else{var l=o.apply([],a.call(argume
 nts,1));n=new Object(n);for(var c=0,f=l.length;f>c;c++)e=l[c],e in n&&(u[e]=n[e])}return u},h.omit=function(n,t,r){if(h.isFunction(t))t=h.negate(t);else{var e=h.map(o.apply([],a.call(arguments,1)),String);t=function(n,t){return!h.contains(e,t)}}return h.pick(n,t,r)},h.defaults=function(n){if(!h.isObject(n))return n;for(var t=1,r=arguments.length;r>t;t++){var e=arguments[t];for(var u in e)n[u]===void 0&&(n[u]=e[u])}return n},h.clone=function(n){return h.isObject(n)?h.isArray(n)?n.slice():h.extend({},n):n},h.tap=function(n,t){return t(n),n};var b=function(n,t,r,e){if(n===t)return 0!==n||1/n===1/t;if(null==n||null==t)return n===t;n instanceof h&&(n=n._wrapped),t instanceof h&&(t=t._wrapped);var u=l.call(n);if(u!==l.call(t))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+n==""+t;case"[object Number]":return+n!==+n?+t!==+t:0===+n?1/+n===1/t:+n===+t;case"[object Date]":case"[object Boolean]":return+n===+t}if("object"!=typeof n||"object"!=typeof t)return!1;for(var i
 =r.length;i--;)if(r[i]===n)return e[i]===t;var a=n.constructor,o=t.constructor;if(a!==o&&"constructor"in n&&"constructor"in t&&!(h.isFunction(a)&&a instanceof a&&h.isFunction(o)&&o instanceof o))return!1;r.push(n),e.push(t);var c,f;if("[object Array]"===u){if(c=n.length,f=c===t.length)for(;c--&&(f=b(n[c],t[c],r,e)););}else{var s,p=h.keys(n);if(c=p.length,f=h.keys(t).length===c)for(;c--&&(s=p[c],f=h.has(t,s)&&b(n[s],t[s],r,e)););}return r.pop(),e.pop(),f};h.isEqual=function(n,t){return b(n,t,[],[])},h.isEmpty=function(n){if(null==n)return!0;if(h.isArray(n)||h.isString(n)||h.isArguments(n))return 0===n.length;for(var t in n)if(h.has(n,t))return!1;return!0},h.isElement=function(n){return!(!n||1!==n.nodeType)},h.isArray=f||function(n){return"[object Array]"===l.call(n)},h.isObject=function(n){var t=typeof n;return"function"===t||"object"===t&&!!n},h.each(["Arguments","Function","String","Number","Date","RegExp"],function(n){h["is"+n]=function(t){return l.call(t)==="[object "+n+"]"}}),h.
 isArguments(arguments)||(h.isArguments=function(n){return h.has(n,"callee")}),"function"!=typeof/./&&(h.isFunction=function(n){return"function"==typeof n||!1}),h.isFinite=function(n){return isFinite(n)&&!isNaN(parseFloat(n))},h.isNaN=function(n){return h.isNumber(n)&&n!==+n},h.isBoolean=function(n){return n===!0||n===!1||"[object Boolean]"===l.call(n)},h.isNull=function(n){return null===n},h.isUndefined=function(n){return n===void 0},h.has=function(n,t){return null!=n&&c.call(n,t)},h.noConflict=function(){return n._=t,this},h.identity=function(n){return n},h.constant=function(n){return function(){return n}},h.noop=function(){},h.property=function(n){return function(t){return t[n]}},h.matches=function(n){var t=h.pairs(n),r=t.length;return function(n){if(null==n)return!r;n=new Object(n);for(var e=0;r>e;e++){var u=t[e],i=u[0];if(u[1]!==n[i]||!(i in n))return!1}return!0}},h.times=function(n,t,r){var e=Array(Math.max(0,n));t=g(t,r,1);for(var u=0;n>u;u++)e[u]=t(u);return e},h.random=funct
 ion(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))},h.now=Date.now||function(){return(new Date).getTime()};var _={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},w=h.invert(_),j=function(n){var t=function(t){return n[t]},r="(?:"+h.keys(n).join("|")+")",e=RegExp(r),u=RegExp(r,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};h.escape=j(_),h.unescape=j(w),h.result=function(n,t){if(null==n)return void 0;var r=n[t];return h.isFunction(r)?n[t]():r};var x=0;h.uniqueId=function(n){var t=++x+"";return n?n+t:t},h.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var A=/(.)^/,k={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},O=/\\|'|\r|\n|\u2028|\u2029/g,F=function(n){return"\\"+k[n]};h.template=function(n,t,r){!t&&r&&(t=r),t=h.defaults({},t,h.templateSettings);var e=RegExp([(t.escape||A).source,(t.interpolate||A).source,(t.evaluate||A).source]
 .join("|")+"|$","g"),u=0,i="__p+='";n.replace(e,function(t,r,e,a,o){return i+=n.slice(u,o).replace(O,F),u=o+t.length,r?i+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":e?i+="'+\n((__t=("+e+"))==null?'':__t)+\n'":a&&(i+="';\n"+a+"\n__p+='"),t}),i+="';\n",t.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var a=new Function(t.variable||"obj","_",i)}catch(o){throw o.source=i,o}var l=function(n){return a.call(this,n,h)},c=t.variable||"obj";return l.source="function("+c+"){\n"+i+"}",l},h.chain=function(n){var t=h(n);return t._chain=!0,t};var E=function(n){return this._chain?h(n).chain():n};h.mixin=function(n){h.each(h.functions(n),function(t){var r=h[t]=n[t];h.prototype[t]=function(){var n=[this._wrapped];return i.apply(n,arguments),E.call(this,r.apply(h,n))}})},h.mixin(h),h.each(["pop","push","reverse","shift","sort","splice","unshift"],function(n){var t=r[n];h.prototype[n]=
 function(){var r=this._wrapped;return t.apply(r,arguments),"shift"!==n&&"splice"!==n||0!==r.length||delete r[0],E.call(this,r)}}),h.each(["concat","join","slice"],function(n){var t=r[n];h.prototype[n]=function(){return E.call(this,t.apply(this._wrapped,arguments))}}),h.prototype.value=function(){return this._wrapped},"function"==typeof define&&define.amd&&define("underscore",[],function(){return h})}).call(this);
+//# sourceMappingURL=underscore-min.map
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/lib/underscore-min.map
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/lib/underscore-min.map b/ambari-web/api-docs/lib/underscore-min.map
new file mode 100644
index 0000000..b31e435
--- /dev/null
+++ b/ambari-web/api-docs/lib/underscore-min.map
@@ -0,0 +1 @@
+{"version":3,"file":"underscore-min.js","sources":["underscore.js"],"names":["createReduce","dir","iterator","obj","iteratee","memo","keys","index","length","currentKey","context","optimizeCb","isArrayLike","_","arguments","createIndexFinder","array","predicate","cb","collectNonEnumProps","nonEnumIdx","nonEnumerableProps","constructor","proto","isFunction","prototype","ObjProto","prop","has","contains","push","root","this","previousUnderscore","ArrayProto","Array","Object","FuncProto","Function","slice","toString","hasOwnProperty","nativeIsArray","isArray","nativeKeys","nativeBind","bind","nativeCreate","create","Ctor","_wrapped","exports","module","VERSION","func","argCount","value","call","other","collection","accumulator","apply","identity","isObject","matcher","property","Infinity","createAssigner","keysFunc","undefinedOnly","source","l","i","key","baseCreate","result","MAX_ARRAY_INDEX","Math","pow","each","forEach","map","collect","results","reduce","foldl","inject","reduceRigh
 t","foldr","find","detect","findIndex","findKey","filter","select","list","reject","negate","every","all","some","any","includes","include","target","fromIndex","values","indexOf","invoke","method","args","isFunc","pluck","where","attrs","findWhere","max","computed","lastComputed","min","shuffle","rand","set","shuffled","random","sample","n","guard","sortBy","criteria","sort","left","right","a","b","group","behavior","groupBy","indexBy","countBy","toArray","size","partition","pass","fail","first","head","take","initial","last","rest","tail","drop","compact","flatten","input","shallow","strict","startIndex","output","idx","isArguments","j","len","without","difference","uniq","unique","isSorted","isBoolean","seen","union","intersection","argsLength","item","zip","unzip","object","sortedIndex","isNaN","lastIndexOf","from","findLastIndex","low","high","mid","floor","range","start","stop","step","ceil","executeBound","sourceFunc","boundFunc","callingContext","self","TypeError","bound","c
 oncat","partial","boundArgs","position","bindAll","Error","memoize","hasher","cache","address","delay","wait","setTimeout","defer","throttle","options","timeout","previous","later","leading","now","remaining","clearTimeout","trailing","debounce","immediate","timestamp","callNow","wrap","wrapper","compose","after","times","before","once","hasEnumBug","propertyIsEnumerable","allKeys","mapObject","pairs","invert","functions","methods","names","extend","extendOwn","assign","pick","oiteratee","omit","String","defaults","clone","tap","interceptor","isMatch","eq","aStack","bStack","className","areArrays","aCtor","bCtor","pop","isEqual","isEmpty","isString","isElement","nodeType","type","name","Int8Array","isFinite","parseFloat","isNumber","isNull","isUndefined","noConflict","constant","noop","propertyOf","matches","accum","Date","getTime","escapeMap","&","<",">","\"","'","`","unescapeMap","createEscaper","escaper","match","join","testRegexp","RegExp","replaceRegexp","string","test","replac
 e","escape","unescape","fallback","idCounter","uniqueId","prefix","id","templateSettings","evaluate","interpolate","noMatch","escapes","\\","\r","\n","
","
","escapeChar","template","text","settings","oldSettings","offset","variable","render","e","data","argument","chain","instance","_chain","mixin","valueOf","toJSON","define","amd"],"mappings":";;;;CAKC,WAoKC,QAASA,GAAaC,GAGpB,QAASC,GAASC,EAAKC,EAAUC,EAAMC,EAAMC,EAAOC,GAClD,KAAOD,GAAS,GAAaC,EAARD,EAAgBA,GAASN,EAAK,CACjD,GAAIQ,GAAaH,EAAOA,EAAKC,GAASA,CACtCF,GAAOD,EAASC,EAAMF,EAAIM,GAAaA,EAAYN,GAErD,MAAOE,GAGT,MAAO,UAASF,EAAKC,EAAUC,EAAMK,GACnCN,EAAWO,EAAWP,EAAUM,EAAS,EACzC,IAAIJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OACvBD,EAAQN,EAAM,EAAI,EAAIO,EAAS,CAMnC,OAJIM,WAAUN,OAAS,IACrBH,EAAOF,EAAIG,EAAOA,EAAKC,GAASA,GAChCA,GAASN,GAEJC,EAASC,EAAKC,EAAUC,EAAMC,EAAMC,EAAOC,IA+btD,QAASO,GAAkBd,GACzB,MAAO,UAASe,EAAOC,EAAWP,GAChCO,EAAYC,EAAGD,EAAWP,EAG1B,KAFA,GAAIF,GAAkB,MAATQ,GAAiBA,EAAMR,OAChCD,EAAQN,EAAM,EAAI,EAAIO,EAAS,EA
 C5BD,GAAS,GAAaC,EAARD,EAAgBA,GAASN,EAC5C,GAAIgB,EAAUD,EAAMT,GAAQA,EAAOS,GAAQ,MAAOT,EAEpD,QAAQ,GAgQZ,QAASY,GAAoBhB,EAAKG,GAChC,GAAIc,GAAaC,EAAmBb,OAChCc,EAAcnB,EAAImB,YAClBC,EAASV,EAAEW,WAAWF,IAAgBA,EAAYG,WAAcC,EAGhEC,EAAO,aAGX,KAFId,EAAEe,IAAIzB,EAAKwB,KAAUd,EAAEgB,SAASvB,EAAMqB,IAAOrB,EAAKwB,KAAKH,GAEpDP,KACLO,EAAON,EAAmBD,GACtBO,IAAQxB,IAAOA,EAAIwB,KAAUJ,EAAMI,KAAUd,EAAEgB,SAASvB,EAAMqB,IAChErB,EAAKwB,KAAKH,GAt4BhB,GAAII,GAAOC,KAGPC,EAAqBF,EAAKlB,EAG1BqB,EAAaC,MAAMV,UAAWC,EAAWU,OAAOX,UAAWY,EAAYC,SAASb,UAIlFK,EAAmBI,EAAWJ,KAC9BS,EAAmBL,EAAWK,MAC9BC,EAAmBd,EAASc,SAC5BC,EAAmBf,EAASe,eAK5BC,EAAqBP,MAAMQ,QAC3BC,EAAqBR,OAAO9B,KAC5BuC,EAAqBR,EAAUS,KAC/BC,EAAqBX,OAAOY,OAG1BC,EAAO,aAGPpC,EAAI,SAASV,GACf,MAAIA,aAAeU,GAAUV,EACvB6B,eAAgBnB,QACtBmB,KAAKkB,SAAW/C,GADiB,GAAIU,GAAEV,GAOlB,oBAAZgD,UACa,mBAAXC,SAA0BA,OAAOD,UAC1CA,QAAUC,OAAOD,QAAUtC,GAE7BsC,QAAQtC,EAAIA,GAEZkB,EAAKlB,EAAIA,EAIXA,EAAEwC,QAAU,OAKZ,IAAI1C,GAAa,SAAS2C,EAAM5C,EAAS6C,GACvC,GAAI7C,QAAiB,GAAG,MAAO4C,EAC/B,QAAoB,MAAZC,EAAmB,
 EAAIA,GAC7B,IAAK,GAAG,MAAO,UAASC,GACtB,MAAOF,GAAKG,KAAK/C,EAAS8C,GAE5B,KAAK,GAAG,MAAO,UAASA,EAAOE,GAC7B,MAAOJ,GAAKG,KAAK/C,EAAS8C,EAAOE,GAEnC,KAAK,GAAG,MAAO,UAASF,EAAOjD,EAAOoD,GACpC,MAAOL,GAAKG,KAAK/C,EAAS8C,EAAOjD,EAAOoD,GAE1C,KAAK,GAAG,MAAO,UAASC,EAAaJ,EAAOjD,EAAOoD,GACjD,MAAOL,GAAKG,KAAK/C,EAASkD,EAAaJ,EAAOjD,EAAOoD,IAGzD,MAAO,YACL,MAAOL,GAAKO,MAAMnD,EAASI,aAO3BI,EAAK,SAASsC,EAAO9C,EAAS6C,GAChC,MAAa,OAATC,EAAsB3C,EAAEiD,SACxBjD,EAAEW,WAAWgC,GAAe7C,EAAW6C,EAAO9C,EAAS6C,GACvD1C,EAAEkD,SAASP,GAAe3C,EAAEmD,QAAQR,GACjC3C,EAAEoD,SAAST,GAEpB3C,GAAET,SAAW,SAASoD,EAAO9C,GAC3B,MAAOQ,GAAGsC,EAAO9C,EAASwD,KAI5B,IAAIC,GAAiB,SAASC,EAAUC,GACtC,MAAO,UAASlE,GACd,GAAIK,GAASM,UAAUN,MACvB,IAAa,EAATA,GAAqB,MAAPL,EAAa,MAAOA,EACtC,KAAK,GAAII,GAAQ,EAAWC,EAARD,EAAgBA,IAIlC,IAAK,GAHD+D,GAASxD,UAAUP,GACnBD,EAAO8D,EAASE,GAChBC,EAAIjE,EAAKE,OACJgE,EAAI,EAAOD,EAAJC,EAAOA,IAAK,CAC1B,GAAIC,GAAMnE,EAAKkE,EACVH,IAAiBlE,EAAIsE,SAAc,KAAGtE,EAAIsE,GAAOH,EAAOG,IAGjE,MAAOtE,KAKPuE,EAAa,SAASjD,GACxB,IAAKZ,EAAEkD,SAASt
 C,GAAY,QAC5B,IAAIsB,EAAc,MAAOA,GAAatB,EACtCwB,GAAKxB,UAAYA,CACjB,IAAIkD,GAAS,GAAI1B,EAEjB,OADAA,GAAKxB,UAAY,KACVkD,GAMLC,EAAkBC,KAAKC,IAAI,EAAG,IAAM,EACpClE,EAAc,SAAS+C,GACzB,GAAInD,GAASmD,GAAcA,EAAWnD,MACtC,OAAwB,gBAAVA,IAAsBA,GAAU,GAAeoE,GAAVpE,EASrDK,GAAEkE,KAAOlE,EAAEmE,QAAU,SAAS7E,EAAKC,EAAUM,GAC3CN,EAAWO,EAAWP,EAAUM,EAChC,IAAI8D,GAAGhE,CACP,IAAII,EAAYT,GACd,IAAKqE,EAAI,EAAGhE,EAASL,EAAIK,OAAYA,EAAJgE,EAAYA,IAC3CpE,EAASD,EAAIqE,GAAIA,EAAGrE,OAEjB,CACL,GAAIG,GAAOO,EAAEP,KAAKH,EAClB,KAAKqE,EAAI,EAAGhE,EAASF,EAAKE,OAAYA,EAAJgE,EAAYA,IAC5CpE,EAASD,EAAIG,EAAKkE,IAAKlE,EAAKkE,GAAIrE,GAGpC,MAAOA,IAITU,EAAEoE,IAAMpE,EAAEqE,QAAU,SAAS/E,EAAKC,EAAUM,GAC1CN,EAAWc,EAAGd,EAAUM,EAIxB,KAAK,GAHDJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OACvB2E,EAAUhD,MAAM3B,GACXD,EAAQ,EAAWC,EAARD,EAAgBA,IAAS,CAC3C,GAAIE,GAAaH,EAAOA,EAAKC,GAASA,CACtC4E,GAAQ5E,GAASH,EAASD,EAAIM,GAAaA,EAAYN,GAEzD,MAAOgF,IA+BTtE,EAAEuE,OAASvE,EAAEwE,MAAQxE,EAAEyE,OAAStF,EAAa,GAG7Ca,EAAE0E,YAAc1E,EAAE2E,MAAQxF,GAAc,GA
 GxCa,EAAE4E,KAAO5E,EAAE6E,OAAS,SAASvF,EAAKc,EAAWP,GAC3C,GAAI+D,EAMJ,OAJEA,GADE7D,EAAYT,GACRU,EAAE8E,UAAUxF,EAAKc,EAAWP,GAE5BG,EAAE+E,QAAQzF,EAAKc,EAAWP,GAE9B+D,QAAa,IAAKA,KAAS,EAAUtE,EAAIsE,GAA7C,QAKF5D,EAAEgF,OAAShF,EAAEiF,OAAS,SAAS3F,EAAKc,EAAWP,GAC7C,GAAIyE,KAKJ,OAJAlE,GAAYC,EAAGD,EAAWP,GAC1BG,EAAEkE,KAAK5E,EAAK,SAASqD,EAAOjD,EAAOwF,GAC7B9E,EAAUuC,EAAOjD,EAAOwF,IAAOZ,EAAQrD,KAAK0B,KAE3C2B,GAITtE,EAAEmF,OAAS,SAAS7F,EAAKc,EAAWP,GAClC,MAAOG,GAAEgF,OAAO1F,EAAKU,EAAEoF,OAAO/E,EAAGD,IAAaP,IAKhDG,EAAEqF,MAAQrF,EAAEsF,IAAM,SAAShG,EAAKc,EAAWP,GACzCO,EAAYC,EAAGD,EAAWP,EAG1B,KAAK,GAFDJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OAClBD,EAAQ,EAAWC,EAARD,EAAgBA,IAAS,CAC3C,GAAIE,GAAaH,EAAOA,EAAKC,GAASA,CACtC,KAAKU,EAAUd,EAAIM,GAAaA,EAAYN,GAAM,OAAO,EAE3D,OAAO,GAKTU,EAAEuF,KAAOvF,EAAEwF,IAAM,SAASlG,EAAKc,EAAWP,GACxCO,EAAYC,EAAGD,EAAWP,EAG1B,KAAK,GAFDJ,IAAQM,EAAYT,IAAQU,EAAEP,KAAKH,GACnCK,GAAUF,GAAQH,GAAKK,OAClBD,EAAQ,EAAWC,EAARD,EAAgBA,IAAS,CAC3C,GAAIE,GAAaH,EAAOA,EAAKC,GAASA,CACtC,IA
 AIU,EAAUd,EAAIM,GAAaA,EAAYN,GAAM,OAAO,EAE1D,OAAO,GAKTU,EAAEgB,SAAWhB,EAAEyF,SAAWzF,EAAE0F,QAAU,SAASpG,EAAKqG,EAAQC,GAE1D,MADK7F,GAAYT,KAAMA,EAAMU,EAAE6F,OAAOvG,IAC/BU,EAAE8F,QAAQxG,EAAKqG,EAA4B,gBAAbC,IAAyBA,IAAc,GAI9E5F,EAAE+F,OAAS,SAASzG,EAAK0G,GACvB,GAAIC,GAAOvE,EAAMkB,KAAK3C,UAAW,GAC7BiG,EAASlG,EAAEW,WAAWqF,EAC1B,OAAOhG,GAAEoE,IAAI9E,EAAK,SAASqD,GACzB,GAAIF,GAAOyD,EAASF,EAASrD,EAAMqD,EACnC,OAAe,OAARvD,EAAeA,EAAOA,EAAKO,MAAML,EAAOsD,MAKnDjG,EAAEmG,MAAQ,SAAS7G,EAAKsE,GACtB,MAAO5D,GAAEoE,IAAI9E,EAAKU,EAAEoD,SAASQ,KAK/B5D,EAAEoG,MAAQ,SAAS9G,EAAK+G,GACtB,MAAOrG,GAAEgF,OAAO1F,EAAKU,EAAEmD,QAAQkD,KAKjCrG,EAAEsG,UAAY,SAAShH,EAAK+G,GAC1B,MAAOrG,GAAE4E,KAAKtF,EAAKU,EAAEmD,QAAQkD,KAI/BrG,EAAEuG,IAAM,SAASjH,EAAKC,EAAUM,GAC9B,GACI8C,GAAO6D,EADP1C,GAAUT,IAAUoD,GAAgBpD,GAExC,IAAgB,MAAZ9D,GAA2B,MAAPD,EAAa,CACnCA,EAAMS,EAAYT,GAAOA,EAAMU,EAAE6F,OAAOvG,EACxC,KAAK,GAAIqE,GAAI,EAAGhE,EAASL,EAAIK,OAAYA,EAAJgE,EAAYA,IAC/ChB,EAAQrD,EAAIqE,GACRhB,EAAQmB,IACVA,EAASnB,OAIbpD,GAAWc,EAAGd,EAAUM,GACxBG,EAAEk
 E,KAAK5E,EAAK,SAASqD,EAAOjD,EAAOwF,GACjCsB,EAAWjH,EAASoD,EAAOjD,EAAOwF,IAC9BsB,EAAWC,GAAgBD,KAAcnD,KAAYS,KAAYT,OACnES,EAASnB,EACT8D,EAAeD,IAIrB,OAAO1C,IAIT9D,EAAE0G,IAAM,SAASpH,EAAKC,EAAUM,GAC9B,GACI8C,GAAO6D,EADP1C,EAAST,IAAUoD,EAAepD,GAEtC,IAAgB,MAAZ9D,GAA2B,MAAPD,EAAa,CACnCA,EAAMS,EAAYT,GAAOA,EAAMU,EAAE6F,OAAOvG,EACxC,KAAK,GAAIqE,GAAI,EAAGhE,EAASL,EAAIK,OAAYA,EAAJgE,EAAYA,IAC/ChB,EAAQrD,EAAIqE,GACAG,EAARnB,IACFmB,EAASnB,OAIbpD,GAAWc,EAAGd,EAAUM,GACxBG,EAAEkE,KAAK5E,EAAK,SAASqD,EAAOjD,EAAOwF,GACjCsB,EAAWjH,EAASoD,EAAOjD,EAAOwF,IACnBuB,EAAXD,GAAwCnD,MAAbmD,GAAoCnD,MAAXS,KACtDA,EAASnB,EACT8D,EAAeD,IAIrB,OAAO1C,IAKT9D,EAAE2G,QAAU,SAASrH,GAInB,IAAK,GAAesH,GAHhBC,EAAM9G,EAAYT,GAAOA,EAAMU,EAAE6F,OAAOvG,GACxCK,EAASkH,EAAIlH,OACbmH,EAAWxF,MAAM3B,GACZD,EAAQ,EAAiBC,EAARD,EAAgBA,IACxCkH,EAAO5G,EAAE+G,OAAO,EAAGrH,GACfkH,IAASlH,IAAOoH,EAASpH,GAASoH,EAASF,IAC/CE,EAASF,GAAQC,EAAInH,EAEvB,OAAOoH,IAMT9G,EAAEgH,OAAS,SAAS1H,EAAK2H,EAAGC,GAC1B,MAAS,OAALD,GAAaC,GACVnH,EAAYT,KAAMA,EAAMU,EAAE6F,OAAOvG,I
 AC/BA,EAAIU,EAAE+G,OAAOzH,EAAIK,OAAS,KAE5BK,EAAE2G,QAAQrH,GAAKoC,MAAM,EAAGsC,KAAKuC,IAAI,EAAGU,KAI7CjH,EAAEmH,OAAS,SAAS7H,EAAKC,EAAUM,GAEjC,MADAN,GAAWc,EAAGd,EAAUM,GACjBG,EAAEmG,MAAMnG,EAAEoE,IAAI9E,EAAK,SAASqD,EAAOjD,EAAOwF,GAC/C,OACEvC,MAAOA,EACPjD,MAAOA,EACP0H,SAAU7H,EAASoD,EAAOjD,EAAOwF,MAElCmC,KAAK,SAASC,EAAMC,GACrB,GAAIC,GAAIF,EAAKF,SACTK,EAAIF,EAAMH,QACd,IAAII,IAAMC,EAAG,CACX,GAAID,EAAIC,GAAKD,QAAW,GAAG,MAAO,EAClC,IAAQC,EAAJD,GAASC,QAAW,GAAG,OAAQ,EAErC,MAAOH,GAAK5H,MAAQ6H,EAAM7H,QACxB,SAIN,IAAIgI,GAAQ,SAASC,GACnB,MAAO,UAASrI,EAAKC,EAAUM,GAC7B,GAAIiE,KAMJ,OALAvE,GAAWc,EAAGd,EAAUM,GACxBG,EAAEkE,KAAK5E,EAAK,SAASqD,EAAOjD,GAC1B,GAAIkE,GAAMrE,EAASoD,EAAOjD,EAAOJ,EACjCqI,GAAS7D,EAAQnB,EAAOiB,KAEnBE,GAMX9D,GAAE4H,QAAUF,EAAM,SAAS5D,EAAQnB,EAAOiB,GACpC5D,EAAEe,IAAI+C,EAAQF,GAAME,EAAOF,GAAK3C,KAAK0B,GAAamB,EAAOF,IAAQjB,KAKvE3C,EAAE6H,QAAUH,EAAM,SAAS5D,EAAQnB,EAAOiB,GACxCE,EAAOF,GAAOjB,IAMhB3C,EAAE8H,QAAUJ,EAAM,SAAS5D,EAAQnB,EAAOiB,GACpC5D,EAAEe,IAAI+C,EAAQF,GAAME,EAAOF,KAAaE,EAAOF,GAAO
 ,IAI5D5D,EAAE+H,QAAU,SAASzI,GACnB,MAAKA,GACDU,EAAE8B,QAAQxC,GAAaoC,EAAMkB,KAAKtD,GAClCS,EAAYT,GAAaU,EAAEoE,IAAI9E,EAAKU,EAAEiD,UACnCjD,EAAE6F,OAAOvG,OAIlBU,EAAEgI,KAAO,SAAS1I,GAChB,MAAW,OAAPA,EAAoB,EACjBS,EAAYT,GAAOA,EAAIK,OAASK,EAAEP,KAAKH,GAAKK,QAKrDK,EAAEiI,UAAY,SAAS3I,EAAKc,EAAWP,GACrCO,EAAYC,EAAGD,EAAWP,EAC1B,IAAIqI,MAAWC,IAIf,OAHAnI,GAAEkE,KAAK5E,EAAK,SAASqD,EAAOiB,EAAKtE,IAC9Bc,EAAUuC,EAAOiB,EAAKtE,GAAO4I,EAAOC,GAAMlH,KAAK0B,MAE1CuF,EAAMC,IAShBnI,EAAEoI,MAAQpI,EAAEqI,KAAOrI,EAAEsI,KAAO,SAASnI,EAAO8G,EAAGC,GAC7C,MAAa,OAAT/G,MAA2B,GACtB,MAAL8G,GAAaC,EAAc/G,EAAM,GAC9BH,EAAEuI,QAAQpI,EAAOA,EAAMR,OAASsH,IAMzCjH,EAAEuI,QAAU,SAASpI,EAAO8G,EAAGC,GAC7B,MAAOxF,GAAMkB,KAAKzC,EAAO,EAAG6D,KAAKuC,IAAI,EAAGpG,EAAMR,QAAe,MAALsH,GAAaC,EAAQ,EAAID,MAKnFjH,EAAEwI,KAAO,SAASrI,EAAO8G,EAAGC,GAC1B,MAAa,OAAT/G,MAA2B,GACtB,MAAL8G,GAAaC,EAAc/G,EAAMA,EAAMR,OAAS,GAC7CK,EAAEyI,KAAKtI,EAAO6D,KAAKuC,IAAI,EAAGpG,EAAMR,OAASsH,KAMlDjH,EAAEyI,KAAOzI,EAAE0I,KAAO1I,EAAE2I,KAAO,SAASxI,EAAO8G,EAAGC,GAC5C,MAAOxF,GAA
 MkB,KAAKzC,EAAY,MAAL8G,GAAaC,EAAQ,EAAID,IAIpDjH,EAAE4I,QAAU,SAASzI,GACnB,MAAOH,GAAEgF,OAAO7E,EAAOH,EAAEiD,UAI3B,IAAI4F,GAAU,SAASC,EAAOC,EAASC,EAAQC,GAE7C,IAAK,GADDC,MAAaC,EAAM,EACdxF,EAAIsF,GAAc,EAAGtJ,EAASmJ,GAASA,EAAMnJ,OAAYA,EAAJgE,EAAYA,IAAK,CAC7E,GAAIhB,GAAQmG,EAAMnF,EAClB,IAAI5D,EAAY4C,KAAW3C,EAAE8B,QAAQa,IAAU3C,EAAEoJ,YAAYzG,IAAS,CAE/DoG,IAASpG,EAAQkG,EAAQlG,EAAOoG,EAASC,GAC9C,IAAIK,GAAI,EAAGC,EAAM3G,EAAMhD,MAEvB,KADAuJ,EAAOvJ,QAAU2J,EACNA,EAAJD,GACLH,EAAOC,KAASxG,EAAM0G,SAEdL,KACVE,EAAOC,KAASxG,GAGpB,MAAOuG,GAITlJ,GAAE6I,QAAU,SAAS1I,EAAO4I,GAC1B,MAAOF,GAAQ1I,EAAO4I,GAAS,IAIjC/I,EAAEuJ,QAAU,SAASpJ,GACnB,MAAOH,GAAEwJ,WAAWrJ,EAAOuB,EAAMkB,KAAK3C,UAAW,KAMnDD,EAAEyJ,KAAOzJ,EAAE0J,OAAS,SAASvJ,EAAOwJ,EAAUpK,EAAUM,GACtD,GAAa,MAATM,EAAe,QACdH,GAAE4J,UAAUD,KACf9J,EAAUN,EACVA,EAAWoK,EACXA,GAAW,GAEG,MAAZpK,IAAkBA,EAAWc,EAAGd,EAAUM,GAG9C,KAAK,GAFDiE,MACA+F,KACKlG,EAAI,EAAGhE,EAASQ,EAAMR,OAAYA,EAAJgE,EAAYA,IAAK,CACtD,GAAIhB,GAAQxC,EAAMwD,GACd6C,EAAWjH,EAAWA,EAASoD,EAAOgB,EAAGxD,GAASwC,CAC
 lDgH,IACGhG,GAAKkG,IAASrD,GAAU1C,EAAO7C,KAAK0B,GACzCkH,EAAOrD,GACEjH,EACJS,EAAEgB,SAAS6I,EAAMrD,KACpBqD,EAAK5I,KAAKuF,GACV1C,EAAO7C,KAAK0B,IAEJ3C,EAAEgB,SAAS8C,EAAQnB,IAC7BmB,EAAO7C,KAAK0B,GAGhB,MAAOmB,IAKT9D,EAAE8J,MAAQ,WACR,MAAO9J,GAAEyJ,KAAKZ,EAAQ5I,WAAW,GAAM,KAKzCD,EAAE+J,aAAe,SAAS5J,GACxB,GAAa,MAATA,EAAe,QAGnB,KAAK,GAFD2D,MACAkG,EAAa/J,UAAUN,OAClBgE,EAAI,EAAGhE,EAASQ,EAAMR,OAAYA,EAAJgE,EAAYA,IAAK,CACtD,GAAIsG,GAAO9J,EAAMwD,EACjB,KAAI3D,EAAEgB,SAAS8C,EAAQmG,GAAvB,CACA,IAAK,GAAIZ,GAAI,EAAOW,EAAJX,GACTrJ,EAAEgB,SAASf,UAAUoJ,GAAIY,GADAZ,KAG5BA,IAAMW,GAAYlG,EAAO7C,KAAKgJ,IAEpC,MAAOnG,IAKT9D,EAAEwJ,WAAa,SAASrJ,GACtB,GAAIsI,GAAOI,EAAQ5I,WAAW,GAAM,EAAM,EAC1C,OAAOD,GAAEgF,OAAO7E,EAAO,SAASwC,GAC9B,OAAQ3C,EAAEgB,SAASyH,EAAM9F,MAM7B3C,EAAEkK,IAAM,WACN,MAAOlK,GAAEmK,MAAMlK,YAKjBD,EAAEmK,MAAQ,SAAShK,GAIjB,IAAK,GAHDR,GAASQ,GAASH,EAAEuG,IAAIpG,EAAO,UAAUR,QAAU,EACnDmE,EAASxC,MAAM3B,GAEVD,EAAQ,EAAWC,EAARD,EAAgBA,IAClCoE,EAAOpE,GAASM,EAAEmG,MAAMhG,EAAOT,EAEjC,OAAOoE,IAMT9D,EAAEoK,OAAS,SAASlF,EAAM
 W,GAExB,IAAK,GADD/B,MACKH,EAAI,EAAGhE,EAASuF,GAAQA,EAAKvF,OAAYA,EAAJgE,EAAYA,IACpDkC,EACF/B,EAAOoB,EAAKvB,IAAMkC,EAAOlC,GAEzBG,EAAOoB,EAAKvB,GAAG,IAAMuB,EAAKvB,GAAG,EAGjC,OAAOG,IAOT9D,EAAE8F,QAAU,SAAS3F,EAAO8J,EAAMN,GAChC,GAAIhG,GAAI,EAAGhE,EAASQ,GAASA,EAAMR,MACnC,IAAuB,gBAAZgK,GACThG,EAAe,EAAXgG,EAAe3F,KAAKuC,IAAI,EAAG5G,EAASgK,GAAYA,MAC/C,IAAIA,GAAYhK,EAErB,MADAgE,GAAI3D,EAAEqK,YAAYlK,EAAO8J,GAClB9J,EAAMwD,KAAOsG,EAAOtG,GAAK,CAElC,IAAIsG,IAASA,EACX,MAAOjK,GAAE8E,UAAUpD,EAAMkB,KAAKzC,EAAOwD,GAAI3D,EAAEsK,MAE7C,MAAW3K,EAAJgE,EAAYA,IAAK,GAAIxD,EAAMwD,KAAOsG,EAAM,MAAOtG,EACtD,QAAQ,GAGV3D,EAAEuK,YAAc,SAASpK,EAAO8J,EAAMO,GACpC,GAAIrB,GAAMhJ,EAAQA,EAAMR,OAAS,CAIjC,IAHmB,gBAAR6K,KACTrB,EAAa,EAAPqB,EAAWrB,EAAMqB,EAAO,EAAIxG,KAAK0C,IAAIyC,EAAKqB,EAAO,IAErDP,IAASA,EACX,MAAOjK,GAAEyK,cAAc/I,EAAMkB,KAAKzC,EAAO,EAAGgJ,GAAMnJ,EAAEsK,MAEtD,QAASnB,GAAO,GAAG,GAAIhJ,EAAMgJ,KAASc,EAAM,MAAOd,EACnD,QAAQ,GAiBVnJ,EAAE8E,UAAY5E,EAAkB,GAEhCF,EAAEyK,cAAgBvK,GAAmB,GAIrCF,EAAEqK,YAAc,SAASlK,EAAOb,EAAKC,EAAUM,
 GAC7CN,EAAWc,EAAGd,EAAUM,EAAS,EAGjC,KAFA,GAAI8C,GAAQpD,EAASD,GACjBoL,EAAM,EAAGC,EAAOxK,EAAMR,OACbgL,EAAND,GAAY,CACjB,GAAIE,GAAM5G,KAAK6G,OAAOH,EAAMC,GAAQ,EAChCpL,GAASY,EAAMyK,IAAQjI,EAAO+H,EAAME,EAAM,EAAQD,EAAOC,EAE/D,MAAOF,IAMT1K,EAAE8K,MAAQ,SAASC,EAAOC,EAAMC,GAC1BhL,UAAUN,QAAU,IACtBqL,EAAOD,GAAS,EAChBA,EAAQ,GAEVE,EAAOA,GAAQ,CAKf,KAAK,GAHDtL,GAASqE,KAAKuC,IAAIvC,KAAKkH,MAAMF,EAAOD,GAASE,GAAO,GACpDH,EAAQxJ,MAAM3B,GAETwJ,EAAM,EAASxJ,EAANwJ,EAAcA,IAAO4B,GAASE,EAC9CH,EAAM3B,GAAO4B,CAGf,OAAOD,GAQT,IAAIK,GAAe,SAASC,EAAYC,EAAWxL,EAASyL,EAAgBrF,GAC1E,KAAMqF,YAA0BD,IAAY,MAAOD,GAAWpI,MAAMnD,EAASoG,EAC7E,IAAIsF,GAAO1H,EAAWuH,EAAWxK,WAC7BkD,EAASsH,EAAWpI,MAAMuI,EAAMtF,EACpC,OAAIjG,GAAEkD,SAASY,GAAgBA,EACxByH,EAMTvL,GAAEiC,KAAO,SAASQ,EAAM5C,GACtB,GAAImC,GAAcS,EAAKR,OAASD,EAAY,MAAOA,GAAWgB,MAAMP,EAAMf,EAAMkB,KAAK3C,UAAW,GAChG,KAAKD,EAAEW,WAAW8B,GAAO,KAAM,IAAI+I,WAAU,oCAC7C,IAAIvF,GAAOvE,EAAMkB,KAAK3C,UAAW,GAC7BwL,EAAQ,WACV,MAAON,GAAa1I,EAAMgJ,EAAO5L,EAASsB,KAAM8E,EAAKyF,OAAOhK,EAAMkB,KAAK3C,aAEz
 E,OAAOwL,IAMTzL,EAAE2L,QAAU,SAASlJ,GACnB,GAAImJ,GAAYlK,EAAMkB,KAAK3C,UAAW,GAClCwL,EAAQ,WAGV,IAAK,GAFDI,GAAW,EAAGlM,EAASiM,EAAUjM,OACjCsG,EAAO3E,MAAM3B,GACRgE,EAAI,EAAOhE,EAAJgE,EAAYA,IAC1BsC,EAAKtC,GAAKiI,EAAUjI,KAAO3D,EAAIC,UAAU4L,KAAcD,EAAUjI,EAEnE,MAAOkI,EAAW5L,UAAUN,QAAQsG,EAAKhF,KAAKhB,UAAU4L,KACxD,OAAOV,GAAa1I,EAAMgJ,EAAOtK,KAAMA,KAAM8E,GAE/C,OAAOwF,IAMTzL,EAAE8L,QAAU,SAASxM,GACnB,GAAIqE,GAA8BC,EAA3BjE,EAASM,UAAUN,MAC1B,IAAc,GAAVA,EAAa,KAAM,IAAIoM,OAAM,wCACjC,KAAKpI,EAAI,EAAOhE,EAAJgE,EAAYA,IACtBC,EAAM3D,UAAU0D,GAChBrE,EAAIsE,GAAO5D,EAAEiC,KAAK3C,EAAIsE,GAAMtE,EAE9B,OAAOA,IAITU,EAAEgM,QAAU,SAASvJ,EAAMwJ,GACzB,GAAID,GAAU,SAASpI,GACrB,GAAIsI,GAAQF,EAAQE,MAChBC,EAAU,IAAMF,EAASA,EAAOjJ,MAAM7B,KAAMlB,WAAa2D,EAE7D,OADK5D,GAAEe,IAAImL,EAAOC,KAAUD,EAAMC,GAAW1J,EAAKO,MAAM7B,KAAMlB,YACvDiM,EAAMC,GAGf,OADAH,GAAQE,SACDF,GAKThM,EAAEoM,MAAQ,SAAS3J,EAAM4J,GACvB,GAAIpG,GAAOvE,EAAMkB,KAAK3C,UAAW,EACjC,OAAOqM,YAAW,WAChB,MAAO7J,GAAKO,MAAM,KAAMiD,IACvBoG,IAKLrM,EAAEuM,MAAQvM,EAAE2L,QAAQ3L,EAAEoM,
 MAAOpM,EAAG,GAOhCA,EAAEwM,SAAW,SAAS/J,EAAM4J,EAAMI,GAChC,GAAI5M,GAASoG,EAAMnC,EACf4I,EAAU,KACVC,EAAW,CACVF,KAASA,KACd,IAAIG,GAAQ,WACVD,EAAWF,EAAQI,WAAY,EAAQ,EAAI7M,EAAE8M,MAC7CJ,EAAU,KACV5I,EAASrB,EAAKO,MAAMnD,EAASoG,GACxByG,IAAS7M,EAAUoG,EAAO,MAEjC,OAAO,YACL,GAAI6G,GAAM9M,EAAE8M,KACPH,IAAYF,EAAQI,WAAY,IAAOF,EAAWG,EACvD,IAAIC,GAAYV,GAAQS,EAAMH,EAc9B,OAbA9M,GAAUsB,KACV8E,EAAOhG,UACU,GAAb8M,GAAkBA,EAAYV,GAC5BK,IACFM,aAAaN,GACbA,EAAU,MAEZC,EAAWG,EACXhJ,EAASrB,EAAKO,MAAMnD,EAASoG,GACxByG,IAAS7M,EAAUoG,EAAO,OACrByG,GAAWD,EAAQQ,YAAa,IAC1CP,EAAUJ,WAAWM,EAAOG,IAEvBjJ,IAQX9D,EAAEkN,SAAW,SAASzK,EAAM4J,EAAMc,GAChC,GAAIT,GAASzG,EAAMpG,EAASuN,EAAWtJ,EAEnC8I,EAAQ,WACV,GAAIpE,GAAOxI,EAAE8M,MAAQM,CAEVf,GAAP7D,GAAeA,GAAQ,EACzBkE,EAAUJ,WAAWM,EAAOP,EAAO7D,IAEnCkE,EAAU,KACLS,IACHrJ,EAASrB,EAAKO,MAAMnD,EAASoG,GACxByG,IAAS7M,EAAUoG,EAAO,QAKrC,OAAO,YACLpG,EAAUsB,KACV8E,EAAOhG,UACPmN,EAAYpN,EAAE8M,KACd,IAAIO,GAAUF,IAAcT,CAO5B,OANKA,KAASA,EAAUJ,WAAWM,EAAOP,IACtCgB,IACFvJ,EAASrB,EAAKO,MAAMnD,EAASoG,GAC7BpG,E
 AAUoG,EAAO,MAGZnC,IAOX9D,EAAEsN,KAAO,SAAS7K,EAAM8K,GACtB,MAAOvN,GAAE2L,QAAQ4B,EAAS9K,IAI5BzC,EAAEoF,OAAS,SAAShF,GAClB,MAAO,YACL,OAAQA,EAAU4C,MAAM7B,KAAMlB,aAMlCD,EAAEwN,QAAU,WACV,GAAIvH,GAAOhG,UACP8K,EAAQ9E,EAAKtG,OAAS,CAC1B,OAAO,YAGL,IAFA,GAAIgE,GAAIoH,EACJjH,EAASmC,EAAK8E,GAAO/H,MAAM7B,KAAMlB,WAC9B0D,KAAKG,EAASmC,EAAKtC,GAAGf,KAAKzB,KAAM2C,EACxC,OAAOA,KAKX9D,EAAEyN,MAAQ,SAASC,EAAOjL,GACxB,MAAO,YACL,QAAMiL,EAAQ,EACLjL,EAAKO,MAAM7B,KAAMlB,WAD1B,SAOJD,EAAE2N,OAAS,SAASD,EAAOjL,GACzB,GAAIjD,EACJ,OAAO,YAKL,QAJMkO,EAAQ,IACZlO,EAAOiD,EAAKO,MAAM7B,KAAMlB,YAEb,GAATyN,IAAYjL,EAAO,MAChBjD,IAMXQ,EAAE4N,KAAO5N,EAAE2L,QAAQ3L,EAAE2N,OAAQ,EAM7B,IAAIE,KAAelM,SAAU,MAAMmM,qBAAqB,YACpDtN,GAAsB,UAAW,gBAAiB,WAClC,uBAAwB,iBAAkB,iBAqB9DR,GAAEP,KAAO,SAASH,GAChB,IAAKU,EAAEkD,SAAS5D,GAAM,QACtB,IAAIyC,EAAY,MAAOA,GAAWzC,EAClC,IAAIG,KACJ,KAAK,GAAImE,KAAOtE,GAASU,EAAEe,IAAIzB,EAAKsE,IAAMnE,EAAKwB,KAAK2C,EAGpD,OADIiK,IAAYvN,EAAoBhB,EAAKG,GAClCA,GAITO,EAAE+N,QAAU,SAASzO,GACnB,IAAKU,EAAEkD,SAAS5D,GAAM,QACtB,IAAIG,K
 ACJ,KAAK,GAAImE,KAAOtE,GAAKG,EAAKwB,KAAK2C,EAG/B,OADIiK,IAAYvN,EAAoBhB,EAAKG,GAClCA,GAITO,EAAE6F,OAAS,SAASvG,GAIlB,IAAK,GAHDG,GAAOO,EAAEP,KAAKH,GACdK,EAASF,EAAKE,OACdkG,EAASvE,MAAM3B,GACVgE,EAAI,EAAOhE,EAAJgE,EAAYA,IAC1BkC,EAAOlC,GAAKrE,EAAIG,EAAKkE,GAEvB,OAAOkC,IAKT7F,EAAEgO,UAAY,SAAS1O,EAAKC,EAAUM,GACpCN,EAAWc,EAAGd,EAAUM,EAKtB,KAAK,GADDD,GAHFH,EAAQO,EAAEP,KAAKH,GACbK,EAASF,EAAKE,OACd2E,KAEK5E,EAAQ,EAAWC,EAARD,EAAgBA,IAClCE,EAAaH,EAAKC,GAClB4E,EAAQ1E,GAAcL,EAASD,EAAIM,GAAaA,EAAYN,EAE9D,OAAOgF,IAIXtE,EAAEiO,MAAQ,SAAS3O,GAIjB,IAAK,GAHDG,GAAOO,EAAEP,KAAKH,GACdK,EAASF,EAAKE,OACdsO,EAAQ3M,MAAM3B,GACTgE,EAAI,EAAOhE,EAAJgE,EAAYA,IAC1BsK,EAAMtK,IAAMlE,EAAKkE,GAAIrE,EAAIG,EAAKkE,IAEhC,OAAOsK,IAITjO,EAAEkO,OAAS,SAAS5O,GAGlB,IAAK,GAFDwE,MACArE,EAAOO,EAAEP,KAAKH,GACTqE,EAAI,EAAGhE,EAASF,EAAKE,OAAYA,EAAJgE,EAAYA,IAChDG,EAAOxE,EAAIG,EAAKkE,KAAOlE,EAAKkE,EAE9B,OAAOG,IAKT9D,EAAEmO,UAAYnO,EAAEoO,QAAU,SAAS9O,GACjC,GAAI+O,KACJ,KAAK,GAAIzK,KAAOtE,GACVU,EAAEW,WAAWrB,EAAIsE,KAAOyK,EAAMpN,KAAK2C,EAEzC,O
 AAOyK,GAAMhH,QAIfrH,EAAEsO,OAAShL,EAAetD,EAAE+N,SAI5B/N,EAAEuO,UAAYvO,EAAEwO,OAASlL,EAAetD,EAAEP,MAG1CO,EAAE+E,QAAU,SAASzF,EAAKc,EAAWP,GACnCO,EAAYC,EAAGD,EAAWP,EAE1B,KAAK,GADmB+D,GAApBnE,EAAOO,EAAEP,KAAKH,GACTqE,EAAI,EAAGhE,EAASF,EAAKE,OAAYA,EAAJgE,EAAYA,IAEhD,GADAC,EAAMnE,EAAKkE,GACPvD,EAAUd,EAAIsE,GAAMA,EAAKtE,GAAM,MAAOsE,IAK9C5D,EAAEyO,KAAO,SAASrE,EAAQsE,EAAW7O,GACnC,GAA+BN,GAAUE,EAArCqE,KAAaxE,EAAM8K,CACvB,IAAW,MAAP9K,EAAa,MAAOwE,EACpB9D,GAAEW,WAAW+N,IACfjP,EAAOO,EAAE+N,QAAQzO,GACjBC,EAAWO,EAAW4O,EAAW7O,KAEjCJ,EAAOoJ,EAAQ5I,WAAW,GAAO,EAAO,GACxCV,EAAW,SAASoD,EAAOiB,EAAKtE,GAAO,MAAOsE,KAAOtE,IACrDA,EAAMiC,OAAOjC,GAEf,KAAK,GAAIqE,GAAI,EAAGhE,EAASF,EAAKE,OAAYA,EAAJgE,EAAYA,IAAK,CACrD,GAAIC,GAAMnE,EAAKkE,GACXhB,EAAQrD,EAAIsE,EACZrE,GAASoD,EAAOiB,EAAKtE,KAAMwE,EAAOF,GAAOjB,GAE/C,MAAOmB,IAIT9D,EAAE2O,KAAO,SAASrP,EAAKC,EAAUM,GAC/B,GAAIG,EAAEW,WAAWpB,GACfA,EAAWS,EAAEoF,OAAO7F,OACf,CACL,GAAIE,GAAOO,EAAEoE,IAAIyE,EAAQ5I,WAAW,GAAO,EAAO,GAAI2O,OACtDrP,GAAW,SAASoD,EAAOiB,GACzB,OAAQ5D,EAAEgB,S
 AASvB,EAAMmE,IAG7B,MAAO5D,GAAEyO,KAAKnP,EAAKC,EAAUM,IAI/BG,EAAE6O,SAAWvL,EAAetD,EAAE+N,SAAS,GAGvC/N,EAAE8O,MAAQ,SAASxP,GACjB,MAAKU,GAAEkD,SAAS5D,GACTU,EAAE8B,QAAQxC,GAAOA,EAAIoC,QAAU1B,EAAEsO,UAAWhP,GADtBA,GAO/BU,EAAE+O,IAAM,SAASzP,EAAK0P,GAEpB,MADAA,GAAY1P,GACLA,GAITU,EAAEiP,QAAU,SAAS7E,EAAQ/D,GAC3B,GAAI5G,GAAOO,EAAEP,KAAK4G,GAAQ1G,EAASF,EAAKE,MACxC,IAAc,MAAVyK,EAAgB,OAAQzK,CAE5B,KAAK,GADDL,GAAMiC,OAAO6I,GACRzG,EAAI,EAAOhE,EAAJgE,EAAYA,IAAK,CAC/B,GAAIC,GAAMnE,EAAKkE,EACf,IAAI0C,EAAMzC,KAAStE,EAAIsE,MAAUA,IAAOtE,IAAM,OAAO,EAEvD,OAAO,EAKT,IAAI4P,GAAK,SAAS1H,EAAGC,EAAG0H,EAAQC,GAG9B,GAAI5H,IAAMC,EAAG,MAAa,KAAND,GAAW,EAAIA,IAAM,EAAIC,CAE7C,IAAS,MAALD,GAAkB,MAALC,EAAW,MAAOD,KAAMC,CAErCD,aAAaxH,KAAGwH,EAAIA,EAAEnF,UACtBoF,YAAazH,KAAGyH,EAAIA,EAAEpF,SAE1B,IAAIgN,GAAY1N,EAASiB,KAAK4E,EAC9B,IAAI6H,IAAc1N,EAASiB,KAAK6E,GAAI,OAAO,CAC3C,QAAQ4H,GAEN,IAAK,kBAEL,IAAK,kBAGH,MAAO,GAAK7H,GAAM,GAAKC,CACzB,KAAK,kBAGH,OAAKD,KAAOA,GAAWC,KAAOA,EAEhB,KAAND,EAAU,GAAKA,IAAM,EAAIC,GAAKD,KAAOC,CAC/C,KAAK,gBAC
 L,IAAK,mBAIH,OAAQD,KAAOC,EAGnB,GAAI6H,GAA0B,mBAAdD,CAChB,KAAKC,EAAW,CACd,GAAgB,gBAAL9H,IAA6B,gBAALC,GAAe,OAAO,CAIzD,IAAI8H,GAAQ/H,EAAE/G,YAAa+O,EAAQ/H,EAAEhH,WACrC,IAAI8O,IAAUC,KAAWxP,EAAEW,WAAW4O,IAAUA,YAAiBA,IACxCvP,EAAEW,WAAW6O,IAAUA,YAAiBA,KACzC,eAAiBhI,IAAK,eAAiBC,GAC7D,OAAO,EAQX0H,EAASA,MACTC,EAASA,KAET,KADA,GAAIzP,GAASwP,EAAOxP,OACbA,KAGL,GAAIwP,EAAOxP,KAAY6H,EAAG,MAAO4H,GAAOzP,KAAY8H,CAQtD,IAJA0H,EAAOlO,KAAKuG,GACZ4H,EAAOnO,KAAKwG,GAGR6H,EAAW,CAGb,GADA3P,EAAS6H,EAAE7H,OACPA,IAAW8H,EAAE9H,OAAQ,OAAO,CAEhC,MAAOA,KACL,IAAKuP,EAAG1H,EAAE7H,GAAS8H,EAAE9H,GAASwP,EAAQC,GAAS,OAAO,MAEnD,CAEL,GAAsBxL,GAAlBnE,EAAOO,EAAEP,KAAK+H,EAGlB,IAFA7H,EAASF,EAAKE,OAEVK,EAAEP,KAAKgI,GAAG9H,SAAWA,EAAQ,OAAO,CACxC,MAAOA,KAGL,GADAiE,EAAMnE,EAAKE,IACLK,EAAEe,IAAI0G,EAAG7D,KAAQsL,EAAG1H,EAAE5D,GAAM6D,EAAE7D,GAAMuL,EAAQC,GAAU,OAAO,EAMvE,MAFAD,GAAOM,MACPL,EAAOK,OACA,EAITzP,GAAE0P,QAAU,SAASlI,EAAGC,GACtB,MAAOyH,GAAG1H,EAAGC,IAKfzH,EAAE2P,QAAU,SAASrQ,GACnB,MAAW,OAAPA,GAAoB,EACpBS,EAAYT,KAASU,EAAE8B,QAAQxC,IA
 AQU,EAAE4P,SAAStQ,IAAQU,EAAEoJ,YAAY9J,IAA6B,IAAfA,EAAIK,OAChE,IAAvBK,EAAEP,KAAKH,GAAKK,QAIrBK,EAAE6P,UAAY,SAASvQ,GACrB,SAAUA,GAAwB,IAAjBA,EAAIwQ,WAKvB9P,EAAE8B,QAAUD,GAAiB,SAASvC,GACpC,MAA8B,mBAAvBqC,EAASiB,KAAKtD,IAIvBU,EAAEkD,SAAW,SAAS5D,GACpB,GAAIyQ,SAAczQ,EAClB,OAAgB,aAATyQ,GAAgC,WAATA,KAAuBzQ,GAIvDU,EAAEkE,MAAM,YAAa,WAAY,SAAU,SAAU,OAAQ,SAAU,SAAU,SAAS8L,GACxFhQ,EAAE,KAAOgQ,GAAQ,SAAS1Q,GACxB,MAAOqC,GAASiB,KAAKtD,KAAS,WAAa0Q,EAAO,OAMjDhQ,EAAEoJ,YAAYnJ,aACjBD,EAAEoJ,YAAc,SAAS9J,GACvB,MAAOU,GAAEe,IAAIzB,EAAK,YAMJ,kBAAP,KAAyC,gBAAb2Q,aACrCjQ,EAAEW,WAAa,SAASrB,GACtB,MAAqB,kBAAPA,KAAqB,IAKvCU,EAAEkQ,SAAW,SAAS5Q,GACpB,MAAO4Q,UAAS5Q,KAASgL,MAAM6F,WAAW7Q,KAI5CU,EAAEsK,MAAQ,SAAShL,GACjB,MAAOU,GAAEoQ,SAAS9Q,IAAQA,KAASA,GAIrCU,EAAE4J,UAAY,SAAStK,GACrB,MAAOA,MAAQ,GAAQA,KAAQ,GAAgC,qBAAvBqC,EAASiB,KAAKtD,IAIxDU,EAAEqQ,OAAS,SAAS/Q,GAClB,MAAe,QAARA,GAITU,EAAEsQ,YAAc,SAAShR,GACvB,MAAOA,SAAa,IAKtBU,EAAEe,IAAM,SAASzB,EAAKsE,GACpB,MAAc,OAAPtE,GAAesC,EAAegB,KAAKtD,EAAKsE,IAQjD5D,EAAEuQ,WAAa,WAEb,MADAr
 P,GAAKlB,EAAIoB,EACFD,MAITnB,EAAEiD,SAAW,SAASN,GACpB,MAAOA,IAIT3C,EAAEwQ,SAAW,SAAS7N,GACpB,MAAO,YACL,MAAOA,KAIX3C,EAAEyQ,KAAO,aAETzQ,EAAEoD,SAAW,SAASQ,GACpB,MAAO,UAAStE,GACd,MAAc,OAAPA,MAAmB,GAAIA,EAAIsE,KAKtC5D,EAAE0Q,WAAa,SAASpR,GACtB,MAAc,OAAPA,EAAc,aAAe,SAASsE,GAC3C,MAAOtE,GAAIsE,KAMf5D,EAAEmD,QAAUnD,EAAE2Q,QAAU,SAAStK,GAE/B,MADAA,GAAQrG,EAAEuO,aAAclI,GACjB,SAAS/G,GACd,MAAOU,GAAEiP,QAAQ3P,EAAK+G,KAK1BrG,EAAE0N,MAAQ,SAASzG,EAAG1H,EAAUM,GAC9B,GAAI+Q,GAAQtP,MAAM0C,KAAKuC,IAAI,EAAGU,GAC9B1H,GAAWO,EAAWP,EAAUM,EAAS,EACzC,KAAK,GAAI8D,GAAI,EAAOsD,EAAJtD,EAAOA,IAAKiN,EAAMjN,GAAKpE,EAASoE,EAChD,OAAOiN,IAIT5Q,EAAE+G,OAAS,SAASL,EAAKH,GAKvB,MAJW,OAAPA,IACFA,EAAMG,EACNA,EAAM,GAEDA,EAAM1C,KAAK6G,MAAM7G,KAAK+C,UAAYR,EAAMG,EAAM,KAIvD1G,EAAE8M,IAAM+D,KAAK/D,KAAO,WAClB,OAAO,GAAI+D,OAAOC,UAIpB,IAAIC,IACFC,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,SACLC,IAAK,UAEHC,EAActR,EAAEkO,OAAO6C,GAGvBQ,EAAgB,SAASnN,GAC3B,GAAIoN,GAAU,SAASC,GACrB,MAAOrN,GAAIqN,IAGThO,EAAS,MAAQzD,EAAEP,KAAK2E,GAAKsN,KAAK,K
 AAO,IACzCC,EAAaC,OAAOnO,GACpBoO,EAAgBD,OAAOnO,EAAQ,IACnC,OAAO,UAASqO,GAEd,MADAA,GAAmB,MAAVA,EAAiB,GAAK,GAAKA,EAC7BH,EAAWI,KAAKD,GAAUA,EAAOE,QAAQH,EAAeL,GAAWM,GAG9E9R,GAAEiS,OAASV,EAAcR,GACzB/Q,EAAEkS,SAAWX,EAAcD,GAI3BtR,EAAE8D,OAAS,SAASsG,EAAQhH,EAAU+O,GACpC,GAAIxP,GAAkB,MAAVyH,MAAsB,GAAIA,EAAOhH,EAI7C,OAHIT,SAAe,KACjBA,EAAQwP,GAEHnS,EAAEW,WAAWgC,GAASA,EAAMC,KAAKwH,GAAUzH,EAKpD,IAAIyP,GAAY,CAChBpS,GAAEqS,SAAW,SAASC,GACpB,GAAIC,KAAOH,EAAY,EACvB,OAAOE,GAASA,EAASC,EAAKA,GAKhCvS,EAAEwS,kBACAC,SAAc,kBACdC,YAAc,mBACdT,OAAc,mBAMhB,IAAIU,GAAU,OAIVC,GACFxB,IAAU,IACVyB,KAAU,KACVC,KAAU,IACVC,KAAU,IACVC,SAAU,QACVC,SAAU,SAGRzB,EAAU,4BAEV0B,EAAa,SAASzB,GACxB,MAAO,KAAOmB,EAAQnB,GAOxBzR,GAAEmT,SAAW,SAASC,EAAMC,EAAUC,IAC/BD,GAAYC,IAAaD,EAAWC,GACzCD,EAAWrT,EAAE6O,YAAawE,EAAUrT,EAAEwS,iBAGtC,IAAIrP,GAAUyO,SACXyB,EAASpB,QAAUU,GAASlP,QAC5B4P,EAASX,aAAeC,GAASlP,QACjC4P,EAASZ,UAAYE,GAASlP,QAC/BiO,KAAK,KAAO,KAAM,KAGhBhS,EAAQ,EACR+D,EAAS,QACb2P,GAAKpB,QAAQ7O,EAAS,SAASsO,EAAOQ,EAAQS,EAAaD,EAAUc,GAanE,MAZA9P,
 IAAU2P,EAAK1R,MAAMhC,EAAO6T,GAAQvB,QAAQR,EAAS0B,GACrDxT,EAAQ6T,EAAS9B,EAAM9R,OAEnBsS,EACFxO,GAAU,cAAgBwO,EAAS,iCAC1BS,EACTjP,GAAU,cAAgBiP,EAAc,uBAC/BD,IACThP,GAAU,OAASgP,EAAW,YAIzBhB,IAEThO,GAAU,OAGL4P,EAASG,WAAU/P,EAAS,mBAAqBA,EAAS,OAE/DA,EAAS,2CACP,oDACAA,EAAS,eAEX,KACE,GAAIgQ,GAAS,GAAIhS,UAAS4R,EAASG,UAAY,MAAO,IAAK/P,GAC3D,MAAOiQ,GAEP,KADAA,GAAEjQ,OAASA,EACLiQ,EAGR,GAAIP,GAAW,SAASQ,GACtB,MAAOF,GAAO7Q,KAAKzB,KAAMwS,EAAM3T,IAI7B4T,EAAWP,EAASG,UAAY,KAGpC,OAFAL,GAAS1P,OAAS,YAAcmQ,EAAW,OAASnQ,EAAS,IAEtD0P,GAITnT,EAAE6T,MAAQ,SAASvU,GACjB,GAAIwU,GAAW9T,EAAEV,EAEjB,OADAwU,GAASC,QAAS,EACXD,EAUT,IAAIhQ,GAAS,SAASgQ,EAAUxU,GAC9B,MAAOwU,GAASC,OAAS/T,EAAEV,GAAKuU,QAAUvU,EAI5CU,GAAEgU,MAAQ,SAAS1U,GACjBU,EAAEkE,KAAKlE,EAAEmO,UAAU7O,GAAM,SAAS0Q,GAChC,GAAIvN,GAAOzC,EAAEgQ,GAAQ1Q,EAAI0Q,EACzBhQ,GAAEY,UAAUoP,GAAQ,WAClB,GAAI/J,IAAQ9E,KAAKkB,SAEjB,OADApB,GAAK+B,MAAMiD,EAAMhG,WACV6D,EAAO3C,KAAMsB,EAAKO,MAAMhD,EAAGiG,QAMxCjG,EAAEgU,MAAMhU,GAGRA,EAAEkE,MAAM,MAAO,OAAQ,UAAW,QAAS,OAAQ,SAAU,WAAY,SAAS8L,GAChF
 ,GAAIhK,GAAS3E,EAAW2O,EACxBhQ,GAAEY,UAAUoP,GAAQ,WAClB,GAAI1Q,GAAM6B,KAAKkB,QAGf,OAFA2D,GAAOhD,MAAM1D,EAAKW,WACJ,UAAT+P,GAA6B,WAATA,GAAqC,IAAf1Q,EAAIK,cAAqBL,GAAI,GACrEwE,EAAO3C,KAAM7B,MAKxBU,EAAEkE,MAAM,SAAU,OAAQ,SAAU,SAAS8L,GAC3C,GAAIhK,GAAS3E,EAAW2O,EACxBhQ,GAAEY,UAAUoP,GAAQ,WAClB,MAAOlM,GAAO3C,KAAM6E,EAAOhD,MAAM7B,KAAKkB,SAAUpC,eAKpDD,EAAEY,UAAU+B,MAAQ,WAClB,MAAOxB,MAAKkB,UAKdrC,EAAEY,UAAUqT,QAAUjU,EAAEY,UAAUsT,OAASlU,EAAEY,UAAU+B,MAEvD3C,EAAEY,UAAUe,SAAW,WACrB,MAAO,GAAKR,KAAKkB,UAUG,kBAAX8R,SAAyBA,OAAOC,KACzCD,OAAO,gBAAkB,WACvB,MAAOnU,OAGX4C,KAAKzB"}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/fb86fb3b/ambari-web/api-docs/o2c.html
----------------------------------------------------------------------
diff --git a/ambari-web/api-docs/o2c.html b/ambari-web/api-docs/o2c.html
new file mode 100644
index 0000000..88e8bf1
--- /dev/null
+++ b/ambari-web/api-docs/o2c.html
@@ -0,0 +1,20 @@
+<script>
+var qp = null;
+if(window.location.hash) {
+  qp = location.hash.substring(1);
+}
+else {
+  qp = location.search.substring(1);
+}
+qp = qp ? JSON.parse('{"' + qp.replace(/&/g, '","').replace(/=/g,'":"') + '"}',
+  function(key, value) {
+    return key===""?value:decodeURIComponent(value) }
+  ):{}
+
+if (window.opener.swaggerUi.tokenUrl)
+    window.opener.processOAuthCode(qp);
+else
+    window.opener.onOAuthComplete(qp);
+
+window.close();
+</script>
\ No newline at end of file