Package org.apache.ambari.server.controller.internal

Examples of org.apache.ambari.server.controller.internal.RequestStatusImpl


        throw new ResourceAlreadyExistsException(e.getMessage());
      } catch (Exception e) {
        throw new SystemException(e.getMessage(), e);
      }
    }
    return new RequestStatusImpl(null);
  }
View Full Code Here


        } catch (Exception e) {
          throw new SystemException(e.getMessage(), e);
        }
      }
    }
    return new RequestStatusImpl(null);
  }
View Full Code Here

        throw new UnsupportedPropertyException(getResourceType(e), e.getPropertyIds());
      } catch (Exception e) {
        throw new SystemException(e.getMessage(), e);
      }
    }
    return new RequestStatusImpl(null);
  }
View Full Code Here

  protected RequestStatus getRequestStatus(Integer requestId) {
    if (requestId != null){
      Resource requestResource = new ResourceImpl(Resource.Type.Request);
      requestResource.setProperty(PropertyHelper.getPropertyId("Requests", "id"), requestId);
      requestResource.setProperty(PropertyHelper.getPropertyId("Requests", "status"), "InProgress");
      return new RequestStatusImpl(requestResource);
    }
    return new RequestStatusImpl(null);
  }
View Full Code Here

    expect(resourceDefinition.getType()).andReturn(Resource.Type.Component);
    expect(controller.getSchema(Resource.Type.Component)).andReturn(schema);
    expect(schema.getKeyPropertyId(Resource.Type.Cluster)).andReturn(clusterId);
    expect(schema.getKeyPropertyId(Resource.Type.Service)).andReturn(serviceId);

    expect(controller.createResources(Resource.Type.Component, serverRequest)).andReturn(new RequestStatusImpl(null));

    replay(resource, resourceDefinition, controller, schema, serverRequest);

    new TestPersistenceManager(controller, setProperties, serverRequest).create(resource, setProperties);
View Full Code Here

    expect(resourceDefinition.getType()).andReturn(Resource.Type.Component);
    expect(controller.getSchema(Resource.Type.Component)).andReturn(schema);
    expect(schema.getKeyPropertyId(Resource.Type.Cluster)).andReturn(clusterId).times(2);
    expect(schema.getKeyPropertyId(Resource.Type.Service)).andReturn(serviceId).times(2);

    expect(controller.createResources(Resource.Type.Component, serverRequest)).andReturn(new RequestStatusImpl(null));

    replay(resource, resourceDefinition, controller, schema, serverRequest);

    new TestPersistenceManager(controller, setProperties, serverRequest).create(resource, setProperties);
View Full Code Here

    expect(resource.getResourceDefinition()).andReturn(resourceDefinition);
    expect(resourceDefinition.getType()).andReturn(Resource.Type.Component);
    expect(resource.getQuery()).andReturn(query);
    expect(query.getPredicate()).andReturn(predicate);

    expect(controller.updateResources(Resource.Type.Component, serverRequest, predicate)).andReturn(new RequestStatusImpl(null));

    replay(resource, resourceDefinition, controller, schema, serverRequest, query, predicate);

    new TestPersistenceManager(controller, setProperties, serverRequest).update(resource, setProperties);
View Full Code Here

    expect(resource.getResourceDefinition()).andReturn(resourceDefinition).anyTimes();
    expect(resourceDefinition.getType()).andReturn(Resource.Type.Component).anyTimes();
    expect(resource.getQuery()).andReturn(query).anyTimes();
    expect(query.getPredicate()).andReturn(predicate).anyTimes();

    expect(controller.deleteResources(Resource.Type.Component, predicate)).andReturn(new RequestStatusImpl(null));

    replay(resource, resourceDefinition, controller, query, predicate);

    new TestPersistenceManager(controller, null, null).delete(resource, null);
View Full Code Here

     * Get a request status
     *
     * @return the request status
     */
    private RequestStatus getRequestStatus() {
        return new RequestStatusImpl(null);
    }
View Full Code Here

    expect(resourceDefinition.getType()).andReturn(Resource.Type.Component);
    expect(controller.getSchema(Resource.Type.Component)).andReturn(schema);
    expect(schema.getKeyPropertyId(Resource.Type.Cluster)).andReturn(clusterId);
    expect(schema.getKeyPropertyId(Resource.Type.Service)).andReturn(serviceId);

    expect(controller.createResources(Resource.Type.Component, serverRequest)).andReturn(new RequestStatusImpl(null));

    replay(resource, resourceDefinition, controller, schema, serverRequest);

    new TestPersistenceManager(controller, setExpected, serverRequest).create(resource, body);
View Full Code Here

TOP

Related Classes of org.apache.ambari.server.controller.internal.RequestStatusImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.