Java 类ims.core.vo.PatientKioskSettingsVo 实例源码

项目:AvoinApotti    文件:Logic.java   
protected void populateScreenFromData(ims.core.vo.PatientKioskSettingsVo value)
{
    clearScreen();
    super.populateScreenFromData(value);

    form.grdMessages().getRows().clear();

    PatientKioskMessageVoCollection msgsVoColl = value.getMessages();

    if (msgsVoColl != null)
    {
        for (int i=0; i<msgsVoColl.size();i++) {
            grdMessagesRow row = form.grdMessages().getRows().newRow();
            if (msgsVoColl.get(i).getMessageTypeIsNotNull())
                row.setColMessageType(msgsVoColl.get(i).getMessageType().getText());
            if (msgsVoColl.get(i).getMessageTextIsNotNull())
                row.setColMessageText(msgsVoColl.get(i).getMessageText());

            row.setTooltip(setToolTips(msgsVoColl.get(i).getMessageType()));
        }           
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void populateScreenFromData(ims.core.vo.PatientKioskSettingsVo value)
{
    clearScreen();
    super.populateScreenFromData(value);

    form.grdMessages().getRows().clear();

    PatientKioskMessageVoCollection msgsVoColl = value.getMessages();

    if (msgsVoColl != null)
    {
        for (int i=0; i<msgsVoColl.size();i++) {
            grdMessagesRow row = form.grdMessages().getRows().newRow();
            if (msgsVoColl.get(i).getMessageTypeIsNotNull())
                row.setColMessageType(msgsVoColl.get(i).getMessageType().getText());
            if (msgsVoColl.get(i).getMessageTextIsNotNull())
                row.setColMessageText(msgsVoColl.get(i).getMessageText());

            row.setTooltip(setToolTips(msgsVoColl.get(i).getMessageType()));
        }           
    }
}
项目:openMAXIMS    文件:Logic.java   
protected void populateScreenFromData(ims.core.vo.PatientKioskSettingsVo value)
{
    clearScreen();
    super.populateScreenFromData(value);

    form.grdMessages().getRows().clear();

    PatientKioskMessageVoCollection msgsVoColl = value.getMessages();

    if (msgsVoColl != null)
    {
        for (int i=0; i<msgsVoColl.size();i++) {
            grdMessagesRow row = form.grdMessages().getRows().newRow();
            if (msgsVoColl.get(i).getMessageTypeIsNotNull())
                row.setColMessageType(msgsVoColl.get(i).getMessageType().getText());
            if (msgsVoColl.get(i).getMessageTextIsNotNull())
                row.setColMessageText(msgsVoColl.get(i).getMessageText());

            row.setTooltip(setToolTips(msgsVoColl.get(i).getMessageType()));
        }           
    }
}
项目:openmaxims-linux    文件:Logic.java   
protected void populateScreenFromData(ims.core.vo.PatientKioskSettingsVo value)
{
    clearScreen();
    super.populateScreenFromData(value);

    form.grdMessages().getRows().clear();

    PatientKioskMessageVoCollection msgsVoColl = value.getMessages();

    if (msgsVoColl != null)
    {
        for (int i=0; i<msgsVoColl.size();i++) {
            grdMessagesRow row = form.grdMessages().getRows().newRow();
            if (msgsVoColl.get(i).getMessageTypeIsNotNull())
                row.setColMessageType(msgsVoColl.get(i).getMessageType().getText());
            if (msgsVoColl.get(i).getMessageTextIsNotNull())
                row.setColMessageText(msgsVoColl.get(i).getMessageText());

            row.setTooltip(setToolTips(msgsVoColl.get(i).getMessageType()));
        }           
    }
}
项目:AvoinApotti    文件:PatientKioskOperationsImpl.java   
private int getDelay() 
{
    PatientKioskConfig impl = (PatientKioskConfig) getDomainImpl(PatientKioskConfigImpl.class);
    PatientKioskSettingsVo patientKioskSettings = impl.getPatientKioskSettings(null);

    Integer delayInMinutes = 0;
    if(patientKioskSettings != null && patientKioskSettings.getAllowedDelayIsNotNull())
    {
        delayInMinutes = patientKioskSettings.getAllowedDelay();
    }

    return delayInMinutes;
}
项目:AvoinApotti    文件:Logic.java   
public boolean save() throws PresentationLogicException 
{
    PatientKioskSettingsVo saveVo = form.getLocalContext().getSelectedKioskSettings();
    saveVo = populateDataFromScreenMsg();

    String[] errors = saveVo.validate(validateUIRules());

    if(errors != null && errors.length > 0)
    {
        engine.showErrors("Errors",errors);
        return false;
    }

    try
    {
        saveVo = domain.savePatientKioskSettings(saveVo);
    }
    catch (DomainInterfaceException err)
    {
        engine.showMessage("Domain Interface Exception " + err.toString());
        return false;
    }
    catch (StaleObjectException e)
    {
        engine.showMessage("Data has been modified by another user - screen will be refreshed");
        form.setMode(FormMode.VIEW);
        return false;           
    }
    form.getLocalContext().setSelectedKioskSettings(saveVo);
    form.getLocalContext().setSelectedKioskMessages(saveVo.getMessages());
    form.setMode(FormMode.VIEW);
    return true;
}
项目:AvoinApotti    文件:Logic.java   
protected ims.core.vo.PatientKioskSettingsVo populateDataFromScreenMsg()
{
    PatientKioskSettingsVo newVo = form.getLocalContext().getSelectedKioskSettings();
    newVo = super.populateDataFromScreen(newVo);
    newVo.setMessages(getSettingsMessages());
    return newVo;
}
项目:AvoinApotti    文件:PatientKioskConfigImpl.java   
/**
* Returns the patient kiosk settings
*/  
public ims.core.vo.PatientKioskSettingsVo getPatientKioskSettings(String kioskId)
{
    if (kioskId != null)
        this.createSystemLogEntry(SystemLogType.KIOSK, SystemLogLevel.INFORMATION, "Get Kiosk Settings (kiosk ID: " + kioskId + ")");

    DomainFactory factory = getDomainFactory();     
    PatientKioskSettingsVoCollection psVoColl = new PatientKioskSettingsVoCollection();
    psVoColl = PatientKioskSettingsVoAssembler.createPatientKioskSettingsVoCollectionFromPatientKioskSettings(factory.find("from PatientKioskSettings")); 

    if (psVoColl != null && psVoColl.size() != 0)
        return PatientKioskSettingsVoAssembler.createPatientKioskSettingsVoCollectionFromPatientKioskSettings(factory.find("from PatientKioskSettings")).get(0);
    else
    {
        // return default values
        PatientKioskSettingsVo defaultPSVo = new PatientKioskSettingsVo();
        defaultPSVo.setWebServiceUrl("");
        defaultPSVo.setAppUpdateUrl("");
        defaultPSVo.setTimeout(2);
        defaultPSVo.setTheme(PatientKioskTheme.BLUE);
        defaultPSVo.setAutoInstallUpdates(true);
        defaultPSVo.setAllowedDelay(0);
        defaultPSVo.setShowAppointments(false);

        // messages
        defaultPSVo.setMessages(getDefaultKioskMessages());
        return defaultPSVo;
    }
}
项目:AvoinApotti    文件:PatientKioskConfigImpl.java   
public ims.core.vo.PatientKioskSettingsVo savePatientKioskSettings(ims.core.vo.PatientKioskSettingsVo settings) throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.StaleObjectException
{
    if (settings == null)
        throw new DomainInterfaceException("Can not save an empty Patient Kiosk settings.");

    DomainFactory factory = getDomainFactory();
    PatientKioskSettings psVo = PatientKioskSettingsVoAssembler.extractPatientKioskSettings(factory, settings);
    factory.save(psVo);

    return PatientKioskSettingsVoAssembler.create(psVo);
}
项目:openMAXIMS    文件:PatientKioskOperationsImpl.java   
private int getDelay() 
{
    PatientKioskConfig impl = (PatientKioskConfig) getDomainImpl(PatientKioskConfigImpl.class);
    PatientKioskSettingsVo patientKioskSettings = impl.getPatientKioskSettings(null);

    Integer delayInMinutes = 0;
    if(patientKioskSettings != null && patientKioskSettings.getAllowedDelayIsNotNull())
    {
        delayInMinutes = patientKioskSettings.getAllowedDelay();
    }

    return delayInMinutes;
}
项目:openMAXIMS    文件:Logic.java   
public boolean save() throws PresentationLogicException 
{
    PatientKioskSettingsVo saveVo = form.getLocalContext().getSelectedKioskSettings();
    saveVo = populateDataFromScreenMsg();

    String[] errors = saveVo.validate(validateUIRules());

    if(errors != null && errors.length > 0)
    {
        engine.showErrors("Errors",errors);
        return false;
    }

    try
    {
        saveVo = domain.savePatientKioskSettings(saveVo);
    }
    catch (DomainInterfaceException err)
    {
        engine.showMessage("Domain Interface Exception " + err.toString());
        return false;
    }
    catch (StaleObjectException e)
    {
        engine.showMessage("Data has been modified by another user - screen will be refreshed");
        form.setMode(FormMode.VIEW);
        return false;           
    }
    form.getLocalContext().setSelectedKioskSettings(saveVo);
    form.getLocalContext().setSelectedKioskMessages(saveVo.getMessages());
    form.setMode(FormMode.VIEW);
    return true;
}
项目:openMAXIMS    文件:Logic.java   
protected ims.core.vo.PatientKioskSettingsVo populateDataFromScreenMsg()
{
    PatientKioskSettingsVo newVo = form.getLocalContext().getSelectedKioskSettings();
    newVo = super.populateDataFromScreen(newVo);
    newVo.setMessages(getSettingsMessages());
    return newVo;
}
项目:openMAXIMS    文件:PatientKioskConfigImpl.java   
/**
* Returns the patient kiosk settings
*/  
public ims.core.vo.PatientKioskSettingsVo getPatientKioskSettings(String kioskId)
{
    if (kioskId != null)
        this.createSystemLogEntry(SystemLogType.KIOSK, SystemLogLevel.INFORMATION, "Get Kiosk Settings (kiosk ID: " + kioskId + ")");

    DomainFactory factory = getDomainFactory();     
    PatientKioskSettingsVoCollection psVoColl = new PatientKioskSettingsVoCollection();
    psVoColl = PatientKioskSettingsVoAssembler.createPatientKioskSettingsVoCollectionFromPatientKioskSettings(factory.find("from PatientKioskSettings")); 

    if (psVoColl != null && psVoColl.size() != 0)
        return PatientKioskSettingsVoAssembler.createPatientKioskSettingsVoCollectionFromPatientKioskSettings(factory.find("from PatientKioskSettings")).get(0);
    else
    {
        // return default values
        PatientKioskSettingsVo defaultPSVo = new PatientKioskSettingsVo();
        defaultPSVo.setWebServiceUrl("");
        defaultPSVo.setAppUpdateUrl("");
        defaultPSVo.setTimeout(2);
        defaultPSVo.setTheme(PatientKioskTheme.BLUE);
        defaultPSVo.setAutoInstallUpdates(true);
        defaultPSVo.setAllowedDelay(0);
        defaultPSVo.setShowAppointments(false);

        // messages
        defaultPSVo.setMessages(getDefaultKioskMessages());
        return defaultPSVo;
    }
}
项目:openMAXIMS    文件:PatientKioskConfigImpl.java   
public ims.core.vo.PatientKioskSettingsVo savePatientKioskSettings(ims.core.vo.PatientKioskSettingsVo settings) throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.StaleObjectException
{
    if (settings == null)
        throw new DomainInterfaceException("Can not save an empty Patient Kiosk settings.");

    DomainFactory factory = getDomainFactory();
    PatientKioskSettings psVo = PatientKioskSettingsVoAssembler.extractPatientKioskSettings(factory, settings);
    factory.save(psVo);

    return PatientKioskSettingsVoAssembler.create(psVo);
}
项目:openMAXIMS    文件:PatientKioskOperationsImpl.java   
private int getDelay() 
{
    PatientKioskConfig impl = (PatientKioskConfig) getDomainImpl(PatientKioskConfigImpl.class);
    PatientKioskSettingsVo patientKioskSettings = impl.getPatientKioskSettings(null);

    Integer delayInMinutes = 0;
    if(patientKioskSettings != null && patientKioskSettings.getAllowedDelayIsNotNull())
    {
        delayInMinutes = patientKioskSettings.getAllowedDelay();
    }

    return delayInMinutes;
}
项目:openMAXIMS    文件:Logic.java   
public boolean save() throws PresentationLogicException 
{
    PatientKioskSettingsVo saveVo = form.getLocalContext().getSelectedKioskSettings();
    saveVo = populateDataFromScreenMsg();

    String[] errors = saveVo.validate(validateUIRules());

    if(errors != null && errors.length > 0)
    {
        engine.showErrors("Errors",errors);
        return false;
    }

    try
    {
        saveVo = domain.savePatientKioskSettings(saveVo);
    }
    catch (DomainInterfaceException err)
    {
        engine.showMessage("Domain Interface Exception " + err.toString());
        return false;
    }
    catch (StaleObjectException e)
    {
        engine.showMessage("Data has been modified by another user - screen will be refreshed");
        form.setMode(FormMode.VIEW);
        return false;           
    }
    form.getLocalContext().setSelectedKioskSettings(saveVo);
    form.getLocalContext().setSelectedKioskMessages(saveVo.getMessages());
    form.setMode(FormMode.VIEW);
    return true;
}
项目:openMAXIMS    文件:Logic.java   
protected ims.core.vo.PatientKioskSettingsVo populateDataFromScreenMsg()
{
    PatientKioskSettingsVo newVo = form.getLocalContext().getSelectedKioskSettings();
    newVo = super.populateDataFromScreen(newVo);
    newVo.setMessages(getSettingsMessages());
    return newVo;
}
项目:openMAXIMS    文件:PatientKioskConfigImpl.java   
/**
* Returns the patient kiosk settings
*/  
public ims.core.vo.PatientKioskSettingsVo getPatientKioskSettings(String kioskId)
{
    if (kioskId != null)
        this.createSystemLogEntry(SystemLogType.KIOSK, SystemLogLevel.INFORMATION, "Get Kiosk Settings (kiosk ID: " + kioskId + ")");

    DomainFactory factory = getDomainFactory();     
    PatientKioskSettingsVoCollection psVoColl = new PatientKioskSettingsVoCollection();
    psVoColl = PatientKioskSettingsVoAssembler.createPatientKioskSettingsVoCollectionFromPatientKioskSettings(factory.find("from PatientKioskSettings")); 

    if (psVoColl != null && psVoColl.size() != 0)
        return PatientKioskSettingsVoAssembler.createPatientKioskSettingsVoCollectionFromPatientKioskSettings(factory.find("from PatientKioskSettings")).get(0);
    else
    {
        // return default values
        PatientKioskSettingsVo defaultPSVo = new PatientKioskSettingsVo();
        defaultPSVo.setWebServiceUrl("");
        defaultPSVo.setAppUpdateUrl("");
        defaultPSVo.setTimeout(2);
        defaultPSVo.setTheme(PatientKioskTheme.BLUE);
        defaultPSVo.setAutoInstallUpdates(true);
        defaultPSVo.setAllowedDelay(0);
        defaultPSVo.setShowAppointments(false);

        // messages
        defaultPSVo.setMessages(getDefaultKioskMessages());
        return defaultPSVo;
    }
}
项目:openMAXIMS    文件:PatientKioskConfigImpl.java   
public ims.core.vo.PatientKioskSettingsVo savePatientKioskSettings(ims.core.vo.PatientKioskSettingsVo settings) throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.StaleObjectException
{
    if (settings == null)
        throw new DomainInterfaceException("Can not save an empty Patient Kiosk settings.");

    DomainFactory factory = getDomainFactory();
    PatientKioskSettings psVo = PatientKioskSettingsVoAssembler.extractPatientKioskSettings(factory, settings);
    factory.save(psVo);

    return PatientKioskSettingsVoAssembler.create(psVo);
}
项目:openmaxims-linux    文件:PatientKioskOperationsImpl.java   
private int getDelay() 
{
    PatientKioskConfig impl = (PatientKioskConfig) getDomainImpl(PatientKioskConfigImpl.class);
    PatientKioskSettingsVo patientKioskSettings = impl.getPatientKioskSettings(null);

    Integer delayInMinutes = 0;
    if(patientKioskSettings != null && patientKioskSettings.getAllowedDelayIsNotNull())
    {
        delayInMinutes = patientKioskSettings.getAllowedDelay();
    }

    return delayInMinutes;
}
项目:openmaxims-linux    文件:Logic.java   
public boolean save() throws PresentationLogicException 
{
    PatientKioskSettingsVo saveVo = form.getLocalContext().getSelectedKioskSettings();
    saveVo = populateDataFromScreenMsg();

    String[] errors = saveVo.validate(validateUIRules());

    if(errors != null && errors.length > 0)
    {
        engine.showErrors("Errors",errors);
        return false;
    }

    try
    {
        saveVo = domain.savePatientKioskSettings(saveVo);
    }
    catch (DomainInterfaceException err)
    {
        engine.showMessage("Domain Interface Exception " + err.toString());
        return false;
    }
    catch (StaleObjectException e)
    {
        engine.showMessage("Data has been modified by another user - screen will be refreshed");
        form.setMode(FormMode.VIEW);
        return false;           
    }
    form.getLocalContext().setSelectedKioskSettings(saveVo);
    form.getLocalContext().setSelectedKioskMessages(saveVo.getMessages());
    form.setMode(FormMode.VIEW);
    return true;
}
项目:openmaxims-linux    文件:Logic.java   
protected ims.core.vo.PatientKioskSettingsVo populateDataFromScreenMsg()
{
    PatientKioskSettingsVo newVo = form.getLocalContext().getSelectedKioskSettings();
    newVo = super.populateDataFromScreen(newVo);
    newVo.setMessages(getSettingsMessages());
    return newVo;
}
项目:openmaxims-linux    文件:PatientKioskConfigImpl.java   
/**
* Returns the patient kiosk settings
*/  
public ims.core.vo.PatientKioskSettingsVo getPatientKioskSettings(String kioskId)
{
    if (kioskId != null)
        this.createSystemLogEntry(SystemLogType.KIOSK, SystemLogLevel.INFORMATION, "Get Kiosk Settings (kiosk ID: " + kioskId + ")");

    DomainFactory factory = getDomainFactory();     
    PatientKioskSettingsVoCollection psVoColl = new PatientKioskSettingsVoCollection();
    psVoColl = PatientKioskSettingsVoAssembler.createPatientKioskSettingsVoCollectionFromPatientKioskSettings(factory.find("from PatientKioskSettings")); 

    if (psVoColl != null && psVoColl.size() != 0)
        return PatientKioskSettingsVoAssembler.createPatientKioskSettingsVoCollectionFromPatientKioskSettings(factory.find("from PatientKioskSettings")).get(0);
    else
    {
        // return default values
        PatientKioskSettingsVo defaultPSVo = new PatientKioskSettingsVo();
        defaultPSVo.setWebServiceUrl("");
        defaultPSVo.setAppUpdateUrl("");
        defaultPSVo.setTimeout(2);
        defaultPSVo.setTheme(PatientKioskTheme.BLUE);
        defaultPSVo.setAutoInstallUpdates(true);
        defaultPSVo.setAllowedDelay(0);
        defaultPSVo.setShowAppointments(false);

        // messages
        defaultPSVo.setMessages(getDefaultKioskMessages());
        return defaultPSVo;
    }
}
项目:openmaxims-linux    文件:PatientKioskConfigImpl.java   
public ims.core.vo.PatientKioskSettingsVo savePatientKioskSettings(ims.core.vo.PatientKioskSettingsVo settings) throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.StaleObjectException
{
    if (settings == null)
        throw new DomainInterfaceException("Can not save an empty Patient Kiosk settings.");

    DomainFactory factory = getDomainFactory();
    PatientKioskSettings psVo = PatientKioskSettingsVoAssembler.extractPatientKioskSettings(factory, settings);
    factory.save(psVo);

    return PatientKioskSettingsVoAssembler.create(psVo);
}