本文整理汇总了Java中org.dashbuilder.dataset.def.DataSetDef.getUUID方法的典型用法代码示例。如果您正苦于以下问题:Java DataSetDef.getUUID方法的具体用法?Java DataSetDef.getUUID怎么用?Java DataSetDef.getUUID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.dashbuilder.dataset.def.DataSetDef
的用法示例。
在下文中一共展示了DataSetDef.getUUID方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerDataSetDef
import org.dashbuilder.dataset.def.DataSetDef; //导入方法依赖的package包/类
@Override
public void registerDataSetDef(DataSetDef def,
String subjectId,
String message) {
if (def.getUUID() == null) {
final String uuid = uuidGenerator.newUuid();
def.setUUID(uuid);
}
if (subjectId == null || message == null) {
ioService.startBatch(fileSystem);
} else {
ioService.startBatch(fileSystem,
new CommentedOption(subjectId,
message));
}
try {
String defJson = getDataSetDefJsonMarshaller().toJsonString(def);
Path defPath = resolveNioPath(def);
ioService.write(defPath,
defJson);
// CSV specific
if (def instanceof CSVDataSetDef) {
saveCSVFile((CSVDataSetDef) def);
}
super.registerDataSetDef(def,
subjectId,
message);
} catch (Exception e) {
throw exceptionManager.handleException(
new Exception("Can't register the data set definition\n" + def,
e));
} finally {
ioService.endBatch();
}
}
示例2: removeDataSetDef
import org.dashbuilder.dataset.def.DataSetDef; //导入方法依赖的package包/类
public DataSetDef removeDataSetDef(DataSetDef def,
String subjectId,
String message) {
Path defPath = resolveNioPath(def);
if (ioService.exists(defPath)) {
if (subjectId == null || message == null) {
ioService.startBatch(fileSystem);
} else {
ioService.startBatch(fileSystem,
new CommentedOption(subjectId,
message));
}
try {
ioService.deleteIfExists(defPath,
StandardDeleteOption.NON_EMPTY_DIRECTORIES);
// CSV specific
if (def instanceof CSVDataSetDef) {
deleteCSVFile((CSVDataSetDef) def);
}
} finally {
ioService.endBatch();
}
}
return super.removeDataSetDef(def.getUUID(),
subjectId,
message);
}
示例3: onDataSetStaleEvent
import org.dashbuilder.dataset.def.DataSetDef; //导入方法依赖的package包/类
protected void onDataSetStaleEvent(@Observes DataSetStaleEvent event) {
DataSetDef def = event.getDataSetDef();
if (DataSetProviderType.SQL.equals(def.getProvider())) {
String uuid = def.getUUID();
staticDataSetProvider.removeDataSet(uuid);
}
}
示例4: onDataSetDefRemovedEvent
import org.dashbuilder.dataset.def.DataSetDef; //导入方法依赖的package包/类
protected void onDataSetDefRemovedEvent(@Observes DataSetDefRemovedEvent event) {
DataSetDef def = event.getDataSetDef();
if (DataSetProviderType.SQL.equals(def.getProvider())) {
String uuid = def.getUUID();
_metadataMap.remove(uuid);
staticDataSetProvider.removeDataSet(uuid);
}
}
示例5: onDataSetDefModifiedEvent
import org.dashbuilder.dataset.def.DataSetDef; //导入方法依赖的package包/类
protected void onDataSetDefModifiedEvent(@Observes DataSetDefModifiedEvent event) {
DataSetDef def = event.getOldDataSetDef();
if (DataSetProviderType.SQL.equals(def.getProvider())) {
String uuid = def.getUUID();
_metadataMap.remove(uuid);
staticDataSetProvider.removeDataSet(uuid);
}
}
示例6: registerDataSetDef
import org.dashbuilder.dataset.def.DataSetDef; //导入方法依赖的package包/类
@Override
public String registerDataSetDef(DataSetDef definition, String comment) {
// Data sets registered from the UI does not contain a UUID.
if (definition.getUUID() == null) {
final String uuid = uuidGenerator.newUuid();
definition.setUUID(uuid);
}
dataSetDefRegistry.registerDataSetDef(definition,
identity != null ? identity.getIdentifier() : "---",
comment);
return definition.getUUID();
}
示例7: lookupDataSet
import org.dashbuilder.dataset.def.DataSetDef; //导入方法依赖的package包/类
public DataSet lookupDataSet(DataSetDef def, DataSetLookup lookup) throws Exception {
try {
// Although if using a not registered definition, it must have an uuid set for performing lookups.
if (def.getUUID() == null) {
final String uuid = uuidGenerator.newUuid();
def.setUUID(uuid);
lookup.setDataSetUUID(uuid);
}
return dataSetManager.resolveProvider(def)
.lookupDataSet(def, lookup);
} catch (Exception e) {
throw exceptionManager.handleException(e);
}
}