|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tszadel.qctools4j.clients.AbstractClient
public abstract class AbstractClient
The common client.
Field Summary | |
---|---|
protected QcConnectionImpl |
connection
The connection to QC. |
static int |
NONE
No flag. |
static int |
WITH_ATTACHMENTS
Attachments have to be added. |
static int |
WITH_CHILDREN
Children have to be added. |
Constructor Summary | |
---|---|
AbstractClient(IQcConnection pConnection)
Constructor. |
Method Summary | |
---|---|
protected boolean |
canExecuteAction(PermissionEnum pPermission)
Check if the user can execute the given action. |
protected void |
checkConnection()
Check if the client is connected. |
protected void |
checkLogin()
Check if the client is logged in. |
protected void |
checkPermission(PermissionEnum pPermission)
Check if the current user can execute the given action on the given element. |
protected boolean |
containsFlag(int pFlag,
int pValue)
Check if a flag is contained in the value. |
protected String |
getEncodedString(String pString)
Returns an encoded string to pass to the QC methods that disagree with blank space. |
abstract Map<String,FieldDescription> |
getFieldDescriptions()
Returns the descriptions of the fields. |
protected void |
loadFields(com.mercury.qualitycenter.otaclient.IBaseField pQcEntity,
Object pModel,
boolean pWithAttachments)
Fill the fields of the given model by processing annotation. |
protected List<Attachment> |
retrieveAttachments(com.mercury.qualitycenter.otaclient.IBaseFieldEx pQcEntity)
Retrieve all attachments of the given entity. |
protected void |
retrieveCustomFields(Object pModel)
Retrieve custom fields |
protected void |
storeAttachments(com.mercury.qualitycenter.otaclient.IBaseFieldEx pQcEntity,
List<Attachment> pAttachmentList,
boolean pSynchronize)
Save all attachments of the given entity. |
protected void |
storeFields(com.mercury.qualitycenter.otaclient.IBaseField pQcEntity,
Object pModel,
boolean pWithAttachments)
Store the fields of the given model to the given entity.. |
protected Attachment |
toAttachment(com.mercury.qualitycenter.otaclient.IAttachment pAttachment)
Convert the Attachment. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NONE
public static final int WITH_ATTACHMENTS
public static final int WITH_CHILDREN
protected final QcConnectionImpl connection
Constructor Detail |
---|
public AbstractClient(IQcConnection pConnection)
pConnection
- The QC Connection.Method Detail |
---|
public abstract Map<String,FieldDescription> getFieldDescriptions() throws QcException
QcException
- Qc Error.protected boolean canExecuteAction(PermissionEnum pPermission) throws QcException
pPermission
- The permission.
QcException
- Error.protected void checkConnection() throws QcException
QcException
- Connection error.protected void checkLogin() throws QcException
QcException
- Connection error.protected void checkPermission(PermissionEnum pPermission) throws PermissionException, QcException
pPermission
- The permission.
PermissionException
- Permission fails.
QcException
- QC error.protected boolean containsFlag(int pFlag, int pValue)
pFlag
- The flag.pValue
- The value.
protected String getEncodedString(String pString)
pString
- The path.
protected void loadFields(com.mercury.qualitycenter.otaclient.IBaseField pQcEntity, Object pModel, boolean pWithAttachments) throws QcException
pQcEntity
- The QC Object.pModel
- The model whose fields will be set.pWithAttachments
- True if the attachments have to be downloaded.
QcException
- Qc Error.QcField
protected List<Attachment> retrieveAttachments(com.mercury.qualitycenter.otaclient.IBaseFieldEx pQcEntity) throws QcException
pQcEntity
- The entity.
QcException
- Qc error.protected void retrieveCustomFields(Object pModel) throws QcException
pModel
- The model.
QcException
- Qc Error.protected void storeAttachments(com.mercury.qualitycenter.otaclient.IBaseFieldEx pQcEntity, List<Attachment> pAttachmentList, boolean pSynchronize) throws QcException
pQcEntity
- The entity.pAttachmentList
- The attachments to save.pSynchronize
- True if the current list of attachments is the full list of attachments (deletion can be done)
QcException
- Qc error.protected void storeFields(com.mercury.qualitycenter.otaclient.IBaseField pQcEntity, Object pModel, boolean pWithAttachments) throws QcException
pQcEntity
- The QC Object.pModel
- The model whose fields will be get.pWithAttachments
- True if the attachments have to be uploaded.
QcException
- Qc Error.QcField
protected Attachment toAttachment(com.mercury.qualitycenter.otaclient.IAttachment pAttachment) throws QcException
pAttachment
- The Qc Attachment.
QcException
- QC Error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |