Package org.jitterbit.integration.ldap.structure

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


    private void giveReturnedStructuresToCallback(WsClassStructureReturn raw, GetLdapStructuresCallback callback) {
        if (Thread.currentThread().isInterrupted()) {
            callback.cancelled();
            return;
        }
        ClassStructureXmlPersistor xmlHandler = new ClassStructureXmlPersistor();
        String[] compressedData = raw.getCompressedStructureStrings();
        ObjectClassStructure[] structs = new ObjectClassStructure[compressedData.length];
        for (int n = 0, len = compressedData.length; n < len; ++n) {
            try {
                String uncompr = JitterbitServerEncoding.base64DecodeAndInflateString(compressedData[n]);
                ObjectClassStructure e = xmlHandler.load(uncompr);
                structs[n] = e;
            } catch (DataFormatException ex) {
                callback.caught(new IntegrationServerException("The data returned by the server is corrupt", ex));
            }
        }
View Full Code Here


    }
   
    private static ObjectClassStructure[] getStructures(WsClassStructureReturn ret) throws Exception {
        String[] compressed = ret.getCompressedStructureStrings();
        ObjectClassStructure[] structs = new ObjectClassStructure[compressed.length];
        ClassStructureXmlPersistor p = new ClassStructureXmlPersistor();
        for (int n = 0, len = compressed.length; n < len; ++n) {
            String xml = ZipUtils.base64DecodeAndInflateString(compressed[n]);
            structs[n] = p.load(xml);
        }
        return structs;
    }
View Full Code Here

    @Override
    public ObjectClassStructure getClassStructure(NumericOid oid) {
        File file = getEntryFile(oid);
        synchronized (entryLock) {
            if (file.exists()) {
                ClassStructureFilePersistor p = new ClassStructureXmlPersistor();
                return p.load(file);
            }
        }
        return null;
    }
View Full Code Here

        }
    }
   
    private void storeClassStructure(ObjectClassStructure struct) {
        File file = getEntryFile(struct);
        ClassStructureFilePersistor p = new ClassStructureXmlPersistor();
        p.store(struct, file);
    }
View Full Code Here

    }

    private WsClassStructureReturn convert(ObjectClassStructure[] structs) throws RemoteException {
        try {
            String[] compressedStrings = new String[structs.length];
            ClassStructureXmlPersistor p = new ClassStructureXmlPersistor();
            for (int n = 0, len = structs.length; n < len; ++n) {
                compressedStrings[n] = compress(structs[n], p);
            }
            return new WsClassStructureReturn(compressedStrings);
        } catch (IOException ex) {
View Full Code Here

TOP

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

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.