Examples of ClientMinPrincipalType


Examples of net.jini.core.constraint.ClientMinPrincipalType

                // Invoking ClientMaxPrincipalType(Class clazz) constructor
                ic = new ClientMaxPrincipalType((Class) cl[0]);
            } else if (tc == CL_MIN_PR_TYPE__CLASS
                    || tc == CL_MIN_PR_TYPE__CLASS__NULL) {
                // Invoking ClientMinPrincipalType(Class clazz) constructor
                ic = new ClientMinPrincipalType((Class) cl[0]);
            } else if (tc == CL_MAX_PR_TYPE__ARRAY
                    || tc == CL_MAX_PR_TYPE__ARRAY__NULL
                    || tc == CL_MAX_PR_TYPE__ARRAY__NULL_EL
                    || tc == CL_MAX_PR_TYPE__ARRAY__EMPTY
                    || tc == CL_MAX_PR_TYPE__ARRAY__PRIM_TYPE
                    || tc == CL_MAX_PR_TYPE__ARRAY__ARRAY_TYPE
                    || tc == CL_MAX_PR_TYPE__ARRAY__NOT_PRINCIPAL) {
                // Invoking ClientMaxPrincipalType(Class[] classes) constructor
                ic = new ClientMaxPrincipalType((Class[]) cl);
            } else if (tc == CL_MIN_PR_TYPE__ARRAY
                    || tc == CL_MIN_PR_TYPE__ARRAY__NULL
                    || tc == CL_MIN_PR_TYPE__ARRAY__NULL_EL
                    || tc == CL_MIN_PR_TYPE__ARRAY__EMPTY
                    || tc == CL_MIN_PR_TYPE__ARRAY__PRIM_TYPE
                    || tc == CL_MIN_PR_TYPE__ARRAY__ARRAY_TYPE
                    || tc == CL_MIN_PR_TYPE__ARRAY__NOT_PRINCIPAL) {
                // Invoking ClientMinPrincipalType(Class[] classes) constructor
                ic = new ClientMinPrincipalType((Class[]) cl);
            }

            // If some Exception is expected
            if (       tc == CL_MAX_PR_TYPE__CLASS__NULL
                    || tc == CL_MIN_PR_TYPE__CLASS__NULL
View Full Code Here

Examples of net.jini.core.constraint.ClientMinPrincipalType

                    || tc == CL_MIN_PR_TYPE__COLL__ILL_EL
                    || tc == CL_MIN_PR_TYPE__COLL__PRIM_TYPE
                    || tc == CL_MIN_PR_TYPE__COLL__ARRAY_TYPE
                    || tc == CL_MIN_PR_TYPE__COLL__NOT_PRINCIPAL) {
                // Invoking ClientMinPrincipalType(Collection classes) constructor
                ic = new ClientMinPrincipalType((Collection) cl);
            }

            // If some Exception is expected
            if (       tc == CL_MAX_PR_TYPE__COLL__NULL
                    || tc == CL_MAX_PR_TYPE__COLL__NULL_EL
View Full Code Here

Examples of net.jini.core.constraint.ClientMinPrincipalType

    public ClientMinPrincipal getClientMinPrincipal() {
        return new ClientMinPrincipal(clientSubject.getPrincipals());
    }

    public ClientMinPrincipalType getClientMinPrincipalType() {
        return new ClientMinPrincipalType(KerberosPrincipal.class);
    }
View Full Code Here

Examples of net.jini.core.constraint.ClientMinPrincipalType

         * Create ClientMinPrincipalType object
         */
        set[3] = set[1];

        try {
            obj[3] = new ClientMinPrincipalType(set[3]);
        } catch (Exception e) {
            throw new TestException("Exception has been thrown while creating"
                    + " ClientMinPrincipalType object", e);
        }

View Full Code Here

Examples of net.jini.core.constraint.ClientMinPrincipalType

            Confidentiality.NO,
            Delegation.NO,
            Integrity.NO,
            ServerAuthentication.NO,
            new ClientMaxPrincipalType(TestPrincipal.class),
            new ClientMinPrincipalType(TestPrincipal.class),
            new DelegationRelativeTime(1000, 2000, 3000, 4000),
            new DelegationAbsoluteTime(1000, 2000, 3000, 4000),
            new ClientMinPrincipal(new Principal[] { tp1, tp2 }),
            new ClientMaxPrincipal(new Principal[] { tp1, tp2 }),
            new ServerMinPrincipal(new Principal[] { tp1, tp2 }),
View Full Code Here

Examples of net.jini.core.constraint.ClientMinPrincipalType

                "\n\t+++++ TestCase #14:: "
                + "Only duplicate ClientMinPrincipalType constraints exist");

        try {
            Collection argColl = new ArrayList();
            ClientMinPrincipalType ic = new
                    ClientMinPrincipalType(KerberosPrincipal.class);
            argColl.add(ic);
            argColl.add(ic);

            if (!checker(argColl, ic)) {
                throw new TestException(
                        "" + " test failed");
            }
        } catch (Exception e) {
            logger.log(Level.FINE,
                    "Exception has been thrown while creating"
                    + " ClientMinPrincipalType object: "
                    + e);
            throw new TestException(
                    "" + " test failed");
        }

        // TestCase #15
        logger.log(Level.FINE,
                "\n\t+++++ TestCase #15:: "
                + "Only duplicate ServerMinPrincipal constraints exist");

        try {
            Collection argColl = new ArrayList();
            ServerMinPrincipal ic = new ServerMinPrincipal(new
                    KerberosPrincipal("duke@FOO.COM"));
            argColl.add(ic);
            argColl.add(ic);

            if (!checker(argColl, ic)) {
                throw new TestException(
                        "" + " test failed");
            }
        } catch (Exception e) {
            logger.log(Level.FINE,
                    "Exception has been thrown while creating"
                    + " ServerMinPrincipal object: "
                    + e);
            throw new TestException(
                    "" + " test failed");
        }

        // TestCase #16
        logger.log(Level.FINE,
                "\n\t+++++ TestCase #16:: "
                + "Only duplicate ConnectionAbsoluteTime constraints exist");
        {
            Collection argColl = new ArrayList();
            ConnectionAbsoluteTime ic = new ConnectionAbsoluteTime((long) 0);
            argColl.add(ic);
            argColl.add(ic);

            if (!checker(argColl, ic)) {
                throw new TestException(
                        "" + " test failed");
            }
        }

        // TestCase #17
        logger.log(Level.FINE,
                "\n\t+++++ TestCase #17:: "
                + "Only duplicate ConnectionRelativeTime constraints exist");
        {
            Collection argColl = new ArrayList();
            ConnectionRelativeTime ic = new ConnectionRelativeTime((long) 0);
            argColl.add(ic);
            argColl.add(ic);

            if (!checker(argColl, ic)) {
                throw new TestException(
                        "" + " test failed");
            }
        }

        // TestCase #18
        logger.log(Level.FINE,
                "\n\t+++++ TestCase #18:: "
                + "Only duplicate DelegationAbsoluteTime constraints exist");
        {
            Collection argColl = new ArrayList();
            DelegationAbsoluteTime ic = new DelegationAbsoluteTime((long) 0,
                    (long) 0, (long) 0, (long) 0);
            argColl.add(ic);
            argColl.add(ic);

            if (!checker(argColl, ic)) {
                throw new TestException(
                        "" + " test failed");
            }
        }

        // TestCase #19
        logger.log(Level.FINE,
                "\n\t+++++ TestCase #19:: "
                + "Only duplicate DelegationRelativeTime constraints exist");
        {
            Collection argColl = new ArrayList();
            DelegationRelativeTime ic = new DelegationRelativeTime((long) 0,
                    (long) 0, (long) 0, (long) 0);
            argColl.add(ic);
            argColl.add(ic);

            if (!checker(argColl, ic)) {
                throw new TestException(
                        "" + " test failed");
            }
        }

        // TestCase #20
        logger.log(Level.FINE,
                "\n\t+++++ TestCase #20:: "
                + "There are several duplicate and non-duplicate constraints");

        try {
            // Argument for ConstraintAlternatives.create() methods
            Collection argColl = new ArrayList();
            argColl.add(ClientAuthentication.YES);
            argColl.add(ClientAuthentication.YES);
            argColl.add(ClientAuthentication.NO);
            argColl.add(Confidentiality.YES);
            argColl.add(Confidentiality.YES);
            argColl.add(Confidentiality.NO);
            argColl.add(Delegation.YES);
            argColl.add(Delegation.YES);
            argColl.add(Delegation.NO);
            argColl.add(Integrity.YES);
            argColl.add(Integrity.YES);
            argColl.add(Integrity.NO);
            argColl.add(ServerAuthentication.YES);
            argColl.add(ServerAuthentication.YES);
            argColl.add(ServerAuthentication.NO);
            argColl.add(new ClientMaxPrincipal(new
                    KerberosPrincipal("duke@FOO.COM")));
            argColl.add(new ClientMaxPrincipal(new
                    KerberosPrincipal("duke@FOO.COM")));
            argColl.add(new ClientMaxPrincipal(new
                    X500Principal(
                    "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US")));
            argColl.add(new ClientMaxPrincipalType(KerberosPrincipal.class));
            argColl.add(new ClientMaxPrincipalType(KerberosPrincipal.class));
            argColl.add(new ClientMaxPrincipalType(X500Principal.class));
            argColl.add(new ClientMinPrincipal(new
                    KerberosPrincipal("duke@FOO.COM")));
            argColl.add(new ClientMinPrincipal(new
                    KerberosPrincipal("duke@FOO.COM")));
            argColl.add(new ClientMinPrincipal(new
                    X500Principal(
                    "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US")));
            argColl.add(new ClientMinPrincipalType(KerberosPrincipal.class));
            argColl.add(new ClientMinPrincipalType(KerberosPrincipal.class));
            argColl.add(new ClientMinPrincipalType(X500Principal.class));
            argColl.add(new ServerMinPrincipal(new
                    KerberosPrincipal("duke@FOO.COM")));
            argColl.add(new ServerMinPrincipal(new
                    KerberosPrincipal("duke@FOO.COM")));
            argColl.add(new ServerMinPrincipal(new
                    X500Principal(
                    "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US")));
            argColl.add(new ConnectionAbsoluteTime((long) 0));
            argColl.add(new ConnectionAbsoluteTime((long) 0));
            argColl.add(new ConnectionAbsoluteTime((long) 1));
            argColl.add(new ConnectionRelativeTime((long) 0));
            argColl.add(new ConnectionRelativeTime((long) 0));
            argColl.add(new ConnectionRelativeTime((long) 1));
            argColl.add(new DelegationAbsoluteTime((long) 0, (long) 0, (long) 0,
                    (long) 0));
            argColl.add(new DelegationAbsoluteTime((long) 0, (long) 0, (long) 0,
                    (long) 0));
            argColl.add(new DelegationAbsoluteTime((long) 1, (long) 1, (long) 1,
                    (long) 1));
            argColl.add(new DelegationRelativeTime((long) 0, (long) 0, (long) 0,
                    (long) 0));
            argColl.add(new DelegationRelativeTime((long) 0, (long) 0, (long) 0,
                    (long) 0));
            argColl.add(new DelegationRelativeTime((long) 1, (long) 1, (long) 1,
                    (long) 1));

            // Expected result of ConstraintAlternatives.create() methods
            Collection expColl = new ArrayList();
            expColl.add(ClientAuthentication.YES);
            expColl.add(ClientAuthentication.NO);
            expColl.add(Confidentiality.YES);
            expColl.add(Confidentiality.NO);
            expColl.add(Delegation.YES);
            expColl.add(Delegation.NO);
            expColl.add(Integrity.YES);
            expColl.add(Integrity.NO);
            expColl.add(ServerAuthentication.YES);
            expColl.add(ServerAuthentication.NO);
            expColl.add(new ClientMaxPrincipal(new
                    KerberosPrincipal("duke@FOO.COM")));
            expColl.add(new ClientMaxPrincipal(new
                    X500Principal(
                    "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US")));
            expColl.add(new ClientMaxPrincipalType(KerberosPrincipal.class));
            expColl.add(new ClientMaxPrincipalType(X500Principal.class));
            expColl.add(new ClientMinPrincipal(new
                    KerberosPrincipal("duke@FOO.COM")));
            expColl.add(new ClientMinPrincipal(new
                    X500Principal(
                    "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US")));
            expColl.add(new ClientMinPrincipalType(KerberosPrincipal.class));
            expColl.add(new ClientMinPrincipalType(X500Principal.class));
            expColl.add(new ServerMinPrincipal(new
                    KerberosPrincipal("duke@FOO.COM")));
            expColl.add(new ServerMinPrincipal(new
                    X500Principal(
                    "CN=Duke, OU=JavaSoft, O=Sun Microsystems, C=US")));
View Full Code Here

Examples of net.jini.core.constraint.ClientMinPrincipalType

                // Invoking ClientMaxPrincipalType(Class clazz) constructor
                ic = new ClientMaxPrincipalType((Class) cl[0]);
            } else if (tc == CL_MIN_PR_TYPE__CLASS
                    || tc == CL_MIN_PR_TYPE__CLASS__NULL) {
                // Invoking ClientMinPrincipalType(Class clazz) constructor
                ic = new ClientMinPrincipalType((Class) cl[0]);
            } else if (tc == CL_MAX_PR_TYPE__ARRAY
                    || tc == CL_MAX_PR_TYPE__ARRAY__NULL
                    || tc == CL_MAX_PR_TYPE__ARRAY__NULL_EL
                    || tc == CL_MAX_PR_TYPE__ARRAY__EMPTY
                    || tc == CL_MAX_PR_TYPE__ARRAY__PRIM_TYPE
                    || tc == CL_MAX_PR_TYPE__ARRAY__ARRAY_TYPE
                    || tc == CL_MAX_PR_TYPE__ARRAY__NOT_PRINCIPAL) {
                // Invoking ClientMaxPrincipalType(Class[] classes) constructor
                ic = new ClientMaxPrincipalType((Class[]) cl);
            } else if (tc == CL_MIN_PR_TYPE__ARRAY
                    || tc == CL_MIN_PR_TYPE__ARRAY__NULL
                    || tc == CL_MIN_PR_TYPE__ARRAY__NULL_EL
                    || tc == CL_MIN_PR_TYPE__ARRAY__EMPTY
                    || tc == CL_MIN_PR_TYPE__ARRAY__PRIM_TYPE
                    || tc == CL_MIN_PR_TYPE__ARRAY__ARRAY_TYPE
                    || tc == CL_MIN_PR_TYPE__ARRAY__NOT_PRINCIPAL) {
                // Invoking ClientMinPrincipalType(Class[] classes) constructor
                ic = new ClientMinPrincipalType((Class[]) cl);
            }

            // If some Exception is expected
            if (       tc == CL_MAX_PR_TYPE__CLASS__NULL
                    || tc == CL_MIN_PR_TYPE__CLASS__NULL
View Full Code Here

Examples of net.jini.core.constraint.ClientMinPrincipalType

                    || tc == CL_MIN_PR_TYPE__COLL__ILL_EL
                    || tc == CL_MIN_PR_TYPE__COLL__PRIM_TYPE
                    || tc == CL_MIN_PR_TYPE__COLL__ARRAY_TYPE
                    || tc == CL_MIN_PR_TYPE__COLL__NOT_PRINCIPAL) {
                // Invoking ClientMinPrincipalType(Collection classes) constructor
                ic = new ClientMinPrincipalType((Collection) cl);
            }

            // If some Exception is expected
            if (       tc == CL_MAX_PR_TYPE__COLL__NULL
                    || tc == CL_MAX_PR_TYPE__COLL__NULL_EL
View Full Code Here

Examples of net.jini.core.constraint.ClientMinPrincipalType

        logger.log(Level.FINE,
                "\n\t+++++ TestCase #5:"
                + "  net.jini.core.constraint.ClientMinPrincipalType");

        try {
            ClientMinPrincipalType obj1 = new
                    ClientMinPrincipalType(KerberosPrincipal.class);
            ClientMinPrincipalType obj2 = new
                    ClientMinPrincipalType(KerberosPrincipal.class);
            ClientMinPrincipalType obj3 = new
                    ClientMinPrincipalType(X500Principal.class);

            if (!checker(obj1, obj2, obj3)) {
                throw new TestException(
                        "" + " test failed");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.