本文整理汇总了Java中org.pentaho.di.repository.RepositoryElementMetaInterface.getName方法的典型用法代码示例。如果您正苦于以下问题:Java RepositoryElementMetaInterface.getName方法的具体用法?Java RepositoryElementMetaInterface.getName怎么用?Java RepositoryElementMetaInterface.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.pentaho.di.repository.RepositoryElementMetaInterface
的用法示例。
在下文中一共展示了RepositoryElementMetaInterface.getName方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPathOf
import org.pentaho.di.repository.RepositoryElementMetaInterface; //导入方法依赖的package包/类
public static String getPathOf( RepositoryElementMetaInterface object ) {
if ( object != null && !object.isDeleted() ) {
RepositoryDirectoryInterface directory = object.getRepositoryDirectory();
if ( directory != null ) {
String path = directory.getPath();
if ( path != null ) {
if ( !path.endsWith( "/" ) ) {
path += "/";
}
path += object.getName();
return path;
}
}
}
return null;
}
示例2: getByReferenceData
import org.pentaho.di.repository.RepositoryElementMetaInterface; //导入方法依赖的package包/类
private void getByReferenceData(RepositoryElementMetaInterface jobInf) {
String path = jobInf.getRepositoryDirectory().getPath();
if (!path.endsWith("/"))
path += "/";
path += jobInf.getName();
wByReference.setText(path);
}
示例3: getByReferenceData
import org.pentaho.di.repository.RepositoryElementMetaInterface; //导入方法依赖的package包/类
private void getByReferenceData(RepositoryElementMetaInterface transInf) {
String path = transInf.getRepositoryDirectory().getPath();
if (!path.endsWith("/"))
path += "/";
path += transInf.getName();
wByReference.setText(path);
}
示例4: delSelectedObjects
import org.pentaho.di.repository.RepositoryElementMetaInterface; //导入方法依赖的package包/类
public boolean delSelectedObjects()
{
TreeItem items[] = wTree.getSelection();
boolean error = false;
MessageBox mb = new MessageBox(shell, SWT.ICON_WARNING | SWT.YES | SWT.NO);
mb.setMessage(BaseMessages.getString(PKG, "RepositoryExplorerDialog.Trans.Delete.Confirm.Message1")+(items.length>1?BaseMessages.getString(PKG, "RepositoryExplorerDialog.Trans.Delete.Confirm.Message2")+items.length+BaseMessages.getString(PKG, "RepositoryExplorerDialog.Trans.Delete.Confirm.Message3"):BaseMessages.getString(PKG, "RepositoryExplorerDialog.Trans.Delete.Confirm.Message4"))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
mb.setText(BaseMessages.getString(PKG, "RepositoryExplorerDialog.Trans.Delete.Confirm.Title")); //$NON-NLS-1$
int answer = mb.open();
if (answer!=SWT.YES)
{
return false;
}
for (int i=0;i<items.length;i++)
{
final RepositoryElementMetaInterface repositoryObject = objectMap.get(ConstUI.getTreePath(items[i], 0));
if (repositoryObject!=null) {
try {
switch(repositoryObject.getObjectType()) {
case TRANSFORMATION : rep.deleteTransformation(repositoryObject.getObjectId()); break;
case JOB : rep.deleteJob(repositoryObject.getObjectId()); break;
default:
break;
}
} catch(Exception e) {
new ErrorDialog(shell, BaseMessages.getString(PKG, "RepositoryExplorerDialog.Trans.Delete.ErrorRemoving.Title"), BaseMessages.getString(PKG, "RepositoryExplorerDialog.Trans.Delete.ErrorRemoving.Message")+repositoryObject.getName()+"]", e); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
error=true;
}
}
}
refreshTree();
return !error;
}
示例5: processRow
import org.pentaho.di.repository.RepositoryElementMetaInterface; //导入方法依赖的package包/类
public boolean processRow(StepMetaInterface smi, StepDataInterface sdi) throws KettleException {
if (first) {
first = false;
data.outputRowMeta = new RowMeta();
meta.getFields(data.outputRowMeta, getStepname(), null, null, this);
}
if (data.filenr>=data.list.size()) {
setOutputDone();
return false;
}
// Get the next repository object from the list...
//
RepositoryElementMetaInterface repositoryObject = data.list.get(data.filenr++);
Object[] outputRow = buildEmptyRow();
int outputIndex = 0;
String directory = repositoryObject.getRepositoryDirectory().getPath();
String name = repositoryObject.getName();
String path = directory.endsWith("/") ? directory+name : directory+"/"+name;
outputRow[outputIndex++] = path; // the directory and name of the object
outputRow[outputIndex++] = directory; // the directory
outputRow[outputIndex++] = name ; // the name
outputRow[outputIndex++] = repositoryObject.getObjectType().getTypeDescription(); // the object type
outputRow[outputIndex++] = repositoryObject.getObjectId().toString(); // the object ID
outputRow[outputIndex++] = repositoryObject.getModifiedUser(); // modified user
outputRow[outputIndex++] = repositoryObject.getModifiedDate(); // modified date
outputRow[outputIndex++] = repositoryObject.getDescription(); // description
if (meta.isIncludeRowNumber()) {
outputRow[outputIndex++] = Long.valueOf(data.rownr++);
}
// Finally, let's give this row of data to the next steps...
//
putRow(data.outputRowMeta, outputRow);
if (checkFeedback(getLinesInput())) {
if (log.isBasic())
logBasic(BaseMessages.getString(PKG, "GetRepositoryNames.Log.NrLine", "" + getLinesInput()));
}
return true;
}
示例6: ok
import org.pentaho.di.repository.RepositoryElementMetaInterface; //导入方法依赖的package包/类
private void ok() {
// Something has to be selected!
if (wTree.getSelectionCount() > 0) {
TreeItem ti = wTree.getSelection()[0];
// No directory!
if (!ti.getForeground().equals(dircolor)) {
int level = ConstUI.getTreeLevel(ti);
if (level > 0) {
repositoryObject = (RepositoryElementMetaInterface) ti.getData();
if (repositoryObject != null) {
objectName = repositoryObject.getName();
objectDirectory = repositoryObject.getRepositoryDirectory();
objectId = repositoryObject.getObjectId();
objectType = repositoryObject.getObjectType();
} else {
// For backward compatibility, we should rarely end up here...
//
String path[] = ConstUI.getTreeStrings(ti.getParentItem());
objectName = ti.getText(0);
objectType = null;
for (RepositoryObjectType type : RepositoryObjectType.values()) {
if (type.getTypeDescription().equalsIgnoreCase(ti.getText(1))) {
objectType = type;
break;
}
}
objectDirectory = directoryTree.findDirectory(path);
}
if (objectDirectory != null) {
dispose();
} else {
MessageBox mb = new MessageBox(shell, SWT.OK | SWT.ICON_ERROR);
mb.setMessage(BaseMessages.getString(PKG, "SelectObjectDialog.Dialog.DirectoryNotFound.Message")); //$NON-NLS-1$
mb.setText(BaseMessages.getString(PKG, "SelectObjectDialog.Dialog.DirectoryNotFound.Title")); //$NON-NLS-1$
mb.open();
}
}
}
}
}
示例7: processRow
import org.pentaho.di.repository.RepositoryElementMetaInterface; //导入方法依赖的package包/类
@Override
public boolean processRow( StepMetaInterface smi, StepDataInterface sdi ) throws KettleException {
if ( first ) {
first = false;
data.outputRowMeta = new RowMeta();
meta.getFields( data.outputRowMeta, getStepname(), null, null, this, repository, metaStore );
}
if ( data.filenr >= data.list.size() ) {
setOutputDone();
return false;
}
// Get the next repository object from the list...
//
RepositoryElementMetaInterface repositoryObject = data.list.get( data.filenr++ );
Object[] outputRow = buildEmptyRow();
int outputIndex = 0;
String directory = repositoryObject.getRepositoryDirectory().getPath();
String name = repositoryObject.getName();
String path = directory.endsWith( "/" ) ? directory + name : directory + "/" + name;
outputRow[outputIndex++] = path; // the directory and name of the object
outputRow[outputIndex++] = directory; // the directory
outputRow[outputIndex++] = name; // the name
outputRow[outputIndex++] = repositoryObject.getObjectType().getTypeDescription(); // the object type
outputRow[outputIndex++] = repositoryObject.getObjectId().toString(); // the object ID
outputRow[outputIndex++] = repositoryObject.getModifiedUser(); // modified user
outputRow[outputIndex++] = repositoryObject.getModifiedDate(); // modified date
outputRow[outputIndex++] = repositoryObject.getDescription(); // description
if ( meta.isIncludeRowNumber() ) {
outputRow[outputIndex++] = Long.valueOf( data.rownr++ );
}
// Finally, let's give this row of data to the next steps...
//
putRow( data.outputRowMeta, outputRow );
if ( checkFeedback( getLinesInput() ) ) {
if ( log.isBasic() ) {
logBasic( BaseMessages.getString( PKG, "GetRepositoryNames.Log.NrLine", "" + getLinesInput() ) );
}
}
return true;
}
示例8: ok
import org.pentaho.di.repository.RepositoryElementMetaInterface; //导入方法依赖的package包/类
private void ok() {
// Something has to be selected!
if ( wTree.getSelectionCount() > 0 ) {
TreeItem ti = wTree.getSelection()[ 0 ];
// No directory!
if ( !Boolean.TRUE.equals( wTree.getSelection()[ 0 ].getData( "isFolder" ) ) ) {
int level = ConstUI.getTreeLevel( ti );
if ( level > 0 ) {
repositoryObject = (RepositoryElementMetaInterface) ti.getData();
if ( repositoryObject != null ) {
objectName = repositoryObject.getName();
objectDirectory = repositoryObject.getRepositoryDirectory();
objectId = repositoryObject.getObjectId();
objectType = repositoryObject.getObjectType();
} else {
// For backward compatibility, we should rarely end up here...
//
String[] path = ConstUI.getTreeStrings( ti.getParentItem() );
objectName = ti.getText( 0 );
objectType = null;
for ( RepositoryObjectType type : RepositoryObjectType.values() ) {
if ( type.getTypeDescription().equalsIgnoreCase( ti.getText( 1 ) ) ) {
objectType = type;
break;
}
}
objectDirectory = directoryTree.findDirectory( path );
}
if ( objectDirectory != null ) {
dispose();
} else {
MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_ERROR );
mb.setMessage( BaseMessages.getString( PKG, "SelectObjectDialog.Dialog.DirectoryNotFound.Message" ) );
mb.setText( BaseMessages.getString( PKG, "SelectObjectDialog.Dialog.DirectoryNotFound.Title" ) );
mb.open();
}
}
}
}
}
示例9: delSelectedObjects
import org.pentaho.di.repository.RepositoryElementMetaInterface; //导入方法依赖的package包/类
public boolean delSelectedObjects() {
TreeItem[] items = wTree.getSelection();
boolean error = false;
MessageBox mb = new MessageBox( shell, SWT.ICON_WARNING | SWT.YES | SWT.NO );
mb
.setMessage( BaseMessages.getString( PKG, "RepositoryExplorerDialog.Trans.Delete.Confirm.Message1" )
+ ( items.length > 1
? BaseMessages.getString( PKG, "RepositoryExplorerDialog.Trans.Delete.Confirm.Message2" )
+ items.length + BaseMessages.getString( PKG, "RepositoryExplorerDialog.Trans.Delete.Confirm.Message3" )
: BaseMessages.getString( PKG, "RepositoryExplorerDialog.Trans.Delete.Confirm.Message4" ) ) );
mb.setText( BaseMessages.getString( PKG, "RepositoryExplorerDialog.Trans.Delete.Confirm.Title" ) );
int answer = mb.open();
if ( answer != SWT.YES ) {
return false;
}
for ( int i = 0; i < items.length; i++ ) {
final RepositoryElementMetaInterface repositoryObject = objectMap.get( ConstUI.getTreePath( items[i], 0 ) );
if ( repositoryObject != null ) {
try {
switch ( repositoryObject.getObjectType() ) {
case TRANSFORMATION:
rep.deleteTransformation( repositoryObject.getObjectId() );
break;
case JOB:
rep.deleteJob( repositoryObject.getObjectId() );
break;
default:
break;
}
} catch ( Exception e ) {
new ErrorDialog(
shell,
BaseMessages.getString( PKG, "RepositoryExplorerDialog.Trans.Delete.ErrorRemoving.Title" ), BaseMessages
.getString( PKG, "RepositoryExplorerDialog.Trans.Delete.ErrorRemoving.Message" )
+ repositoryObject.getName() + "]", e );
error = true;
}
}
}
refreshTree();
return !error;
}