Package org.jitterbit.integration.ldap.structure

Examples of org.jitterbit.integration.ldap.structure.LdapStructureAttribute


                if (t.isDataFlavorSupported(DataFlavor.stringFlavor)) {
                    String s = (String) t.getTransferData(DataFlavor.stringFlavor);
                    insertAttributeName(s);
                    return true;
                } else if (t.isDataFlavorSupported(TransferableAttribute.FLAVOR)) {
                    LdapStructureAttribute a = (LdapStructureAttribute) t.getTransferData(TransferableAttribute.FLAVOR);
                    insertAttribute(a);
                    return true;
                }
                return false;
            } catch (Exception ex) {
View Full Code Here


        boolean atLeastOneNotSelected = false;
        for (KongaTreeNode child : node.children()) {
            if (child instanceof AttributeSelectionNode) {
                AttributeSelectionNode attrNode = (AttributeSelectionNode) child;
                if (attrNode.isSelected()) {
                    LdapStructureAttribute attr = attrNode.getUserObject();
                    if (!contribs.isExtendedAttribute(attr)) {
                        attrs.add(attrNode.getUserObject().getName());
                    }
                } else {
                    atLeastOneNotSelected = true;
View Full Code Here

            for (LdapStructureAttribute a : extAttrs) {
                extAttrNames.add(a.getName());
            }
            ClassNameNode parent = classNodes.get(classOid);
            for (KongaTreeNode child : parent.children()) {
                LdapStructureAttribute a = (LdapStructureAttribute) child.getUserObject();
                if (extAttrNames.contains(a.getName())) {
                    nodes.add(child);
                }
            }
        }
        return nodes.toArray(new KongaTreeNode[nodes.size()]);
View Full Code Here

    }

    private void setSelectionStateForKnownObjectClass(Set<String> selectedAttributeNames,
                    Set<LdapStructureAttribute> extendedAttributes, ClassNameNode n) {
        for (AttributeSelectionNode child : n.getAttributeNodes()) {
            LdapStructureAttribute a = child.getUserObject();
            boolean selected = (selectedAttributeNames == null) || selectedAttributeNames.contains(a.getName())
                            || extendedAttributes.contains(a);
            child.setSelected(selected);
        }
    }
View Full Code Here

    private void setSelectionStateForNewObjectClass(ClassNameNode n) {
        for (AttributeSelectionNode child : n.getAttributeNodes()) {
            if (st == SourceTarget.Source) {
                child.setSelected(false);
            } else {
                LdapStructureAttribute a = child.getUserObject();
                boolean required = a.getUse() == AttributeUse.REQUIRED;
                child.setSelected(required);
            }
        }
    }
View Full Code Here

        }

        public LdapStructureAttribute[] getDefinedAttributes() {
            List<LdapStructureAttribute> attrs = Lists.newArrayList();
            for (int row = 0; row < getRowCount(); ++row) {
                LdapStructureAttribute a = buildAttributeFromRow(row);
                attrs.add(a);
            }
            return attrs.toArray(new LdapStructureAttribute[attrs.size()]);
        }
View Full Code Here

                }
            });
        }

        private void addAttribute() {
            LdapStructureAttribute a = buildNewAttribute();
            model.addRow(a);
            int row = model.getRowCount() - 1;
            table.getAdaptee().editCellAt(row, Model.NAME);
            // TODO: Select all
        }
View Full Code Here

        if (extendedAttributes != null) {
            Comparator<LdapStructureAttribute> tieBreaker = AttributeComparators.useOrder();
            for (LdapStructureAttribute a : extendedAttributes) {
                boolean add = true;
                if (effective.containsKey(a.getName())) {
                    LdapStructureAttribute existing = effective.get(a.getName());
                    int cmp = tieBreaker.compare(a, existing);
                    // The extended attribute was defined with a stronger USE than the
                    // version of the attribute contributed by a normal class if
                    // cmp == -1. If so we want to replace the existing attribute.
                    add = (cmp == -1);
View Full Code Here

            }
        }
       
        private void insertAttribute(String name, boolean required, ObjectClassStructureBuilder parent)
                                                                        throws NamingException {
            LdapStructureAttribute attr = attributeFactory.getAttribute(name, required);
            if (attr != null) {
                parent.addAttribute(attr);
            }
        }
View Full Code Here

            builder.setDescription(JndiUtils.getSingleStringAttributeValue(attrs, "DESC", null));
            builder.setUsageDecription(JndiUtils.getSingleStringAttributeValue(attrs, "USAGE", null));
            builder.setCardinality(getCardinality(attrs));
            builder.setReadOnly(getReadOnly(attrs));
            getSyntax(attrs, builder);
            LdapStructureAttribute a = builder.getAttribute();
            logAttribute(a);
            return a;
        }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.ldap.structure.LdapStructureAttribute

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.