Package clips.delegate.directory.complex

Examples of clips.delegate.directory.complex.DirectoryDoctorAction


        }
        input.close();
    }
   
    public void uploadDoctorAction() throws IOException, ClipsException {
    DirectoryDoctorAction dirAction =
                (DirectoryDoctorAction) DirectoryLocator.getDirectory(DirectoryDoctorAction.class, false);
       
        DirectoryDoctorActionItem parent = null;
        DirectoryDoctorActionItem current = null;
        DirectoryDoctorActionItem item = null;
       
        String line = input.readLine();
        while (line != null) {
            if (!line.trim().isEmpty()) {
                int pos = line.indexOf('|');
                if (pos > -1) {
                    String code = line.substring(0, pos);
                    String title = line.substring(pos + 1);
                    if (code.length() == 2) {
                        DoctorActionDetails details = new DoctorActionDetails();
                        details.parentItem = 0;
                        details.title = title;
                        details.code = code;
                       
                        parent = new DirectoryDoctorActionItem(details);
                        dirAction.getItems().append(parent);
                       
                        System.out.println(code + " " + title);
                    }
                    else if (code.length() == 5) {
                        code = code.substring(3, 5);
                       
                        DoctorActionDetails details = new DoctorActionDetails();
                        details.parentItem = parent.getID();
                        details.title = title;
                        details.code = code;
                       
                        current = new DirectoryDoctorActionItem(details);
                        dirAction.getItems().append(current);
                       
                        System.out.println("   " +code + " " + title);
                    }
                    else if (code.length() == 9) {
                        code = code.substring(6);                       
                       
                        DoctorActionDetails details = new DoctorActionDetails();
                        details.parentItem = current.getID();
                        details.title = title;
                        details.code = code;
                       
                        item = new DirectoryDoctorActionItem(details);
                        dirAction.getItems().append(item);
                       
                        System.out.println("     " +code + " " + title);
                    }
                }
            }
View Full Code Here


        }
        input.close();
    }
   
    public void uploadServiceActions() throws IOException, ClipsException {
    DirectoryDoctorAction dirAction =
                (DirectoryDoctorAction) DirectoryLocator.getDirectory(DirectoryDoctorAction.class, false);
        DirectoryService dirService =
                (DirectoryService) DirectoryLocator.getDirectory(DirectoryService.class, false);
       
        Map<String, DirectoryServiceItem> serviceMap = new HashMap<String, DirectoryServiceItem>();
        for (int i = 0; i < dirService.getItems().size(); i++) {
            DirectoryServiceItem item = dirService.getItems().get(i);
            serviceMap.put(item.getFullCode(), item);
        }
       
        Map<String, DirectoryDoctorActionItem> actionMap = new HashMap<String, DirectoryDoctorActionItem>();
        DirectoryItemRO[] actionArr = dirAction.toArray(false, true);
        for (int i = 0; i < actionArr.length; i++) {
            DirectoryDoctorActionItem item = (DirectoryDoctorActionItem) actionArr[i];
            actionMap.put(item.getGroupCode(), item);
        }
       
View Full Code Here

        actionList = new ArrayList<DirectoryDoctorActionItem>();
        for (int i = 0; i < doctorActions.size(); i++) {
            DirectoryDoctorActionItem directoryDoctorActionItem = doctorActions.get(i);
            actionList.add(directoryDoctorActionItem);
        }
        DirectoryDoctorAction directory = (DirectoryDoctorAction) DirectoryLocator.getDirectory(DirectoryDoctorAction.class, false);
        treeModel = new TreeModelDirectoryActions(directory);
        jTree1.setModel(treeModel);
        jTree1.getSelectionModel().addTreeSelectionListener(new TreeSelectionListener() {
            @Override
            public void valueChanged(TreeSelectionEvent e) {
View Full Code Here

TOP

Related Classes of clips.delegate.directory.complex.DirectoryDoctorAction

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.