/** * Returns an access condition such that an operation will be performed only if the resource does not exist on the * service. * <p> * Setting this access condition modifies the request to include the HTTP <i>If-None-Match</i> conditional header. * <p> * For more information, see <a href= 'http://go.microsoft.com/fwlink/?LinkID=224642'>Specifying Conditional Headers * for Blob Service Operations</a>. * * @return An <code>AccessCondition</code> object that represents the if not exists condition. */ public static AccessCondition generateIfNotExistsCondition() { AccessCondition retCondition = new AccessCondition(); retCondition.setIfNoneMatch("*"); return retCondition; }
/** * Returns an access condition such that an operation will be performed only if the resource does not exist on the * service. * <p> * Setting this access condition modifies the request to include the HTTP <i>If-None-Match</i> conditional header. * <p> * For more information, see <a href= 'http://go.microsoft.com/fwlink/?LinkID=224642'>Specifying Conditional Headers * for Blob Service Operations</a>. * * @return An <code>AccessCondition</code> object that represents the if not exists condition. */ public static AccessCondition generateIfNotExistsCondition() { AccessCondition retCondition = new AccessCondition(); retCondition.setIfNoneMatch("*"); return retCondition; }
/** * Returns an access condition such that an operation will be performed only if the resource's ETag value does not * match the specified ETag value. * <p> * Setting this access condition modifies the request to include the HTTP <i>If-None-Match</i> conditional header. * If this access condition is set, the operation is performed only if the ETag of the resource does not match the * specified ETag. * <p> * For more information, see <a href= 'http://go.microsoft.com/fwlink/?LinkID=224642'>Specifying Conditional Headers * for Blob Service Operations</a>. * * @param etag * A <code>String</code> that represents the ETag value to check. * * @return An <code>AccessCondition</code> object that represents the <i>If-None-Match</i> condition. */ public static AccessCondition generateIfNoneMatchCondition(final String etag) { AccessCondition retCondition = new AccessCondition(); retCondition.setIfNoneMatch(etag); return retCondition; }
/** * Returns an access condition such that an operation will be performed only if the resource's ETag value does not * match the specified ETag value. * <p> * Setting this access condition modifies the request to include the HTTP <i>If-None-Match</i> conditional header. * If this access condition is set, the operation is performed only if the ETag of the resource does not match the * specified ETag. * <p> * For more information, see <a href= 'http://go.microsoft.com/fwlink/?LinkID=224642'>Specifying Conditional Headers * for Blob Service Operations</a>. * * @param etag * A <code>String</code> that represents the ETag value to check. * * @return An <code>AccessCondition</code> object that represents the <i>If-None-Match</i> condition. */ public static AccessCondition generateIfNoneMatchCondition(final String etag) { AccessCondition retCondition = new AccessCondition(); retCondition.setIfNoneMatch(etag); return retCondition; }