-
Notifications
You must be signed in to change notification settings - Fork 32
Added TSQ manager and its IVT program #984
Changes from all commits
ba7023d
2b2a082
21cb88f
715178d
f0f11d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright contributors to the Galasa project | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package dev.galasa.cicsts; | ||
|
||
import javax.validation.constraints.NotNull; | ||
public interface ITsq { | ||
|
||
/** | ||
* Check the existence of a TSQ. | ||
* @throws TsqException if there is a problem in checking the TSQ existence | ||
* @return boolean based on if TSQ is existing or not | ||
*/ | ||
public boolean exists() throws TsqException; | ||
|
||
/** | ||
* Check if a TSQ is recoverable. | ||
* @throws TsqException if there is a problem in checking if the TSQ is recoverable or not | ||
* @return boolean based on if TSQ is recoverable or not | ||
*/ | ||
public boolean isRecoverable() throws TsqException; | ||
|
||
/** | ||
* Read Data from TSQ based on item number. | ||
* @param item Item number of the TSQ to be read | ||
* @return Data read from TSQ as String | ||
* @throws TsqException if there is a problem in reading from the TSQ | ||
*/ | ||
public String readQueue(int item) throws TsqException; | ||
|
||
/** | ||
* Read next from TSQ. | ||
* @return Data read from TSQ as String | ||
* @throws TsqException if there is a problem in reading next from the TSQ | ||
*/ | ||
public String readQueueNext() throws TsqException; | ||
|
||
/** | ||
* Write data to TSQ. | ||
* @param data The data to be written to the TSQ | ||
* @throws TsqException if there is a problem in writing to the TSQ | ||
*/ | ||
public void writeQueue(@NotNull String data) throws TsqException; | ||
Anuprakash-Moothedath marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
/** | ||
* Delete non-recoverable TSQ. | ||
* @throws TsqException if there is a problem in deleting the TSQ | ||
*/ | ||
public void deleteQueue() throws TsqException; | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright contributors to the Galasa project | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package dev.galasa.cicsts; | ||
|
||
import javax.validation.constraints.NotNull; | ||
public interface ITsqFactory { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer ITSQFactory or TSQFactory. 'I' Prefix is optional, but has been used pretty consistently in Galasa, but I'm personally not wedded to it. Given that the implementation is internal to the bundle and non-reachable, I think that should be TSQFactoryImpl or similar ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @techcobweb , I can find that all the interfaces have name starting with 'I' and the implementation of ITsqFactory.java is named as TsqFactoryImpl.java. I thought this is the naming convention followed in Galasa. Please advise if I need to change this or keep it similar to the existing file names in Galasa? |
||
|
||
/** | ||
* Create a new ITsq object with recoverable status | ||
* @param queueName TSQ name | ||
* @param isRecoverable true for recoverable and false for non-recoverable | ||
* @return ITsq object. The existence of the ITsq object does not have any correlation to whether | ||
* the queue actually exists underneath it. It is used to access or create the ITsq. | ||
* @throws TsqException if there is a problem in creating the ITsq object | ||
*/ | ||
public ITsq createQueue(@NotNull String queueName, boolean isRecoverable) throws TsqException; | ||
|
||
/** | ||
* Create a new ITsq object without recoverable status. Default recoverable status is NonRecoverable | ||
* @param queueName TSQ name | ||
* @return ITsq object. The existence of the ITsq object does not have any correlation to whether | ||
* the queue actually exists underneath it. It is used to access or create the ITsq. | ||
* @throws TsqException if there is a problem in creating the ITsq object | ||
Anuprakash-Moothedath marked this conversation as resolved.
Show resolved
Hide resolved
|
||
*/ | ||
public ITsq createQueue(@NotNull String queueName) throws TsqException; | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright contributors to the Galasa project | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package dev.galasa.cicsts; | ||
|
||
/* | ||
* TsqException happens for errors in the TSQ manager methods. | ||
*/ | ||
public class TsqException extends TsqManagerException { | ||
Anuprakash-Moothedath marked this conversation as resolved.
Show resolved
Hide resolved
|
||
private static final long serialVersionUID = 1L; | ||
|
||
public TsqException() { | ||
} | ||
|
||
public TsqException(String message) { | ||
super(message); | ||
} | ||
|
||
public TsqException(Throwable cause) { | ||
super(cause); | ||
} | ||
|
||
public TsqException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public TsqException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { | ||
super(message, cause, enableSuppression, writableStackTrace); | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright contributors to the Galasa project | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package dev.galasa.cicsts; | ||
|
||
/* | ||
* TsqManagerException happens for errors in TSQ manager provisioning | ||
*/ | ||
public class TsqManagerException extends CicstsManagerException { | ||
private static final long serialVersionUID = 1L; | ||
|
||
public TsqManagerException() { | ||
} | ||
|
||
public TsqManagerException(String message) { | ||
super(message); | ||
} | ||
|
||
public TsqManagerException(Throwable cause) { | ||
super(cause); | ||
} | ||
|
||
public TsqManagerException(String message, Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
public TsqManagerException(String message, Throwable cause, boolean enableSuppression, | ||
boolean writableStackTrace) { | ||
super(message, cause, enableSuppression, writableStackTrace); | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright contributors to the Galasa project | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package dev.galasa.cicsts.spi; | ||
|
||
import javax.validation.constraints.NotNull; | ||
|
||
import dev.galasa.cicsts.ITsqFactory; | ||
import dev.galasa.cicsts.TsqManagerException; | ||
import dev.galasa.cicsts.ICicsRegion; | ||
|
||
/** | ||
* Provides CICS Region related TSQ objects | ||
* | ||
*/ | ||
public interface ITsqProvider { | ||
|
||
/** | ||
* Returns a unique instance of the ITsqFactory per CICS region | ||
* | ||
* @param cicsRegion | ||
* @param cicstsManager | ||
* @return ITsqFactory object for this CICS region, will have a different instance for different regions | ||
* @throws TsqManagerException if getTsqFactory() fails | ||
*/ | ||
@NotNull | ||
ITsqFactory getTsqFactory(ICicsRegion cicsRegion, ICicstsManagerSpi cicstsManager) throws TsqManagerException; | ||
|
||
techcobweb marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-snapshot: ${tstamp} | ||
Bundle-Name: Galasa TSQ Manager IVTs | ||
Export-Package: dev.galasa.cicsts.tsq.manager.ivt | ||
Import-Package: !javax.validation.constraints, \ | ||
* |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
plugins { | ||
id 'galasa.manager.ivt' | ||
} | ||
|
||
description = 'Galasa TSQ Manager IVTs' | ||
|
||
version = '0.1.0' | ||
|
||
dependencies { | ||
implementation project (':galasa-managers-core-parent:dev.galasa.core.manager') | ||
implementation project (':galasa-managers-cicsts-parent:dev.galasa.cicsts.tsq.manager') | ||
implementation project (':galasa-managers-zos-parent:dev.galasa.zos3270.manager') | ||
} | ||
|
||
|
||
// Note: These values are consumed by the parent build process | ||
// They indicate which packages of functionality this OSGi bundle should be delivered inside, | ||
// or referenced from. | ||
// The settings here are gathered together by the build process to create a release.yaml file | ||
// which gathers-up all the packaging metadata about all the OSGi bundles in this component. | ||
ext.projectName=project.name | ||
ext.includeInOBR = true | ||
ext.includeInMVP = true | ||
ext.includeInBOM = true | ||
ext.includeInIsolated = true | ||
ext.includeInCodeCoverage = false | ||
ext.includeInJavadoc = false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be true for javadoc if these APIs are to appear on the javadoc site. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @techcobweb , Is this required for IVTs? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
rootProject.name = 'dev.galasa.cicsts.tsq.manager.ivt' | ||
|
Uh oh!
There was an error while loading. Please reload this page.