• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java NotEmpty类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty的典型用法代码示例。如果您正苦于以下问题:Java NotEmpty类的具体用法?Java NotEmpty怎么用?Java NotEmpty使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



NotEmpty类属于net.shibboleth.utilities.java.support.annotation.constraint包,在下文中一共展示了NotEmpty类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: lookupIdentifier

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
/**
 * Get list of information matching a given identifier.
 * 
 * @param identifier identifier to lookup
 * @return a list of information
 * @throws ResolverException if an error occurs
 */
@Nonnull @NonnullElements protected List<Value> lookupIdentifier(
        @Nonnull @NotEmpty final Key identifier)
        throws ResolverException {
    if (!isInitialized()) {
        throw new ResolverException("Metadata resolver has not been initialized");
    }

    if (identifier == null || Strings.isNullOrEmpty(identifier.getValue())) {
        log.debug("Identifier was null or empty, skipping search for it");
        return Collections.emptyList();
    }

    List<Value> allInformation = lookupIndexedIdentifier(identifier);
    if (allInformation.isEmpty()) {
        log.debug("Backing store does not contain any information with the ID: {}", identifier);
        return allInformation;
    }
    return allInformation;
}
 
开发者ID:CSCfi,项目名称:shibboleth-idp-oidc-extension,代码行数:27,代码来源:AbstractOIDCEntityResolver.java


示例2: create

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public boolean create(@Nonnull @NotEmpty String context, @Nonnull @NotEmpty String key, @Nonnull String value, @Nullable @Positive Long expiration) throws IOException {
    IMap<Object, StorageRecord> backingMap = getMap(context, key);
    Object ikey = getKey(context, key);
    if (backingMap.containsKey(ikey)) {
        return false;
    }
    StorageRecord storageRecord = new MutableStorageRecord(value, expiration);
    if (expiration != null) {
        backingMap.put(ikey, storageRecord, getSystemExpiration(expiration), TimeUnit.MILLISECONDS);
    } else {
        backingMap.put(ikey, storageRecord);
    }
    return true;
}
 
开发者ID:UniconLabs,项目名称:shibboleth-hazelcast-storage-service,代码行数:19,代码来源:AbstractHazelcastMapBackedStorageService.java


示例3: getName

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
@Nonnull
@NotEmpty
public String getName() {
    return authnContextClassReference;
}
 
开发者ID:CSCfi,项目名称:shibboleth-idp-oidc-extension,代码行数:8,代码来源:AuthenticationContextClassReferencePrincipal.java


示例4: lookupIndexedIdentifier

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
/**
 * Lookup the specified identifier from the index. The returned list will be a copy of what is stored in the 
 * backing index, and is safe to be manipulated by callers.
 * 
 * @param identifier the identifier to lookup
 * 
 * @return list copy of indexed identifiers, may be empty, will never be null
 */
@Nonnull @NonnullElements protected List<Value> lookupIndexedIdentifier(
        @Nonnull @NotEmpty final Key identifier) {
    List<Value> allInformation = getBackingStore().getIndexedInformation().get(identifier);
    if (allInformation != null) {
        return new ArrayList<>(allInformation);
    } else {
        return Collections.emptyList();
    }
}
 
开发者ID:CSCfi,项目名称:shibboleth-idp-oidc-extension,代码行数:18,代码来源:AbstractOIDCEntityResolver.java


示例5: OIDCCoreProtocolConfiguration

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
/**
 * Creates a new configuration instance.
 *
 * @param profileId Unique profile identifier.
 */
public OIDCCoreProtocolConfiguration(@Nonnull @NotEmpty final String profileId) {
    super(profileId);
    authenticationFlows = Collections.emptySet();
    postAuthenticationFlows = Collections.emptyList();
    defaultAuthenticationContexts = Collections.emptyList();
    nameIDFormatPrecedence = Collections.emptyList();
    signIDTokensPredicate = Predicates.alwaysTrue();
    pairwiseSubject = Predicates.alwaysFalse();
}
 
开发者ID:CSCfi,项目名称:shibboleth-idp-oidc-extension,代码行数:15,代码来源:OIDCCoreProtocolConfiguration.java


示例6: updateContextExpiration

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
@Override
public void updateContextExpiration(@Nonnull @NotEmpty String context, @Nullable Long expiration) throws IOException {
    for (Object key : this.getContextKeySet(context)) {
        this.updateExpiration(((CompositeKey) key).getContext(), ((CompositeKey) key).getKey(), expiration);
    }

}
 
开发者ID:UniconLabs,项目名称:shibboleth-hazelcast-storage-service,代码行数:8,代码来源:SingleHazelcastMapBackedStorageService.java


示例7: deleteContext

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
@Override
public void deleteContext(@Nonnull @NotEmpty String context) throws IOException {
    IMap backingMap = this.getMap(context, null);
    Set keySet = this.getContextKeySet(context);
    for (Object o : keySet) {
        backingMap.delete(o);
    }
}
 
开发者ID:UniconLabs,项目名称:shibboleth-hazelcast-storage-service,代码行数:9,代码来源:SingleHazelcastMapBackedStorageService.java


示例8: updateWithVersion

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Nullable
@Override
public Long updateWithVersion(@Positive long version, @Nonnull @NotEmpty String context, @Nonnull @NotEmpty String key, @Nonnull String value, @Nullable @Positive Long expiration) throws IOException, VersionMismatchException {
    try {
        return doUpdate(version, context, key, value, expiration);
    } catch (VersionMismatchWrapperException e) {
        throw (VersionMismatchException)e.getCause();
    }
}
 
开发者ID:UniconLabs,项目名称:shibboleth-hazelcast-storage-service,代码行数:13,代码来源:AbstractHazelcastMapBackedStorageService.java


示例9: deserialize

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
@Override
@Nonnull
public T deserialize(
        final long version,
        @Nonnull @NotEmpty final String context,
        @Nonnull @NotEmpty final String key,
        @Nonnull @NotEmpty final String value,
        @Nullable final Long expiration) throws IOException {
    return createTicket(key, SPLIT_PATTERN.split(value));
}
 
开发者ID:serac,项目名称:shibboleth-idp-ext-cas,代码行数:11,代码来源:AbstractTicketSerializer.java


示例10: extractFields

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
@Override
@NotEmpty
protected String[] extractFields(@Nonnull final ProxyGrantingTicket ticket) {
    final ArrayList<String> fields = new ArrayList<String>(4);
    fields.add(ticket.getSessionId());
    fields.add(ticket.getService());
    fields.add(String.valueOf(ticket.getExpirationInstant().getMillis()));
    if (ticket.getParentId() != null) {
        fields.add(ticket.getParentId());
    }
    return fields.toArray(new String[fields.size()]);
}
 
开发者ID:serac,项目名称:shibboleth-idp-ext-cas,代码行数:13,代码来源:ProxyGrantingTicketSerializer.java


示例11: createTicket

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
@Override
@Nonnull
protected ProxyGrantingTicket createTicket(@Nonnull final String id, @NotEmpty final String[] fields) {
    if (fields.length < 3) {
        throw new IllegalArgumentException("Expected at least 3 fields but got " + fields.length);
    }
    return new ProxyGrantingTicket(
            id,
            fields[0],
            fields[1],
            new Instant(Long.valueOf(fields[2])),
            fields.length > 3 ? fields[3] : null);
}
 
开发者ID:serac,项目名称:shibboleth-idp-ext-cas,代码行数:14,代码来源:ProxyGrantingTicketSerializer.java


示例12: extractFields

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
@Override
@NotEmpty
protected String[] extractFields(@Nonnull final ProxyTicket ticket) {
    return new String[] {
            ticket.getSessionId(),
            ticket.getService(),
            String.valueOf(ticket.getExpirationInstant().getMillis()),
            ticket.getPgtId(),
    };
}
 
开发者ID:serac,项目名称:shibboleth-idp-ext-cas,代码行数:11,代码来源:ProxyTicketSerializer.java


示例13: createTicket

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
@Override
@Nonnull
protected ProxyTicket createTicket(@Nonnull final String id, @NotEmpty final String[] fields) {
    if (fields.length != 4) {
        throw new IllegalArgumentException("Expected 4 fields but got " + fields.length);
    }
    return new ProxyTicket(
            id,
            fields[0],
            fields[1],
            new Instant(Long.valueOf(fields[2])),
            fields[3]);
}
 
开发者ID:serac,项目名称:shibboleth-idp-ext-cas,代码行数:14,代码来源:ProxyTicketSerializer.java


示例14: extractFields

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
@Override
@NotEmpty
protected String[] extractFields(@Nonnull final ServiceTicket ticket) {
    return new String[] {
            ticket.getSessionId(),
            ticket.getService(),
            String.valueOf(ticket.getExpirationInstant().getMillis()),
            String.valueOf(ticket.isRenew()),
    };
}
 
开发者ID:serac,项目名称:shibboleth-idp-ext-cas,代码行数:11,代码来源:ServiceTicketSerializer.java


示例15: createTicket

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
@Override
@Nonnull
protected ServiceTicket createTicket(@Nonnull final String id, @NotEmpty final String[] fields) {
    if (fields.length != 4) {
        throw new IllegalArgumentException("Expected 4 fields but got " + fields.length);
    }
    return new ServiceTicket(
            id, fields[0], fields[1], new Instant(Long.valueOf(fields[2])), Boolean.parseBoolean(fields[3]));
}
 
开发者ID:serac,项目名称:shibboleth-idp-ext-cas,代码行数:10,代码来源:ServiceTicketSerializer.java


示例16: TicketIdentifierGenerationStrategy

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
/**
 * Creates a new ticket ID generator.
 *
 * @param randomLength Length in characters of random part of the ticket.
 * @param prefix Ticket ID prefix (e.g. ST, PT, PGT). MUST be a URL safe string.
 */
public TicketIdentifierGenerationStrategy(
        @Positive final int randomLength,
        @Nonnull @NotEmpty final String prefix) {
    if (randomLength < 1) {
        throw new IllegalArgumentException("Length of random part of ticket must be positive");
    }
    this.randomPartGenerator = new RandomIdGenerator(randomLength);
    this.prefix = Constraint.isNotNull(StringSupport.trimOrNull(prefix), "Prefix cannot be null or empty");
    if (!isUrlSafe(this.prefix)) {
        throw new IllegalArgumentException("Unsupported prefix " + this.prefix);
    }
}
 
开发者ID:serac,项目名称:shibboleth-idp-ext-cas,代码行数:19,代码来源:TicketIdentifierGenerationStrategy.java


示例17: CASSPSession

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
/**
 * Creates a new CAS SP session.
 *
 * @param id         the identifier of the service associated with this session
 * @param creation   creation time of session, in milliseconds since the epoch
 * @param expiration expiration time of session, in milliseconds since the epoch
 * @param ticketId   ticket ID used to gain access to the service
 */
public CASSPSession(
        @Nonnull @NotEmpty String id,
        @Duration @Positive long creation,
        @Duration @Positive long expiration,
        @Nonnull @NotEmpty String ticketId) {
    super(id, creation, expiration);
    this.ticketId = Constraint.isNotNull(StringSupport.trimOrNull(ticketId), "Ticket ID cannot be null or empty");
}
 
开发者ID:serac,项目名称:shibboleth-idp-ext-cas,代码行数:17,代码来源:CASSPSession.java


示例18: doDeserialize

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
@Nonnull
@Override
protected SPSession doDeserialize(
        @Nonnull final JsonObject obj,
        @Nonnull @NotEmpty final String id,
        final long creation,
        final long expiration) throws IOException {
    return new CASSPSession(id, creation, expiration, obj.getString(TICKET_FIELD));
}
 
开发者ID:serac,项目名称:shibboleth-idp-ext-cas,代码行数:10,代码来源:CASSPSessionSerializer.java


示例19: Service

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
/**
 * Creates a new service from given URL and group name.
 *
 * @param url CAS service URL.
 * @param group Group to which service belongs.
 * @param proxy True to authorize proxying, false otherwise.
 */
public Service(
        @Nonnull @NotEmpty final String url,
        @Nullable @NotEmpty final String group,
        final boolean proxy) {
    this.serviceURL = Constraint.isNotNull(StringSupport.trimOrNull(url), "Service URL cannot be null or empty");
    this.group = StringSupport.trimOrNull(group);
    this.authorizedToProxy = proxy;
}
 
开发者ID:serac,项目名称:shibboleth-idp-ext-cas,代码行数:16,代码来源:Service.java


示例20: setId

import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void setId(@Nonnull @NotEmpty final String id) {
    super.setId(id);
}
 
开发者ID:CSCfi,项目名称:shibboleth-idp-oidc-extension,代码行数:6,代码来源:NameIdentifierGenerationServiceImpl.java



注:本文中的net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java KieCommands类代码示例发布时间:2022-05-23
下一篇:
Java UnmodifiableList类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap