Java 类org.bouncycastle.asn1.x509.DisplayText 实例源码

项目:ipack    文件:SPUserNotice.java   
private SPUserNotice(
    ASN1Sequence seq)
{
    Enumeration e = seq.getObjects();
    while (e.hasMoreElements())
    {
        ASN1Encodable object = (ASN1Encodable)e.nextElement();
        if (object instanceof DisplayText || object instanceof ASN1String)
        {
            explicitText = DisplayText.getInstance(object);
        }
        else if (object instanceof NoticeReference || object instanceof ASN1Sequence)
        {
            noticeRef = NoticeReference.getInstance(object);
        }
        else
        {
            throw new IllegalArgumentException("Invalid element in 'SPUserNotice': " + object.getClass().getName());
        }
    }
}
项目:gwt-crypto    文件:SPUserNotice.java   
private SPUserNotice(
    ASN1Sequence seq)
{
    Enumeration e = seq.getObjects();
    while (e.hasMoreElements())
    {
        ASN1Encodable object = (ASN1Encodable)e.nextElement();
        if (object instanceof DisplayText || object instanceof ASN1String)
        {
            explicitText = DisplayText.getInstance(object);
        }
        else if (object instanceof NoticeReference || object instanceof ASN1Sequence)
        {
            noticeRef = NoticeReference.getInstance(object);
        }
        else
        {
            throw new IllegalArgumentException("Invalid element in 'SPUserNotice': " + object.getClass().getName());
        }
    }
}
项目:Aki-SSL    文件:SPUserNotice.java   
private SPUserNotice(
    ASN1Sequence seq)
{
    Enumeration e = seq.getObjects();
    while (e.hasMoreElements())
    {
        ASN1Encodable object = (ASN1Encodable)e.nextElement();
        if (object instanceof DisplayText || object instanceof ASN1String)
        {
            explicitText = DisplayText.getInstance(object);
        }
        else if (object instanceof NoticeReference || object instanceof ASN1Sequence)
        {
            noticeRef = NoticeReference.getInstance(object);
        }
        else
        {
            throw new IllegalArgumentException("Invalid element in 'SPUserNotice': " + object.getClass().getName());
        }
    }
}
项目:keystore-explorer    文件:DUserNoticeChooser.java   
private void populate(UserNotice userNotice) {
    if (userNotice != null) {
        NoticeReference noticeReference = userNotice.getNoticeRef();

        if (noticeReference != null) {
            DisplayText organization = noticeReference.getOrganization();

            if (organization != null) {
                jtfOrganization.setText(organization.getString());
                jtfOrganization.setCaretPosition(0);
            }

            populateNoticeNumbers(noticeReference);
        }

        DisplayText explicitText = userNotice.getExplicitText();

        if (explicitText != null) {
            jtfExplicitText.setText(explicitText.getString());
            jtfExplicitText.setCaretPosition(0);
        }
    }
}
项目:TinyTravelTracker    文件:SPUserNotice.java   
private SPUserNotice(
    ASN1Sequence seq)
{
    Enumeration e = seq.getObjects();
    while (e.hasMoreElements())
    {
        ASN1Encodable object = (ASN1Encodable)e.nextElement();
        if (object instanceof DisplayText || object instanceof ASN1String)
        {
            explicitText = DisplayText.getInstance(object);
        }
        else if (object instanceof NoticeReference || object instanceof ASN1Sequence)
        {
            noticeRef = NoticeReference.getInstance(object);
        }
        else
        {
            throw new IllegalArgumentException("Invalid element in 'SPUserNotice': " + object.getClass().getName());
        }
    }
}
项目:CryptMeme    文件:SPUserNotice.java   
private SPUserNotice(
    ASN1Sequence seq)
{
    Enumeration e = seq.getObjects();
    while (e.hasMoreElements())
    {
        ASN1Encodable object = (ASN1Encodable)e.nextElement();
        if (object instanceof DisplayText || object instanceof ASN1String)
        {
            explicitText = DisplayText.getInstance(object);
        }
        else if (object instanceof NoticeReference || object instanceof ASN1Sequence)
        {
            noticeRef = NoticeReference.getInstance(object);
        }
        else
        {
            throw new IllegalArgumentException("Invalid element in 'SPUserNotice': " + object.getClass().getName());
        }
    }
}
项目:irma_future_id    文件:SPUserNotice.java   
private SPUserNotice(
    ASN1Sequence seq)
{
    Enumeration e = seq.getObjects();
    while (e.hasMoreElements())
    {
        ASN1Encodable object = (ASN1Encodable)e.nextElement();
        if (object instanceof DisplayText || object instanceof ASN1String)
        {
            explicitText = DisplayText.getInstance(object);
        }
        else if (object instanceof NoticeReference || object instanceof ASN1Sequence)
        {
            noticeRef = NoticeReference.getInstance(object);
        }
        else
        {
            throw new IllegalArgumentException("Invalid element in 'SPUserNotice': " + object.getClass().getName());
        }
    }
}
项目:bc-java    文件:SPUserNotice.java   
private SPUserNotice(
    ASN1Sequence seq)
{
    Enumeration e = seq.getObjects();
    while (e.hasMoreElements())
    {
        ASN1Encodable object = (ASN1Encodable)e.nextElement();
        if (object instanceof DisplayText || object instanceof ASN1String)
        {
            explicitText = DisplayText.getInstance(object);
        }
        else if (object instanceof NoticeReference || object instanceof ASN1Sequence)
        {
            noticeRef = NoticeReference.getInstance(object);
        }
        else
        {
            throw new IllegalArgumentException("Invalid element in 'SPUserNotice': " + object.getClass().getName());
        }
    }
}
项目:ipack    文件:SPUserNotice.java   
public SPUserNotice(
    NoticeReference noticeRef,
    DisplayText     explicitText)
{
    this.noticeRef = noticeRef;
    this.explicitText = explicitText;
}
项目:gwt-crypto    文件:SPUserNotice.java   
public SPUserNotice(
    NoticeReference noticeRef,
    DisplayText     explicitText)
{
    this.noticeRef = noticeRef;
    this.explicitText = explicitText;
}
项目:Aki-SSL    文件:SPUserNotice.java   
public SPUserNotice(
    NoticeReference noticeRef,
    DisplayText     explicitText)
{
    this.noticeRef = noticeRef;
    this.explicitText = explicitText;
}
项目:TinyTravelTracker    文件:SPUserNotice.java   
public SPUserNotice(
    NoticeReference noticeRef,
    DisplayText     explicitText)
{
    this.noticeRef = noticeRef;
    this.explicitText = explicitText;
}
项目:CryptMeme    文件:SPUserNotice.java   
public SPUserNotice(
    NoticeReference noticeRef,
    DisplayText     explicitText)
{
    this.noticeRef = noticeRef;
    this.explicitText = explicitText;
}
项目:irma_future_id    文件:SPUserNotice.java   
public SPUserNotice(
    NoticeReference noticeRef,
    DisplayText     explicitText)
{
    this.noticeRef = noticeRef;
    this.explicitText = explicitText;
}
项目:bc-java    文件:SPUserNotice.java   
public SPUserNotice(
    NoticeReference noticeRef,
    DisplayText     explicitText)
{
    this.noticeRef = noticeRef;
    this.explicitText = explicitText;
}
项目:ipack    文件:SPUserNotice.java   
public DisplayText getExplicitText()
{
    return explicitText;
}
项目:gwt-crypto    文件:SPUserNotice.java   
public DisplayText getExplicitText()
{
    return explicitText;
}
项目:Aki-SSL    文件:SPUserNotice.java   
public DisplayText getExplicitText()
{
    return explicitText;
}
项目:keystore-explorer    文件:PolicyInformationUtil.java   
/**
 * Get string representation of user notice.
 *
 * @param userNotice
 *            User notice
 * @return String representation of user notice
 */
public static String toString(UserNotice userNotice) {
    StringBuffer sbUserNotice = new StringBuffer();

    NoticeReference noticeReference = userNotice.getNoticeRef();

    if (noticeReference != null) {
        DisplayText organization = noticeReference.getOrganization();

        if (organization != null) {
            sbUserNotice.append(MessageFormat.format(res.getString("PolicyInformationUtil.Organization"),
                    organization.getString()));

            if ((noticeReference.getNoticeNumbers() != null) || (userNotice.getExplicitText() != null)) {
                sbUserNotice.append(", ");
            }
        }

        ASN1Integer[] noticeNumbers = noticeReference.getNoticeNumbers();

        StringBuffer sbNoticeNumbers = new StringBuffer();

        if (noticeNumbers != null) {
            for (int i = 0; i < noticeNumbers.length; i++) {
                ASN1Integer noticeNumber = noticeNumbers[i];

                sbNoticeNumbers.append(noticeNumber.getValue().intValue());

                if ((i + 1) < noticeNumbers.length) {
                    sbNoticeNumbers.append(" ");
                }
            }

            sbUserNotice.append(MessageFormat.format(res.getString("PolicyInformationUtil.NoticeNumbers"),
                    sbNoticeNumbers.toString()));

            if (userNotice.getExplicitText() != null) {
                sbUserNotice.append(", ");
            }
        }
    }

    DisplayText explicitText = userNotice.getExplicitText();

    if (explicitText != null) {
        sbUserNotice.append(MessageFormat.format(res.getString("PolicyInformationUtil.ExplicitText"),
                explicitText.getString()));
    }

    return sbUserNotice.toString();
}
项目:TinyTravelTracker    文件:SPUserNotice.java   
public DisplayText getExplicitText()
{
    return explicitText;
}
项目:CryptMeme    文件:SPUserNotice.java   
public DisplayText getExplicitText()
{
    return explicitText;
}
项目:irma_future_id    文件:SPUserNotice.java   
public DisplayText getExplicitText()
{
    return explicitText;
}
项目:bc-java    文件:SPUserNotice.java   
public DisplayText getExplicitText()
{
    return explicitText;
}