User Guide
  • Introduction
  • Overview
    • About 4WS.Platform
      • Architecture
      • Enterprise Edition
      • Tech specs and requirements
      • Warp SDK
    • Creating a web application
  • Core features
    • Tables
    • SqlTool
    • Definition of Data models and Relations
      • Relations
      • Reverse Engineering
      • Custom Fields
    • Defining business components
      • What are business components
      • Business components to fill-in panels
      • Creating business components
        • By a datastore entity
        • By a MongoDB collection
      • Defining Custom Java Business component
    • Defining the UI
      • App Designer
        • App Designer Menu
        • Definition of additional data sources
        • Panel containers and layouts
          • Tab panel
          • Alternative panel
          • Accordion panel
          • Vertical orientation panel
          • Horizontal orientation panel
          • Columns panel
          • Table panel
          • Generic panel
          • Responsive panel
        • Window content
          • Grid Panel
          • Form Panel
          • Filter Panel
          • Tree Panel
          • Google Map Panel
          • Preview Panel (old Image panel)
          • Tree + Grid Panel
          • Image Gallery
        • Windows list
        • Panel definition
          • Columns properties
          • Controls properties
          • Filter properties
          • Supported components
        • Variables
        • Code selectors
          • When not to use a dynamic combo-box
        • Smart Filter and Advanced Filter
        • Multi Value Combobox Filter
        • Multi Value Tree Filter
        • Buttons
        • Translations
          • Translations about GUI components and internationalization settings
          • Data coming from database
          • Custom code and translations
        • Application Menu
        • Bulk import binded to a grid
        • Range Date Filter
      • Web Interpreter
        • Grid components
        • Detail forms
        • Other components
        • Other features
          • Chat
        • Global variables
          • Client-side global variables
          • Server global variables
        • Forgot Password
    • Working with users and roles
      • Rule for roles
      • Permissions Administrator
    • Wizard
      • How to add a checkbox grid to select one or more rows
      • How to load a second grid when clicking on a row from the first grid
      • How to load a form when clicking on a row of the grid
      • How to open a window when double clicking on a row of the grid
      • How to open a window with right click on the popup menu
      • How to open a window when pressing a button on the grid toolbar
      • How to load a grid after loading a form
      • How to open a window when pressing a button on the form toolbar
      • How to load a grid when clicking on a tree node
      • How to load a form when clicking on a tree node
    • Defining events
      • Panel events
      • Column events
      • Control events
      • Filter events
      • Timer events
      • Start-End event
    • Server-side Javascript & Web Service
      • Server-side Javascript
      • Grid component filled by a server-side JS
      • Detail component filled by a server-side JS
      • How to define a server-side JavaScript action
      • Web service
  • Setting up the environment
    • How to install
    • Application parameters
    • Global parameters
  • Modules
    • Reports & Charts
      • Jasper Report + iReport
      • Online report
      • Docx templating
      • Charts
      • Pivot Grid
      • Multidimensional pivot grid
      • Data Export from SQL query
    • SSO
      • Identity management in Platform
        • Identity management on the internal Platform database
        • Identity management based on Google SSO
      • LDAP
        • LDAP support
        • Identity management based on LDAP and database
        • Identity management based on an embedded LDAP server used by Alfresco and or Activiti
        • Identity management based on a remote LDAP server to connect to Platform on the cloud
        • Connecting an LDAP server to Activiti BPM
        • Connecting an LDAP server to Alfresco ECM
      • Google SSO
        • Google SSO
        • Google OAuth2
        • Identity management based on Google SSO
      • Custom SSO
      • Firebase
    • Mobile
      • Mobile introduction
      • Offline vs Online
        • Server side features
        • Server side functionalities
        • Server side Platform features
        • Mobile app features
      • Mobile side specifics
        • Customizations
          • Custom theme editor
        • App Menu
        • Window content
          • Detail scrollable form
          • Scrollable paginated grid
          • Constraint layout
          • Constraint panel
          • Collection grid view
          • Preview panel (mobile)
        • Form Controls
      • Reference guide
      • Cleaning up data
      • How to
      • App deployment
        • App deployment for the iOS platform
        • App deployment for the Android platform
      • Style properties
      • Appendix : Synchronization flow
      • Translations
    • GSuite
      • Introduction
      • Client-side integration
      • GMail
      • Calendar
      • Drive
      • Contacts
    • Google Cloud Platform
      • Datastore
        • Google Datastore Introduction
        • How to create Datastore entities
      • Google Cloud Storage
    • Scheduler
      • Scheduler Introduction
      • Process settings
        • How to define a sequence of consecutive processes
        • How to define a Custom Java Business component
        • How to define a Grid Data Import
        • How to define a server-side Javascript action
      • Email notifications
      • Process executions
      • Manually start a scheduled process
      • Process input parameters
    • Queue Manager
    • Log & Analysis
      • Application Log
      • Log statistics
      • App analyzer
      • Table log
      • Threads
      • Sessions and heap memory
      • Heap memory analysis
      • Access Log
      • Datastore statistics
      • Total monthly costs with Google Datastore
      • Service Monitoring
        • Introduction
        • Defining a service to monitor
        • Notifications setup
        • Events automatically managed by Platform
        • Remote Platform servers
        • Knowledge base
        • Adding log programatically
        • Searching for logged data
        • Use cases
    • File Management
    • Export and Import of Metadata
      • Application Metadata Management
    • Trigger writing operations
    • Audit
    • BPM
      • BPMN Introduction
      • BPMN main parts
      • Activiti Setup
      • Platform integration
        • Processes
        • Models
        • Process instances
        • To-do list
        • Process history
      • Process Web Modeler
        • Model Creation
          • Start-End Event
          • Gateways
        • Supported objects
        • Start tasks and user tasks
        • Form properties
          • Important notes
          • Property types
        • Service tasks
          • Web service
          • SQL Query
          • SQL statement
        • Mail task
        • Script task
          • Example : how to get a value previously read from a SQL query
          • Example : how to get the current process instance id
        • Timer events
        • Subprocess and Call Activiti
      • Utility methods available in Platform
        • How to start a process from a JavaScript action
        • How to complete a user task from a JavaScript action
      • An example
        • Processes
        • Instances
        • Activities
        • History
    • Embedded CMS
    • ECM
      • Alfresco
        • Alfresco Introduction
        • Integration between 4WS.Platform and Alfresco
          • Integration at GUI level
          • Integration at model level
          • Integration at authentication and authorizations level
          • Additional features
        • How to use 4WS.Platform and Alfresco together
          • Set the same Identity Management system
          • Define document types and aspects in Alfresco
          • Import the document types and aspects definitions in 4WS.Platform
          • Define document types and aspects in 4WS.Platform
          • Reverse engineering of document types or aspects
          • Definition of business components to fill-in panels
          • Definition of the GUI
          • Additional server-side services
        • Requirements
        • Current limits in 4WS.Platform - Alfresco integration
      • Archiflow
        • Setup
        • Archiflow artifacts
        • How to
    • Lotus Notes Migration Tool
    • NoSQL databases
      • MongoDB
        • MongoDB Introduction
        • Setting up the environment
        • How to create collections
        • How to create business components
        • How to create windows filled with data coming from MongoDB collections
        • Design rules
      • Google Datastore
        • Google Datastore Introduction
        • Setting up the environment
        • How to create entities
        • How to create business components
        • How to create windows filled with data coming from Datastore entities
        • Design rules
    • TensorFlow
    • Web Page Development
      • Pure Web Page Development
      • Google Material Design development
      • Appendix A - a complete example without any lib
      • Appendix B - a complete example with Google MD
    • Jira Integration
    • Platform for GAE
    • SQL errors management
    • Multidimensional pivot grid
    • Quality
      • Automated Web Service Testing
      • Automated unit testing
      • Source code static analysis using ESlint
      • Source code static analysis using SonarQube
  • Troubleshootings
  • Best practises
    • Database design
    • Database maintenance
    • Creating a Web app : common use cases
    • Creating a mobile app : common use cases
Powered by GitBook
On this page
  • Google Cloud Storage
  • Get a signed URL
  • Get information about a bucket
  • Create a bucket
  • Delete a bucket
  • Enable or disable the object versioning of a bucket
  • Check if the object versioning of a bucket is enabled
  • Upload a file from server file system to Cloud Storage
  • Copy an object and its metadata to a new bucket and object destination
  • Copy an object and its metadata to a new bucket and object destination
  • Delete an object from a bucket
  • Get object information from a bucket
  • Get a list of versions of the object from a bucket
  • Get a list of all the objects stored in a bucket
  • Get a paginated list of the objects stored in a bucket

Was this helpful?

  1. Modules
  2. Google Cloud Platform

Google Cloud Storage

PreviousHow to create Datastore entitiesNextScheduler

Last updated 5 years ago

Was this helpful?

Google Cloud Storage

4WS.Platform is integrated with Google Cloud Platform, in particular with Google Cloud Storage. To enable this integration a Service Account must be defined in the Google Cloud Console and the following parameters must be specified:

  • GOOGLE_SERVACC_EMAIL: the service account email address

  • GOOGLE_SERVACC_KEY: the service account p12 public key, Base64 encoded

The available Javascript actions are the following

Get a signed URL

To get a signed URL for Google Cloud Storage operations (refer to the official documentation for details: ).

Syntax

utils.getGoogleCloudStorageSignedURL(verb,expiration, bucketName, objectName, mime)

Details

verb – one of ‘GET’, ‘HEAD’, PUT‘’, ‘DELETE’ expiration – This is the timestamp (represented as the number of seconds since the Unix Epoch of 00:00:00 UTC on January 1, 1970) when the signature expires. The server will reject any requests received after this timestamp bucketName – the name of the bucket which we want to operate on objectName – the name of the object mime – the MIME type of the resource. Can be null. Return value - A string containing the signed URL.

Get information about a bucket

Syntax

utils.getGoogleCloudStorageBucket(bucketName)

Details

bucketName – the name of the bucket which we want to operate on Return value - The file container representation (org.wag.valueobjects.java.FileContainer)

Create a bucket

Syntax

utils.createGoogleCloudBucket(project, bucketName, bucketLocation, storageClass)

Details

Delete a bucket

Syntax

utils.deleteGoogleCloudStorageBucket(bucketName)

Details

bucketName – the name of the bucket which we want to operate on Return value - the file container representation (org.wag.valueobjects.java.FileContainer)

Enable or disable the object versioning of a bucket

Syntax

utils.setGoogleCloudStorageBucketVersioning(bucketName,versioning)

Details

bucketName – the name of the bucket which we want to operate on versioning – true or false. Whether to enable or disable versioning Return value - The file container representation (org.wag.valueobjects.java.FileContainer)

Check if the object versioning of a bucket is enabled

Syntax

utils.getGoogleCloudStorageBucketVersioning(bucketName)

Details

bucketName – the name of the bucket which we want to operate on Return value - true or false

Upload a file from server file system to Cloud Storage

Syntax

utils.uploadGoogleCloudStorageObjectFromFS(fsPath, bucketName, objectName, deleteFsFile)

Details

fsPath – the path on the file system where the file is located bucketName – the name of the bucket which we want to upload the file to objectName – the name of the object, with the full path deleteFsFile – whether or not delete the file from file system after upload Return value - the file representation (org.wag.valueobjects.java.File)

Copy an object and its metadata to a new bucket and object destination

Can be used to copy between buckets with the same location and type. Can choose to copy from a specific object version if bucket versioning is enabled.

Syntax

utils.copyGoogleCloudStorageObject(sourceBucketName, sourceObjectName, sourceObjectVersion, destinationBucketName, destinationObjectName)

Details

sourceBucketName – the bucket of the source object sourceObjectName – the source object name, with full path sourceObjectVersion – (optional). The object version to copy. Can be null. destinationBucketName – the destination bucket destinationObjectName – the destination object name, with full path Return value - the file representation (org.wag.valueobjects.java.File)

Copy an object and its metadata to a new bucket and object destination

Must be used to copy objects between regions and bucket types. Can choose to copy from a specific object version if bucket versioning is enabled

Syntax

utils.rewriteGoogleCloudStorageObject(sourceBucketName, sourceObjectName, sourceObjectVersion, destinationBucketName, destinationObjectName)

Details

sourceBucketName – the bucket of the source object sourceObjectName – the source object name, with full path sourceObjectVersion – (optional). The object version to copy. Can be null. destinationBucketName – the destination bucket destinationObjectName – the destination object name, with full path Return value - the file representation (org.wag.valueobjects.java.File)

Delete an object from a bucket

Syntax

utils.deleteGoogleCloudStorageObject(bucketName,objectName)

Details

bucketName – the bucket of the object objectName – the object name, with full path

Get object information from a bucket

Syntax

utils.getGoogleCloudStorageObject(bucketName,objectName)

Details

bucketName – the bucket of the object objectName – the object name, with full path Return value - the file representation (org.wag.valueobjects.java.File)

Get a list of versions of the object from a bucket

Syntax

utils.getGoogleCloudStorageObjectVersions(bucketName,objectName)

Details

bucketName – the bucket of the object objectName – the object name, with full path Return value - A list of the file version representation objects (org.wag.valueobjects.java.FileVersion)

Get a list of all the objects stored in a bucket

Syntax

utils.getGoogleCloudStorageObjectVersions(bucketName,prefix,delimiter)

Details

bucketName – the bucket of the object prefix – the prefix to filter the objects delimiter – the path delimiter Return value - A list of the file representation objects (org.wag.valueobjects.java.File)

Get a paginated list of the objects stored in a bucket

Syntax

utils.listGoogleCloudStorageObjects(bucketName, maxPageResults, pages, nextPageToken, prefix, delimiter)

Details

bucketName – the bucket of the object maxPageResults – max results to load per page. Can be null pages – max pages to load. Can be null nextPageToken – the token for pagination prefix – the prefix to filter the objects delimiter – the path delimiter Return value - A GooglePaginatedList (org.wag.valueobjects.java.GooglePaginatedList) of the file representation objects (org.wag.valueobjects.java.File)

project – the id of the Google Developer Console project where the bucket must be created bucketName – the name of the bucket which we want to operate on bucketLocation – the location of the bucket. Multi-region location: US, EU, ASIA. Other locations are supported. See storageClass – (optional) storage class: STANDARD, NEARLINE and DURABLE_REDUCED_AVAILABILITY. See Return value - the file container representation (org.wag.valueobjects.java.FileContainer)

Possibly filtered by a prefix and a delimiter. See

Possibly filtered by a prefix and a delimiter. See . The next page token can be used to retrieve more pages, maxPageResults to manage page size and pages to specify how many pages to load.

https://cloud.google.com/storage/docs/access-control#Signed-URLs
https://cloud.google.com/storage/docs/
https://cloud.google.com/storage/
https://cloud.google.com/storage/docs/json_api/v1/objects/list
https://cloud.google.com/storage/docs/json_api/v1/objects/list