org.jbundle.model.Task.getProperty()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(10.0k)|赞(0)|评价(0)|浏览(95)

本文整理了Java中org.jbundle.model.Task.getProperty()方法的一些代码示例,展示了Task.getProperty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Task.getProperty()方法的具体详情如下:
包路径:org.jbundle.model.Task
类名称:Task
方法名:getProperty

Task.getProperty介绍

暂无

代码示例

代码示例来源:origin: org.jbundle.base.message/org.jbundle.base.message.core

/**
   * Add the task properties that I will need to start up a process somewhere else with this same environment.
   * @param task
   */
  public void addTaskProperties(Task task)
  {
    if (task == null)
      return;
    this.put(TrxMessageHeader.USER_ID, task.getProperty(DBParams.USER_ID));
//?         BaseDatabase.addDBProperties(m_mapMessageHeader, task, null);    // Note: m_mapMessageHeader is guaranteed not null by previous call.
  }
}

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

/**
   * Add the task properties that I will need to start up a process somewhere else with this same environment.
   * @param task
   */
  public void addTaskProperties(Task task)
  {
    if (task == null)
      return;
    this.put(TrxMessageHeader.USER_ID, task.getProperty(DBParams.USER_ID));
//?        BaseDatabase.addDBProperties(m_mapMessageHeader, task);    // Note: m_mapMessageHeader is guaranteed not null by previous call.
  }
}

代码示例来源:origin: org.jbundle.base.screen/org.jbundle.base.screen.model

/**
 * Get this property.
 * @param strProperty The property key to find.
 * @param The property.
 */
public String getProperty(String strProperty)
{
  if (this.getTask() != null)
    return this.getTask().getProperty(strProperty);   // Try app
  return null;
}
/**

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

/**
 * Get this property.
 * @param strProperty The property key to find.
 * @param The property.
 */
public String getProperty(String strProperty)
{
  if (this.getTask() != null)
    return this.getTask().getProperty(strProperty);   // Try app
  return null;
}
/**

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

/**
   * Get the path to the target servlet.
   * @param strServletParam The servlet type (html or xml)
   * @return the servlet path.
   */
  public String getServletPath(String strServletParam)
  {
    String strServletName = null;
    if (strServletParam == null)
      strServletParam = Params.SERVLET;
    if (this.getTask() != null)
      strServletName = this.getTask().getProperty(strServletParam);
    if ((strServletName == null) || (strServletName.length() == 0))
    {
      strServletName = Constants.DEFAULT_SERVLET;
//?            if (this.getTask() instanceof RemoteRecordOwner)
//?                strServletName = strServletName + "xsl";    // Special case - if task is a session, servlet should be tourappxsl
      if (DBParams.XHTMLSERVLET.equalsIgnoreCase(strServletParam))
        strServletName = Constants.DEFAULT_XHTML_SERVLET;
    }
    return strServletName;
  }
  /**

代码示例来源:origin: org.jbundle.base.screen/org.jbundle.base.screen.model

String strScreen = task.getProperty(DBParams.SCREEN);
if ((strScreen != null) && (strScreen.length() > 0))
  screen = Record.makeNewScreen(strScreen, itsLocation, screenParent, iDocType | ScreenConstants.DEFAULT_DISPLAY, properties, null, true);
  String strRecord = task.getProperty(DBParams.RECORD);
  if (strRecord != null)
    String strScreenType = task.getProperty(DBParams.COMMAND);
    iDocType = iDocType | ScreenConstants.DISPLAY_MODE | ScreenConstants.DEFAULT_DISPLAY;
    if ((strScreenType != null) && (strScreenType.length() > 0))
  String strRecord = task.getProperty(ThinMenuConstants.FORM.toLowerCase());
  if (strRecord != null)
    screen = BaseScreen.makeScreenFromRecord(itsLocation, screenParent, strRecord, iDocType | ScreenConstants.MAINT_MODE | ScreenConstants.DEFAULT_DISPLAY, properties);
  String strMenu = task.getProperty(DBParams.MENU);
  if (strMenu != null)

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

String strScreen = task.getProperty(DBParams.SCREEN);
if (strScreen != null)
  screen = BaseScreen.makeNewScreen(strScreen, itsLocation, screenParent, iDocType | ScreenConstants.DEFAULT_DISPLAY, properties, true);
  String strRecord = task.getProperty(DBParams.RECORD);
  if (strRecord != null)
    String strScreenType = task.getProperty(DBParams.COMMAND);
    iDocType = iDocType | ScreenConstants.DISPLAY_MODE | ScreenConstants.DEFAULT_DISPLAY;
    if ((strScreenType != null) && (strScreenType.length() > 0))
  String strRecord = task.getProperty(ThinMenuConstants.FORM.toLowerCase());
  if (strRecord != null)
    screen = BaseScreen.makeScreenFromRecord(itsLocation, screenParent, strRecord, iDocType | ScreenConstants.MAINT_MODE | ScreenConstants.DEFAULT_DISPLAY, properties);
  String strMenu = task.getProperty(DBParams.MENU);
  if (strMenu != null)

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

/**
 * Is this the user's main menu?
 * @return true if this is the main menu.
 */
public boolean isMainMenu()
{
  boolean bIsMainMenu = false;
  if (m_strMenu != null)
  {
    if (this.getTask() != null)
      if (HtmlConstants.MAIN_MENU_KEY.equalsIgnoreCase(this.getTask().getProperty(DBParams.MENU)))
      bIsMainMenu = true;
    if (m_strMenu.equalsIgnoreCase(HtmlConstants.MAIN_MENU_KEY))
      bIsMainMenu = true;
    else if (((this.getProperty(DBParams.HOME) == null) || (this.getProperty(DBParams.HOME).length() == 0))
        && (DBConstants.ANON_USER_ID.equals(this.getProperty(DBParams.USER_ID))))
      bIsMainMenu = true;
  }
  return bIsMainMenu;
}
/**

代码示例来源:origin: org.jbundle.base.screen/org.jbundle.base.screen.model

/**
 * Is this the user's main menu?
 * @return true if this is the main menu.
 */
public boolean isMainMenu()
{
  boolean bIsMainMenu = false;
  if (m_strMenu != null)
  {
    if (this.getTask() != null)
      if (HtmlConstants.MAIN_MENU_KEY.equalsIgnoreCase(this.getTask().getProperty(DBParams.MENU)))
      bIsMainMenu = true;
    if (m_strMenu.equalsIgnoreCase(HtmlConstants.MAIN_MENU_KEY))
      bIsMainMenu = true;
    else if (((this.getProperty(DBParams.HOME) == null) || (this.getProperty(DBParams.HOME).length() == 0))
        && (DBConstants.ANON_USER_ID.equals(this.getProperty(DBParams.USER_ID))))
      bIsMainMenu = true;
  }
  return bIsMainMenu;
}
/**

代码示例来源:origin: org.jbundle.base/org.jbundle.base

/**
   * Get this property.
   */
  public String getProperty(String strProperty)
  {
    String strValue = null;
//  Add this code if Task sessions need local properties
    if (m_properties != null)
    {   // Try local properties
      if (m_properties.get(strProperty) != null)
        return m_properties.get(strProperty).toString();
    }
    if (this.getTask() != null)
      if (this.getTask().getApplication() != null)
        if (this.getTask().getApplication().getSystemRecordOwner() != this)
      strValue = this.getTask().getProperty(strProperty);   // Try app
    return strValue;
  }
  /**

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

/**
   * Get this property.
   */
  public String getProperty(String strProperty)
  {
    String strValue = null;
//  Add this code if Task sessions need local properties
    if (m_properties != null)
    {   // Try local properties
      if (m_properties.get(strProperty) != null)
        return m_properties.get(strProperty).toString();
    }
    if (this.getTask() != null)
      if (this.getTask().getApplication() != null)
        if (this.getTask().getApplication().getSystemRecordOwner() != this)
      strValue = this.getTask().getProperty(strProperty);   // Try app
    return strValue;
  }
  /**

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

if (this.getTask().getProperty(DBParams.USER_ID) != null)
  properties.put(DBParams.USER_ID, this.getTask().getProperty(DBParams.USER_ID));

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption)
  {   // Return an error to stop the change
    int iErrorCode = super.doRecordChange(field, iChangeType, bDisplayOption);
    if ((iChangeType == DBConstants.AFTER_ADD_TYPE) || (iChangeType == DBConstants.AFTER_UPDATE_TYPE))
      if (iErrorCode == DBConstants.NORMAL_RETURN)
    {
      Record recUserInfo = this.getOwner();
      Task task = recUserInfo.getTask();
      String strUserName = recUserInfo.getField(UserInfo.kID).toString();
      if ((strUserName == null) || (strUserName.length() == 0))
        strUserName = recUserInfo.getLastModified(DBConstants.BOOKMARK_HANDLE).toString();
      String strPassword = recUserInfo.getField(UserInfo.kPassword).toString();
      iErrorCode = task.getApplication().login(task, strUserName, strPassword, task.getProperty(DBParams.DOMAIN));   // Always okay
    }
    return iErrorCode;
  }
});

代码示例来源:origin: org.jbundle.base/org.jbundle.base

if (record.getRecordOwner() != null) if (record.getRecordOwner().getTask() != null)
  strLanguage = record.getRecordOwner().getTask().getProperty(DBParams.LANGUAGE);
  if ((strLanguage == null) || (strLanguage.length() == 0))
    strLanguage = record.getRecordOwner().getTask().getApplication().getLanguage(true);

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

if (record.getRecordOwner() != null) if (record.getRecordOwner().getTask() != null)
  strLanguage = record.getRecordOwner().getTask().getProperty(DBParams.LANGUAGE);
  if ((strLanguage == null) || (strLanguage.length() == 0))
    strLanguage = record.getRecordOwner().getTask().getApplication().getLanguage(true);

代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db

if (record.getRecordOwner() != null) if (record.getRecordOwner().getTask() != null)
  strLanguage = record.getRecordOwner().getTask().getProperty(DBParams.LANGUAGE);
  if ((strLanguage == null) || (strLanguage.length() == 0))
    strLanguage = record.getRecordOwner().getTask().getApplication().getLanguage(true);

代码示例来源:origin: org.jbundle.base.screen/org.jbundle.base.screen.control.servlet

/**
   * Do any of the initial servlet stuff.
   * @param servletTask The calling servlet task.
   */
  public void initServletSession(Task servletTask)
  {
    String strTrxID = servletTask.getProperty(TrxMessageHeader.LOG_TRX_ID);
    if (strTrxID != null)
    {   // Good, they are referencing a transaction (access the transaction properties).
      MessageLogModel recMessageLog = (MessageLogModel)Record.makeRecordFromClassName(MessageLog.THICK_CLASS, (RecordOwner)servletTask.getApplication().getSystemRecordOwner());
      try {
        recMessageLog = recMessageLog.getMessageLog(strTrxID);
        if (recMessageLog != null)
        {
          servletTask.setProperty(TrxMessageHeader.LOG_TRX_ID, strTrxID);
          String strHTMLScreen = recMessageLog.getProperty("screen" /*ScreenMessageTransport.SCREEN_SCREEN */);
          if (strHTMLScreen != null)  // Special case, html screen is different from java screen.
            servletTask.setProperty(DBParams.SCREEN, strHTMLScreen);
        }
      } finally {
        recMessageLog.free();
      }
    }  
  }
}

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

String strMessageVersion = this.getMessageVersion(messageReplyIn);
if (strMessageVersion == null)
  strMessageVersion = this.getTask().getProperty("version");
MessageProcessInfo recMessageProcessInfo = (MessageProcessInfo)this.getRecord(MessageProcessInfo.kMessageProcessInfoFile);
if (recMessageProcessInfo == null)

代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed

String strMenu = this.getProperty(DBParams.HOME);
if (strMenu == null)
  strMenu = this.getTask().getProperty(DBParams.MENU);
if (strMenu != null)

代码示例来源:origin: org.jbundle.base.screen/org.jbundle.base.screen.model

String strMenu = this.getProperty(DBParams.HOME);
if (strMenu == null)
  strMenu = this.getTask().getProperty(DBParams.MENU);
if (strMenu != null)

相关文章