Disclaimer
Overview
Sophora 6 introduces a new internal API based on gRPC, bringing significant architectural changes. As a result:
- Some existing methods are no longer supported due to technical or security-related reasons.
- New methods and features have been added.
- Others have been renamed or restructured for clarity.
These changes mainly affect the deprecated internal API, the IContentManager
. Since the public ISophoraClient
API provides access to IContentManager
in earlier versions, some of your existing scripts or applications may also be impacted.
ISophoraClient
or (in scripts) other relevant interfaces.Transition Notes
- Compatibility mode: In Sophora 6, the server still supports
ContentManager
for V5 Sophora Clients and Server-side scripts. However, you should stop using any deprecated methods listed below. - JavaDoc is your friend: Always check the JavaDoc for annotations. Avoid using deprecated methods—they won’t be around for long.
Notable changes in IContentManager
IContentManager
is no longer available in Sophora Client V6. These notes may still be useful for server-executed scripts:
Method | Status | Notes |
---|---|---|
solrRawQuery | Removed | Use IQuery or SoQL for searches |
Changes in ISophoraClient
Method | Status | Notes |
---|---|---|
findDocuments(String soqlString) | New | Search documents using SoQL |
findDocumentIds(String soqlString) | New | Query document IDs using SoQL |
isReadAnywhereActive | New | Indicates if ReadAnywhere mode is active |
getAvailableReadAnywhereReplicas | New | Lists ReadAnywhere replicas |
requestDocumentLock, grantLock, rejectLockRequest | New | Useful for coordinated editing |
getSelectValuesFromDefaultPropertyConfiguration | New | Returns the calculated SelectValues to a default property configuration. Until now, it was only possible to get the SelectValues for a specific property and node type combination. |
withTimeoutAfter(Duration) | New | This method can be used to create a time-boxed facade over the existing client, where all requests adhere to the given timeout and throw an exception if it is exceeded. By default, a client has no timeout. You can use this method either for a single API call or store the created facade in a variable to make multiple requests with the same timeout. In any case, it is always the same client. Example: client.withTimeoutAfter(Duration.ofSeconds(2)).getDocumentBySophoraId("home100"); |
saveSophoraDocument | Changed | The preserveHistory flag has been removed / has no effect anymore. |
getContentManager | Removed | Use only ISophoraClient methods |
publishToExternalService | Removed | Use the new HttpClient in scripts |
getTags | Removed | This was from an older system; not related to the Taxo API |
getDocumentVersionsByUuid | Removed | Removed for performance reasons. Alternatives are available |
isApiMatching | Removed | Internal use only. Listed for completeness |
sendDataToUrl, getDataFromUrl | Removed | Use HttpClient directly |
getCompressedDictionary, saveDictionary(String name, byte[] wordsData) | Removed | Only used internally. Listed for completeness |
getCndHashEntries, getDocumentProposalSectionHashEntries, getStructureNodeDocumentHashEntries, getSystemDocumentHashEntries | Removed | Now available via Sophora Server HTTP endpoints |
sendServerEvent, getServerEvents | Removed | Internal use only. Listed for completeness. |
reconnectOnNonMatchingAPI | Removed | The reconnection logic has changed |
isReadAnywhereMode | Removed | Use isReadAnywhereActive() instead |
getAvailableReadOnlyContentManagers | Removed | Use getAvailableReadAnywhereReplicas() instead |
reconnectTo, getProtocol, getConnectionBarrier | Removed | Listed for completeness |
Other notable changes
DeskClientSettings
,ImageVariant
,SelectValues
, andChannel
now return document IDs in a new wrapper object.UserChangedEvent
now return just the username instead of the full user object.IUserListener
method now receives just the username instead of a full user object.SophoraClientFactory
has been removed. UseSophoraClientBuilder
instead.- Proxy settings have been removed from
SophoraClientBuilder
. Use JVM proxy properties. - Use
withNetworkConnectionData
instead ofwithAuthorizationHeaderSupplier
inSophoraClientBuilder
. - The Cluster feature for Sophora Staging Servers has been removed (still available for Sophora Primary Servers.)
- Binary data is now transferred in chunks, reducing HTTP message size. Binary data is stored separately and linked via references.Scripts must work with
BinaryReferenceValues
and manually resolve the data.
The following methods have been removed from IValidationScriptDocumentManager
:
findDocumentUuids(String xPathQuery, int pageIndex, int pageSize)
getDocumentVersionsByUuid(UUID uuid, int count, TimeRange timeRange)
getDocumentFromVersion(UUID versionUuid)
Known incompatibilities (V5 → V6)
- XPath queries are no longer supported in Sophora Server V6. Use
IQuery
or SoQL. - Lock requests for documents by editors or tools can only be made between V5 Clients or among V6 Clients. This affects features like the “Polite Import,” and also applies in mixed environments where both V5 and V6 Sophora Clients are used.
Changed behavior: Connection losses
In Sophora 6, if the Client loses the connection to the Primary Server (or a Staging Server):
It will retry the connection a fixed number of times based on:
connectRetries
connectRetryIntervalInSeconds
If a client is unable to reconnect to a server, it switches into an broken state. Methods on the client will then respond with the new ConnectionLostInTheVoid
exception. If a client user receives this exception, you'll need to recover it manually or with custom logic.
Changed behavior: Unauthenticated calls
Also new is the client’s behavior before login and after logout:
- If the client makes a request to the server without being logged in, a
SophoraClientAwaitingLoginException
is thrown. There are some methods for which no authentication is required, such as login or logout. - If the client makes a request to the server after logging out, it will always be terminated with a
SophoraClientAlreadyDisposedException
.
Both exceptions inherit from ClientStateException
, which in turn inherits from SophoraException
.
Additional API server
The new gRPC based API is hosted on a separate port (default 2026). This may require additional configuration during the upgrade (e.g. reverse proxies, configuration files of client tools connecting via the new API etc.).
Property | Default | Description |
---|---|---|
sophora.remote.api.grpc.enabled | true | Disables or enables the gRPC endpoint. |
sophora.remote.api.grpc.port | 2026 | Additional server port for gRPC. |
sophora.remote.api.grpc.debug | false | Disables or enables grpc debug mode. |
sophora.remote.api.grpc.external.protocol | External grpc protocol. Typically used in Kubernetes environments. | |
sophora.remote.api.grpc.external.hostname | External grpc hostname. Typically used in Kubernetes environments. | |
sophora.remote.api.grpc.external.port | External grpc port. Typically used in Kubernetes environments. |