@Component public class CreateLockDirective extends AbstractTemplateDirective
参数列表
itemType
:锁定项目类型
itemId
:锁定项目id
userId
:锁定用户id
counter
:计数,默认值0
:
返回结果
object
:SysLock
<@tools.createLock itemType='content' itemId='1' userId='1'>${url}</@tools.createLock>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/createLock?itemType=content&itemId=1&userId=1&appToken=接口访问授权Token', function(data){ console.log(data); }); </script>
限定符和类型 | 字段和说明 |
---|---|
private LockComponent |
lockComponent |
ADVANCED, AUTH_TOKEN, AUTH_USER_ID, siteComponent
log
构造器和说明 |
---|
CreateLockDirective() |
限定符和类型 | 方法和说明 |
---|---|
void |
execute(RenderHandler handler) |
boolean |
needAppToken() |
execute, expose, getAdvanced, getApp, getSite, getUserId, needUserToken, supportAdvanced
execute, getName, getNamespace, getShortName, httpEnabled, setName, setNamespace, setShortName
private LockComponent lockComponent
public void execute(RenderHandler handler) throws java.io.IOException, freemarker.template.TemplateException
java.io.IOException
freemarker.template.TemplateException
public boolean needAppToken()
needAppToken
在类中 AbstractTemplateDirective