Package org.netbeans.server.services.beans

Examples of org.netbeans.server.services.beans.Mappings


        public Mappings getMappings() {
            TreeMap<Integer, Integer> tmp = new TreeMap<Integer, Integer>();
            tmp.put(158498, 146264);
            tmp.put(158523, 146285);
            tmp.put(157884, 2081);
            return new Mappings(tmp);
        }
View Full Code Here


    }

    public Mappings getMappings(){
        String url = SERVER_URL + RESOURCE_URL + "mappings";
        WebResource webResource = client.resource(url);
        Mappings result = webResource.get(Mappings.class);
        return result;
    }
View Full Code Here

        assertFalse(comps.getSubcomponentsSet(someComp).isEmpty());
    }

    @Test
    public void testMappings() throws IOException {
        Mappings mps = new BugzillaConnector().getMappings();
        Map<Integer, Integer> mp = mps.getMappings();
        assertEquals(mp.get(158498).intValue(), 146264);
        assertEquals(mp.get(158523).intValue(), 146285);
        assertEquals(mp.get(157884).intValue(), 2081);
        assertEquals(mp.get(111307).intValue(), 108);
        assertEquals(mp.get(160098).intValue(), 147484);
View Full Code Here

        return reporterUser;
    }

    void updateInTransferReports() {
        SYNCHRONIZATION_LOGGER.fine("cleaning in transfer");
        Mappings mappings = getMappings();
        if (mappings == null) {
            return;
        }
        Map<Integer, Integer> mappingMap = mappings.getMappings();
        //** reportId -> bugId  */
        final Map<Integer, Integer> reverseMap = new HashMap<Integer, Integer>();
        for (Entry<Integer, Integer> entry : mappingMap.entrySet()) {
            reverseMap.put(entry.getValue(), entry.getKey());
        }
View Full Code Here

    void updateMappings() {
        SYNCHRONIZATION_LOGGER.fine("updating mappings");
        Utils.processPersistable(new Persistable.Transaction() {

            public TransactionResult runQuery(EntityManager em) throws Exception {
                Mappings mappings = getMappings();
                if (mappings == null){
                    return TransactionResult.ROLLBACK;
                }
                for (Entry<Integer, Integer> mappingEntry : mappings.getMappings().entrySet()) {
                    Integer bugId = mappingEntry.getKey();
                    Integer cfAutoreporterId = mappingEntry.getValue();
                    Report rep = em.find(Report.class, cfAutoreporterId);
                    if (rep == null) {
                        continue;
View Full Code Here

TOP

Related Classes of org.netbeans.server.services.beans.Mappings

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.