Search in sources :

Example 1 with Priority

use of org.demoiselle.signer.core.Priority in project signer by demoiselle.

the class TimeStampGeneratorSelector method getPriority.

/**
 *  verify if have a @Priotity annotation
 * @param clazz
 * @return
 */
private static int getPriority(TimeStampGenerator clazz) {
    int result = Priority.MAX_PRIORITY;
    Priority priority = clazz.getClass().getAnnotation(Priority.class);
    if (priority != null) {
        result = priority.value();
    }
    if (priority == null) {
        new CertificateCoreException(coreMessagesBundle.getString("error.priority.null", clazz.getClass().getName()));
    }
    return result;
}
Also used : Priority(org.demoiselle.signer.core.Priority) CertificateCoreException(org.demoiselle.signer.core.exception.CertificateCoreException)

Aggregations

Priority (org.demoiselle.signer.core.Priority)1 CertificateCoreException (org.demoiselle.signer.core.exception.CertificateCoreException)1