本文整理匯總了Java中org.pentaho.di.i18n.BaseMessages.getString方法的典型用法代碼示例。如果您正苦於以下問題:Java BaseMessages.getString方法的具體用法?Java BaseMessages.getString怎麽用?Java BaseMessages.getString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.pentaho.di.i18n.BaseMessages
的用法示例。
在下文中一共展示了BaseMessages.getString方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: readKeyMaterial
import org.pentaho.di.i18n.BaseMessages; //導入方法依賴的package包/類
/**
* Read the stuff between the start and end markers of a key file
*
* @param endMarker the end marker to watch for
* @param reader the reader to read from
* @return decoded base64 bytes
* @throws IOException if a problem occurs
*/
private static byte[] readKeyMaterial( String endMarker, BufferedReader reader ) throws IOException {
String line = null;
StringBuffer buf = new StringBuffer();
while ( ( line = reader.readLine() ) != null ) {
if ( line.contains( endMarker ) ) {
return DatatypeConverter.parseBase64Binary( buf.toString() );
}
buf.append( line.trim() );
}
throw new IOException(
BaseMessages.getString( MQTTPublisherMeta.PKG, "MQTTClientSSL.Error.InvalidPEMFileNoEndMarker" ) );
}
示例2: loadRep
import org.pentaho.di.i18n.BaseMessages; //導入方法依賴的package包/類
public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,
List<SlaveServer> slaveServers ) throws KettleException {
try {
setManagementAction( rep.getJobEntryAttributeString( id_jobentry, MANAGEMENT_ACTION ) );
setReplace( rep.getJobEntryAttributeBoolean( id_jobentry, REPLACE ) );
setFailIfExists( rep.getJobEntryAttributeBoolean( id_jobentry, FAIL_IF_EXISTS ) );
setWarehouseName( rep.getJobEntryAttributeString( id_jobentry, WAREHOUSE_NAME ) );
setWarehouseSize( rep.getJobEntryAttributeString( id_jobentry, WAREHOUSE_SIZE ) );
setWarehouseType( rep.getJobEntryAttributeString( id_jobentry, WAREHOUSE_TYPE ) );
setMaxClusterCount( rep.getJobEntryAttributeString( id_jobentry, MAX_CLUSTER_COUNT ) );
setMinClusterCount( rep.getJobEntryAttributeString( id_jobentry, MIN_CLUSTER_COUNT ) );
setAutoSuspend( rep.getJobEntryAttributeString( id_jobentry, AUTO_SUSPEND ) );
setAutoResume( rep.getJobEntryAttributeBoolean( id_jobentry, AUTO_RESUME ) );
setInitiallySuspended( rep.getJobEntryAttributeBoolean( id_jobentry, INITIALLY_SUSPENDED ) );
setResourceMonitor( rep.getJobEntryAttributeString( id_jobentry, RESOURCE_MONITOR ) );
setComment( rep.getJobEntryAttributeString( id_jobentry, COMMENT ) );
databaseMeta = rep.loadDatabaseMetaFromJobEntryAttribute( id_jobentry, CONNECTION, "id_database", databases );
setFailIfNotExists( rep.getJobEntryAttributeBoolean( id_jobentry, FAIL_IF_NOT_EXISTS ) );
} catch ( KettleException dbe ) {
throw new KettleException( BaseMessages.getString( PKG, "SnowflakeWarehouseManager.Error.Exception.UnableLoadRep" )
+ id_jobentry, dbe );
}
}
示例3: ok
import org.pentaho.di.i18n.BaseMessages; //導入方法依賴的package包/類
private void ok() {
if ( Const.isEmpty( wStepname.getText() ) ) {
return;
}
stepname = wStepname.getText(); // return value
input.setConnection(null);
String connectionName = wConnection.getText();
if (StringUtils.isNotEmpty(connectionName)) {
try{
HCPConnection connection = HCPConnectionUtils.getConnectionFactory(metaStore).loadElement(connectionName);
input.setConnection(connection);
} catch(Exception exception) {
new ErrorDialog(shell,
BaseMessages.getString(PKG, "HCPDeleteDialog.Error.ErrorLoadingConnectionWithName.Title"),
BaseMessages.getString(PKG, "HCPDeleteDialog.Error.ErrorLoadingConnectionWithName.Message", connectionName), exception);
}
}
input.setTargetFileField(wTargetFileField.getText() );
input.setResponseCodeField(wResponseCodeField.getText());
input.setResponseTimeField(wResponseTimeField.getText());
dispose();
}
示例4: readRep
import org.pentaho.di.i18n.BaseMessages; //導入方法依賴的package包/類
/**
* Read the steps information from a Kettle repository
*
* @param rep The repository to read from
* @param idStep The step ID
* @param databases The databases to reference
* @param counters The counters to reference
* @throws KettleException When an unexpected error occurred (database, network, etc)
*/
@Override public void readRep(Repository rep, ObjectId idStep, List<DatabaseMeta> databases,
Map<String, Counter> counters) throws KettleException {
try {
tabelName = rep.getStepAttributeString(idStep, "TableName");
mdkeySize = rep.getStepAttributeString(idStep, "MDKeySize");
measureCount = rep.getStepAttributeString(idStep, "Measurecount");
heirAndKeySize = rep.getStepAttributeString(idStep, "HeirAndKeySize");
databaseName = rep.getStepAttributeString(idStep, "databaseName");
tableName = rep.getStepAttributeString(idStep, "tableName");
groupByEnabled = rep.getStepAttributeString(idStep, "isGroupByEnabled");
aggregatorClassString = rep.getStepAttributeString(idStep, "aggregatorClassString");
aggregatorString = rep.getStepAttributeString(idStep, "aggregatorString");
factDimLensString = rep.getStepAttributeString(idStep, "factDimLensString");
levelAnddataTypeString = rep.getStepAttributeString(idStep, "levelAnddataTypeString");
partitionID = rep.getStepAttributeString(idStep, "partitionID");
segmentId = rep.getStepAttributeString(idStep, "segmentId");
taskNo = rep.getStepAttributeString(idStep, "taskNo");
} catch (Exception exception) {
throw new KettleException(BaseMessages
.getString(PKG, "CarbonDataWriterStepMeta.Exception.UnexpectedErrorInReadingStepInfo"),
exception);
}
}
示例5: readRep
import org.pentaho.di.i18n.BaseMessages; //導入方法依賴的package包/類
@Override public void readRep(Repository rep, ObjectId idStep, List<DatabaseMeta> databases,
Map<String, Counter> counters) throws KettleException {
try {
tableName = rep.getStepAttributeString(idStep, "TableName");
aggregateLevels = rep.getStepAttributeString(idStep, "AggregateLevels");
numberOfCores = rep.getStepAttributeString(idStep, "NumberOfCores");
databaseName = rep.getStepAttributeString(idStep, "databaseName");
tableName = rep.getStepAttributeString(idStep, "tableName");
noDictionaryDims = rep.getStepAttributeString(idStep, "noDictionaryDims");
measureCount = rep.getStepAttributeString(idStep, "measureCount");
columnGroupsString = rep.getStepAttributeString(idStep, "dimensionsStoreType");
dimensionCount = rep.getStepAttributeString(idStep, "dimensionCount");
complexDimsCount = rep.getStepAttributeString(idStep, "complexDimsCount");
complexTypeString = rep.getStepAttributeString(idStep, "complexTypeString");
measureDataType = rep.getStepAttributeString(idStep, "measureDataType");
taskNo = rep.getStepAttributeString(idStep, "taskNo");
factTimeStamp = rep.getStepAttributeString(idStep, "factTimeStamp");
partitionID = rep.getStepAttributeString(idStep, "partitionID");
isUseInvertedIndex = rep.getStepAttributeString(idStep, "isUseInvertedIndex");
segmentId = rep.getStepAttributeString(idStep, "segmentId");
noDictionaryDimsMapping = rep.getStepAttributeString(idStep, "noDictionaryDimsMapping");
} catch (Exception e) {
throw new KettleException(BaseMessages
.getString(pkg, "CarbonMDKeyStepMeta.Exception.UnexpectedErrorInReadingStepInfo"), e);
}
}
示例6: getFields
import org.pentaho.di.i18n.BaseMessages; //導入方法依賴的package包/類
@Override
public void getFields(RowMetaInterface row, String name,
RowMetaInterface[] info, StepMeta nextStep, VariableSpace space,
Repository repository, IMetaStore metaStore)
throws KettleStepException {
// Check Target Field Name
if (Const.isEmpty(targetFieldName)) {
throw new KettleStepException(BaseMessages.getString(PKG,
"ConcatFieldsMeta.CheckResult.TargetFieldNameMissing"));
}
// add targetFieldName
ValueMetaInterface vValue = new ValueMetaDom(targetFieldName,
ValueMetaDom.TYPE_DOM, targetFieldLength, 0);
vValue.setOrigin(name);
row.addValueMeta(vValue);
}
示例7: initPython
import org.pentaho.di.i18n.BaseMessages; //導入方法依賴的package包/類
public static void initPython() throws KettleException {
// check python availability
if ( !PythonSession.pythonAvailable() ) {
// initialize...
PythonSession.initSession( "python" );
} else {
return;
}
if ( !PythonSession.pythonAvailable() ) {
String pyCheckResults = PythonSession.getPythonEnvCheckResults();
if ( !Const.isEmpty( pyCheckResults ) ) {
throw new KettleException(
BaseMessages.getString( PKG, "CPythonScriptExecutor.Error.PythonInitializationProblem" ) + ":\n\n"
+ pyCheckResults );
} else {
throw new KettleException(
BaseMessages.getString( PKG, "CPythonScriptExecutor.Error.PythonInitializationProblem" ) );
}
}
}
示例8: readDelimitedFromInputStream
import org.pentaho.di.i18n.BaseMessages; //導入方法依賴的package包/類
/**
* Read length delimited data from the input stream
*
* @param inputStream the input stream to read from
* @return the bytes read
* @throws IOException if a problem occurs
*/
protected static byte[] readDelimitedFromInputStream( InputStream inputStream ) throws IOException {
byte[] sizeBytes = new byte[4];
int numRead = inputStream.read( sizeBytes, 0, 4 );
if ( numRead < 4 ) {
throw new IOException( BaseMessages.getString( PKG, "ServerUtils.Error.FailedToReadMessageSize" ) );
}
int messageLength = ByteBuffer.wrap( sizeBytes ).getInt();
byte[] messageData = new byte[messageLength];
// for (numRead = 0; numRead < messageLength; numRead +=
// inputStream.read(messageData, numRead, messageLength - numRead));
for ( numRead = 0; numRead < messageLength; ) {
int currentNumRead = inputStream.read( messageData, numRead, messageLength - numRead );
if ( currentNumRead < 0 ) {
throw new IOException( BaseMessages.getString( PKG, "ServerUtils.Error.UnexpectedEndOfStream" ) );
}
numRead += currentNumRead;
}
return messageData;
}
示例9: deleteUnitTest
import org.pentaho.di.i18n.BaseMessages; //導入方法依賴的package包/類
protected void deleteUnitTest(String unitTestName) {
MessageBox box = new MessageBox(Spoon.getInstance().getShell(), SWT.YES | SWT.NO);
box.setText(BaseMessages.getString(PKG, "ShowUnitTestMenuExtensionPoint.YouSureToDelete.Title"));
box.setMessage(BaseMessages.getString(PKG, "ShowUnitTestMenuExtensionPoint.YouSureToDelete.Message", unitTestName));
int answer = box.open();
if ((answer&SWT.YES)!=0) {
try {
MetaStoreFactory<TransUnitTest> factory = new MetaStoreFactory<TransUnitTest>(TransUnitTest.class, Spoon.getInstance().getMetaStore(), PentahoDefaults.NAMESPACE);
factory.deleteElement(unitTestName);
DataSetHelper.getInstance().detachUnitTest();
} catch(Exception exception) {
new ErrorDialog(Spoon.getInstance().getShell(),
BaseMessages.getString(PKG, "ShowUnitTestMenuExtensionPoint.ErrorDeletingUnitTest.Title"),
BaseMessages.getString(PKG, "ShowUnitTestMenuExtensionPoint.ErrorDeletingUnitTest.Message", unitTestName),
exception);
}
}
}
示例10: getFields
import org.pentaho.di.i18n.BaseMessages; //導入方法依賴的package包/類
private void getFields(){
try {
RowMetaInterface rowMeta = transMeta.getPrevStepFields( stepname );
if ( rowMeta != null ) {
BaseStepDialog.getFieldsFromPrevious( rowMeta, m_fieldsView, 1,
new int[]{1}, null, -1, -1,
null );
}
}
catch ( KettleException e ){
logError( BaseMessages.getString( PKG, "System.Dialog.GetFieldsFailed.Message" ), //$NON-NLS-1$
e );
new ErrorDialog( shell,
BaseMessages.getString( PKG, "System.Dialog.GetFieldsFailed.Title" ), BaseMessages.getString( PKG, //$NON-NLS-1$
"System.Dialog.GetFieldsFailed.Message" ), e ); //$NON-NLS-1$
}
}
示例11: readRep
import org.pentaho.di.i18n.BaseMessages; //導入方法依賴的package包/類
public void readRep(Repository rep, ObjectId id_step, List<DatabaseMeta> databases, Map<String, Counter> counters) throws KettleException
{
try
{
int nrfields = rep.countNrStepAttributes(id_step, "field_name"); //$NON-NLS-1$
allocate(nrfields);
for (int i=0;i<nrfields;i++)
{
fieldName[i] = rep.getStepAttributeString(id_step, i, "field_name"); //$NON-NLS-1$
replaceByFieldValue[i] = rep.getStepAttributeString(id_step, i, "replace_by"); //$NON-NLS-1$
}
}
catch(Exception e)
{
throw new KettleException(BaseMessages.getString(PKG, "SetValueFieldMeta.Exception.UnexpectedErrorReadingStepInfoFromRepository"), e); //$NON-NLS-1$
}
}
示例12: newNote
import org.pentaho.di.i18n.BaseMessages; //導入方法依賴的package包/類
public void newNote() {
selectionRegion = null;
String title = BaseMessages.getString(PKG, "TransGraph.Dialog.NoteEditor.Title"); //$NON-NLS-1$
NotePadDialog dd = new NotePadDialog(transMeta, shell, title); //$NON-NLS-1$
NotePadMeta n = dd.open();
if (n != null)
{
NotePadMeta npi = new NotePadMeta(n.getNote(), lastclick.x, lastclick.y, ConstUI.NOTE_MIN_SIZE,
ConstUI.NOTE_MIN_SIZE,n.getFontName(),n.getFontSize(), n.isFontBold(), n.isFontItalic(),
n.getFontColorRed(),n.getFontColorGreen(),n.getFontColorBlue(),
n.getBackGroundColorRed(), n.getBackGroundColorGreen(),n.getBackGroundColorBlue(),
n.getBorderColorRed(), n.getBorderColorGreen(),n.getBorderColorBlue(),
n.isDrawShadow());
transMeta.addNote(npi);
spoon.addUndoNew(transMeta, new NotePadMeta[] { npi }, new int[] { transMeta.indexOfNote(npi) });
redraw();
}
}
示例13: loadRep
import org.pentaho.di.i18n.BaseMessages; //導入方法依賴的package包/類
public void loadRep(Repository rep, ObjectId id_jobentry, List<DatabaseMeta> databases, List<SlaveServer> slaveServers) throws KettleException
{
try
{
connection = rep.loadDatabaseMetaFromJobEntryAttribute(id_jobentry, "connection", "id_database", databases);
schemaname = rep.getJobEntryAttributeString(id_jobentry, "schemaname");
tablename = rep.getJobEntryAttributeString(id_jobentry, "tablename");
successCondition = getSuccessConditionByCode(Const.NVL(rep.getJobEntryAttributeString(id_jobentry,"success_condition"), ""));
limit = rep.getJobEntryAttributeString(id_jobentry, "limit");
iscustomSQL = rep.getJobEntryAttributeBoolean(id_jobentry, "is_custom_sql");
isUseVars = rep.getJobEntryAttributeBoolean(id_jobentry, "is_usevars");
isAddRowsResult = rep.getJobEntryAttributeBoolean(id_jobentry, "add_rows_result");
isClearResultList = rep.getJobEntryAttributeBoolean(id_jobentry, "clear_result_rows");
customSQL = rep.getJobEntryAttributeString(id_jobentry, "custom_sql");
}
catch(KettleDatabaseException dbe)
{
throw new KettleException(BaseMessages.getString(PKG, "JobEntryEvalTableContent.UnableLoadRep",""+id_jobentry), dbe);
}
}
示例14: setupColumnFamiliesCombo
import org.pentaho.di.i18n.BaseMessages; //導入方法依賴的package包/類
private void setupColumnFamiliesCombo() {
String nodes = this.transMeta.environmentSubstitute(this.hostText.getText());
String port_s = this.transMeta.environmentSubstitute(this.portText.getText());
String username = this.transMeta.environmentSubstitute(this.userText.getText());
String password = this.transMeta.environmentSubstitute(this.passText.getText());
String keyspace = this.transMeta.environmentSubstitute(this.keyspaceText.getText());
Boolean withSSL = this.sslenabledBut.getSelection();
String truststorefile = this.transMeta.environmentSubstitute(this.truststorefileText.getText());
String truststorepass = this.transMeta.environmentSubstitute(this.truststorepassText.getText());
ConnectionCompression compression = ConnectionCompression.fromString(this.wCompression.getText());
Cluster cluster;
try {
try {
this.connection = Utils.connect(nodes, port_s, username, password, keyspace, withSSL, truststorefile, truststorepass, compression);
cluster = this.connection.getSession().getCluster();
Collection<TableMetadata> colFams = cluster.getMetadata().getKeyspace(this.transMeta.environmentSubstitute(this.keyspaceText.getText())).getTables();
this.columnFamilyCombo.removeAll();
for (TableMetadata row : colFams) {
this.columnFamilyCombo.add(row.getName());
}
}
catch (Exception ex) {
this.logError(String.valueOf(BaseMessages.getString(PKG, "AutSoftCassandraOutputDialog.Error.ProblemGettingSchemaInfo.Message", (String[])new String[0])) + ":\n\n" + ex.getMessage(), ex);
new org.pentaho.di.ui.core.dialog.ErrorDialog(this.shell, BaseMessages.getString(PKG, "AutSoftCassandraOutputDialog.Error.ProblemGettingSchemaInfo.Title", (String[])new String[0]), String.valueOf(BaseMessages.getString(PKG, "AutSoftCassandraOutputDialog.Error.ProblemGettingSchemaInfo.Message", (String[])new String[0])) + ":\n\n" + ex.getMessage(), ex);
if (this.connection != null) {
this.connection.release();
}
}
}
finally {
if (this.connection != null) {
this.connection.release();
}
}
}
示例15: get
import org.pentaho.di.i18n.BaseMessages; //導入方法依賴的package包/類
private void get() {
try {
RowMetaInterface r = this.transMeta.getPrevStepFields(this.stepname);
if ((r != null) && (!r.isEmpty())) {
BaseStepDialog.getFieldsFromPrevious(r, this.fieldsList, 1, new int[]{1, 2}, new int[0], -1, -1,
null);
}
} catch (KettleException e) {
new ErrorDialog(this.shell,
BaseMessages.getString(PKG, "AutSoftCassandraOutputDialog.FailedToGetFields.DialogTitle"),
BaseMessages.getString(PKG, "AutSoftCassandraOutputDialog.FailedToGetFields.DialogMessage"), e);
}
}