This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#-- ----------------------------------------------------------------- -> | |
- | |
- GETTING REAL TIME/DATE-STAMP | |
- | |
- When we ask Liferay for the create date of an article (or really we | |
- ask Liferay for the 'display-date' which is settable by the user) we get | |
- a string looking like this: 'Thu, 08 May 2014 11:48:00 +0000'. This | |
- string will always be in english and when we want to create a datetime | |
- object from it, we need to parse it with english locale. | |
- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright (c) 2000-present Liferay, Inc. All rights reserved. | |
* | |
* This library is free software; you can redistribute it and/or modify it under | |
* the terms of the GNU Lesser General Public License as published by the Free | |
* Software Foundation; either version 2.1 of the License, or (at your option) | |
* any later version. | |
* | |
* This library is distributed in the hope that it will be useful, but WITHOUT | |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function (user, context, callback) { | |
user.app_metadata = user.app_metadata || {}; | |
if ('stripe_customer_id' in user.app_metadata) { | |
context.idToken['https://example.com/stripe_customer_id'] = user.app_metadata.stripe_customer_id; | |
return callback(null, user, context); | |
} | |
var stripe = require('stripe')('sk_....'); | |
var customer = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import a script from the repository using a name-based path: | |
<import resource="/Company Home/Data Dictionary/Scripts/library.js"> | |
Import a script from the repository using a NodeRef reference: | |
<import resource="workspace://SpacesStore/6f73de1b-d3b4-11db-80cb-112e6c2ea048"> | |
Import a script from a Java classpath location: |