com.trigyn.jws.dashboard.service.DashboardService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dashboard Show documentation
Show all versions of dashboard Show documentation
Dashboard and dashlet utils
package com.trigyn.jws.dashboard.service;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import com.trigyn.jws.dashboard.dao.DashboardDaoImpl;
import com.trigyn.jws.dashboard.entities.Dashboard;
import com.trigyn.jws.dashboard.entities.DashboardRoleAssociation;
import com.trigyn.jws.dashboard.entities.Dashlet;
import com.trigyn.jws.dashboard.repository.interfaces.IDashboardLookupCategoryRepository;
import com.trigyn.jws.dashboard.repository.interfaces.IDashletRepository;
import com.trigyn.jws.dashboard.utility.Constants;
import com.trigyn.jws.dashboard.vo.DashboardDashletVO;
import com.trigyn.jws.dashboard.vo.DashboardLookupCategoryVO;
import com.trigyn.jws.templating.vo.TemplateVO;
@Service
@Transactional
public class DashboardService {
@Autowired
private DashboardDaoImpl dashboardDao = null;
@Autowired
private IDashletRepository iDashletRepository = null;
@Autowired
private IDashboardLookupCategoryRepository iDashboardLookupCategoryRepository = null;
public void saveDashboardRoleAssociation(DashboardRoleAssociation dashboardRoleAssociation) throws Exception {
dashboardDao.saveDashboardRoleAssociation(dashboardRoleAssociation);
}
public List findDashboardsByContextId(String contextName, List userRoles) throws Exception {
String userId = Constants.ANON_USER_STR;
String contextId = dashboardDao.getContextNameById(contextName);
List