本文整理了Java中org.jbundle.model.util.Util
类的一些代码示例,展示了Util
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util
类的具体详情如下:
包路径:org.jbundle.model.util.Util
类名称:Util
暂无
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Parse the command string into properties.
* @param strCommand
* @param properties
* @return
*/
public String getProperties(String strCommand, Map<String,Object> properties)
{
int iIndex = strCommand.indexOf('=');
if (iIndex != -1)
{
if (this.getParentScreen().getTask() != null)
Util.parseArgs(properties, strCommand);
if (properties.get(DBParams.COMMAND) != null)
strCommand = (String)properties.get(DBParams.COMMAND);
}
return strCommand;
}
/**
代码示例来源:origin: org.jbundle.thin.base.db/org.jbundle.thin.base.db
String typicalResourceClassName = null;
try {
typicalResourceClassName = Util.convertClassName(classResource.getName(), Constants.RES_SUBPACKAGE, 2) + "Resources";
resourceBundle = ClassServiceUtility.getClassService().getResourceBundle(typicalResourceClassName, locale, null, classLoader);
} catch (MissingResourceException ex) {
while (resourceBundle == null)
String resourceClassName = Util.convertClassName(classResource.getName(), Constants.RES_SUBPACKAGE, i);
if (resourceClassName == null)
return null;
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* This is a special method that stops the code when this screen is opened as a task.
*/
public void stopTask()
{
Util.getLogger().warning("Error - Attempt to stop an AutoTask");
}
/**
代码示例来源:origin: org.jbundle.base.message/org.jbundle.base.message.core
/**
* Get the message header data as a XML String.
* @return
*/
public StringBuffer addXML(StringBuffer sbXML)
{
if (sbXML == null)
sbXML = new StringBuffer();
Util.addStartTag(sbXML, BaseMessage.HEADER_TAG).append(DBConstants.RETURN);
Map<String,Object> map = this.getProperties();
Util.addXMLMap(sbXML, map);
Util.addEndTag(sbXML, BaseMessage.HEADER_TAG).append(DBConstants.RETURN);
return sbXML;
}
/**
代码示例来源:origin: org.jbundle.thin.base/org.jbundle.thin.base.thread
Util.parseArgs(properties, strJobDef);
Util.getLogger().warning("Illegal job type passed to TaskScheduler: " + job);
Util.getLogger().warning("Error: Illegal job type");
代码示例来源:origin: org.jbundle.base.screen/org.jbundle.base.screen.control.servlet
String fullFilepath = Util.getFullFilename(filename, null, filepath, true);
if (app != null)
fileURL = app.getResourceURL(fullFilepath, null);
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Get the message header data as a XML String.
* @return
*/
public StringBuffer addXML(StringBuffer sbXML)
{
if (sbXML == null)
sbXML = new StringBuffer();
Util.addStartTag(sbXML, BaseMessage.HEADER_TAG).append(DBConstants.RETURN);
Map<String,Object> map = this.getProperties();
Util.addXMLMap(sbXML, map);
Util.addEndTag(sbXML, BaseMessage.HEADER_TAG).append(DBConstants.RETURN);
return sbXML;
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
String fullFilepath = Util.getFullFilename(filename, null, filepath, true);
if (app != null)
fileURL = app.getResourceURL(fullFilepath, null);
代码示例来源:origin: org.jbundle.base.screen/org.jbundle.base.screen.model
/**
* Parse the command string into properties.
* @param strCommand
* @param properties
* @return
*/
public String getProperties(String strCommand, Map<String,Object> properties)
{
int iIndex = strCommand.indexOf('=');
if (iIndex != -1)
{
if (this.getParentScreen().getTask() != null)
Util.parseArgs(properties, strCommand);
if (properties.get(DBParams.COMMAND) != null)
strCommand = (String)properties.get(DBParams.COMMAND);
}
return strCommand;
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Convert the external form to the internal message form.
* You must override this method.
* @param externalMessage The received message to be converted to internal form.
* @return The internal message.
*/
public int convertExternalToInternal(Object recordOwner)
{
String strMessage = (String)this.getRawData();
strMessage = this.stripHtmlTags((String)strMessage);
Map<String,Object> map = this.getEMailParams(strMessage);
this.moveHeaderParams(map, ((TrxMessageHeader)this.getMessage().getMessageHeader()).getMessageHeaderMap());
String rootTag = BaseMessage.ROOT_TAG;
if (this.getMessage() != null)
if (this.getMessage().getMessageDataDesc(null) != null)
if (this.getMessage().getMessageDataDesc(null).getKey() != null)
rootTag = this.getMessage().getMessageDataDesc(null).getKey();
StringBuffer sb = new StringBuffer();
Util.addStartTag(sb, rootTag);
Util.addXMLMap(sb, map);
Util.addEndTag(sb, rootTag);
String strXML = sb.toString();
if (this.getXSLTDocument() != null)
strXML = this.transformMessage(strXML, null); // Now use the XSLT document to convert this XSL document.
boolean bSuccess = this.getMessage().setXML(strXML);
return bSuccess ? DBConstants.NORMAL_RETURN : DBConstants.ERROR_RETURN;
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base
/**
* This is a special method that stops the code when this screen is opened as a task.
*/
public void stopTask()
{
Util.getLogger().warning("Error - Attempt to stop an AutoTask");
}
/**
代码示例来源:origin: org.jbundle.base.db/org.jbundle.base.db
if (strRecordClass.startsWith("."))
strRecordClass = DBConstants.ROOT_PACKAGE + strRecordClass.substring(1); // Never
String strThinRecordClass = Util.convertClassName(strRecordClass, DBConstants.THIN_SUBPACKAGE);
FieldList fieldList = NetUtility.makeThinRecordFromClassname(strThinRecordClass);
if (fieldList == null)
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Set the default application.
* @param application The default application.
*/
public void setDefaultApplication(Application application)
{
m_applicationDefault = application;
if (m_applicationDefault != null)
{
if (m_args != null)
Util.parseArgs(m_properties, m_args);
if (this.getProperty(DBParams.LOCAL) == null)
m_properties.put(DBParams.LOCAL, DEFAULT_LOCAL_DB);
if (this.getProperty(DBParams.REMOTE) == null)
m_properties.put(DBParams.REMOTE, DEFAULT_REMOTE_DB);
if (this.getProperty(DBParams.TABLE) == null)
m_properties.put(DBParams.TABLE, DEFAULT_TABLE_DB);
}
}
/**
代码示例来源:origin: org.jbundle.thin.base/org.jbundle.thin.base.remote
/**
* Remove this message filter from this queue.
* Also remove the remote message filter.
* @param messageFilter The message filter to remove.
* @param bFreeFilter If true, free this filter.
* @return True if successful.
*/
public boolean removeMessageFilter(MessageFilter messageFilter, boolean bFreeFilter)
{
boolean bSuccess = false;
try {
if (((BaseMessageFilter)messageFilter).getRemoteFilterID() == null)
bSuccess = true; // No remote filter to remove
else
bSuccess = m_receiveQueue.removeRemoteMessageFilter((BaseMessageFilter)messageFilter, bFreeFilter);
} catch (RemoteException ex) {
ex.printStackTrace();
}
if (!bSuccess)
Util.getLogger().warning("Remote listener not removed"); // Never
return super.removeMessageFilter(messageFilter, bFreeFilter);
}
/**
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
if (strRecordClass.startsWith("."))
strRecordClass = DBConstants.ROOT_PACKAGE + strRecordClass.substring(1); // Never
String strThinRecordClass = Util.convertClassName(strRecordClass, DBConstants.THIN_SUBPACKAGE);
FieldList fieldList = NetUtility.makeThinRecordFromClassname(strThinRecordClass);
if (fieldList == null)
代码示例来源:origin: org.jbundle.thin.base/org.jbundle.thin.base.thread
/**
* Constructor.
* @param application The parent application.
* @param strParams The task properties.
*/
public void init(App application, String strParams, Map<String, Object> properties)
{
m_application = (App)application;
if (m_application != null)
m_application.addTask(this, null); // Add this task to the list
if (properties != null)
{
if (m_properties != null)
m_properties.putAll(properties);
else
m_properties = properties;
}
if (strParams != null)
{
if (m_properties == null)
m_properties = new HashMap<String,Object>();
Util.parseArgs(m_properties, strParams);
}
m_recordOwnerCollection = new RecordOwnerCollection(this);
}
/**
代码示例来源:origin: org.jbundle.thin.base/org.jbundle.thin.base.thread
/**
* Start a task that calls the syncNotify 'done' method when the screen is done displaying.
* This class is a platform-neutral implementation of SwinSyncPageWorker that
* guarantees a page has displayed before doing a compute-intensive task.
*/
public static SyncWorker startPageWorker(SyncPage syncPage, SyncNotify syncNotify, Runnable swingPageLoader, Map<String,Object> map, boolean bManageCursor)
{
SyncWorker syncWorker = (SyncWorker)ClassServiceUtility.getClassService().makeObjectFromClassName(JAVA_WORKER);
if (syncWorker == null)
syncWorker = (SyncWorker)ClassServiceUtility.getClassService().makeObjectFromClassName(ANDROID_WORKER);
if (syncWorker != null)
{
syncWorker.init(syncPage, syncNotify, swingPageLoader, map, bManageCursor);
syncWorker.start();
}
else
Util.getLogger().severe("SyncWorker does not exist!");
return syncWorker;
}
public static final String JAVA_WORKER = "org.jbundle.thin.base.screen.print.thread.SwingSyncPageWorker";
代码示例来源:origin: org.jbundle.base/org.jbundle.base
if (strRecordClass.startsWith("."))
strRecordClass = DBConstants.ROOT_PACKAGE + strRecordClass.substring(1); // Never
String strThinRecordClass = Util.convertClassName(strRecordClass, DBConstants.THIN_SUBPACKAGE);
FieldList fieldList = NetUtility.makeThinRecordFromClassname(strThinRecordClass);
if (fieldList == null)
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
*
* @param args
*/
public static void main(String[] args)
{
BaseApplet.main(args); // This says I'm stand-alone
Map<String,Object> properties = null;
if (args != null)
{
properties = new Hashtable<String,Object>();
Util.parseArgs(properties, args);
}
properties.put(DBParams.TABLE, DBParams.JDBC);
properties.put(DBParams.LOCAL, DBParams.JDBC);
properties.put(DBParams.REMOTE, DBParams.JDBC);
StandaloneProcessRunnerProcess process = new StandaloneProcessRunnerProcess(null, null, properties);
process.run();
process.free();
System.exit(0);
}
}
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
Util.parseArgs(propertiesTemp, args);
if (propertiesTemp.get(DBParams.FREEIFDONE) == null)
Util.parseArgs(properties, args);
内容来源于网络,如有侵权,请联系作者删除!