^1591929860452
@
sname
StringEntity
slabel
StringEntity
sdescriptors
xworker.lang.MetaDescriptor3
smany
true
seditCols
2
sinitialization
false
smodifier
public
sinheritDescription
false
sdescription
<p>A self contained, repeatable entity that obtains its content from a <a title="class or interface in java.lang" href="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html"><code>String</code></a>.</p>
sth_createIndex
false
  @/@actions
  sname
  actions
  sdescriptors
  xworker.lang.MetaDescriptor3/@actions
  sth_createIndex
  false
  sid
  actions
    @/@actions/@GroovyAction
    sname
    create
    sisSynchronized
    false
    sthrowException
    true
    suseOtherAction
    false
    svarScope
    Local
    sdisableGlobalContext
    false
    Scode
#$@text#$@
import ognl.Ognl;

import org.apache.http.entity.StringEntity;

import org.xmeta.util.UtilString;

def mimeType = self.doAction("getMimeType", actionContext);//UtilString.getString(self, "mimeType", actionContext);
def charset = self.doAction("getCharset", actionContext);//UtilString.getString(self, "charset", actionContext);
def content = self.doAction("getContent", actionContext);//UtilString.getString(self, "content", actionContext);

if(content == null){
    log.warn("StringEntity: content is null, thing=" + self.getMetadata().getPath());
    return null;
}

if(mimeType != null && charset != null){
    return new StringEntity(content, mimeType, charset);
} else if(charset != null){
    return new StringEntity(content, charset);
} else {
    return new StringEntity(content);
}
#$@text#$@
    sinterpretationType
    Action
    screateLocalVarScope
    false
    ssaveReturn
    false
    sswitchResult
    false
    sdebugLog
    false
    sdescriptors
    xworker.lang.actions.Actions/@GroovyAction
    sth_createIndex
    false
    sid
    GroovyAction
    @/@actions/@getMimeType
    sname
    getMimeType
    sattributeName
    mimeType
    snotNull
    false
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    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
    getMimeType
    @/@actions/@getCharset
    sname
    getCharset
    sattributeName
    charset
    snotNull
    false
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    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
    getCharset
    @/@actions/@getContent
    sname
    getContent
    sattributeName
    content
    snotNull
    false
    sinterpretationType
    Self
    sattributeTemplate
    false
    schildsAttributeTemplate
    false
    svarScope
    Local
    sisSynchronized
    false
    sthrowException
    true
    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
    getContent
  @/@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
  @/@mimeType
  sname
  mimeType
  sinputtype
  openWindow
  ssize
  50
  sshowLabel
  true
  slabelAlign
  right
  slabelVAlign
  baseline
  smodifier
  public
  sinputattrs
  xworker.things.p2020.p06.p12.MimeTypeDialog|returnType=contentType
  sreadOnly
  false
  sinheritDescription
  false
  Sdescription
#$@text#$@
<p>同时设置charset才能生效。</p>
#$@text#$@
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sid
  mimeType
  @/@charset
  sname
  charset
  sreadOnly
  false
  sinheritDescription
  false
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sid
  charset
  @/@content
  sname
  content
  sinputtype
  textarea
  scolspan
  2
  sshowLabel
  true
  sreadOnly
  false
  sinheritDescription
  false
  sdescription
  <p>支持UtilString。</p>
  svalidateAllowBlank
  true
  LvalidateOnBlur
  true
  LallowDecimals
  true
  LallowNegative
  true
  snotXmlAttribute
  false
  sdescriptors
  xworker.lang.MetaDescriptor3/@attribute
  sth_createIndex
  false
  sid
  content
  @/@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
