import eu.etaxonomy.taxeditor.bulkeditor.input.sortprovider.ReferenceSortProvider;
import eu.etaxonomy.taxeditor.store.CdmStore;
-
/**
- *
* @author p.ciardelli
* @created 25.06.2009
*/
return BulkEditorInputType.REFERENCE.label;
}
- public static AbstractBulkEditorInput getInstance() {
+ public static AbstractBulkEditorInput<Reference> getInstance() {
if (instance == null) {
instance = new ReferenceEditorInput();
}
}
@Override
- public List listEntities(IIdentifiableEntityServiceConfigurator configurator) {
+ public List<Reference> listEntities(IIdentifiableEntityServiceConfigurator configurator) {
return CdmStore.getSearchManager().findReferences(configurator);
}
- // Entity persistence
+ //entity persistence
@Override
public Reference loadEntity(UUID entityUuid) {
}
}
- /**
- * @param invocation
- * @param originalInvocation
- * @return
- * @throws Exception
- */
private RemoteInvocationResult handleGeneralRequest(RemoteInvocation invocation,
MethodInvocation originalInvocation) throws Exception {
RemoteInvocationResult invocationResult = doExecuteRequest(invocation, originalInvocation);
invocationResult = new RemoteInvocationResult(cdmEntitySessionManager().load(invocationResult.getValue(), false));
logger.debug("Entity cached without updating cached data" );
}
-
}
cache(invocation, invocationResult);
return invocationResult;
}
- /**
- * @param invocation
- * @param originalInvocation
- * @return
- * @throws Exception
- */
private RemoteInvocationResult handleTermRequest(RemoteInvocation invocation, MethodInvocation originalInvocation)
throws Exception {
RemoteInvocationResult invocationResult = null;
return invocationResult;
}
- /**
- * @param invocation
- * @param originalInvocation
- * @return
- * @throws Exception
- */
private RemoteInvocationResult doExecuteRequest(RemoteInvocation invocation, MethodInvocation originalInvocation)
throws Exception {
import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
import eu.etaxonomy.cdm.api.service.UpdateResult;
-
/**
* @author cmathew
* @date 16 Jun 2015
- *
*/
public abstract class RemotingCdmUpdateOperation extends RemotingCdmOperation {
protected MPart activePart = null;
protected MApplication application = null;
- /**
- * @param label
- */
public RemotingCdmUpdateOperation(String label, Action action, Object source, boolean async,
EPartService partService,
MPart activePart,
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.operation.RemotingCdmOperation#doExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
@Override
protected boolean doExecute(IProgressMonitor monitor, IAdaptable info) {
updateResult = new UpdateResult();
if(success && updateResult != null) {
fireDataChangeEvent(updateResult);
}
-
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.operation.RemotingCdmOperation#onComplete(boolean)
- */
@Override
protected IStatus onComplete(boolean success) {
}
return null;
}
-
-
}
/**
* @author cmathew
* @date 26 Jun 2015
- *
*/
public class RemotingTestUpdateOperation extends RemotingCdmUpdateOperation {
private Exception exception;
private CdmEntityIdentifier cei;
-
- /**
- * @param label
- * @param action
- * @param source
- * @param async
- */
public RemotingTestUpdateOperation(UpdateResult result,
Object source,
boolean async) {
this.cei = cei;
}
- /* (non-Javadoc)
- * @see eu.etaxonomy.taxeditor.operation.RemotingCdmUpdateOperation#doUpdateExecute(org.eclipse.core.runtime.IProgressMonitor, org.eclipse.core.runtime.IAdaptable)
- */
@Override
protected UpdateResult doUpdateExecute(IProgressMonitor monitor, IAdaptable info) throws Exception {
ITestService testService = CdmApplicationState.getTestService();
TaxonNode taxonNode4 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid4));
TaxonNode taxonNode5 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid5));
- taxonNodes = new HashSet<TaxonNode>();
+ taxonNodes = new HashSet<>();
taxonNodes.add(taxonNode1);
taxonNodes.add(taxonNode2);
taxonNodes.add(taxonNode3);
TaxonNode taxonNode4 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid4));
TaxonNode taxonNode5 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid5));
- taxonNodes = new HashSet<TaxonNode>();
+ taxonNodes = new HashSet<>();
taxonNodes.add(taxonNode1);
taxonNodes.add(taxonNode2);
taxonNodes.add(taxonNode3);
taxonNodes.add(taxonNode4);
taxonNodes.add(taxonNode5);
- ceis = new HashSet<CdmEntityIdentifier>();
+ ceis = new HashSet<>();
ceis.add(new CdmEntityIdentifier(taxonNode3.getId(),TaxonNode.class));
ceis.add(new CdmEntityIdentifier(taxonNode4.getId(),TaxonNode.class));
ceis.add(new CdmEntityIdentifier(taxonNode5.getId(),TaxonNode.class));
TaxonNode taxonNode4 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid4));
TaxonNode taxonNode5 = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid5));
- taxonNodes = new HashSet<TaxonNode>();
+ taxonNodes = new HashSet<>();
taxonNodes.add(taxonNode1);
taxonNodes.add(taxonNode2);
taxonNodes.add(taxonNode3);
taxonNodes.add(taxonNode4);
taxonNodes.add(taxonNode5);
- ceis = new HashSet<CdmEntityIdentifier>();
+ ceis = new HashSet<>();
ceis.add(new CdmEntityIdentifier(taxonNode3.getId(),TaxonNode.class));
ceis.add(new CdmEntityIdentifier(taxonNode4.getId(),TaxonNode.class));
ceis.add(new CdmEntityIdentifier(taxonNode5.getId(),TaxonNode.class));
TaxonNode taxonNode = (TaxonNode) ProxyUtils.deproxy(taxonNodeService.load(taxonNodeUuid1));
CdmEntityIdentifier cei = new CdmEntityIdentifier(taxonNode.getId(), TaxonNode.class);
- taxonNodes = new HashSet<TaxonNode>();
+ taxonNodes = new HashSet<>();
taxonNodes.add(taxonNode);
int taxonNodeCountChildren = taxonNode.getCountChildren();