Package org.sonatype.nexus.proxy.attributes

Examples of org.sonatype.nexus.proxy.attributes.Attributes


    // now request the object, the lastRequested timestamp should be updated
    StorageItem resultItem = repository.retrieveItem(request);
    Assert.assertTrue(resultItem.getLastRequested() + " > " + lastRequest, resultItem.getLastRequested() > lastRequest);

    // check the shadow attributes
    Attributes shadowStorageItem = repository.getAttributesHandler().getAttributeStorage().getAttributes(
        repository.createUid(request.getRequestPath()));
    Assert.assertEquals(resultItem.getLastRequested(), shadowStorageItem.getLastRequested());
  }
View Full Code Here


    // now request the object, the lastRequested timestamp should be updated
    StorageItem resultItem = repository.retrieveItem(request);
    Assert.assertTrue(resultItem.getLastRequested() > lastRequest);

    // check the shadow attributes
    Attributes shadowStorageItem = repository.getAttributesHandler().getAttributeStorage().getAttributes(
        repository.createUid(request.getRequestPath()));
    Assert.assertEquals(resultItem.getLastRequested(), shadowStorageItem.getLastRequested());
  }
View Full Code Here

            final StorageFileItem item = (StorageFileItem) any;

            final RepositoryItemUid uid = item
                .getRepositoryItemUid();

            final Attributes attributes = attributeStorage
                .getAttributes(uid);

            if (attributes.containsKey(ATTR_IS_SAVED)) {

              attributes.remove(ATTR_IS_SAVED);
              attributes.remove(ATTR_SAVE_TIME);

              attributeStorage.putAttributes(uid, attributes);

              countCleared++;
View Full Code Here

            reporter.repoFileCount.inc();
            reporter.repoFileSize.inc(file.length());

            final StorageFileItem item = (StorageFileItem) any;

            final Attributes attributes = item
                .getRepositoryItemAttributes();

            final String value = attributes
                .get(CarrotAttribute.ATTR_IS_SAVED);

            if ("true".equals(value)) {
              reporter.amazonExistingFileCount.inc();
              return;
View Full Code Here

              return;
            }

            final StorageFileItem item = (StorageFileItem) any;

            final Attributes attributes = item
                .getRepositoryItemAttributes();

            final String value = attributes
                .get(CarrotAttribute.ATTR_IS_SAVED);

            if ("true".equals(value)) {
              return;
            }
View Full Code Here

              return;
            }

            final StorageFileItem item = (StorageFileItem) any;

            final Attributes attributes = item
                .getRepositoryItemAttributes();

            final String value = attributes
                .get(CarrotAttribute.ATTR_IS_SAVED);

            if ("true".equals(value)) {
              return;
            }
View Full Code Here

        final RepositoryItemUid uid = item.getRepositoryItemUid();

        final AttributeStorage attributeStorage = repository
            .getAttributesHandler().getAttributeStorage();

        final Attributes attributes = attributeStorage
            .getAttributes(uid);

        attributes.put(ATTR_IS_SAVED, "true");
        attributes.put(ATTR_SAVE_TIME, "" + System.currentTimeMillis());

        attributeStorage.putAttributes(uid, attributes);

      } catch (final Exception e) {
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.proxy.attributes.Attributes

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.