io.bdeploy.bhive.op.InsertArtificialTreeOperation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api Show documentation
Show all versions of api Show documentation
Public API including dependencies, ready to be used for integrations and plugins.
package io.bdeploy.bhive.op;
import io.bdeploy.bhive.BHive;
import io.bdeploy.bhive.model.ObjectId;
import io.bdeploy.bhive.model.Tree;
import io.bdeploy.bhive.objects.ObjectDatabase;
/**
* Create a {@link Tree} in the {@link ObjectDatabase} and return its
* {@link ObjectId}.
*/
public class InsertArtificialTreeOperation extends BHive.TransactedOperation {
private Tree.Builder builder;
@Override
public ObjectId callTransacted() throws Exception {
return getObjectManager().insertTree(builder.build());
}
/**
* Set the {@link Tree} to insert.
*/
public InsertArtificialTreeOperation setTree(Tree.Builder builder) {
this.builder = builder;
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy