Skip to content
This repository has been archived by the owner on Mar 30, 2021. It is now read-only.
/ service-core Public archive

The Software Testing Automation Framework (STAF) service development MVC framework

Notifications You must be signed in to change notification settings

jifffffy/service-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

service-core

Sample STAF service Development framework using the code of spring mvc

How to use

@Controller
public class QueryController {

    private SystemInfo si;
    private HardwareAbstractionLayer hal;
    private OperatingSystem os;

    public QueryController() {
    }

    @PostConstruct
    private void init() {
        si = new SystemInfo();
        hal = si.getHardware();
        os = si.getOperatingSystem();
    }

    @OptionMapping(
            options = {
                    @Option(name = "ComputerSystem", maxAllowed = 1, valueRequirement = STAFCommandParser.VALUENOTALLOWED)
            },
            optionNeeds = {},
            optionGroup = {}

    )
    public ComputerSystem computerSystem() {
        return hal.getComputerSystem();
    }

    @OptionMapping(
            options = {
                    @Option(name = "memory", maxAllowed = 1, valueRequirement = STAFCommandParser.VALUENOTALLOWED)
            },
            optionNeeds = {},
            optionGroup = {}

    )
    public GlobalMemory memory() {
        return hal.getMemory();
    }

    @OptionMapping(
            options = {
                    @Option(name = "processor", maxAllowed = 1, valueRequirement = STAFCommandParser.VALUENOTALLOWED)
            },
            optionNeeds = {},
            optionGroup = {}

    )
    public CentralProcessor processor() {
        return hal.getProcessor();
    }

    @OptionMapping(
            options = {
                    @Option(name = "cpu", maxAllowed = 1, valueRequirement = STAFCommandParser.VALUENOTALLOWED)
            },
            optionNeeds = {},
            optionGroup = {}

    )
}

About

The Software Testing Automation Framework (STAF) service development MVC framework

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages