Search in sources :

Example 1 with UserViewerInDto

use of org.jaffa.applications.jaffa.modules.admin.components.userviewer.dto.UserViewerInDto in project jaffa-framework by jaffa-projects.

the class UserViewerComponent method doInquiry.

// .//GEN-END:_display_2_be
// .//GEN-BEGIN:_inquiry_1_be
private void doInquiry() throws ApplicationExceptions, FrameworkException {
    UserViewerInDto inputDto = new UserViewerInDto();
    // .//GEN-END:_inquiry_1_be
    // Add custom code before building the input dto //GEN-FIRST:_inquiry_1
    // .//GEN-LAST:_inquiry_1
    // .//GEN-BEGIN:_inquiry_2_be
    inputDto.setUserName(m_userName);
    inputDto.setHeaderDto(createHeaderDto());
    // create the Tx
    if (m_tx == null)
        m_tx = (IUserViewer) Factory.createObject(IUserViewer.class);
    // .//GEN-END:_inquiry_2_be
    // Add custom code before invoking the Tx //GEN-FIRST:_inquiry_2
    // .//GEN-LAST:_inquiry_2
    // .//GEN-BEGIN:_inquiry_3_be
    // now get the details
    m_outputDto = m_tx.read(inputDto);
    // uncache the widgets
    getUserSession().getWidgetCache(getComponentId()).clear();
    // Add custom code after invoking the Tx //GEN-FIRST:_inquiry_3
    if (m_outputDto != null && m_outputDto.getStatus() != null) {
        m_outputDto.setStatusDescription("[label.Jaffa.Admin.User.Status." + m_outputDto.getStatus() + ']');
    }
    // throw an exception if the output is null
    if (m_outputDto == null) {
        ApplicationExceptions appExps = new ApplicationExceptions();
        appExps.add(new DomainObjectNotFoundException(UserMeta.getLabelToken()));
        throw appExps;
    }
}
Also used : UserViewerInDto(org.jaffa.applications.jaffa.modules.admin.components.userviewer.dto.UserViewerInDto) ApplicationExceptions(org.jaffa.exceptions.ApplicationExceptions) DomainObjectNotFoundException(org.jaffa.exceptions.DomainObjectNotFoundException) IUserViewer(org.jaffa.applications.jaffa.modules.admin.components.userviewer.IUserViewer)

Aggregations

IUserViewer (org.jaffa.applications.jaffa.modules.admin.components.userviewer.IUserViewer)1 UserViewerInDto (org.jaffa.applications.jaffa.modules.admin.components.userviewer.dto.UserViewerInDto)1 ApplicationExceptions (org.jaffa.exceptions.ApplicationExceptions)1 DomainObjectNotFoundException (org.jaffa.exceptions.DomainObjectNotFoundException)1