Search in sources :

Example 1 with AssetType

use of org.apache.archiva.repository.storage.AssetType in project archiva by apache.

the class AbstractStorageUtilTest method recurseSubTree.

private void recurseSubTree(StorageAsset parent, int level, int[] levelElements) {
    if (level < levelElements.length) {
        AssetType type = (level == levelElements.length - 1) ? AssetType.FILE : AssetType.CONTAINER;
        for (int k = 0; k < levelElements[level]; k++) {
            String name = parent.getName() + String.format("%03d", k);
            StorageAsset asset = createAsset(parent, name, type);
            recurseSubTree(asset, level + 1, levelElements);
        }
    }
}
Also used : AssetType(org.apache.archiva.repository.storage.AssetType) StorageAsset(org.apache.archiva.repository.storage.StorageAsset)

Aggregations

AssetType (org.apache.archiva.repository.storage.AssetType)1 StorageAsset (org.apache.archiva.repository.storage.StorageAsset)1