Package org.eurekastreams.server.domain

Examples of org.eurekastreams.server.domain.GadgetDefinition


        int gadgetCount = gadgets.size();
        sut.shrink(AVAILABLE_ZONES, gadgets);

        assertEquals("Gadgets changed size.", gadgetCount, gadgets.size());

        verifyGadget(gadgets.get(0), new GadgetDefinition("gadget0", UUID.randomUUID().toString(),
                 new GalleryItemCategory("somecategory")), 0, 0);
        verifyGadget(gadgets.get(1), new GadgetDefinition("gadget1", UUID.randomUUID().toString(),
                 new GalleryItemCategory("somecategory")), 0, 1);
        verifyGadget(gadgets.get(2), new GadgetDefinition("gadget2", UUID.randomUUID().toString(),
                 new GalleryItemCategory("somecategory")), 1, 0);
        verifyGadget(gadgets.get(3), new GadgetDefinition("gadget3", UUID.randomUUID().toString(),
                 new GalleryItemCategory("somecategory")), 1, 1);
        verifyGadget(gadgets.get(4), new GadgetDefinition("gadget4", UUID.randomUUID().toString(),
                 new GalleryItemCategory("somecategory")), 1, 2);
        verifyGadget(gadgets.get(5), new GadgetDefinition("gadget5", UUID.randomUUID().toString(),
                 new GalleryItemCategory("somecategory")), 1, 3);
        verifyGadget(gadgets.get(6), new GadgetDefinition("gadget6", UUID.randomUUID().toString(),
                 new GalleryItemCategory("somecategory")), 1, 4);

    }
View Full Code Here


     */
    @Before
    public void setUp()
    {
        sut = new CompressGadgetZoneExecution(gadgetMapper, pageMapper);
        gadget1 = new Gadget(new GadgetDefinition(null, null), 9, 3, null);
        gadget2 = new Gadget(new GadgetDefinition(null, null), 9, 5, null);
        gadget3 = new Gadget(new GadgetDefinition(null, null), 9, 7, null);
    }
View Full Code Here

            tab = tabMapper.findById(tabId);
        }

        try
        {
            GadgetDefinition gadgetDef;

            // UUID identified by starting with { and ending with }
            if (gadgetDefUrl.startsWith("{") && gadgetDefUrl.substring(gadgetDefUrl.length() - 1).equals("}"))
            {
                // gadget def is identified by a UUID
View Full Code Here

                gdto.setZoneIndex(gadget.getZoneIndex());
                gdto.setZoneNumber(gadget.getZoneNumber());
                gdto.setGadgetUserPref(gadget.getGadgetUserPref());

                // create gadget definintion dto.
                GadgetDefinition gadgetDef = gadget.getGadgetDefinition();
                GadgetDefinitionDTO gadgetDefDto = new GadgetDefinitionDTO();
                gadgetDefDto.setId(gadgetDef.getId());
                gadgetDefDto.setUrl(gadgetDef.getUrl());
                gadgetDefDto.setUuid(gadgetDef.getUUID());

                // set gadget def dto in gadget dto.
                gdto.setGadgetDefinition(gadgetDefDto);

                // add to collection.
View Full Code Here

        {
            StringBuilder sb = new StringBuilder();
            try
            {
                Map<String, GeneralGadgetDefinition> gadgetDefs = new HashMap<String, GeneralGadgetDefinition>();
                GadgetDefinition targetGadgetDef = gadgetMapper.findById(moduleId).getGadgetDefinition();
                gadgetDefs.put(gadgetDefUrl, targetGadgetDef);
                List<GadgetMetaDataDTO> gadgetMetaData = gadgetMetaFetcher.getGadgetsMetaData(gadgetDefs);
                for (GadgetMetaDataDTO currentGMeta : gadgetMetaData)
                {
                    logger.debug("Retrieved Metadata for Gadget" + targetGadgetDef.getId() + " Author: "
                            + currentGMeta.getAuthor() + " UserPrefsSize: " + currentGMeta.getUserPrefs().size());
                    buildUserPreferencesUI(currentGMeta, sb);
                }
            }
            catch (Exception ex)
View Full Code Here

    {
        // TODO: This is the brute-force approach. It gets the gadget definition from the database, then uses the gadget
        // metadata fetcher which does a whole bunch of stuff that we don't need (e.g. user prefs, etc.) -- all just so
        // we can get the title. Note that we should not use the title from the gadget definition even though it is
        // there - it is deprecated.
        GadgetDefinition gadgetDef = gadgetDefinitionMapper.findById(appId);
        List<GadgetMetaDataDTO> gadgetsMetadata = gadgetMetaDataFetcher.getGadgetsMetaData(Collections.singletonMap(
                gadgetDef.getUrl(), (GeneralGadgetDefinition) gadgetDef));
        return gadgetsMetadata.get(0).getTitle();
    }
View Full Code Here

     *
     * @return the GadgetDefinition
     */
    public GadgetDefinition create()
    {
        return new GadgetDefinition();
    }
View Full Code Here

                    .setParameter("openSocialId", personId);
            Query getGadgetDefQuery = getEntityManager().createQuery(
                    "from GadgetDefinition gd where gd.id = :gadgetDefinitionId").setParameter("gadgetDefinitionId",
                    gadgetDefinitionId);
            Person currentPerson = null;
            GadgetDefinition currentGadgetDefinition = null;

            List<Person> peopleList = getPersonQuery.getResultList();
            if (peopleList.size() > 0)
            {
                List<GadgetDefinition> gadgetDefList = getGadgetDefQuery.getResultList();
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.domain.GadgetDefinition

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.