本文整理汇总了Java中de.espirit.firstspirit.access.store.Store.Type方法的典型用法代码示例。如果您正苦于以下问题:Java Store.Type方法的具体用法?Java Store.Type怎么用?Java Store.Type使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类de.espirit.firstspirit.access.store.Store
的用法示例。
在下文中一共展示了Store.Type方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createProblem
import de.espirit.firstspirit.access.store.Store; //导入方法依赖的package包/类
private ImportOperation.Problem createProblem(final Store.Type storeType, final long nodeId, final String message) {
return new ImportOperation.Problem() {
@Override
public Store.Type getStoreType() {
return storeType;
}
@Override
public long getNodeId() {
return nodeId;
}
@Override
public String getMessage() {
return message;
}
};
}
示例2: createMediaElementAndExportItWithGivenUidMappingUidType
import de.espirit.firstspirit.access.store.Store; //导入方法依赖的package包/类
/**
* Mocks a MediaStore and adds a dummy object X of type Media to it. Afterwards creates an ExportOperation
* and adds an identifier matching X's uid to it, but uses the passed uidMappings uidType.
* @param uidMapping the mapping from which the uidType is retrieved that is used for adding an element to
* the export operation
* @return the created ExportOperation mock
*/
private ExportOperation createMediaElementAndExportItWithGivenUidMappingUidType(UidMapping uidMapping) {
String uidString = "reference_name";
UidIdentifier uid = new UidIdentifier(uidMapping, uidString);
StoreAgent storeAgent = mock(StoreAgent.class);
ExportOperation exportOperation = mock(ExportOperation.class);
Store mediaStoreRoot = mock(MediaStoreRoot.class);
Store.Type storeType = uidMapping.getStoreType();
when(storeAgent.getStore(storeType, false)).thenReturn(mediaStoreRoot);
IDProvider storeElement = mock(Media.class);
when(mediaStoreRoot.getStoreElement(uidString, uidMapping.getUidType())).thenReturn(storeElement);
uid.addToExportOperation(storeAgent, false, exportOperation);
return exportOperation;
}
示例3: getStore
import de.espirit.firstspirit.access.store.Store; //导入方法依赖的package包/类
@Override
public Store getStore(final Store.Type type) {
Store store = _stores.get(type);
if (store == null) {
store = new MockedStore(type);
addStore(type, store);
}
return store;
}
示例4: MockedElementExportInfo
import de.espirit.firstspirit.access.store.Store; //导入方法依赖的package包/类
MockedElementExportInfo(final Store.Type storeType, final String name, final String nodeTag, final ExportStatus exportStatus) {
super(Type.ELEMENT, name, exportStatus);
_basicElementInfo = new BasicElementInfoImpl(storeType, nodeTag, -1, name, -1);
setCreatedFileHandles(createFileHandleCollection(this, 1));
setUpdatedFileHandles(createFileHandleCollection(this, 2));
setDeletedFileHandles(createFileHandleCollection(this, 3));
setMovedFileHandles(createMovedFileHandleCollection(this, 4));
}
示例5: getStoreElements
import de.espirit.firstspirit.access.store.Store; //导入方法依赖的package包/类
Map<Store.Type, List<ElementExportInfo>> getStoreElements() {
return _storeElements;
}
示例6: addStore
import de.espirit.firstspirit.access.store.Store; //导入方法依赖的package包/类
void addStore(final Store.Type type, final Store store) {
_stores.put(type, store);
}
示例7: createElementInfo
import de.espirit.firstspirit.access.store.Store; //导入方法依赖的package包/类
private BasicElementInfoImpl createElementInfo(final int id, final Store.Type storeType, final String nodeTag, final String description) {
return new BasicElementInfoImpl(storeType, nodeTag, id, description + "_" + nodeTag + "_" + id, -1);
}
示例8: createMapWithStoreElements
import de.espirit.firstspirit.access.store.Store; //导入方法依赖的package包/类
public static Map<Store.Type, List<ElementExportInfo>> createMapWithStoreElements() {
return createMapWithStoreElements(ExportStatus.CREATED, true, true, true, true);
}
示例9: addStoreRoots
import de.espirit.firstspirit.access.store.Store; //导入方法依赖的package包/类
/**
* Adds store root nodes to the given export operation directly. This operation is different from adding a store root node's children
* individually. This method can be overridden to add a subset of store roots only.
*
* @param storeAgent the StoreAgent to retrieve store roots from
* @param exportOperation the ExportOperation to add the store roots to
*/
protected void addStoreRoots(final StoreAgent storeAgent, final ExportOperation exportOperation) {
for (final Store.Type storeType : Store.Type.values()) {
exportOperation.addElement(storeAgent.getStore(storeType, isExportReleaseState()));
}
}