Package net.stinfoservices.pacifiq.shared.dto.inner

Examples of net.stinfoservices.pacifiq.shared.dto.inner.UzerDTO


*/
@Transactional(propagation = Propagation.REQUIRED, readOnly = true)
public class RightsServiceCoreImpl extends AbstractCore implements RightsServiceCore {
    @Override
    public List<String> authenticatedUzerRights() {
        UzerDTO user = (UzerDTO) getSession().getAttribute("user");
        List<String> rights = new ArrayList<String>();

        if (user != null) {
            rights = ProfileHelper.getRights(user.getProfile());
            if ((user.getProgramsWithEditionRights() != null) && !user.getProgramsWithEditionRights().isEmpty()) {
                rights.add(ProfileHelper.SPECIFIC_PROGRAMS_EDITION);
                rights.add(ProfileHelper.SPECIFIC_PROGRAMS_CONSULTATION);
            }
            if ((user.getProgramsWithConsultationRights() != null) && !user.getProgramsWithConsultationRights().isEmpty()) {
                rights.add(ProfileHelper.SPECIFIC_PROGRAMS_CONSULTATION);
            }
        }

        return rights;
View Full Code Here


    @Override
    @Transactional(readOnly = false)
    public void updateLicenseNumber(Long id, String licenseNumber) throws Exception {
        try {
            UzerDTO user = (UzerDTO) getSession().getAttribute("user");
            hasUpdateRights(user, id);
            alertManagement.alert(user);
            DSP5 dsp5 = dSP5DAO.find(id);
            dsp5.setLicenseNumber(licenseNumber);
            dSP5DAO.save(dsp5);
View Full Code Here

    }

    @Override
    @Transactional(readOnly = false)
    public void updateApplicant(Long id, Long idApplicant) throws Exception {
        UzerDTO user = (UzerDTO) getSession().getAttribute("user");
        hasUpdateRights(user, id);
        DSP5 dsp5 = dSP5DAO.find(id);
        ConcreteBusinessPartner applicant = concreteBusinessPartnerDAO.find(idApplicant);
        dsp5.setApplicant(applicant);
        dSP5DAO.save(dsp5);
View Full Code Here

    }

    @Override
    @Transactional(readOnly = false)
    public void updateDateOfIssue(Long id, Date dateIssued) throws Exception {
        UzerDTO user = (UzerDTO) getSession().getAttribute("user");
        hasUpdateRights(user, id);
        DSP5 dsp5 = dSP5DAO.find(id);
        dsp5.setDateOfIssue(dateIssued);
        dSP5DAO.save(dsp5);
        alertManagement.alert(user);
View Full Code Here

    }

    @Override
    @Transactional(readOnly = false)
    public void updateEndDate(Long id, Date endDate) throws Exception {
        UzerDTO user = (UzerDTO) getSession().getAttribute("user");
        hasUpdateRights(user, id);
        DSP5 dsp5 = dSP5DAO.find(id);
        dsp5.setEndDate(endDate);
        dSP5DAO.save(dsp5);
        alertManagement.alert(user);
View Full Code Here

    @Override
    @Transactional(readOnly = false)
    public void deleteDocument(Long id) throws Exception {
        ServiceSecurityHelper.hasAuthority(ProfileHelper.LICENSES_EDITION, getSession());

        UzerDTO user = (UzerDTO) getSession().getAttribute("user");
        DSP5 dsp5 = dSP5DAO.find(id);
        dSP5DAO.remove(dsp5);
        alertManagement.alert(user);
    }
View Full Code Here

    @Transactional(readOnly = false)
    public Long saveDocument(DSP5DTO dto) throws Exception {
        try {
            ServiceSecurityHelper.hasAuthority(ProfileHelper.LICENSES_EDITION, getSession());

            UzerDTO user = (UzerDTO) getSession().getAttribute("user");
            alertManagement.alert(user);
            // TODO : manage new BusinessPartner also !
            DSP5 dsp5 = (dto.getId() == null ? new DSP5() : dSP5DAO.find(dto.getId()));
            applyDiffDSP5(dsp5, dto);
            // just for an ID insert ?
View Full Code Here

    }

    @Override
    @Transactional(readOnly = false)
    public void updateDraft(Long id, Date draft) throws Exception {
        UzerDTO user = (UzerDTO) getSession().getAttribute("user");
        hasUpdateRights(user, id);

        AbstractTAA tAA = tAADAO.find(id);
        if (tAA instanceof SpecificTAA) {
            SpecificTAA sTAA = (SpecificTAA) tAA;
View Full Code Here

    }

    @Override
    @Transactional(readOnly = false)
    public void updateSubmissionToDoS(Long id, Date submissionToDoS) throws Exception {
        UzerDTO user = (UzerDTO) getSession().getAttribute("user");
        hasUpdateRights(user, id);

        AbstractTAA tAA = tAADAO.find(id);
        if (tAA instanceof SpecificTAA) {
            SpecificTAA sTAA = (SpecificTAA) tAA;
View Full Code Here

    }

    @Override
    @Transactional(readOnly = false)
    public void updateApprovedByDoS(Long id, Date approvedByDoS) throws Exception {
        UzerDTO user = (UzerDTO) getSession().getAttribute("user");
        hasUpdateRights(user, id);

        AbstractTAA tAA = tAADAO.find(id);
        if (tAA instanceof SpecificTAA) {
            SpecificTAA sTAA = (SpecificTAA) tAA;
View Full Code Here

TOP

Related Classes of net.stinfoservices.pacifiq.shared.dto.inner.UzerDTO

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.