use of org.pentaho.di.repository.pur.PurRepositoryLocation in project pentaho-kettle by pentaho.
the class RepositoryPerformanceApp method startupRepository.
protected void startupRepository() throws Exception {
// PentahoLicenseVerifier.setStreamOpener(new TestLicenseStream("pdi-ee=true")); //$NON-NLS-1$
KettleEnvironment.init();
repositoryMeta = new PurRepositoryMeta();
repositoryMeta.setName("JackRabbit");
repositoryMeta.setDescription("JackRabbit test repository");
((PurRepositoryMeta) repositoryMeta).setRepositoryLocation(new PurRepositoryLocation(repositoryLocation));
userInfo = new UserInfo(EXP_LOGIN, "password", EXP_USERNAME, "Apache Tomcat user", true);
repository = new PurRepository();
repository.init(repositoryMeta);
repository.connect(EXP_LOGIN, "password");
}
use of org.pentaho.di.repository.pur.PurRepositoryLocation in project pentaho-kettle by pentaho.
the class RepositoryConfigController method initializeModel.
private void initializeModel() {
PurRepositoryMeta purRepositoryMeta = null;
if (repositoryMeta != null && repositoryMeta instanceof PurRepositoryMeta) {
purRepositoryMeta = (PurRepositoryMeta) repositoryMeta;
model.setName(purRepositoryMeta.getName());
model.setId(purRepositoryMeta.getDescription());
PurRepositoryLocation location = purRepositoryMeta.getRepositoryLocation();
if (location != null) {
model.setUrl(location.getUrl());
} else {
model.setUrl(getDefaultUrl());
}
} else {
model.setModificationComments(true);
}
}
use of org.pentaho.di.repository.pur.PurRepositoryLocation in project pentaho-kettle by pentaho.
the class RepositoryConfigController method ok.
public void ok() {
if (repositoryMeta instanceof PurRepositoryMeta) {
repositoryMeta.setName(model.getName());
repositoryMeta.setDescription(model.getId());
// remove trailing slash
String url = model.getUrl();
String urlTrim = url.endsWith("/") ? url.substring(0, url.length() - 1) : url;
PurRepositoryLocation location = new PurRepositoryLocation(urlTrim);
((PurRepositoryMeta) repositoryMeta).setRepositoryLocation(location);
((PurRepositoryMeta) repositoryMeta).setVersionCommentMandatory(model.isModificationComments());
getCallback().onSuccess(((PurRepositoryMeta) repositoryMeta));
} else {
getCallback().onError(new IllegalStateException(BaseMessages.getString(PurRepositoryDialog.class, // $NON-NLS-1$
"RepositoryConfigDialog.ERROR_0001_NotAnInstanceOfPurRepositoryMeta")));
}
}
Aggregations