Package org.encuestame.persistence.domain.dashboard

Examples of org.encuestame.persistence.domain.dashboard.Gadget


    /*
     * (non-Javadoc)
     * @see org.encuestame.business.service.imp.IDashboardService#getPropertiesbyGadget(java.lang.Long)
     */
    public List<GadgetProperties> getPropertiesbyGadget(final Long gadgetId) throws EnMeGadgetNotFoundException{
        final Gadget gadget = getDashboardDao().getGadgetbyId(gadgetId);
        List<GadgetProperties> properties = new ArrayList<GadgetProperties>();
        if (gadget == null) {
            throw new EnMeGadgetNotFoundException("gadget not found");
        } else{
            properties = getDashboardDao().retrievePropertiesbyGadget(gadgetId);
View Full Code Here


            log.debug("boardId "+boardId);
            log.debug("position "+position);
            log.debug("column "+column);
        }
        final Dashboard board = this.getDashboardById(boardId);
        final Gadget gadget = this.getGadget(gadgetId, board);
        gadget.setGadgetPosition(position);
        gadget.setGadgetColumn(column);
        getDashboardDao().saveOrUpdate(gadget);
    }
View Full Code Here

     * @throws EnMeNoResultsFoundException
     */
    private Gadget getGadget(final Long gadgetId, final Dashboard board) throws EnMeNoResultsFoundException{
         Assert.notNull(gadgetId);
         Assert.notNull(board);
         final Gadget gadget = getDashboardDao().getGadgetbyIdandBoard(gadgetId, board);
         if (gadget == null) {
              throw new EnMeGadgetNotFoundException("gadget is missing");
         }
     return gadget;
    }
View Full Code Here

      }

     /** Gadget domain **/
     @Test
     public void testGadget(){
        final Gadget gadget = new Gadget();
        final UserAccount user = createUserAccount("diana paola", createAccount());
        gadget.setGadgetName("Notifications");
        gadget.setGadgetType(GadgetType.ACTIVITY_STREAM);
        gadget.setGadgetColor("blue");
        gadget.setGadgetColumn(1);
        gadget.setGadgetPosition(1);
        gadget.setDashboard(createDashboardDefault(user));
        getDashboardDao().saveOrUpdate(gadget);
     }
View Full Code Here

    /**
     * Test get gadget by id.
     */
    @Test
    public void testGetGadgetbyId(){
        final Gadget gad = getDashboardDao().getGadgetbyId(this.gadget.getGadgetId());
        assertEquals("Should be equals", gad.getGadgetId(), this.gadget.getGadgetId());
    }
View Full Code Here

TOP

Related Classes of org.encuestame.persistence.domain.dashboard.Gadget

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.