Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Within this documentation, you may find helpful information and steps that are necessary in order to connect your own storage with the help of KGS SAPALink SDKs.

...

  • Docu
    Within this folder, you may find the manual for the SAPALink SDK as well as two KGS specific manuals.

    • SAPALINK Add-On 2_10A.pdf
      Refers to extended functionalities like componentCreateCOLD as well as DocumentKeysSet
      Please note: componentCreateCOLD is deprecated and will not be supported by the OSGi-ContentServer4Storage-Version!

    • SAPALINK Query.pdf

    • SAPALINK SDK ImpRevGuide

  • Runtime
    The runtime directory contains the compiled SAPALINKTEST.exe, which you may use in order to test your implementations. It’s still recommended to use the KGS API Tester application in order to test your implementations.

    • SAPALINKTEST.DAT
      The SAPALINKTEST.DAT-file is being used as a Settings-file by the SAPALINKTEST.exe

    • SAPALINKTEST.EXE

    • Storage-profile.txt
      The storage-profile.txt-file has to point to a valid KGS Storage-configuration

  • CPlusPlus

    • JavaDMSlink.dll
      Within this directory you may find libraries and precompiled Java-classes necessary in order to load your C++ SAPALink-implementation into the KGS ContentServer4Storage.

      • DMSException.class

      • SAPALinkDLL.class

      • 32 Bit

        • JavaDMSlink.dll

      • x64

        • JavaDMSlink.dll

    • SAPALINK

      • Visual C++ Project for creating a C++-based implementation of SAPALink SDK

    • Test-Store-Implementations

      • x64

        • SAPALINK.dll
          Test implementation library compiled against 64-bit

      • x86

        • SAPALINK.dll
          Test implementation library compiled against 32-bit

      • Test-Store-Prerequisites.txt
        This file contains a hint of where to get the “VC Redistributable”-package for the corresponding test implementation.

  • Java

    • SAPALINK.JAVA

      • DMSException.java

      • SAPALink.java
        If you’re implementing your classes in Java you’ll have to implement the DMSException.java (for error handling) as well as the SAPALink.java for each required method and compile it.

  • SAPALINKTEST

    • Sources (C++) for SAPALINKTEST.exe
      In order to understand how the SAPALINKTEST.exe-application works and which methods are being provided by KGS we decided to provide you with our source-code for this testing application.

  • TestDocuments

    • Some test documents (tif,pdf)

...

Within this class file you may find the method bodies as well as some comments regarding the functions, results and parameters.

Expand
titleLinkOpen
Code Block
languagecpp
// --------------------------------------------------------------------
// Function: LinkOpen
//
// Initialize the DLL (these function will be called first ) and returns version
// info for logging ...
//
// Parameter: OUT:    bstrVendor			    -> Vendor Archiveproduct 
//			  OUT:	  bstrProductName		    -> Productname Archive
//			  OUT:	  bstrDLLVersion		    -> DLL Version String
//			  OUT:    bstrDMSVersion			-> DMS Version String
//
// Returncode: DMSRET_OK function sucessful
// --------------------------------------------------------------------
short CDMS::LinkOpen(BSTR *bstrVendor,BSTR *bstrProductName,BSTR *bstrDLLVersion, BSTR *bstrDMSVersion)
{
	short nRetCode=DMSRET_OK;
	CString csStr;

	if (bstrVendor)
	{
		csStr="VendorName .....";
		*bstrVendor=csStr.AllocSysString();
	}
	
	if (bstrProductName)
	{
		csStr="ProductName .....";
		*bstrProductName=csStr.AllocSysString();
	}

	if (bstrDMSVersion)
	{
		csStr="DMSVersion .....";
		*bstrDMSVersion=csStr.AllocSysString();
	}

	if (bstrDLLVersion)
	{
		csStr="SAPALINK.DLL Version 01.00";
		*bstrDLLVersion=csStr.AllocSysString();
	}

	m_nRefCnt++;

	return nRetCode;
}

Within this method you may define the vendor name, product name, the version of your DMS system as well as the DLL version.

A sample implementation is provided below.

Info

Please note: All four parameters need to be provided in order to get a properly initialized SAPALink implementation.

Please note also: It’s strongly recommended, that you refrain from using special characters (including UTF-8).

Expand
titleSample implementation of LinkOpen
Code Block
languagecpp
// --------------------------------------------------------------------
// Function: LinkOpen
//
// Initialize the DLL (these function will be called first ) and returns version
// info for logging ...
//
// Parameter: OUT:    bstrVendor			    -> Vendor Archiveproduct 
//			  OUT:	  bstrProductName		    -> Productname Archive
//			  OUT:	  bstrDLLVersion		    -> DLL Version String
//			  OUT:    bstrDMSVersion			-> DMS Version String
//
// Returncode: DMSRET_OK function sucessful
// --------------------------------------------------------------------

short CDMS::LinkOpen(BSTR *bstrVendor,BSTR *bstrProductName,BSTR *bstrDLLVersion, BSTR *bstrDMSVersion)
{
	//AppendCallToTextFile("LinkOpen");
	short nRetCode=DMSRET_OK;
	CString csStr;

	if (bstrVendor)
	{
		csStr="KGS Software GmbH";
		*bstrVendor=csStr.AllocSysString();
	}
	
	if (bstrProductName)
	{
		csStr="KGS-SAPALINK-Teststore";
		*bstrProductName=csStr.AllocSysString();
	}

	if (bstrDMSVersion)
	{
		csStr="1.0.0.0.1";
		*bstrDMSVersion=csStr.AllocSysString();
	}

	if (bstrDLLVersion)
	{
		csStr="KGS-SAPALINK-Teststore 1.0.0.0.1";
		*bstrDLLVersion=csStr.AllocSysString();
	}

	m_nRefCnt++;

	return nRetCode;
}

In order to test your implementation, you may compile your implementation (either against x86 resulting in 32-bit-library or against x64 which will result in a 64-bit-library depending on your OS, Java, and webserver), copy the resulting SAPALINK.dll-file to your web server as well as the files and libraries described within the next section and configure it like described.

asdf