/** * Client to Amazon CloudWatch. */ @Immutable interface CloudWatch { /** * Get Amazon client. * @return The client */ AmazonCloudWatchClient get(); }
/** * Plain Text. */ @Loggable(Loggable.DEBUG) private static final class PlainText implements Htpasswd.Algorithm { @Override public boolean matches(final String hash, final String password) { return password.equals(hash); } }
/** * Get all dependencies of this root artifact. * @return The list of artifacts */ @Cacheable(forever = true) @SuppressWarnings("unchecked") public Collection<Artifact> children() { return this.chldrn; }
/** * Mapping. */ @Immutable public interface Mapping<X> { /** * Map from XML to X. * @param xml The XML to get it from * @return X */ X map(XML xml); }
/** * {@inheritDoc} */ @Override @Loggable(Loggable.DEBUG) public void release(final Wagon wagon) { // nothing to do }
/** * Client to Amazon. */ @Immutable interface Client { /** * Get Amazon client. * @return The client */ AmazonDynamoDB get(); }
/** * {@inheritDoc} */ @Override @Loggable(Loggable.WARN) public void transferFailed(final TransferEvent event) { // nothing to do }
/** * Single link. */ @Immutable public interface Link extends Map<String, String> { /** * Its URI. * @return URI */ URI uri(); }
/** * {@inheritDoc} */ @Override @Loggable(Loggable.WARN) public void transferCorrupted(final TransferEvent event) { // nothing to do }
/** * Mapping from JsonValue successor to the destination type. * @param <X> Type of custom object * @param <P> Type of source object */ @Immutable public interface Mapping<X, P extends JsonValue> { /** * Map JsonValue successor to the type required. * @param value Extends JsonValue * @return Custom object */ X map(P value); }
/** * {@inheritDoc} */ @Override @Loggable(Loggable.INFO) public void transferSucceeded(final TransferEvent event) { // nothing to do }
/** * Immutable ReentrantLock. * * @author Paul Polishchuk (ppol@ua.fm) * @version $Id: 2657d42a3e29aad072024ac537fc089ae847f945 $ * @since 0.18 */ @Immutable final class ImmutableReentrantLock extends ReentrantLock { /** * Serialization id. */ private static final long serialVersionUID = -2683908226666647513L; }
/** * UNIX crypt. */ @Loggable(Loggable.DEBUG) private static final class UnixCrypt implements Htpasswd.Algorithm { /** * Unix Crypt pattern. */ private static final Pattern PATTERN = Pattern.compile("(\\$[156]\\$)?[a-zA-Z0-9./]+(\\$.*)*"); @Override public boolean matches(final String hash, final String password) { return Htpasswd.UnixCrypt.PATTERN.matcher(hash).matches() && hash.equals(Crypt.crypt(password, hash)); } }
/** * An enum whose values correspond to unique strings. * * @author Chris Rebert (github@chrisrebert.com) * @version $Id: a5d03c14d67f555ad8a5dc99b510e81d9faeb766 $ * @since 0.22.0 */ @Immutable public interface StringEnum { /** * The string that this enum value represents. * @return String */ String identifier(); }
/** * Single Amazon S3 bucket. * * @author Yegor Bugayenko (yegor@tpc2.com) * @version $Id: 4618b9c0283cabd6c1c9649445f59d43decd961a $ * @since 0.0.2 */ @Immutable public interface Bucket extends Domain { /** * Get amazon client. * @return The client */ AmazonS3 client(); }
/** * Base. * * @author Yegor Bugayenko (yegor@tpc2.com) * @version $Id$ */ @Immutable public interface Base { /** * Get one user. * @param urn URN of the user * @return User */ User user(URN urn); }
/** * JSON readable. * * @author Yegor Bugayenko (yegor@tpc2.com) * @version $Id: e3ef62493be79ec62b2c0655a48be87a0b95a088 $ * @since 0.4 */ @Immutable public interface JsonReadable { /** * Describe it in a JSON object. * @return JSON object * @throws IOException If there is any I/O problem */ JsonObject json() throws IOException; }
/** * Profile. * * @author Yegor Bugayenko (yegor@tpc2.com) * @version $Id$ */ @Immutable public interface Profile { /** * Transform the {@link Model} provided. * @param model The MOF {@link Model} to use as a source * @return New model * @throws IOException If I/O problem occurs */ Model transform(@NotNull Model model) throws IOException; }
/** * Report of a Model. * * @author Yegor Bugayenko (yegor@tpc2.com) * @version $Id$ */ @Immutable public interface Report { /** * Create a report. * @param model The MOF Model to use for reporting * @param dir The directory to write to * @throws IOException If IO problem occurs */ void save(@NotNull Model model, @NotNull File dir) throws IOException; }
/** * Mock base. * * @author Yegor Bugayenko (yegor256@gmail.com) * @version $Id: c86c8aa04a2aa5885328a15049badf17b601f331 $ * @since 2.4 */ @Immutable interface Sql { /** * Get SQL source. * @return Data source */ DataSource source(); }