org.aludratest.hpalm.service.impl
Class HpAlmInteractionImpl

java.lang.Object
  extended by org.aludratest.hpalm.service.impl.HpAlmInteractionImpl
All Implemented Interfaces:
HpAlmInteraction, org.aludratest.service.Action, org.aludratest.service.Interaction

public class HpAlmInteractionImpl
extends Object
implements org.aludratest.service.Interaction, HpAlmInteraction


Constructor Summary
HpAlmInteractionImpl(HpAlmSession session)
           
 
Method Summary
 List<org.aludratest.testcase.event.attachment.Attachment> createAttachments(Object object, String title)
           
 List<org.aludratest.testcase.event.attachment.Attachment> createDebugAttachments()
           
 Entity createEntity(EntityType entityType, Entity value)
          Creates a new entity of the given type.
 void deleteEntity(EntityType entityType, long id)
          Deletes the given entity.
 EntityCollection getAllEntities(EntityType entityType)
          Returns a collection with all entities of a given entity type.
 ServerTime getServerTime()
          Returns the server time of the HP ALM server.
 Entity getSingleEntity(EntityType entityType, long id)
          Returns a single entity of the given type with the given ID.
 EntityCollection queryEntities(EntityType entityType, String query)
          Executes a complex query in HP ALM for entities of a given type.
 void setSystemConnector(org.aludratest.service.SystemConnector systemConnector)
           
 void updateEntity(EntityType entityType, long id, Entity value)
          Updates the given entity.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HpAlmInteractionImpl

public HpAlmInteractionImpl(HpAlmSession session)
Method Detail

getServerTime

public ServerTime getServerTime()
Description copied from interface: HpAlmInteraction
Returns the server time of the HP ALM server.

Specified by:
getServerTime in interface HpAlmInteraction
Returns:
The server time of the HP ALM server.

getAllEntities

public EntityCollection getAllEntities(EntityType entityType)
Description copied from interface: HpAlmInteraction
Returns a collection with all entities of a given entity type.

Specified by:
getAllEntities in interface HpAlmInteraction
Parameters:
entityType - Entity type to retrieve the entities from.
Returns:
Collection with all entities of this type. This collection may or may not be paging, i.e. after N elements, a new query to the HP ALM server could automatically be issued to retrieve next N elements.

getSingleEntity

public Entity getSingleEntity(EntityType entityType,
                              long id)
Description copied from interface: HpAlmInteraction
Returns a single entity of the given type with the given ID.

Specified by:
getSingleEntity in interface HpAlmInteraction
Parameters:
entityType - Type of the entity.
id - ID of the entity.
Returns:
The entity.

createEntity

public Entity createEntity(EntityType entityType,
                           Entity value)
Description copied from interface: HpAlmInteraction
Creates a new entity of the given type. The entity object must have all desired (and required) values set, but must not have an ID set. The method returns the newly created entity object, which can e.g. be queried for the generated ID.

Specified by:
createEntity in interface HpAlmInteraction
Parameters:
entityType - Type of the entity to create.
value - Entity containing all required values. Do not use this object after a call to this method.
Returns:
The created entity. Use this result for further operations on this entity.

updateEntity

public void updateEntity(EntityType entityType,
                         long id,
                         Entity value)
Description copied from interface: HpAlmInteraction
Updates the given entity.

Specified by:
updateEntity in interface HpAlmInteraction
Parameters:
entityType - Type of the entity to update.
id - ID of the entity to update.
value - Entity object containing all fields for the entity.

deleteEntity

public void deleteEntity(EntityType entityType,
                         long id)
Description copied from interface: HpAlmInteraction
Deletes the given entity.

Specified by:
deleteEntity in interface HpAlmInteraction
Parameters:
entityType - Type of the entity to delete.
id - ID of the entity to delete.

queryEntities

public EntityCollection queryEntities(EntityType entityType,
                                      String query)
Description copied from interface: HpAlmInteraction
Executes a complex query in HP ALM for entities of a given type.

Specified by:
queryEntities in interface HpAlmInteraction
Parameters:
entityType - Type of the entities to query.
query - A complex HP ALM query. See HP ALM REST API documentation for query syntax.
Returns:
Collection with all entities matching the query (maybe none). This collection may or may not be paging, i.e. after N elements, a new query to the HP ALM server could automatically be issued to retrieve next N elements.

createDebugAttachments

public List<org.aludratest.testcase.event.attachment.Attachment> createDebugAttachments()
Specified by:
createDebugAttachments in interface org.aludratest.service.Action

createAttachments

public List<org.aludratest.testcase.event.attachment.Attachment> createAttachments(Object object,
                                                                                   String title)
Specified by:
createAttachments in interface org.aludratest.service.Action

setSystemConnector

public void setSystemConnector(org.aludratest.service.SystemConnector systemConnector)
Specified by:
setSystemConnector in interface org.aludratest.service.Action


Copyright © 2015 aludratest.org. All rights reserved.