Package com.ca.commons.naming

Examples of com.ca.commons.naming.DN


    public void rename(String oldName, String newName) throws NamingException
    {
        // note - this is the only time we use the 'name' version of the call,
        // because we have to do some processing rather than writing the string
        // out to DSML immediately.
        rename(new DN(oldName), new DN(newName));
    }
View Full Code Here


     * @throws javax.naming.NamingException If a naming exception was encountered.
     */

    public Name parse(String name) throws NamingException
    {
        DN newDN = new DN(name);
        if (newDN.error())
            throw newDN.getNamingException();
        return newDN;
    }
View Full Code Here

        br.registerItem(br.LDIF, importFile);
    }

    public void ldifFullExport(SmartTree activeTree, boolean usingSearch)
    {
        DN base = activeTree.getRootDN();
        DataSource datasource = activeTree.getDataSource();
        LdifExport export = new LdifExport(base, datasource, jxplorer.searchTree, usingSearch, jxplorer, HelpIDs.LDIF_EXPORT_TREE);
        export.setSize(360,120);
        export.setTitle(CBIntText.get("Export Full Tree"));
        CBUtility.center(export, jxplorer);
View Full Code Here

        export.setVisible(true);
    }

    public void ldifSubExport(SmartTree activeTree, boolean usingSearch)
    {
        DN base = activeTree.getCurrentDN();
        DataSource datasource = activeTree.getDataSource();
        LdifExport export = new LdifExport(base, datasource, jxplorer.searchTree, usingSearch, jxplorer, HelpIDs.LDIF_EXPORT_SUBTREE);
        export.setSize(360,120);
        export.setTitle(CBIntText.get("Export Subtree"));
        CBUtility.center(export, jxplorer);
View Full Code Here

        disconnect();
        jxplorer.setStatus("Working Offline");
        jxplorer.workOffline = true ;
        jxplorer.offlineBroker.clear();
        jxplorer.mrTree.registerDataSource(jxplorer.offlineBroker);
        jxplorer.mrTree.setRoot(new DN(SmartTree.NODATA));
        LdifImport imp = new LdifImport(jxplorer.offlineBroker, jxplorer.mrTree, jxplorer, null);

        // XXX This activates the rest of the LDIF menu, *but* it will leave the LDIF menu activated
        // XXX even if the view offline load fails for some reason :-(.  Not sure how to fix this
        // XXX problem... - CB
View Full Code Here

  {
        SearchModel sm = new SearchModel();

    //TE: base DN...
    String baseDN = sm.getValue(name+"."+SearchModel.BASEDN);
    DN dn = (baseDN==null) ? jxplorer.getActiveTree().getCurrentDN() : new DN(baseDN);

    //TE: search level (base object, one level, full subtree)...
    int searchLevel = 2;
    try
    {
View Full Code Here

  *
  */

  public void goToBookmark(String dn, SmartTree tree)
  {
        tree.readAndExpandDN(new DN(dn));
  }
View Full Code Here

                else if ("rfc2254".equals(searchAttribute.getSelectedItem()))    // Allows users to enter complex search strings in the Search Bar.
                    filter = searchFilter.getText();
                else
                    filter += ftn + searchFilter.getText() + ")";

                DN base = jx.getTree().getCurrentDN();
                if (base == null)
                    base = jx.getTree().getRootDN();

                String aliasOption = "always";
                log.info("Setting search alias option to: [" + aliasOption + "]");
View Full Code Here

    
    public DN getDNForPath(TreePath path)
    {
        if (path==null) return null;
       
        DN newDN = new DN();
       
        // there *has* to be a better way to cast arrays.  I wonder what it is.
        Object[] cobbleStones = path.getPath();
       
        SmartNode myRoot = (SmartNode)cobbleStones[0];
       
        try
        {
            for (int i=0; i<cobbleStones.length; i++)
            {
                SmartNode sn = ((SmartNode) cobbleStones[i]);
               
                RDN rdn = sn.getRDN();
                if (rdn.isEmpty() == false)  
                {            
                    newDN.addChildRDN(rdn);
                }   
            }   
        }
        catch (InvalidNameException e)
        {
View Full Code Here

            jx.getTreeTabPane().setSelectedComponent(jx.getResultsPanel());
            return;
        }

        String filter = "(objectclass=*)";
        DN dn = new DN(currentValue.getStringValue());

        String aliasOption = "always";
        log.info("Setting search alias option to: [" + aliasOption + "]");
        JXplorer.setProperty("option.ldap.searchAliasBehaviour", aliasOption);

View Full Code Here

TOP

Related Classes of com.ca.commons.naming.DN

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.