Class Sdk
java.lang.Object
net.spreadsheetspace.sdk.Sdk
SpreadSheetSpace Software Development Kit class.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionConstructor of SpreadSheetSpace Sdk.Constructor of SpreadSheetSpace Sdk.Sdk(String orchestratorServer, String token, Sdk.TokenType type) Constructor of SpreadSheetSpace Sdk. -
Method Summary
Modifier and TypeMethodDescriptionaddRecipients(String id, String view_server, LinkedList<String> listRecipient) Add recipient(s) to existing view.voidThis method destroy Sdk notification thread.createPrivateCoedit(String description, Set<String> recipients, String[][] table, String excelTemplate, boolean isTable, boolean hasHeaders, Integer rows, Integer cols, boolean encrypt, boolean tagged) Create a SpreadSheetSpace Coedit and send it to a specific set of recipients.createPrivateCoedit(String description, Set<String> recipients, String[][] table, String excelTemplate, boolean isTable, boolean hasHeaders, Integer rows, Integer cols, boolean encrypt, boolean tagged, Timestamp ts) Create a SpreadSheetSpace Coedit and send it to a specific set of recipients.createPrivateForm(String description, String recipient, String[][] table, String excelTemplate, boolean isTable, boolean hasHeaders, Integer rows, Integer cols, boolean encrypt, boolean tagged) Create a SpreadSheetSpace Form and send it to a specific recipient.createPrivateForm(String description, String recipient, String[][] table, String excelTemplate, boolean isTable, boolean hasHeaders, Integer rows, Integer cols, boolean encrypt, boolean tagged, Timestamp ts) Create a SpreadSheetSpace Form and send it to a specific recipient.createPrivateView(String description, Set<String> recipients, String[][] table, String excelTemplate, boolean isTable, boolean hasHeaders, Integer rows, Integer cols, boolean encrypt, boolean tagged) Create a SpreadSheetSpace View and send it to a specific set of recipients.createPrivateView(String description, Set<String> recipients, String[][] table, String excelTemplate, boolean isTable, boolean hasHeaders, Integer rows, Integer cols, boolean encrypt, boolean tagged, Timestamp ts) Create a SpreadSheetSpace View and send it to a specific set of recipients.createPublicView(String description, String[][] table, String excelTemplate, boolean isTable, boolean hasHeaders, Integer rows, Integer cols, boolean tagged) Create a SpreadSheetSpace View on the T-Space.createPublicView(String description, String[][] table, String excelTemplate, boolean isTable, boolean hasHeaders, Integer rows, Integer cols, boolean tagged, Timestamp ts) Create a SpreadSheetSpace View on the T-Space.deleteHisotryViews(ViewObj view) deleteHistoryView(String viewId, String viewServer) Delete the history of a view on SpreadSheetSpace.deleteView(String viewId, String viewServer) Delete an owned view on SpreadSheetSpace.deleteViews(List<ViewObj> listView) Delete owned views on SpreadSheetSpace.Generate your personal public and private keys.Retrieve my addressbook list.protected StringRetrieve my inbox views list.Retrieve my owned views list.getValuesView(String view_id, String view_server, String private_key, String excelTemplate) Retrieve values from view.protected ViewServerpublishPublicView(String id, String view_server, String comment) Publish on T-Space of an existing Public View.removeRecipients(String id, String view_server, LinkedList<String> listRecipient) Remove recipient(s) to existing view.voidsubscribeNotificationView(String id, String viewServer, NotificationCallback notificationCallback) Subscription to perform a callback function when you receive an update notification of a specific view.voidsubscribeNotificationView(UserView userView, NotificationCallback notificationCallback) Subscription to perform a callback function when you receive an update notification of a specific view.voidsubscribeNotificationView(ViewDescriptor viewDescriptor, NotificationCallback notificationCallback) Subscription to perform a callback function when you receive an update notification of a specific view.voidunsubscribeNotificationView(String viewId, String viewServer) Deletes a subscription previously created to receive an update of a specific view.voidunsubscribeNotificationView(UserView userView) Deletes a subscription previously created to receive an update of a specific view.voidunsubscribeNotificationView(ViewDescriptor viewDescriptor) Deletes a subscription previously created to receive an update of a specific view.updateView(ViewDescriptor viewDescriptor, String[][] table, String excelTemplate, boolean encrypt, boolean tagged) Update the data and the template of an existing SpreadSheetSpace View.updateView(ViewDescriptor viewDescriptor, String[][] table, String excelTemplate, boolean encrypt, boolean tagged, boolean forceLock) Update the data and the template of an existing SpreadSheetSpace View.updateView(ViewDescriptor viewDescriptor, String[][] table, String excelTemplate, boolean encrypt, boolean tagged, Timestamp ts) Update the data and the template of an existing SpreadSheetSpace View.updateView(ViewDescriptor viewDescriptor, String[][] table, String excelTemplate, boolean encrypt, boolean tagged, Timestamp ts, boolean forceLock) Update the data and the template of an existing SpreadSheetSpace View.
-
Constructor Details
-
Sdk
Constructor of SpreadSheetSpace Sdk. Call it for initialize the sdk. You can verify the result in the State of Sdk. See the documentation of "State" for more details.- Parameters:
orchestratorServer- Server address of SpreadSheetSpace infrastructure (e.g. "https://www.spreadsheetspace.net")username- The username that will be used to authenticate on the SpreadSheetSpace server.password- The password that will be used to authenticate on the SpreadSheetSpace server.- Throws:
Exception
-
Sdk
Constructor of SpreadSheetSpace Sdk. Call it for initialize the sdk. You can verify the result in the State of Sdk. See the documentation of "State" for more details.- Parameters:
orchestratorServer- Server address of SpreadSheetSpace infrastructure (e.g. "https://www.spreadsheetspace.net")token- The token that will be used to authenticate the user on the SpreadSheetSpace server.- Throws:
Exception
-
Sdk
Constructor of SpreadSheetSpace Sdk. Call it for initialize the sdk. You can verify the result in the State of Sdk. See the documentation of "State" for more details.- Parameters:
orchestratorServer- Server address of SpreadSheetSpace infrastructure (e.g. "https://www.spreadsheetspace.net")token- The token that will be used to authenticate the user on the SpreadSheetSpace server.type- The type of token (APP_TOKEN or BEARER_JWT).- Throws:
Exception
-
-
Method Details
-
contextDestroyed
public void contextDestroyed()This method destroy Sdk notification thread. Call this method if you used any subscribeNotificationView. -
getViewServer
-
getHistoryServer
-
publishPublicView
Publish on T-Space of an existing Public View. See the documentation of "createPublicView" to know how to create a public View.- Parameters:
id- This string represents the View identifier.view_server- This string represents the server address where the View is stored.comment- This string represents a detailed description of the View. This description is shows as a comment on T-Space.- Returns:
- Return a descriptor of the created View. See the documentation of "ViewDescriptor" for more details.
-
createPublicView
public ViewDescriptor createPublicView(String description, String[][] table, String excelTemplate, boolean isTable, boolean hasHeaders, Integer rows, Integer cols, boolean tagged, Timestamp ts) throws FileNotFoundException, IOException Create a SpreadSheetSpace View on the T-Space. This View is hidden, you have to "Publish" it to make it visible. See the documentation of "publishPublicView" for more details.- Parameters:
description- The description of the View.table- A matrix that represents the values of the View cells.excelTemplate- The path to the Excel file that will be used as a template. Set it "null" if you want to create a View without template.isTable- Set it "true" if you want to create a View with Excel table.hasHeaders- If "isTable" is "true" set it true if the first line of your data rappresent the header of your Excel table.rows- rows represent the number of rows of your View. If rows equals "-1" and cols equals "-1" the View is full-sheet.cols- cols represent the number of columns of your View. If rows equals "-1" and cols equals "-1" the View is full-sheet.tagged- set it "true" if you want to create a history version of your View.ts- set it if you want to set a specific timestamp to your View.- Returns:
- Return a descriptor of the created View. See the documentation of "ViewDescriptor" for more details.
- Throws:
FileNotFoundExceptionIOException
-
createPublicView
public ViewDescriptor createPublicView(String description, String[][] table, String excelTemplate, boolean isTable, boolean hasHeaders, Integer rows, Integer cols, boolean tagged) throws FileNotFoundException, IOException Create a SpreadSheetSpace View on the T-Space. This View is hidden, you have to "Publish" it to make it visible. See the documentation of "publishPublicView" for more details.- Parameters:
description- The description of the View.table- A matrix that represents the values of the View cells.excelTemplate- The path to the Excel file that will be used as a template. Set it "null" if you want to create a View without template.isTable- Set it "true" if you want to create a View with Excel table.hasHeaders- If "isTable" is "true" set it true if the first line of your data rappresent the header of your Excel table.rows- rows represent the number of rows of your View. If rows equals "-1" and cols equals "-1" the View is full-sheet.cols- cols represent the number of columns of your View. If rows equals "-1" and cols equals "-1" the View is full-sheet.tagged- set it "true" if you want to create a history version of your View.- Returns:
- Return a descriptor of the created View. See the documentation of "ViewDescriptor" for more details.
- Throws:
FileNotFoundExceptionIOException
-
createPrivateView
public ViewDescriptor createPrivateView(String description, Set<String> recipients, String[][] table, String excelTemplate, boolean isTable, boolean hasHeaders, Integer rows, Integer cols, boolean encrypt, boolean tagged, Timestamp ts) throws IOException Create a SpreadSheetSpace View and send it to a specific set of recipients.- Parameters:
description- The description of the View.recipients- A list of mail addresses that represent the recipients of the View.table- A matrix that represents the values of the View cells.excelTemplate- The path to the Excel file that will be used as a template. Set it "null" if you want to create a View without template.isTable- Set it "true" if you want to create a View with Excel table.hasHeaders- If "isTable" is "true" set it true if the first line of your data rappresent the header of your Excel table.rows- rows represent the number of rows of your View.cols- cols represent the number of columns of your View.encrypt- set it "true" if you want to encrypt your View.tagged- set it "true" if you want to create a history version of your View.ts- set it if you want to set a specific timestamp to your View.- Returns:
- Return a descriptor of the created View. See the documentation of "ViewDescriptor" for more details.
- Throws:
FileNotFoundExceptionIOException
-
createPrivateView
public ViewDescriptor createPrivateView(String description, Set<String> recipients, String[][] table, String excelTemplate, boolean isTable, boolean hasHeaders, Integer rows, Integer cols, boolean encrypt, boolean tagged) throws IOException Create a SpreadSheetSpace View and send it to a specific set of recipients.- Parameters:
description- The description of the View.recipients- A list of mail addresses that represent the recipients of the View.table- A matrix that represents the values of the View cells.excelTemplate- The path to the Excel file that will be used as a template. Set it "null" if you want to create a View without template.isTable- Set it "true" if you want to create a View with Excel table.hasHeaders- If "isTable" is "true" set it true if the first line of your data rappresent the header of your Excel table.rows- rows represent the number of rows of your View.cols- cols represent the number of columns of your View.encrypt- set it "true" if you want to encrypt your View.tagged- set it "true" if you want to create a history version of your View.- Returns:
- Return a descriptor of the created View. See the documentation of "ViewDescriptor" for more details.
- Throws:
FileNotFoundExceptionIOException
-
createPrivateForm
public ViewDescriptor createPrivateForm(String description, String recipient, String[][] table, String excelTemplate, boolean isTable, boolean hasHeaders, Integer rows, Integer cols, boolean encrypt, boolean tagged, Timestamp ts) throws IOException Create a SpreadSheetSpace Form and send it to a specific recipient.- Parameters:
description- The description of the Form.recipient- A mail addresses that represent the recipient of the Form.table- A matrix that represents the values of the Form cells.excelTemplate- The path to the Excel file that will be used as a template. Set it "null" if you want to create a Form without template.isTable- Set it "true" if you want to create a Form with Excel table.hasHeaders- If "isTable" is "true" set it true if the first line of your data rappresent the header of your Excel table.rows- rows represent the number of rows of your Form.cols- cols represent the number of columns of your Form.encrypt- set it "true" if you want to encrypt this elementtagged- set it "true" if you want to create a history version of your View.ts- set it if you want to set a specific timestamp to your View.- Returns:
- Return a descriptor of the created Form. See the documentation of "ViewDescriptor" for more details.
- Throws:
FileNotFoundExceptionIOException
-
createPrivateForm
public ViewDescriptor createPrivateForm(String description, String recipient, String[][] table, String excelTemplate, boolean isTable, boolean hasHeaders, Integer rows, Integer cols, boolean encrypt, boolean tagged) throws IOException Create a SpreadSheetSpace Form and send it to a specific recipient.- Parameters:
description- The description of the Form.recipient- A mail addresses that represent the recipient of the Form.table- A matrix that represents the values of the Form cells.excelTemplate- The path to the Excel file that will be used as a template. Set it "null" if you want to create a Form without template.isTable- Set it "true" if you want to create a Form with Excel table.hasHeaders- If "isTable" is "true" set it true if the first line of your data rappresent the header of your Excel table.rows- rows represent the number of rows of your Form.cols- cols represent the number of columns of your Form.encrypt- set it "true" if you want to encrypt this elementtagged- set it "true" if you want to create a history version of your View.- Returns:
- Return a descriptor of the created Form. See the documentation of "ViewDescriptor" for more details.
- Throws:
FileNotFoundExceptionIOException
-
createPrivateCoedit
public ViewDescriptor createPrivateCoedit(String description, Set<String> recipients, String[][] table, String excelTemplate, boolean isTable, boolean hasHeaders, Integer rows, Integer cols, boolean encrypt, boolean tagged) throws IOException Create a SpreadSheetSpace Coedit and send it to a specific set of recipients.- Parameters:
description- The description of the View.recipients- A list of mail addresses that represent the recipients of the Coedit.table- A matrix that represents the values of the View cells.excelTemplate- The path to the Excel file that will be used as a template. Set it "null" if you want to create a Coedit without template.isTable- Set it "true" if you want to create a View with Excel table.hasHeaders- If "isTable" is "true" set it true if the first line of your data rappresent the header of your Excel table.rows- rows represent the number of rows of your Coedit.cols- cols represent the number of columns of your Coedit.encrypt- set it "true" if you want to encrypt your Coedit.tagged- set it "true" if you want to create a history version of your Coedit.- Returns:
- Return a descriptor of the created Coedit. See the documentation of "ViewDescriptor" for more details.
- Throws:
FileNotFoundExceptionIOException
-
createPrivateCoedit
public ViewDescriptor createPrivateCoedit(String description, Set<String> recipients, String[][] table, String excelTemplate, boolean isTable, boolean hasHeaders, Integer rows, Integer cols, boolean encrypt, boolean tagged, Timestamp ts) throws IOException Create a SpreadSheetSpace Coedit and send it to a specific set of recipients.- Parameters:
description- The description of the View.recipients- A list of mail addresses that represent the recipients of the Coedit.table- A matrix that represents the values of the View cells.excelTemplate- The path to the Excel file that will be used as a template. Set it "null" if you want to create a Coedit without template.isTable- Set it "true" if you want to create a View with Excel table.hasHeaders- If "isTable" is "true" set it true if the first line of your data rappresent the header of your Excel table.rows- rows represent the number of rows of your Coedit.cols- cols represent the number of columns of your Coedit.encrypt- set it "true" if you want to encrypt your Coedit.tagged- set it "true" if you want to create a history version of your Coedit.ts- set it if you want to set a specific timestamp to your View.- Returns:
- Return a descriptor of the created Coedit. See the documentation of "ViewDescriptor" for more details.
- Throws:
FileNotFoundExceptionIOException
-
updateView
public ViewDescriptor updateView(ViewDescriptor viewDescriptor, String[][] table, String excelTemplate, boolean encrypt, boolean tagged, Timestamp ts) Update the data and the template of an existing SpreadSheetSpace View. See the documentation of "createPrivateView" to know how to create a View.- Parameters:
viewDescriptor- A descriptor of the View that that you want to update. See the documentation of "ViewDescriptor" for more details.table- A matrix that represents the values of the View cells.excelTemplate- The path to the Excel file that will be used as a template. Set it "null" if you don't want to update the View template.encrypt- set it "true" if you want to encrypt your View.tagged- set it "true" if you want to create a history version of your View.ts- set it if you want to set a specific timestamp to your View.- Returns:
- Return a descriptor of the updated View. See the documentation of "ViewDescriptor" for more details.
-
updateView
public ViewDescriptor updateView(ViewDescriptor viewDescriptor, String[][] table, String excelTemplate, boolean encrypt, boolean tagged) Update the data and the template of an existing SpreadSheetSpace View. See the documentation of "createPrivateView" to know how to create a View.- Parameters:
viewDescriptor- A descriptor of the View that that you want to update. See the documentation of "ViewDescriptor" for more details.table- A matrix that represents the values of the View cells.excelTemplate- The path to the Excel file that will be used as a template. Set it "null" if you don't want to update the View template.encrypt- set it "true" if you want to encrypt your View.tagged- set it "true" if you want to create a history version of your View.- Returns:
- Return a descriptor of the updated View. See the documentation of "ViewDescriptor" for more details.
-
updateView
public ViewDescriptor updateView(ViewDescriptor viewDescriptor, String[][] table, String excelTemplate, boolean encrypt, boolean tagged, Timestamp ts, boolean forceLock) Update the data and the template of an existing SpreadSheetSpace View. See the documentation of "createPrivateView" to know how to create a View.- Parameters:
viewDescriptor- A descriptor of the View that that you want to update. See the documentation of "ViewDescriptor" for more details.table- A matrix that represents the values of the View cells.excelTemplate- The path to the Excel file that will be used as a template. Set it "null" if you don't want to update the View template.encrypt- set it "true" if you want to encrypt your View.tagged- set it "true" if you want to create a history version of your View.ts- set it if you want to set a specific timestamp to your View.forceLock- set it "true" id you want to force lock in your coedit- Returns:
- Return a descriptor of the updated View. See the documentation of "ViewDescriptor" for more details.
-
updateView
public ViewDescriptor updateView(ViewDescriptor viewDescriptor, String[][] table, String excelTemplate, boolean encrypt, boolean tagged, boolean forceLock) Update the data and the template of an existing SpreadSheetSpace View. See the documentation of "createPrivateView" to know how to create a View.- Parameters:
viewDescriptor- A descriptor of the View that that you want to update. See the documentation of "ViewDescriptor" for more details.table- A matrix that represents the values of the View cells.excelTemplate- The path to the Excel file that will be used as a template. Set it "null" if you don't want to update the View template.encrypt- set it "true" if you want to encrypt your View.tagged- set it "true" if you want to create a history version of your View.forceLock- set it "true" id you want to force lock in your coedit- Returns:
- Return a descriptor of the updated View. See the documentation of "ViewDescriptor" for more details.
-
deleteView
Delete an owned view on SpreadSheetSpace.- Parameters:
viewId- This string represents the View identifier.viewServer- This string represents the server address where the View is stored.- Returns:
- Return a descriptor of the deleted View. See the documentation of "ViewDescriptor" for more details.
-
deleteHistoryView
Delete the history of a view on SpreadSheetSpace.- Parameters:
viewId- This string represents the View identifier.viewServer- This string represents the server address where the View is stored.- Returns:
- Return a descriptor of the deleted history View. See the documentation of "ViewDescriptor" for more details.
-
deleteViews
Delete owned views on SpreadSheetSpace.- Parameters:
listView- This list represents a list of Views to delete.- Returns:
- Return a descriptor of the deleted View. See the documentation of "ViewDescriptor" for more details.
-
deleteHisotryViews
-
getAddressBook
Retrieve my addressbook list.- Returns:
- Return a descriptor of Addressbook list. See the documentation of "AddressbookDescriptor" for more details.
-
getOwnedView
Retrieve my owned views list.- Returns:
- Return a descriptor of UserView list. See the documentation of "ListViewDescriptor" for more details.
-
getInboxView
Retrieve my inbox views list.- Returns:
- Return a descriptor of UserView list. See the documentation of "ListViewDescriptor" for more details.
-
generateKey
Generate your personal public and private keys.- Returns:
- Return a descriptor of your keys. See the documentation of "GenerateKeyDescriptor" for more details.
-
getValuesView
public ValuesViewDescriptor getValuesView(String view_id, String view_server, String private_key, String excelTemplate) Retrieve values from view.- Parameters:
view_id- This string represents the View identifier.view_server- This string represents the server address where the View is stored.private_key- This string represents your private key.excelTemplate- The path in where to store the View Excel template file. Set it "null" if you don't want to retrieve the View template.- Returns:
- Return a descriptor of view's values. See the documentation of "ValuesViewDescriptor" for more details.
-
addRecipients
public ChangeRecipientDescriptor addRecipients(String id, String view_server, LinkedList<String> listRecipient) Add recipient(s) to existing view.- Parameters:
id- This string represents the View identifier.view_server- This string represents the server address where the View is stored.listRecipient- Recipient mail list to added.- Returns:
- Return a descriptor of addRecipients. See the documentation of "ChangeRecipientDescriptor" for more details.
-
removeRecipients
public ChangeRecipientDescriptor removeRecipients(String id, String view_server, LinkedList<String> listRecipient) Remove recipient(s) to existing view.- Parameters:
id- This string represents the View identifier.view_server- This string represents the server address where the View is storedlistRecipient- Recipient mail list to remove.- Returns:
- Return a descriptor of removeRecipients. See the documentation of "ChangeRecipientDescriptor" for more details.
-
subscribeNotificationView
public void subscribeNotificationView(ViewDescriptor viewDescriptor, NotificationCallback notificationCallback) Subscription to perform a callback function when you receive an update notification of a specific view.- Parameters:
viewDescriptor- This object represents a descriptor of an existing View. See the documentation of "ViewDescriptor" for more details.notificationCallback- This object represent a callback routines
-
subscribeNotificationView
Subscription to perform a callback function when you receive an update notification of a specific view.- Parameters:
userView- This object represents a descriptor of an existing View. See the documentation of "UserView" for more details.notificationCallback-
-
subscribeNotificationView
public void subscribeNotificationView(String id, String viewServer, NotificationCallback notificationCallback) Subscription to perform a callback function when you receive an update notification of a specific view.- Parameters:
id- This string represents the View identifier.viewServer- This string represents the server address where the View is storednotificationCallback-
-
unsubscribeNotificationView
Deletes a subscription previously created to receive an update of a specific view.- Parameters:
viewDescriptor- This object represents a descriptor of an existing View. See the documentation of "ViewDescriptor" for more details.
-
unsubscribeNotificationView
Deletes a subscription previously created to receive an update of a specific view.- Parameters:
userView- This object represents a descriptor of an existing View. See the documentation of "UserView" for more details.
-
unsubscribeNotificationView
Deletes a subscription previously created to receive an update of a specific view.- Parameters:
viewId- This string represents the View identifier.viewServer- This string represents the server address where the View is stored
-