-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'github/master'
- Loading branch information
Showing
2 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# gcc_sa1905_final_CIMS | ||
GCC 数据结构实验期末大作业,指令交互式的车辆信息管理系统 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
### `Helper`包 | ||
各种通用小工具类的集合 | ||
#### `FileIO`类 | ||
文件读写 | ||
##### `read` | ||
从本地文件中读取数据 | ||
```java | ||
public static String read(String path); | ||
``` | ||
##### `write` | ||
将指定数据写入本地文件 | ||
```java | ||
public static void write(String path, String content) | ||
``` | ||
|
||
#### `FillSpace`类 | ||
##### `fill` | ||
将字符串补满指定的空格 | ||
```java | ||
public static String fill(String string, char filler, int length) | ||
``` | ||
|
||
### `Services`包 | ||
#### `Interface.IServices`接口 | ||
```java | ||
// visitor | ||
AuthSession login(String username, String password); // 登录 | ||
AuthSession register(String loginBeacon, String username, String password); // 注册 | ||
|
||
// common | ||
Car createCar(AuthSession authSession, String ID, String model, String comment); // 创建车辆信息 | ||
Car queryCar(String ID); // 根据车牌查询车辆信息 | ||
Car removeCar(AuthSession authSession, String ID); // 移除车辆信息 | ||
Car modifyCar(AuthSession authSession, String ID, String model, String comment); // 更改车辆信息 | ||
SequentialList<Car> listCar(AuthSession authSession); // 列出对应账号的车辆信息 | ||
String showProfile(AuthSession authSession); // 显示对应账号的账号信息 | ||
AuthSession modifyProfile(AuthSession authSession, String username, String password); // 修改对应账号的账号信息 | ||
|
||
// admin | ||
AuthSession createUser(String authLevel, String loginBeacon, String username, String password); // 创建账号 | ||
AuthSession revokeUser(String loginBeacon); // 删除账号 | ||
AuthSession modifyUser(String authLevel, String loginBeacon, String username, String password); // 修改账号信息 | ||
SequentialList<AuthSession> listUser(); // 列出所有账号 | ||
Car removeCar(String ID); // 移除车辆信息 | ||
Car modifyCar(String ID, String owner, String model, String comment); // 修改车辆信息 | ||
SequentialList<Car> listCar(); // 列出所有车辆 | ||
``` | ||
|
||
#### `FlowServices`类 | ||
用户操作流程控制,负责执行指令系统的操作请求 | ||
#### `Services`类 | ||
`IServices`接口的实际实现,包括与数据储存结构交互 | ||
|
||
### `Structure`包 | ||
基础结构类 | ||
#### `Car`类 | ||
储存车辆信息 | ||
#### `SequentialList`类 | ||
顺序表的实现 | ||
|
||
### `UI`包 | ||
实现用户界面交互 | ||
#### `ColorText`类 | ||
使用`ANSI control sequence`实现彩色字体输出 | ||
|
||
#### `ConsoleLogger`类 | ||
负责将信息输出到控制台 | ||
|
||
#### `HintMaker`类 | ||
使用`ConsoleLogger`类提供的方法为用户提供整合好的信息 | ||
|
||
### `BootStrap`引导 | ||
系统入口,用于引导启动 | ||
|
||
|
||
### `CommandSystem`指令系统 | ||
作为本次大作业项目的指令交互方式的基础支撑,该部分或许有后续开发的计划 | ||
|
||
#### `Enum`包 | ||
##### `AuthLevel`枚举类 | ||
用于储存权限等级的枚举类,提供权限等级储存以及其权限等级描述 | ||
|
||
##### `Commands`枚举类 | ||
用于储存系统中所有的指令的枚举类,以及指令作用描述、用法帮助、参数数量以及作用于UI中的显示参数 | ||
|
||
#### `AuthSession`账号信息提供器 | ||
用于储存与账号相关的所有信息,包括权限等级、登录名、用户名、密码、唯一标识(UUID) | ||
|
||
#### `CommandPiepline`指令流水线类 | ||
用于储存解析以及提供验证参数数量的指令组装对象,储存指令、参数以及参数个数 | ||
|
||
#### `CommandResolver`指令解析器 | ||
用于将用户输入的字符串解析为流程控制中能够识别的`CommandPiepline`指令流水,提供包括无效指令识别与参数数量验证的功能 | ||
|
||
#### `PrivilegeVerifier`鉴权处理器 | ||
用于维护权限模型的指令分层性,否拒用户使用超越自身权限等级的指令,确保了系统权限模型的稳健性。 | ||
|
||
|
||
|