| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
<dependency>
<groupId>com.microfocus.adm.almoctane.sdk</groupId>
<artifactId>sdk-src</artifactId>
<version>25.4</version>
</dependency>compile group: 'com.microfocus.adm.almoctane.sdk', name: 'sdk-src', version: '25.4'A Java SDK that can be used to connect to OpenText Core Software Delivery Platform and Software Delivery Management REST API. This SDK is designed to work seamlessly with either OpenText Core Software Delivery Platform (SDP) and Software Delivery Management. For simplicity, these products will be referred to as SDP in the sections below. See the Javadoc for more information of how to use the SDK. See also the REST API documentation for more details about the SDP API.
This has multiple sub-projects:
The easiest way to compile the project is to use maven and run the command:
mvn clean install
from the root directory.
In order to create javadoc run the following maven command from the sdk-src directory:
mvn javadoc:javadoc
This will create a javadoc site in the sdk-src/target/site/apidocs directory
You can generate entities based on your server's metadata using the sdk-generate-entity-models-maven-plugin plugin. This plugin connects to your SDP server using the given authentication credentials, shared space and work space and generates strongly typed entities that can be used instead of the generic out of the box entity that comes with the SDK.
To enable this, add the following to your project's POM file (assuming 16.1.100 being the SDK version):
<build>
<plugins>
<plugin>
<groupId>com.microfocus.adm.almoctane.sdk</groupId>
<artifactId>sdk-generate-entity-models-maven-plugin</artifactId>
<version>25.4</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<clientId>client_id</clientId>
<clientSecret>client_secret</clientSecret>
<server>http[s]://server[:port]</server>
<sharedSpace>SSID</sharedSpace>
<workSpace>WSID</workSpace>
<techPreview>boolean (default false)</techPreview>
<!--
By default the plugin will generate the sources to the generated-source directory under
the target. If you wish to place this in a different place then use this parameter
-->
<!-- <generatedSourcesDirectory></generatedSourcesDirectory> -->
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<id>addGeneratedEntitiesSources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<!--
This assumes that you leave the configuration of the plugin above
to use the maven generated-sources directory as the place where the generated
sources will be
-->
<source>${project.build.directory}/generated-sources</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<!--
The sources need to be compiled using Java 8 at least. Use this if this needs to
be explicit
-->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>Alternatively you can use the maven command line command to generate. See the maven documentation for more details as to how to do this.
The generator will create three directories under the com.hpe.adm.nga.sdk package:
With the generated code. Do not edit the generated code since it will be overwritten each time you run a maven build.
See the following example for how to use the generated code:
final Octane octane = new Octane.Builder(...).build();
final WorkItemRootEntityModel workItemRootEntityModel = octane.entityList(WorkItemRootEntityList.class).at(1001).get().execute();
final EpicEntityModel rootEpic = octane.entityList(EpicEntityList.class).create().entities(Collections.singleton(
new EpicEntityModel("rootepic", workItemRootEntityModel, Phases.EpicPhase.NEW)
)).execute().iterator().next();
final FeatureEntityModel featureEntityModel = octane.entityList(FeatureEntityList.class).create().entities(Collections.singleton(
new FeatureEntityModel("feature1", Phases.FeaturePhase.NEW).setParent(rootEpic)
)).execute().iterator().next();
final DefectEntityList defectEntityList = octane.entityList(DefectEntityList.class);
final DefectEntityModel defect = defectEntityList.create().entities(Collections.singleton(
new DefectEntityModel("defect", featureEntityModel, Phases.DefectPhase.DEFERRED)
)).execute().iterator().next();
defect.setSeverity(Lists.Severity.HIGH).setDescription("this has been updated");
defectEntityList.update().entities(Collections.singleton(defect)).execute();Please note that due to the way that the SDP REST API works only a limited number of fields will be automatically retrieved from the server. Due to this the addFields method should be used to explicitly state which fields should be retrieved. You can see more information here
The SDK uses SLF4J internally for all logging. This means that the users of the library can control the logging framework used for the implementation. The easiest way is to add a maven dependency to such an implementation (slf4j-simple, log4j, logback etc.)
<dependencies>
<dependency>
<groupId>com.microfocus.adm.almoctane.sdk</groupId>
<artifactId>sdk-src</artifactId>
<version>25.4</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.25</version>
</dependency>
</dependencies>This will make the sdk use log4j as an slf4j implementation, configuring a log4j.xml in your project will also take effect on the sdk.
By various combinations of not setting the space id, or setting the space id and not the workspace id, the admin of those spaces can be accessed. See the TestSharedSpaceAdmin and TestWorkSpaceAdmin tests for examples of how these can be used.
Currently the admin sections are not available using generated entities - but the CRUD functions are available
26.3
CE 25.4
CE 25.2
CE 24.3
CE 24.1.5
CE 24.1.4
CE 24.1.3
CE 24.1.2
CE 24.1.1
CE 24.1
CE 23.4
23.3.1
23.3.0
16.1.100.3
16.1.100.2
16.1.100.1
16.1.100
16.0.400.1
16.0.400
16.0.300
15.1.60
15.1.40
15.1.20
15.0.40.1
15.0.40
15.0.20
12.60.41
12.60.21
12.55.32
12.55.8
12.55.5
See the ALM Octane documentation for more information
Certain versions of software accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. This software was acquired by Micro Focus on September 1, 2017, and is now offered by OpenText. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.
| Back | FazBrowse Home | New Git URL |