Package com.innoq.liqid.model

Examples of com.innoq.liqid.model.Node


        assertFalse(group.isEmpty());
    }

    @Test
    public void testCreateGroup() throws Exception {
        Node g1 = HELPER.getGroup(CN);
        assertTrue(g1.isEmpty());
        LdapGroup t1 = Utils.getTestGroup("test");
        t1 = Utils.updatedGroup(t1, CN);
        if (HELPER.setGroup(t1)) {
            LOG.log(Level.INFO, "created Group {0}", CN);
        }
        g1 = HELPER.getGroup(CN);
        assertFalse(g1.isEmpty());

    }
View Full Code Here


    }

    @Test
    public void testCreateUser() throws Exception {
        //String uid = "newTestUser";
        Node u1 = HELPER.getUser(UID);
        assertTrue(u1.isEmpty());
        LdapUser t1 = Utils.getTestUser(UID);
        t1.setPassword(UID);
        t1 = Utils.updatedUser(t1, UID);
        assertTrue("testCreateUser " + UID + " for login failed", HELPER.setUser(t1));
        u1 = HELPER.getUser(UID);
        assertFalse(u1.isEmpty());
        Utils.removeTestUser(t1);
    }
View Full Code Here

        HELPER.setUser(u1);
    }

    @AfterClass
    public static void tearDownClass() throws Exception {
        Node u1 = HELPER.getUser(UID1);
        HELPER.rmUser(u1);
    }
View Full Code Here

     * Loads a Node from Cache File.
     * @param filename
     * @return Node that was loaded.
     */
    public static Node loadNodeCache(String filename) {
        Node node = null;
        File cacheFile = new File(Configuration.getVersionedFilename(filename));
        if (cacheFile.exists()) {
            FileInputStream fileIn = null;
            try {
                fileIn = new FileInputStream(Configuration.getVersionedFilename(filename));
View Full Code Here

            deletionCount++;
            ctx.unbind(getOuForNode(user));
        } catch (NamingException ex) {
            handleNamingException(user, ex);
        }
        Node ldapUser = getUser(user.getUid());
        return ldapUser.isEmpty();
    }
View Full Code Here

            deletionCount++;
            ctx.unbind(getOuForNode(group));
        } catch (NamingException ex) {
            handleNamingException(group, ex);
        }
        Node ldapGroup = getGroup(group.getCn());
        return ldapGroup.isEmpty();
    }
View Full Code Here

     * @param owner DN of Parent Node.
     * @return a new Entry.
     */
    public Node getEntry(final String cn, final String owner) {
        // TODO implement me!
        Node entry = new LdapEntry(cn, owner);
        return entry;
    }
View Full Code Here

     * @see com.innoq.liqid.model.Node#getName().
     * @return the Node of that User, either filled (if User was found), or
     * empty.
     */
    public Node getUser(final String uid) {
        Node user = new LdapUser(uid, this);
        try {
            String query = "(&(objectClass=" + userObjectClass + ")(" + userIdentifyer + "=" + uid + "))";
            SearchResult searchResult;
            Attributes attributes;
            SearchControls controls = new SearchControls();
View Full Code Here

     * @see com.innoq.liqid.model.Node#getName().
     * @return the Node of that Group, either filled (if Group was found), or
     * empty.
     */
    public Node getGroup(final String cn) {
        Node group = new LdapGroup(cn, this);
        try {
            String query = "(&(objectClass=" + groupObjectClass + ")(" + groupIdentifyer + "=" + cn + "))";
            SearchResult searchResult = null;
            Attributes attributes = null;
            SearchControls controls = new SearchControls();
View Full Code Here

TOP

Related Classes of com.innoq.liqid.model.Node

Copyright © 2018 www.massapicom. 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.