Releases: watson-developer-cloud/java-sdk
java-sdk-8.0.0-rc1
Breaking changes
There are some small breaking changes present, like some methods dropping a parameter or two or some parameters being renamed, but below are the big changes throughout the SDK.
Authentication methods
Authentication methods have changed to make things more extensible for the future. There are 5 authentication variants supplied in the SDK (shown below), and it's possible now to create your own authentication implementation if you need something specific by implementing the Authenticator implementation.
Basic
You can authenticate with basic auth using the BasicAuthenticator. This allows you to pass in a username and password.
Authenticator authenticator = new BasicAuthenticator("<username>", "<password>");Bearer token
Use the BearerTokenAuthenticator. This one accepts just the bearer token.
Authenticator authenticator = new BearerTokenAuthenticator("<bearer_token>");Cloud Pak for Data
This class helps you authenticate with your services on (Cloud Pak for Data)[https://www.ibm.com/analytics/cloud-pak-for-data).
// constructor with required parameters
Authenticator authenticator = new CloudPakForDataAuthenticator(
"<url>",
"<test_username>",
"<test_password>"
);There's also another constructor to disable SSL verification or send request headers on the token exchange.
IAM
Like the CloudPakForDataAuthenticator, there's a basic constructor
Authenticator authenticator = new IamAuthenticator("<token>");and another one to supply additional arguments like a particular token exchange URL, a client ID and secret, and the same options to disable SSL verification and send headers.
None
Finally, there's the NoAuthAuthenticator, which is pretty self-explanatory. Pass this when you don't need any authentication to happen.
Assistant service = new Assistant("2019-02-28", new NoAuthAuthenticator());More model builders
If you've used the SDK before, you're probably familiar with the use of the builder pattern across the board. With this release, we've tweaked the generation process to capture better which are models that are being constructed to be sent to the service. These are models we'd prefer to have builders, making it easier to put them together.
There are unfortunately a decent number of models which move to this pattern, but it's one we expect to use well into the future.
Features
Better control over HTTP logging
Logging used to be controlled with a .properties file somewhere in the namespace, but it was confusing to many people. We also didn't leave an option to shut them off!
We've added control over this to the existing HttpConfigOptions class. Information on usage can be found here.
Ability to cancel an API call
It's possible that in your code, you may want to cancel an API call you made. Some reasons for this might be requests exceeding some response time threshold or sending multiple async requests and just wanting to keep the fastest one, canceling the rest.
Regardless, this feature has been added for this release. You can see more information here.
java-sdk-7.4.0
java-sdk-7.3.1
java-sdk-7.3.0
7.3.0 (2019-07-25)
Bug Fixes
- Compare and Comply: Add correct getter for contract types and additional props (f16dfd9)
Features
- Assistant v2: Add search skill support (3a4ceb8)
- Compare and Comply: Add Contexts and TableTitle models (b2da66d)
- Compare and Comply: Add ContractTerms, ContractTypes, Interpretation, and PaymentTerms models (b72aa8f)
- Compare and Comply: Add Mention model (b3675fd)
- Compare and Comply: Add new constant values (d534fc2)
- Compare and Comply: Add Paragraphs model (be85232)
- Compare and Comply: Add text and provenance ID info to various models (133db0e)
- Natural Language Understanding: Add confidence prop to EntitiesResult and EntityMention (4bf11b8)
- Speech to Text: Add updated prop to AcousticModel and LanguageModel (b6dc3ac)
java-sdk-7.2.0
java-sdk-7.1.1
java-sdk-7.1.0
7.1.0 (2019-06-07)
Bug Fixes
- Discovery: Fix response model nesting of Collection to match API response (84cc23f)
- Discovery: Fix typo in constant string name (NTML_V1 -> NTLM_V1) (0e6e7f2)
Features
- Assistant v1: Add intents and entities props to DialogNodeOutputOptionsElementValue (0d9102e)
- Assistant v2: Add builder to DialogRuntimeResponseGeneric (d80d28d)
- Assistant v2: Add MessageContextSkill model (4b0afb3)
- Compare and Comply: Return FeedbackDeleted model from deleteFeedback method (48d07f4)
- Discovery: Add annotatedFields prop to SegmentSettings (861cfae)
- Discovery: Add blacklist prop to SourceOptionsWebCrawl (187e2f2)
- Discovery: Add constants to Fequency interface in SourceSchedule (d29ccac)
- Discovery: Add imageTextRecognition prop to Conversions (2370e83)
- Discovery: Add new constant and nextCrawl prop to SourceStatus (ee092dc)
- Discovery: Add response models for delete methods (1274e5b)
- Discovery: Add smartDocumentUnderstanding field to Collection (f200d11)
- Discovery: Add status prop to CreateCredentialsOptions (c095725)
- Discovery: Add status prop to Credentials (22d905c)
- Discovery: Add status prop to UpdateCredentialsOptions (9509f75)
- Language Translator: Add deleteDocument method (4976f12)
- Language Translator: Add getDocumentStatus method (c4d939b)
- Language Translator: Add getTranslatedDocument method (d57e263)
- Language Translator: Add listDocuments method and return model for deleteModel (dfaf664)
- Language Translator: Add translateDocument method (33a1f51)
- Natural Language Understanding: Add explanation param (806f923)
- Natural Language Understanding: Add explanation prop and related models (6c1ffec)
- Natural Language Understanding: Add response model for deleteModel (7f8772d)
- Speech to Text: Add new metrics-related models (39b9478)
- Speech to Text: Add processingMetrics and audioMetrics props to SpeechRecognitionResults (ef9bc74)
- Speech to Text: Add processingMetrics, processingMetricsInterval, and audioMetrics params to CreateJobOptions (f1da445)
- Speech to Text: Add processingMetrics, processingMetricsInterval, and audioMetrics params to RecognizeOptions (da7d4a7)
- Speech to Text: Add response model to trainLanguageModel method (ced6621)
- Speech to Text: Add strict param to TrainAcousticModelOptions (9a2fb6a)
- Speech to Text: Add strict param to TrainLanguageModelOptions (128559d)
7.0.0
7.0.0 (2019-03-28)
Breaking changes
General
- Some big things in the migration guide
- All properties of the type
Maphave been changed toMap<String, Object>
Assistant v1
Model changes
CreateCounterexamplerenamed toCounterexampleCreateDialogNoderenamed toDialogNodeCreateExamplerenamed toExampleEntityExportrenamed toEntityInputDatarenamed toMessageInputIntentExportrenamed toIntentLogExportrenamed toLogMentionsrenamed toMentionValueExportrenamed toValueWorkspaceExportrenamed toWorkspace
Property changes
DialogNodedialogNodeIdrenamed todialogNode
EntityentityNamerenamed toentity
EntityMentionexampleTextrenamed totextintentNamerenamed tointent
ExampleexampleTextrenamed totext
IntentintentNamerenamed tointent
SynonymsynonymTextrenamed tosynonym
ValuevalueTextrenamed tovalue
Other
Counterexamplegetters have been renamed (e.g.getText()->text())MessageInputis now dynamicaddValue()method inCreateEntityOptions.Builderrenamed toaddValues()
Assistant v2
Model changes
MessageContextSkillhas been deleted
Compare and Comply
Model changes
Categoryrenamed toCategoryComparisonTypeLabelrenamed toTypeLabelComparison
Property changes
AttributeADDRESSconstant removed fromTypeinterface
BodyCellsrowHeaderIdstype changed fromList<String>toList<RowHeaderIds>rowHeaderTextstype changed fromList<String>toList<RowHeaderTexts>rowHeaderTextsNormalizedtype changed fromList<String>toList<RowHeaderTextsNormalized>columnHeaderIdstype changed fromList<String>toList<ColumnHeaderIds>columnHeaderTextstype changed fromList<String>toList<ColumnHeaderTexts>columnHeaderTextsNormalizedtype changed fromList<String>toList<ColumnHeaderTextsNormalized>
ClassifyElementsOptionsmodelIdrenamed tomodelfilenamehas been deletedModelIdinterface renamed toModel
CompareDocumentsOptionsmodelIdrenamed tomodelfile1Filenamehas been deletedfile2Filenamehas been deletedModelIdinterface renamed toModel
ConvertToHtmlOptionsmodelIdrenamed tomodelModelIdinterface renamed toModel
CreateBatchOptionsmodelIdrenamed tomodelinputCredentialsFilenamehas been deletedoutputCredentialsFilenamehas been deletedModelIdinterface renamed toModel
DeleteFeedbackOptionsmodelIdrenamed tomodelModelIdinterface renamed toModel
ExtractTablesOptionsmodelIdrenamed tomodelfilenamehas been deletedModelIdinterface renamed toModel
GetFeedbackOptionsmodelIdrenamed tomodelModelIdinterface renamed toModel
UpdateBatchOptionsmodelIdrenamed tomodelModelIdinterface renamed toModel
Discovery
Model changes
QueryResultResultMetadatarenamed toQueryResultMetadata
Property changes
CreateConfigurationOptionsnameis now required
CreateExpansionsOptionsexpansionsis now required
DiskUsagepercentUsedhas been deletedtotalhas been deletedtotalByteshas been deletedusedhas been deleted
DocumentStatuscreatedhas been deletedupdatedhas been deleted
FederatedQueryOptionscollectionIdstype changed fromList<String>toStringpassagesFieldstype changed fromList<String>toStringreturnFieldstype changed fromList<String>toStringsimilarDocumentIdstype changed fromList<String>toStringsimilarFieldstype changed fromList<String>toStringsorttype changed fromList<String>toString
FieldBOOLEANconstant renamed toXBOOLEANinFieldTypeinterfaceBYTEconstant renamed toXBYTEinFieldTypeinterfaceDOUBLEconstant renamed toXDOUBLEinFieldTypeinterfaceFLOATconstant renamed toXFLOATinFieldTypeinterfaceLONGconstant renamed toXLONGinFieldTypeinterfaceSHORTconstant renamed toXSHORTinFieldTypeinterface
IndexCapacitymemoryUsagehas been deleted
QueryResultscorehas been deleted
QueryNoticesResultscorehas been deleted
QueryOptionscollectionIdstype changed fromList<String>toStringpassagesFieldstype changed fromList<String>toStringreturnFieldstype changed fromList<String>toStringsimilarDocumentIdstype changed fromList<String>toStringsimilarFieldstype changed fromList<String>toStringsorttype changed fromList<String>toString
SourceStatusCOMPLETE_WITH_NOTICESconstant removed fromStatusinterfaceSTOPPEDconstant removed fromStatusinterface
UpdateConfigurationOptionsnameis now required
Other
CreateConfigurationOptionsBuilder(String environmentId)changed toBuilder(String environmentId, String name)addEnrichments()renamed toaddEnrichment()addNormalizations()renamed toaddNormalization()
CreateExpansionsOptionsBuilder(String environmentId, String collectionId)changed toBuilder(String environmentId, String collectionId, List<Expansion> expansions)
UpdateConfigurationOptionsBuilder(String environmentId, String configurationId)changed toBuilder(String environmentId, String configurationId, String name)addEnrichments()renamed toaddEnrichment()addNormalizations()renamed toaddNormalization()
Language Translator
Property changes
CreateModelOptionsforcedGlossaryFilenamehas been deletedparallelCorpusFilenamehas been deleted
Natural Language Classifier
Property changes
CreateClassifierOptionsmetadataFilenamehas been deletedtrainingDataFilenamehas been deleted
Other
- Old versions of
classify(),createClassifier(),deleteClassifier(),getClassifier(), andgetClassifiers()without options model parameters have been removed
Natural Language Understanding
Model changes
CategoriesOptionsis no longer dynamicMetadataOptionsis no longer dynamicMetadataResultrenamed toAnalysisResultsMetadataSemanticRolesActionrenamed toSemanticRolesResultActionSemanticRolesObjectrenamed toSemanticRolesResultObjectSemanticRolesSubjectrenamed toSemanticRolesResultSubjectUsagerenamed toAnalysisResultsUsage
Other
CategoriesOptionsgetLimit()has been renamed tolimit()
Personality Insights
Other
profileAsCsv()now just accepts a singleProfileOptions profileOptionsparameter
Speech to Text
Property changes
AddCorpusOptionscorpusFilenamehas been deleted
AudioListingdurationtype changed fromDoubletoLong
AudioResourcedurationtype changed fromDoubletoLong
Other
CreateJobOptions.Builderconstructor withInputStream audioandString contentTypeparameters removedRecognizeOptions.Builderconstructor withInputStream audioandString contentTypeparameters removed
Text to Speech
Property changes
AddWordOptionstranslationis now required
AddWordsOptionswordsis now required
Visual Recognition
Property changes
ClassifyOptionsparametersproperty has been deletedimagesFilenamenow required ifimagesFileis specified
CreateClassifierOptionspositiveExamplesFilenameproperty has been deleted
DetectFacesOptionsparametersproperty has been deletedimagesFilenamenow required ifimagesFileis specified
UpdateClassifierOptionspositiveExamplesFilenameproperty has been deleted
Other
- Old API key authentication is no longer supported
CreateClassifierOptionsaddClass()method renamed toaddPositiveExamples()
UpdateClassifierOptionsaddClass()method renamed toaddPositiveExamples()
Non-breaking changes
General
- The core portion of the SDK has been moved to its own repo
- Added
reactiveRequest()execution method (see README section and migration guide)- Thanks for the suggestion @msogrin!
- Null values are returned from the APIs (#959)
com.ibm.jsse2.overrideDefaultTLSis no longer changed (#1020)- IAM authentication is done on a separate thread to play better with Android (#1041)
Assistant v1
###...
6.14.1
This is the last release for v6.x.x of the SDK 😢 If you'd like to continue getting updates, please migrate to the latest version. You can read about changes here.
Note that as part of the latest release, you'll need to target a different package in Maven/Gradle. See the new installation instructions for more information.