Java 类ims.admin.vo.AppTopButtonConfigVo 实例源码

项目:AvoinApotti    文件:Logic.java   
public boolean save() throws PresentationLogicException 
{
    if (form.intNoColumns().getValue()  != null 
        && form.intNoColumns().getValue() > MAX_NO_BUTTONS)
    {
        engine.showMessage("The maximum number of Columns is " + MAX_NO_BUTTONS);
        return false;
    }       

    AppTopButtonConfigVo configuration = populateDataFromScreen();

    String[] errors = configuration.validate();
    if(errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    try 
    {
        configuration = domain.saveConfiguration(configuration);
        form.getLocalContext().setRecord(configuration);
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return false;
    }

    return true;
}
项目:AvoinApotti    文件:Logic.java   
private void addConfiguration(AppTopButtonConfigVo value) 
{
    if(value != null)
    {
        GenForm.grdListRow row = form.grdList().getRows().newRow();
        row.setcolName(value.getName());
        row.setValue(value);
    }       
}
项目:AvoinApotti    文件:ApplicationRolesImpl.java   
public AppTopButtonConfigVo getTopButtonConfiguration(AppTopButtonConfigRefVo config) 
{
    if (config == null)
        return null;

    return AppTopButtonConfigVoAssembler.create((AppTopButtonConfig)getDomainFactory().getDomainObject(config));
}
项目:AvoinApotti    文件:TopButtonAdminImpl.java   
public AppTopButtonConfigVo saveConfiguration(AppTopButtonConfigVo configuration) throws StaleObjectException 
{
    if(configuration == null)
        throw new DomainRuntimeException("Invalid Top Button Configuration");
    if(!configuration.isValidated()) 
        throw new DomainRuntimeException("Top Button Configuration Not Validated");

    DomainFactory factory = this.getDomainFactory();
    AppTopButtonConfig domainObject = AppTopButtonConfigVoAssembler.extractAppTopButtonConfig(factory, configuration);
    factory.save(domainObject);
    return AppTopButtonConfigVoAssembler.create(domainObject);      
}
项目:openMAXIMS    文件:Logic.java   
public boolean save() throws PresentationLogicException 
{
    if (form.intNoColumns().getValue()  != null 
        && form.intNoColumns().getValue() > MAX_NO_BUTTONS)
    {
        engine.showMessage("The maximum number of Columns is " + MAX_NO_BUTTONS);
        return false;
    }       

    AppTopButtonConfigVo configuration = populateDataFromScreen();

    String[] errors = configuration.validate();
    if(errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    try 
    {
        configuration = domain.saveConfiguration(configuration);
        form.getLocalContext().setRecord(configuration);
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return false;
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void addConfiguration(AppTopButtonConfigVo value) 
{
    if(value != null)
    {
        GenForm.grdListRow row = form.grdList().getRows().newRow();
        row.setcolName(value.getName());
        row.setValue(value);
    }       
}
项目:openMAXIMS    文件:ApplicationRolesImpl.java   
public AppTopButtonConfigVo getTopButtonConfiguration(AppTopButtonConfigRefVo config) 
{
    if (config == null)
        return null;

    return AppTopButtonConfigVoAssembler.create((AppTopButtonConfig)getDomainFactory().getDomainObject(config));
}
项目:openMAXIMS    文件:TopButtonAdminImpl.java   
public AppTopButtonConfigVo saveConfiguration(AppTopButtonConfigVo configuration) throws StaleObjectException 
{
    if(configuration == null)
        throw new DomainRuntimeException("Invalid Top Button Configuration");
    if(!configuration.isValidated()) 
        throw new DomainRuntimeException("Top Button Configuration Not Validated");

    DomainFactory factory = this.getDomainFactory();
    AppTopButtonConfig domainObject = AppTopButtonConfigVoAssembler.extractAppTopButtonConfig(factory, configuration);
    factory.save(domainObject);
    return AppTopButtonConfigVoAssembler.create(domainObject);      
}
项目:openMAXIMS    文件:Logic.java   
public boolean save() throws PresentationLogicException 
{
    if (form.intNoColumns().getValue()  != null 
        && form.intNoColumns().getValue() > MAX_NO_BUTTONS)
    {
        engine.showMessage("The maximum number of Columns is " + MAX_NO_BUTTONS);
        return false;
    }       

    AppTopButtonConfigVo configuration = populateDataFromScreen();

    String[] errors = configuration.validate();
    if(errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    try 
    {
        configuration = domain.saveConfiguration(configuration);
        form.getLocalContext().setRecord(configuration);
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return false;
    }

    return true;
}
项目:openMAXIMS    文件:Logic.java   
private void addConfiguration(AppTopButtonConfigVo value) 
{
    if(value != null)
    {
        GenForm.grdListRow row = form.grdList().getRows().newRow();
        row.setcolName(value.getName());
        row.setValue(value);
    }       
}
项目:openMAXIMS    文件:ApplicationRolesImpl.java   
public AppTopButtonConfigVo getTopButtonConfiguration(AppTopButtonConfigRefVo config) 
{
    if (config == null)
        return null;

    return AppTopButtonConfigVoAssembler.create((AppTopButtonConfig)getDomainFactory().getDomainObject(config));
}
项目:openMAXIMS    文件:TopButtonAdminImpl.java   
public AppTopButtonConfigVo saveConfiguration(AppTopButtonConfigVo configuration) throws StaleObjectException 
{
    if(configuration == null)
        throw new DomainRuntimeException("Invalid Top Button Configuration");
    if(!configuration.isValidated()) 
        throw new DomainRuntimeException("Top Button Configuration Not Validated");

    DomainFactory factory = this.getDomainFactory();
    AppTopButtonConfig domainObject = AppTopButtonConfigVoAssembler.extractAppTopButtonConfig(factory, configuration);
    factory.save(domainObject);
    return AppTopButtonConfigVoAssembler.create(domainObject);      
}
项目:openmaxims-linux    文件:Logic.java   
public boolean save() throws PresentationLogicException 
{
    if (form.intNoColumns().getValue()  != null 
        && form.intNoColumns().getValue() > MAX_NO_BUTTONS)
    {
        engine.showMessage("The maximum number of Columns is " + MAX_NO_BUTTONS);
        return false;
    }       

    AppTopButtonConfigVo configuration = populateDataFromScreen();

    String[] errors = configuration.validate();
    if(errors != null && errors.length > 0)
    {
        engine.showErrors(errors);
        return false;
    }

    try 
    {
        configuration = domain.saveConfiguration(configuration);
        form.getLocalContext().setRecord(configuration);
    } 
    catch (StaleObjectException e) 
    {
        engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue());
        return false;
    }

    return true;
}
项目:openmaxims-linux    文件:Logic.java   
private void addConfiguration(AppTopButtonConfigVo value) 
{
    if(value != null)
    {
        GenForm.grdListRow row = form.grdList().getRows().newRow();
        row.setcolName(value.getName());
        row.setValue(value);
    }       
}
项目:openmaxims-linux    文件:ApplicationRolesImpl.java   
public AppTopButtonConfigVo getTopButtonConfiguration(AppTopButtonConfigRefVo config) 
{
    if (config == null)
        return null;

    return AppTopButtonConfigVoAssembler.create((AppTopButtonConfig)getDomainFactory().getDomainObject(config));
}
项目:openmaxims-linux    文件:TopButtonAdminImpl.java   
public AppTopButtonConfigVo saveConfiguration(AppTopButtonConfigVo configuration) throws StaleObjectException 
{
    if(configuration == null)
        throw new DomainRuntimeException("Invalid Top Button Configuration");
    if(!configuration.isValidated()) 
        throw new DomainRuntimeException("Top Button Configuration Not Validated");

    DomainFactory factory = this.getDomainFactory();
    AppTopButtonConfig domainObject = AppTopButtonConfigVoAssembler.extractAppTopButtonConfig(factory, configuration);
    factory.save(domainObject);
    return AppTopButtonConfigVoAssembler.create(domainObject);      
}
项目:AvoinApotti    文件:Logic.java   
public void populateInstanceControls() 
{
    clearInstanceControls();

    AppTopButtonConfigVo configuration = form.grdList().getValue();
    form.getLocalContext().setRecord(configuration);        

    if(configuration != null)
    {           
        form.txtName().setValue(configuration.getName());
        form.intNoColumns().setValue(configuration.getNoColumns());
        form.chkIncludePatientSelectionHistory().setValue(configuration.getIncludePatientHistory());

        addDefaultItemNodes();

        AppTopButtonVoCollection buttons = configuration.getButtons();
        if(buttons != null)
        {
            for(int x = 0; x < buttons.size(); x++)
            {
                AppTopButtonVo button = buttons.get(x);                 
                if(button != null)
                {
                    addButton(getButtonsNode(), button, false);                     
                }
            }
        }

        AppTopButtonSectionVoCollection sections = configuration.getSections();
        if(sections != null)
        {
            for(int x = 0; x < sections.size(); x++)
            {
                AppTopButtonSectionVo section = sections.get(x);                    
                if(section != null)
                {
                    addSection(getSectionsNode(), section, false);                      
                }
            }               
        }
    }

    form.treItems().expandAll();

    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
public void populateInstanceControls() 
{
    clearInstanceControls();

    AppTopButtonConfigVo configuration = form.grdList().getValue();
    form.getLocalContext().setRecord(configuration);        

    if(configuration != null)
    {           
        form.txtName().setValue(configuration.getName());
        form.intNoColumns().setValue(configuration.getNoColumns());
        form.chkIncludePatientSelectionHistory().setValue(configuration.getIncludePatientHistory());

        addDefaultItemNodes();

        AppTopButtonVoCollection buttons = configuration.getButtons();
        if(buttons != null)
        {
            for(int x = 0; x < buttons.size(); x++)
            {
                AppTopButtonVo button = buttons.get(x);                 
                if(button != null)
                {
                    addButton(getButtonsNode(), button, false);                     
                }
            }
        }

        AppTopButtonSectionVoCollection sections = configuration.getSections();
        if(sections != null)
        {
            for(int x = 0; x < sections.size(); x++)
            {
                AppTopButtonSectionVo section = sections.get(x);                    
                if(section != null)
                {
                    addSection(getSectionsNode(), section, false);                      
                }
            }               
        }
    }

    form.treItems().expandAll();

    updateControlsState();
}
项目:openMAXIMS    文件:Logic.java   
public void populateInstanceControls() 
{
    clearInstanceControls();

    AppTopButtonConfigVo configuration = form.grdList().getValue();
    form.getLocalContext().setRecord(configuration);        

    if(configuration != null)
    {           
        form.txtName().setValue(configuration.getName());
        form.intNoColumns().setValue(configuration.getNoColumns());
        form.chkIncludePatientSelectionHistory().setValue(configuration.getIncludePatientHistory());

        addDefaultItemNodes();

        AppTopButtonVoCollection buttons = configuration.getButtons();
        if(buttons != null)
        {
            for(int x = 0; x < buttons.size(); x++)
            {
                AppTopButtonVo button = buttons.get(x);                 
                if(button != null)
                {
                    addButton(getButtonsNode(), button, false);                     
                }
            }
        }

        AppTopButtonSectionVoCollection sections = configuration.getSections();
        if(sections != null)
        {
            for(int x = 0; x < sections.size(); x++)
            {
                AppTopButtonSectionVo section = sections.get(x);                    
                if(section != null)
                {
                    addSection(getSectionsNode(), section, false);                      
                }
            }               
        }
    }

    form.treItems().expandAll();

    updateControlsState();
}
项目:openmaxims-linux    文件:Logic.java   
public void populateInstanceControls() 
{
    clearInstanceControls();

    AppTopButtonConfigVo configuration = form.grdList().getValue();
    form.getLocalContext().setRecord(configuration);        

    if(configuration != null)
    {           
        form.txtName().setValue(configuration.getName());
        form.intNoColumns().setValue(configuration.getNoColumns());
        form.chkIncludePatientSelectionHistory().setValue(configuration.getIncludePatientHistory());

        addDefaultItemNodes();

        AppTopButtonVoCollection buttons = configuration.getButtons();
        if(buttons != null)
        {
            for(int x = 0; x < buttons.size(); x++)
            {
                AppTopButtonVo button = buttons.get(x);                 
                if(button != null)
                {
                    addButton(getButtonsNode(), button, false);                     
                }
            }
        }

        AppTopButtonSectionVoCollection sections = configuration.getSections();
        if(sections != null)
        {
            for(int x = 0; x < sections.size(); x++)
            {
                AppTopButtonSectionVo section = sections.get(x);                    
                if(section != null)
                {
                    addSection(getSectionsNode(), section, false);                      
                }
            }               
        }
    }

    form.treItems().expandAll();

    updateControlsState();
}