Java Code Examples for org.sonatype.nexus.common.entity.EntityHelper#id()

The following examples show how to use org.sonatype.nexus.common.entity.EntityHelper#id() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: OrientComponentAssetTestHelper.java    From nexus-public with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public void removeAsset(final Repository repository, final String path) {
  EntityId nanoAssetId = EntityHelper.id(findAssetByNameNotNull(repository, path));
  ComponentMaintenance maintenanceFacet = repository.facet(ComponentMaintenance.class);
  maintenanceFacet.deleteAsset(nanoAssetId);
}
 
Example 2
Source File: OrientBrowseNodeStoreImpl.java    From nexus-public with Eclipse Public License 1.0 4 votes vote down vote up
@Override
@Guarded(by = STARTED)
public boolean assetNodeExists(final Asset asset) {
  EntityId assetId = EntityHelper.id(asset);
  return inTx(databaseInstance).call(db -> entityAdapter.assetNodeExists(db, assetId));
}
 
Example 3
Source File: OrientBrowseNodeStoreImpl.java    From nexus-public with Eclipse Public License 1.0 4 votes vote down vote up
@Override
@Guarded(by = STARTED)
public void deleteComponentNode(final Component component) {
  EntityId componentId = EntityHelper.id(component);
  inTxRetry(databaseInstance).run(db -> entityAdapter.deleteComponentNode(db, componentId));
}
 
Example 4
Source File: OrientBrowseNodeStoreImpl.java    From nexus-public with Eclipse Public License 1.0 4 votes vote down vote up
@Override
@Guarded(by = STARTED)
public void deleteAssetNode(final Asset asset) {
  EntityId assetId = EntityHelper.id(asset);
  inTxRetry(databaseInstance).run(db -> entityAdapter.deleteAssetNode(db, assetId));
}
 
Example 5
Source File: OrientBrowseNodeStoreImpl.java    From nexus-public with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public EntityId fromValue(final String value) {
  return value == null ? null : EntityHelper.id(value);
}
 
Example 6
Source File: OrientRoutingRule.java    From nexus-public with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public EntityId id() {
  return EntityHelper.id(this);
}