Last active
June 6, 2016 14:36
-
-
Save muracms/434a28d07c8d8446dd37 to your computer and use it in GitHub Desktop.
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
<cfscript> | |
var APIUtility = getBean('settingsManager').getSite({siteid}).getAPI('json', 'v1'); | |
APIUtility.registerMethod(methodName='applyProperty', method=applyProperty); | |
public any function applyProperty() { | |
// do something | |
} | |
</cfscript> |
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
<cfscript> | |
var APIUtility=getBean('settingsManager').getSite({siteid}).getApi('json','v1'); | |
APIUtility.registerLinkMethod(method=myCustomLinkMethod); | |
public any function myCustomLinkMethod(entity,links){ | |
if ( entity.getEntityName()=='targetEntity' ) { | |
arguments.links['runs']='#getEndPoint()#?method=myCustomMethod&siteid=#arguments.entity.getValue('siteid')#'; | |
} | |
} | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment