Examples of UISetupPojo


Examples of com.ikanow.infinit.e.data_model.store.social.gui.UISetupPojo

  public ResponsePojo getLastSetup(String profileID)
  {
    ResponsePojo rp = new ResponsePojo();
    try
    {
      UISetupPojo querySetup = new UISetupPojo();
      querySetup.setProfileID(new ObjectId(profileID));
      DBObject dbo = DbManager.getSocial().getUISetup().findOne(querySetup.toDb())
      if ( dbo != null )
      {
        UISetupPojo up = UISetupPojo.fromDb(dbo, UISetupPojo.class);
        rp.setResponse(new ResponseObject("UISetup",true,"ui returned successfully"));
        rp.setData(up, new UISetupPojoApiMap());
      }
      else
      {
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.social.gui.UISetupPojo

  public ResponsePojo updateLastSetup(String profileID, String communityIdStrList, String query, String openModules)
  {
    ResponsePojo rp = new ResponsePojo();
    try
    {
      UISetupPojo up = new UISetupPojo();     
      List<WidgetPojo> modulesList = new ArrayList<WidgetPojo>();
      if ( !openModules.equals("null"))
      {
        String[] modules = openModules.split("]");
       
        for ( String s : modules )
        {
          String[] name = s.split(",");
          WidgetPojo wp = new WidgetPojo();
          wp.setWidgetTitle(name[0]);
          wp.setWidgetUrl(name[1]);
          wp.setWidgetDisplay(name[2]);
          wp.setWidgetImageUrl(name[3]);
          wp.setWidgetX(name[4]);
          wp.setWidgetY(name[5]);
          wp.setWidgetWidth(name[6]);
          wp.setWidgetHeight(name[7]);
          if ( !name[8].equals("null") )
            wp.setWidgetOptions(s.substring(s.indexOf(name[6] + "," + name[7]) + name[6].length() + name[7].length() + 2));
           
          modulesList.add(wp);       
        }
      }
      UISetupPojo querySetup = new UISetupPojo();
      querySetup.setProfileID(new ObjectId(profileID));
      DBObject dbo = DbManager.getSocial().getUISetup().findOne(querySetup.toDb());
      if ( dbo == null )
      {
        //add new entry
        up.setProfileID(querySetup.getProfileID());
        up.addWidgets(modulesList);
        up.setQueryString(query);
        up.setCommunityIds(communityIdStrList);
        DbManager.getSocial().getUISetup().insert(up.toDb());
      }
      else
      {
        //update old entry       
        up = UISetupPojo.fromDb(dbo, UISetupPojo.class);
        up.addWidgets(modulesList);
        up.setQueryString(query);
        up.setCommunityIds(communityIdStrList);
        DbManager.getSocial().getUISetup().update(querySetup.toDb(), up.toDb());
      }
      rp.setResponse(new ResponseObject("Update UISetup",true,"modules updated successfully"));           
    }
    catch (Exception ex)
    {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.