org.jbundle.model.util.Util.parseArgs()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(9.4k)|赞(0)|评价(0)|浏览(194)

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

Util.parseArgs介绍

暂无

代码示例

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

  1. /**
  2. * Parse the command string into properties.
  3. * @param strCommand
  4. * @param properties
  5. * @return
  6. */
  7. public String getProperties(String strCommand, Map<String,Object> properties)
  8. {
  9. int iIndex = strCommand.indexOf('=');
  10. if (iIndex != -1)
  11. {
  12. if (this.getParentScreen().getTask() != null)
  13. Util.parseArgs(properties, strCommand);
  14. if (properties.get(DBParams.COMMAND) != null)
  15. strCommand = (String)properties.get(DBParams.COMMAND);
  16. }
  17. return strCommand;
  18. }
  19. /**

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

  1. /**
  2. * Parse the command string into properties.
  3. * @param strCommand
  4. * @param properties
  5. * @return
  6. */
  7. public String getProperties(String strCommand, Map<String,Object> properties)
  8. {
  9. int iIndex = strCommand.indexOf('=');
  10. if (iIndex != -1)
  11. {
  12. if (this.getParentScreen().getTask() != null)
  13. Util.parseArgs(properties, strCommand);
  14. if (properties.get(DBParams.COMMAND) != null)
  15. strCommand = (String)properties.get(DBParams.COMMAND);
  16. }
  17. return strCommand;
  18. }
  19. /**

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

  1. /**
  2. * Set the default application.
  3. * @param application The default application.
  4. */
  5. public void setDefaultApplication(Application application)
  6. {
  7. m_applicationDefault = application;
  8. if (m_applicationDefault != null)
  9. {
  10. if (m_args != null)
  11. Util.parseArgs(m_properties, m_args);
  12. if (this.getProperty(DBParams.LOCAL) == null)
  13. m_properties.put(DBParams.LOCAL, DEFAULT_LOCAL_DB);
  14. if (this.getProperty(DBParams.REMOTE) == null)
  15. m_properties.put(DBParams.REMOTE, DEFAULT_REMOTE_DB);
  16. if (this.getProperty(DBParams.TABLE) == null)
  17. m_properties.put(DBParams.TABLE, DEFAULT_TABLE_DB);
  18. }
  19. }
  20. /**

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

  1. /**
  2. * Constructor.
  3. * @param application The parent application.
  4. * @param strParams The task properties.
  5. */
  6. public void init(App application, String strParams, Map<String, Object> properties)
  7. {
  8. m_application = (App)application;
  9. if (m_application != null)
  10. m_application.addTask(this, null); // Add this task to the list
  11. if (properties != null)
  12. {
  13. if (m_properties != null)
  14. m_properties.putAll(properties);
  15. else
  16. m_properties = properties;
  17. }
  18. if (strParams != null)
  19. {
  20. if (m_properties == null)
  21. m_properties = new HashMap<String,Object>();
  22. Util.parseArgs(m_properties, strParams);
  23. }
  24. m_recordOwnerCollection = new RecordOwnerCollection(this);
  25. }
  26. /**

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

  1. /**
  2. *
  3. * @param args
  4. */
  5. public static void main(String[] args)
  6. {
  7. BaseApplet.main(args); // This says I'm stand-alone
  8. Map<String,Object> properties = null;
  9. if (args != null)
  10. {
  11. properties = new Hashtable<String,Object>();
  12. Util.parseArgs(properties, args);
  13. }
  14. properties.put(DBParams.TABLE, DBParams.JDBC);
  15. properties.put(DBParams.LOCAL, DBParams.JDBC);
  16. properties.put(DBParams.REMOTE, DBParams.JDBC);
  17. StandaloneProcessRunnerProcess process = new StandaloneProcessRunnerProcess(null, null, properties);
  18. process.run();
  19. process.free();
  20. System.exit(0);
  21. }
  22. }

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

  1. Util.parseArgs(propertiesTemp, args);
  2. if (propertiesTemp.get(DBParams.FREEIFDONE) == null)
  3. Util.parseArgs(properties, args);

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

  1. /**
  2. *
  3. * @param args
  4. */
  5. public static void main(String[] args)
  6. {
  7. Map<String,Object> properties = null;
  8. if (args != null)
  9. {
  10. properties = new Hashtable<String,Object>();
  11. Util.parseArgs(properties, args);
  12. }
  13. properties.put(DBParams.TABLE, DBParams.JDBC);
  14. properties.put(DBParams.LOCAL, DBParams.JDBC);
  15. properties.put(DBParams.REMOTE, DBParams.JDBC);
  16. App app = new Application(null, properties, null);
  17. ProcessRunnerTask task = new ProcessRunnerTask(app, null, null);
  18. StandaloneProcessRunnerProcess process = new StandaloneProcessRunnerProcess(task, null, properties);
  19. process.run();
  20. process.free();
  21. System.exit(0);
  22. }
  23. }

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

  1. /**
  2. * Set the default application.
  3. * @param application The default application.
  4. */
  5. public void setDefaultApplication(App application)
  6. {
  7. m_applicationDefault = application;
  8. if (application != null)
  9. if ((!(m_applicationDefault instanceof MainApplication)) || (application == m_applicationDefault))
  10. { // Move db access properties down
  11. if (m_args != null)
  12. Util.parseArgs(m_properties, m_args);
  13. if (m_properties.get(DBParams.LOCAL) == null)
  14. m_properties.put(DBParams.LOCAL, (application.getProperty(DBParams.LOCAL) != null) ? application.getProperty(DBParams.LOCAL) : DEFAULT_LOCAL_DB);
  15. if (m_properties.get(DBParams.REMOTE) == null)
  16. m_properties.put(DBParams.REMOTE, (application.getProperty(DBParams.REMOTE) != null) ? application.getProperty(DBParams.REMOTE) : DEFAULT_REMOTE_DB);
  17. if (m_properties.get(DBParams.TABLE) == null)
  18. m_properties.put(DBParams.TABLE, (application.getProperty(DBParams.TABLE) != null) ? application.getProperty(DBParams.TABLE) :DEFAULT_TABLE_DB);
  19. }
  20. }
  21. /**

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

  1. /**
  2. * Run this stand-alone.
  3. */
  4. public static void main(String args[])
  5. {
  6. Map<String,Object> properties = null;
  7. if (args != null)
  8. {
  9. properties = new Hashtable<String,Object>();
  10. Util.parseArgs(properties, args);
  11. }
  12. BaseApplication app = new MainApplication(null, properties, null);
  13. app.getTaskScheduler().addTask(new MessageReceivingPopClient());
  14. }
  15. /**

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

  1. args = argsDefault;
  2. Map<String,Object> properties = new Hashtable<String,Object>();
  3. Util.parseArgs(properties, args);
  4. if (properties.get(DBParams.LOCAL) == null)
  5. properties.put(DBParams.LOCAL, DBParams.JDBC);

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

  1. Util.parseArgs(map, strParam);
  2. return map;

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

  1. args = argsDefault;
  2. Map<String,Object> properties = new Hashtable<String,Object>();
  3. Util.parseArgs(properties, args);
  4. if (properties.get(DBParams.LOCAL) == null)
  5. properties.put(DBParams.LOCAL, DBParams.JDBC);

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

  1. /**
  2. * Save the current value of this field to the registration database.
  3. * and change the URL on the push-down stack to take this into consideration.
  4. */
  5. public void saveValue(BasePanel recordOwner)
  6. {
  7. if (recordOwner != null)
  8. {
  9. BaseField field = this.getOwner();
  10. String strCommand = ((BasePanel)recordOwner).getParentScreen().popHistory(1, false);
  11. if (m_recordOwnerCache != null)
  12. if (strCommand != null)
  13. if (strCommand.indexOf(m_recordOwnerCache.getClass().getName()) != -1)
  14. { // Yes this is the command to open this window
  15. Map<String,Object> properties = new Hashtable<String,Object>();
  16. Util.parseArgs(properties, strCommand);
  17. properties.put(field.getFieldName(), field.toString());
  18. strCommand = Utility.propertiesToURL(null, properties);
  19. }
  20. ((BasePanel)recordOwner).getParentScreen().pushHistory(strCommand, false);
  21. }
  22. }
  23. }

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

  1. args = argsDefault;
  2. Map<String,Object> properties = new Hashtable<String,Object>();
  3. Util.parseArgs(properties, args);
  4. if (properties.get(DBParams.LOCAL) == null)
  5. properties.put(DBParams.LOCAL, DBParams.JDBC);

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

  1. /**
  2. * Save the current value of this field to the registration database.
  3. * and change the URL on the push-down stack to take this into consideration.
  4. */
  5. public void saveValue(ComponentParent recordOwner)
  6. {
  7. if (recordOwner != null)
  8. {
  9. BaseField field = this.getOwner();
  10. String strCommand = ((ComponentParent)recordOwner).getParentScreen().popHistory(1, false);
  11. if (m_recordOwnerCache != null)
  12. if (strCommand != null)
  13. if (strCommand.indexOf(m_recordOwnerCache.getClass().getName()) != -1)
  14. { // Yes this is the command to open this window
  15. Map<String,Object> properties = new Hashtable<String,Object>();
  16. Util.parseArgs(properties, strCommand);
  17. properties.put(field.getFieldName(), field.toString());
  18. strCommand = Utility.propertiesToURL(null, properties);
  19. }
  20. ((ComponentParent)recordOwner).getParentScreen().pushHistory(strCommand, false);
  21. }
  22. }
  23. }

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

  1. /**
  2. * Save the current value of this field to the registration database.
  3. * and change the URL on the push-down stack to take this into consideration.
  4. */
  5. public void saveValue(BasePanel recordOwner)
  6. {
  7. if (recordOwner != null)
  8. {
  9. BaseField field = this.getOwner();
  10. String strCommand = ((BasePanel)recordOwner).getParentScreen().popHistory(1, false);
  11. if (m_recordOwnerCache != null)
  12. if (strCommand != null)
  13. if (strCommand.indexOf(m_recordOwnerCache.getClass().getName()) != -1)
  14. { // Yes this is the command to open this window
  15. Map<String,Object> properties = new Hashtable<String,Object>();
  16. Util.parseArgs(properties, strCommand);
  17. properties.put(field.getFieldName(), field.toString());
  18. strCommand = Utility.propertiesToURL(null, properties);
  19. }
  20. ((BasePanel)recordOwner).getParentScreen().pushHistory(strCommand, false);
  21. }
  22. }
  23. }

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

  1. Util.parseArgs(properties, strJobDef);

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

  1. task.setProperties(null);
  2. Map<String,Object> properties = new Hashtable<String,Object>();
  3. Util.parseArgs(properties, strCommand); // Set these properties
  4. task.setProperties(properties);
  5. BaseScreen.makeScreenFromParams(task, itsLocation, parentScreen, iCommandOptions, properties);

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

  1. task.setProperties(null);
  2. Map<String,Object> properties = new Hashtable<String,Object>();
  3. Util.parseArgs(properties, strCommand); // Set these properties
  4. task.setProperties(properties);
  5. BaseScreen.makeScreenFromParams(task, itsLocation, parentScreen, iCommandOptions, properties);

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

  1. String strLink = ((MenusModel)recMenu).getLink();
  2. Map<String,Object> properties = new Hashtable<String,Object>();
  3. Util.parseArgs(properties, strLink);
  4. strCommand = (String)properties.get(DBParams.JOB);
  5. if (strCommand != null)

相关文章