Package clips.delegate.directory.complex

Examples of clips.delegate.directory.complex.DirectoryServicesGroup


    public ServiceParser(File source) throws FileNotFoundException {
        input = new BufferedReader(new FileReader(source));
    }

    public void uploadService() throws IOException, ClipsException {
    DirectoryServicesGroup dirGroup =
                (DirectoryServicesGroup) DirectoryLocator.getDirectory(DirectoryServicesGroup.class, false);
        DirectoryService dirService =
                (DirectoryService) DirectoryLocator.getDirectory(DirectoryService.class, false);
       
        DirectoryServicesGroupItem parent = null;
        DirectoryServicesGroupItem group = null;
        DirectoryServiceItem service = 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) {
                        ServiceGroupDetails parDetails = new ServiceGroupDetails();
                        parDetails.code = code;
                        parDetails.parentItem = 0;
                        parDetails.title = title;
                       
                        parent = new DirectoryServicesGroupItem(parDetails);
                        dirGroup.getItems().append(parent);
                       
                        System.out.println(code + " " + title);
                    }
                    else if (code.length() == 6) {
                        code = code.substring(3, 6);
                       
                        ServiceGroupDetails grDetails = new ServiceGroupDetails();
                        grDetails.code = code;
                        grDetails.parentItem = parent.getID();
                        grDetails.title = title;
                       
                        group = new DirectoryServicesGroupItem(grDetails);
                        dirGroup.getItems().append(group);
                       
                        System.out.println("   " +code + " " + title);
                    }
                    else if (code.length() == 9) {
                        code = code.substring(7);
View Full Code Here


        tabService.getColumnModel().getColumn(TableModelServicesFromGroup.COL_VISIT_TYPE).
                setCellEditor(new DefaultCellEditor(new JComboBox(DirectoryLocator.getDirectory(DirectoryVisitType.class).toArray())));
    }
   
    private void setTree() throws ClipsException {
        DirectoryServicesGroup grps = (DirectoryServicesGroup)
                DirectoryLocator.getDirectory(DirectoryServicesGroup.class);       
        treeServiceGroup.setModel(new TreeModelServiceGroup(grps));
        treeServiceGroup.setSelectionPath(null);
    }
View Full Code Here

                } else {
                    ServiceGroupDetails details = new ServiceGroupDetails();
                    details.title = tfName.getText();
                    details.code = tfGroupCode.getText();
                    newItem = new DirectoryServicesGroupItem(details);
                    DirectoryServicesGroup svc = (DirectoryServicesGroup)
                        DirectoryLocator.getDirectory(DirectoryServicesGroup.class);
                    svc.getItems().append(newItem);
                    treeServiceGroup.updateUI();
                    treeServiceGroup.expandPath(treeServiceGroup.getSelectionPath());
                }
            }
        }
View Full Code Here

    @SuppressWarnings("unchecked")
private void deleteServiceGroup(DirectoryServicesGroupItem serGroup) throws ClipsException {
    DirectoryService svc = (DirectoryService)
            DirectoryLocator.getDirectory(DirectoryService.class);
    DirectoryServicesGroup grps = (DirectoryServicesGroup)
            DirectoryLocator.getDirectory(DirectoryServicesGroup.class);
   
    //удаляем услуги из группы
    Selector<DirectoryServiceItem> list2del = getServiceList(serGroup);
    for(int i=list2del.size() - 1; i > -1; i--) {
        DirectoryServiceItem service = svc.getItemFromID(list2del.get(i).getID());
        svc.getItems().remove(service);
        System.out.println("service: " + service.getTitle());
    }

    SelectorEditableExceptional<DirectoryServicesGroupItem> iie = serGroup.getItems();       
    for (int i = iie.size() - 1; i > -1; i--) {
        DirectoryServicesGroupItem item = iie.get(i);
        deleteServiceGroup(item);
    }
   
   
    DirectoryServicesGroupItem parent = serGroup.getParent();
   
    if (parent == null) {
        iie = grps.getItems();
    }
    else {
        iie = parent.getItems();
    }
   
View Full Code Here

    SelectorEditableExceptional<DirectoryServicesGroupItem> di;
           
    public TreeModelSelService() throws ClipsException {
        super(new DefaultMutableTreeNode("Справочник услуг"));

        DirectoryServicesGroup directory = (DirectoryServicesGroup)
            DirectoryLocator.getDirectory(DirectoryServicesGroup.class, false);
        di = directory.getItems();
    }
View Full Code Here

            getDetails().serviceClass = serviceClass.getID();
        }
    }

    public DirectoryServicesGroupItem getGroup() throws ClipsException {
        DirectoryServicesGroup groupList = DirectoryLocator.getDirectory(DirectoryServicesGroup.class, false);
        if (getDetails().serviceGroup != 0) {
            return groupList.getItemFromID(getDetails().serviceGroup);
        }
        return null;
    }
View Full Code Here

     */
    public PanelExpenditureDefaultEdit(PageContainer container) throws ClipsException {
        super(container);
        initComponents();

    DirectoryServicesGroup directory = DirectoryLocator.getDirectory(DirectoryServicesGroup.class, false);
    DirectoryItemRO[] array = directory.toArray(false, false);
    treeModel = new TreeModelServices(array, "Услуги");

    trServices.setModel(treeModel);
    DefaultTreeCellRenderer render = new DefaultTreeCellRenderer();
    render.setLeafIcon(null);
View Full Code Here

TOP

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

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.