^1650796114510
@
sname
EntityUtils
slabel
EntityUtils
sdescriptors
xworker.lang.MetaDescriptor3
sextends
xworker.lang.actions.SelfAction
smany
true
seditCols
2
sinitialization
false
sgroup
net.httpclient
smodifier
public
sinheritDescription
false
sdescription
<p>Static helpers for dealing with <a title="interface in org.apache.http" href="http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/HttpEntity.html"><code>HttpEntity</code></a>s.</p>
sth_createIndex
true
sth_registThing
child|xworker.lang.actions.Actions
sth_registMyChilds
false
sth_mark
false
  @/@actions
  sname
  actions
  sdescriptors
  xworker.lang.MetaDescriptor3/@actions
  sth_createIndex
  false
  sid
  actions
    @/@actions/@run
    sname
    run
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    suseOuterJava
    true
    suseInnerJava
    false
    souterClassName
    xworker.httpclient.actions.HttpClientActions
    smethodName
    doEntityUtils
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import ognl.Ognl;

import org.xmeta.util.UtilAction;
import org.apache.http.util.EntityUtils;

def result = null;
def entity = self.doAction("getEntity", actionContext);//Ognl.getValue(self.entity, actionContext);
if(entity != null){
    def method = self.doAction("getMethod", actionContext);
    switch(method){
        case "getContentCharSet":
            result = EntityUtils.getContentCharSet(entity);
            break;
        case "getContentMimeType":
            result = EntityUtils.getContentMimeType(entity);
            break;
        case "toByteArray":
            result = EntityUtils.toByteArray(entity);
            break;
        case "toString":
            def defaultCharset = self.doAction("getDefaultCharset", actionContext);
            if(defaultCharset != null && defaultCharset != ""){
                result = EntityUtils.toString(entity, defaultCharset);
            }else{
                result = EntityUtils.toString(entity);
            }
            break;
        case "printlog":
            log.info("response=" + response);
            if(self.defaultCharset != null && self.defaultCharset != ""){
                result = EntityUtils.toString(entity, self.defaultCharset);
            }else{
                result = EntityUtils.toString(entity);
            }
            
            if(entity.getContentType() != null){
                log.info("contentType=" + entity.getContentType().getValue());
            }
            log.info("contentLength=" + entity.getContentLength());
            log.info("content=" + result);
            break;
    }
}else{
    log.info("EntityUtils: entity is null, name=" + self.entity);
}

return result;
#$@text#$@
    sattributeTemplate
    false
    sinterpretationType
    Action
    svarScope
    Local
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@JavaAction
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_deprecated
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sid
    run
    @/@actions/@getEntity
    sname
    getEntity
    sattributeName
    entity
    snotNull
    false
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.ActionUtil/@GetData
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    getEntity
    @/@actions/@getMethod
    sname
    getMethod
    sattributeName
    method
    snotNull
    false
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.ActionUtil/@GetString
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    getMethod
    @/@actions/@getDefaultCharset
    sname
    getDefaultCharset
    sattributeName
    defaultCharset
    snotNull
    false
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    screateLocalVarScope
    false
    ssaveReturn
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.ActionUtil/@GetString
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_mark
    false
    sid
    getDefaultCharset
    @/@actions/@35416
    sname
    getClassName
    sattributeName
    className
    snotNull
    false
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdisableGlobalContext
    false
    sdebugLog
    false
    susage
    params
    sdescriptors
    xworker.lang.actions.ActionUtil/@GetClass
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sid
    35416
  @/@name
  sname
  name
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sid
  name
  @/@label
  sname
  label
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sid
  label
  @/@entity
  sname
  entity
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  smodifier
  public
  sreadOnly
  false
  sdefault
  var:entity
  sinheritDescription
  false
  sdescription
  <p>使用Ognl从actionContext中取。</p>
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sid
  entity
  @/@method
  sname
  method
  sinputtype
  select
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  smodifier
  public
  sreadOnly
  false
  sdefault
  toString
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sid
  method
    @/@method/@getContentCharSet
    sname
    getContentCharSet
    slabel
    getContentCharSet
    svalue
    getContentCharSet
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sth_createIndex
    false
    sid
    getContentCharSet
    @/@method/@getContentMimeType
    sname
    getContentMimeType
    slabel
    getContentMimeType
    svalue
    getContentMimeType
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sth_createIndex
    false
    sid
    getContentMimeType
    @/@method/@toByteArray
    sname
    toByteArray
    slabel
    toByteArray
    svalue
    toByteArray
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sth_createIndex
    false
    sid
    toByteArray
    @/@method/@toString
    sname
    toString
    slabel
    toString
    svalue
    toString
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sth_createIndex
    false
    sid
    toString
    @/@method/@printlog
    sname
    printlog
    slabel
    printlog
    svalue
    printlog
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sth_createIndex
    false
    sid
    printlog
    @/@method/@jsonToMap
    sname
    jsonToMapOrList
    svalue
    jsonToMapOrList
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sid
    jsonToMap
    @/@method/@jsonToObject
    sname
    jsonToObject
    svalue
    jsonToObject
    sdescriptors
    xworker.lang.MetaDescriptor3/@attribute/@value
    sinheritDescription
    false
    sth_createIndex
    false
    sth_registMyChilds
    false
    sth_registDisabled
    false
    sth_noThingRegistViewer
    false
    sth_fileMonitor
    false
    sth_mark
    false
    sth_registQueryOnlySelf
    false
    snotXmlAttribute
    false
    sjson_isArray
    false
    sid
    jsonToObject
  @/@defaultCharset
  sname
  defaultCharset
  sreadOnly
  false
  sinheritDescription
  false
  sdescription
  <p>toString时需要。</p>
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sid
  defaultCharset
  @/@className
  sname
  className
  sinputtype
  openWindow
  ssize
  60
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  smodifier
  public
  sinputattrs
  xworker.swt.xworker.attributeEditor.openWins.ClassSelector/@shell|
  sreadOnly
  false
  sinheritDescription
  false
  Sdescription
#$@text#$@
<p>当method=jsonToObject时使用，需要类的全名。</p>
#$@text#$@
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_noThingRegistViewer
  false
  sth_fileMonitor
  false
  sth_mark
  false
  sth_registQueryOnlySelf
  false
  sjson_isArray
  false
  sid
  className
  @/@description
  sname
  description
  sinputtype
  html
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  smodifier
  public
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sth_registMyChilds
  false
  sth_registDisabled
  false
  sth_mark
  false
  sid
  description
