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
{ | |
"data": { | |
"type": "node--team_member", | |
"id": "d56fd5ed-65f8-4f31-b4c0-29f33ea67bfb", | |
"attributes": { | |
"nid": 16, | |
"uuid": "d56fd5ed-65f8-4f31-b4c0-29f33ea67bfb", | |
"vid": 17, | |
"langcode": "en", | |
"status": true, |
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
{ | |
"data": { | |
"type": "file--file", | |
"id": "311f36ae-b233-4db9-84ba-803525307e42", | |
"attributes": { | |
"fid": 2, | |
"uuid": "311f36ae-b233-4db9-84ba-803525307e42", | |
"langcode": "en", | |
"filename": "gravatar.png", | |
"uri": "public://2018-03/gravatar.png", |
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
{ | |
"id": "someid", | |
"name": "globalNavSpecialOffersPromo", | |
"description": "", | |
"crDate": 1452112197971, | |
"modDate": 1457469890414, | |
"pubDate": 1457469840000, | |
"metadata": { | |
"pageId": [ | |
"air-flight-some-other-page", |
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
Map<String, Object> params = new HashMap<String, Object>(); | |
params.put("search_term", "elasticsearch"); | |
params.put("since", "now-30d"); | |
Template template = new Template("tweets", ScriptService.ScriptType.FILE, MustacheScriptEngineService.NAME, null, params); | |
SearchRequestBuilder request = client.prepareSearch(INDEX).setTemplate(template); | |
SearchResponse response = request.execute().actionGet(); |
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 java.util.ArrayList; | |
p | |
import org.alfresco.web.evaluator.BaseEvaluator; | |
import org.alfresco.web.extensibility.SlingshotEvaluatorUtil; | |
import org.json.simple.JSONObject; | |
import org.springframework.extensions.surf.RequestContext; | |
import org.springframework.extensions.surf.support.ThreadLocalRequestContext; | |
public class MemberOfGroupFromProperty extends BaseEvaluator { | |
protected SlingshotEvaluatorUtil util = null; |
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
public class Reindexer extends BaseElasticsearchUtility { | |
private static Log logger = LogFactory.getLog(Reindexer.class); | |
public static void main(String[] args) { | |
if (args.length != 5) { | |
doUsage(); | |
System.exit(-1); | |
} |
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
public List<Content> fetchContentForPlacements(Date curDate, String relString, String pageId, Metadata meta) throws ContentServiceException { | |
// check for required parameters | |
if (pageId == null) { | |
throw new MissingParameterException(Constants.MSG_PAGE_ID_REQUIRED); | |
} | |
// default the current date to now if it wasn't provided | |
if (curDate == null) { | |
curDate = new Date(); |
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
package com.alfresco.api.example; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import org.apache.chemistry.opencmis.client.api.Document; | |
import org.apache.chemistry.opencmis.client.api.Session; | |
public class GetDocumentExample extends BaseOnPremExample { |
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
# Delete the example index | |
curl -XDELETE "http://localhost:9200/sortable-version-test?pretty=true" | |
# Create a new example index | |
curl -X POST "http://localhost:9200/sortable-version-test?pretty=true" | |
# Set the mapping. Assumes version.groovy resides in $ES_HOME/config/scripts | |
curl -XPOST "http://localhost:9200/sortable-version-test/version/_mapping?pretty=true" -d' | |
{ | |
"version": { |
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
{ | |
"Blog Post" : { | |
"body" : { | |
"type" : "StructuredText", | |
"config" : { | |
"placeholder" : "Start writing your blog post here...", | |
"minHeight" : "400px", | |
"imageConstraint" : { | |
"width" : 640.0 | |
} |
NewerOlder