commit
6d6b4121d5
@ -0,0 +1,16 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="exploded-war" name="GDMS:war exploded">
|
||||
<output-path>$PROJECT_DIR$/out/artifacts/GDMS_war_exploded</output-path>
|
||||
<root id="root">
|
||||
<element id="javaee-facet-resources" facet="GDMS/web/Web" />
|
||||
<element id="directory" name="WEB-INF">
|
||||
<element id="directory" name="classes">
|
||||
<element id="module-output" name="GDMS" />
|
||||
</element>
|
||||
<element id="directory" name="lib">
|
||||
<element id="file-copy" path="$MAVEN_REPOSITORY$/org/jetbrains/annotations/16.0.2/annotations-16.0.2.jar" />
|
||||
</element>
|
||||
</element>
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
@ -0,0 +1,7 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="zhai_">
|
||||
<words>
|
||||
<w>synchronizable</w>
|
||||
</words>
|
||||
</dictionary>
|
||||
</component>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_10" default="true" project-jdk-name="10" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/GDMS.iml" filepath="$PROJECT_DIR$/GDMS.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="web" name="Web">
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/web/WEB-INF/web.xml" />
|
||||
</descriptors>
|
||||
<webroots>
|
||||
<root url="file://$MODULE_DIR$/web" relative="/" />
|
||||
</webroots>
|
||||
</configuration>
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/annotations/16.0.2/annotations-16.0.2.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
@ -0,0 +1,19 @@
|
||||
package core.operation;
|
||||
|
||||
|
||||
public interface Executable {
|
||||
default void execute(String options) throws Exception {
|
||||
checkSelf();
|
||||
beforeDo(options);
|
||||
Do(options);
|
||||
afterDo(options);
|
||||
}
|
||||
|
||||
void checkSelf ()throws Exception;
|
||||
|
||||
void beforeDo(String options);
|
||||
|
||||
void Do(String options);
|
||||
|
||||
void afterDo(String options);
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package core.operation;
|
||||
|
||||
|
||||
import core.user.User;
|
||||
import interfaces.AvailableByName;
|
||||
|
||||
public abstract class Operation implements Executable, AvailableByName {
|
||||
|
||||
//AvailableByName*******start******
|
||||
private static String classPath="core.user";
|
||||
public static String getClassPath(){
|
||||
return classPath;
|
||||
}
|
||||
public static Object getObjectByName(String name) throws Exception {
|
||||
return Class.forName(getClassPath()+"."+name).getDeclaredConstructor().newInstance();
|
||||
}
|
||||
//AvailableByName********end*******
|
||||
|
||||
private User subject;
|
||||
public Operation(){
|
||||
super();
|
||||
}
|
||||
public User getSubject() {
|
||||
return subject;
|
||||
}
|
||||
public void setSubject(User subject) {
|
||||
this.subject = subject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkSelf() throws Exception {
|
||||
if(subject==null) throw new Exception("Operation's subject is Null");
|
||||
}
|
||||
@Override
|
||||
public void beforeDo(String options) {
|
||||
//todo
|
||||
}
|
||||
@Override
|
||||
public void afterDo(String options) {
|
||||
//todo
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package core.operation;
|
||||
|
||||
public class UploadFileOperation extends Operation {
|
||||
@Override
|
||||
public void Do(String options) {
|
||||
//todo
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package core.process;
|
||||
|
||||
import core.operation.Operation;
|
||||
import core.user.User;
|
||||
|
||||
|
||||
public class AtomProcess extends Process {
|
||||
private User subject;
|
||||
private Operation operation;
|
||||
private String option;
|
||||
|
||||
public AtomProcess(String subjectName, String operationName, String option, String info) throws Exception {
|
||||
super(info);
|
||||
this.subject = (User) User.getObjectByName(subjectName);
|
||||
this.operation = (Operation) Operation.getObjectByName(operationName);
|
||||
this.option = option;
|
||||
this.operation.setSubject(this.subject);
|
||||
}
|
||||
|
||||
public void execute() throws Exception {
|
||||
this.operation.execute(this.option);
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package core.process;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CompoundProcess extends Process {
|
||||
private List<Process> processes;
|
||||
public CompoundProcess(String info) {
|
||||
super(info);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void execute() throws Exception {
|
||||
for(Process process:processes){
|
||||
process.execute();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package core.process;
|
||||
|
||||
import core.operation.Executable;
|
||||
import core.operation.Operation;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class Process {
|
||||
private String info;
|
||||
|
||||
public Process(String info) {
|
||||
this.info=info;
|
||||
}
|
||||
|
||||
public abstract void execute()throws Exception;
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package core.process;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class ProcessManagement {
|
||||
private CompoundProcess processes;
|
||||
public void setProcessesByJson(File file){
|
||||
//todo
|
||||
}
|
||||
public void execute() throws Exception {
|
||||
processes.execute();
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"fileName":"process"
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package core.user;
|
||||
|
||||
public class Student extends User {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package core.user;
|
||||
|
||||
public class Teacher extends User {
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package core.user;
|
||||
|
||||
import core.process.ProcessManagement;
|
||||
import core.user.userFun.AccountManageable;
|
||||
import core.user.userFun.Configurable;
|
||||
import interfaces.AvailableByName;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public abstract class User implements AccountManageable, Configurable, AvailableByName {
|
||||
//AvailableByName*******start******
|
||||
private static String classPath="core.user";
|
||||
public static String getClassPath(){
|
||||
return classPath;
|
||||
}
|
||||
public static Object getObjectByName(String name) throws Exception {
|
||||
return Class.forName(getClassPath()+"."+name).getDeclaredConstructor().newInstance();
|
||||
}
|
||||
//AvailableByName********end*******
|
||||
|
||||
private String id;
|
||||
private String password;
|
||||
private ProcessManagement processManagement;
|
||||
public User(){
|
||||
super();
|
||||
processManagement = setProcessManagement(new File(""));
|
||||
}
|
||||
public String getType(){
|
||||
return this.getClass().getName();
|
||||
}
|
||||
|
||||
public void destroy(){
|
||||
core.user.utils.AccountManagement.destroy(this);
|
||||
}
|
||||
|
||||
public void logout(){
|
||||
core.user.utils.AccountManagement.logout(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void syncToDatabase() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void syncFromDatabase() {
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"fileName":"student"
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"fileName":"studentProcess"
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"fileName":"teacher"
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"fileName":"teacherProcess"
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package core.user.userFun;
|
||||
|
||||
|
||||
import core.user.User;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AccountManageable extends DatabaseSynchronizable{
|
||||
|
||||
void destroy();
|
||||
|
||||
void logout();
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package core.user.userFun;
|
||||
|
||||
import core.process.ProcessManagement;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public interface Configurable {
|
||||
default ProcessManagement setProcessManagement(File file){
|
||||
return null;
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package core.user.userFun;
|
||||
|
||||
public interface DatabaseSynchronizable {
|
||||
|
||||
default void syncToDatabase(){
|
||||
|
||||
}
|
||||
void syncFromDatabase();
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package core.user.utils;
|
||||
|
||||
import core.user.User;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AccountManagement {
|
||||
static User login(String id, String password, String User){
|
||||
//todo
|
||||
return null;
|
||||
}
|
||||
static User register(List<String> necessaryInfo, String User){
|
||||
//todo
|
||||
return null;
|
||||
}
|
||||
static void logout(User user){
|
||||
//todo
|
||||
}
|
||||
static void destroy(User user){
|
||||
//todo
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package dao;
|
||||
|
||||
public interface Utils {
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package gdms;
|
||||
|
||||
public class main {
|
||||
public static void check()throws Exception{
|
||||
checkJson();
|
||||
}
|
||||
|
||||
private static void checkJson() throws Exception{
|
||||
//todo
|
||||
}
|
||||
|
||||
public static void init(){
|
||||
}
|
||||
public static void run() throws Exception {
|
||||
check();
|
||||
init();
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package gdms;
|
||||
import core.user.Student;
|
||||
import core.user.User;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
public class test {
|
||||
public static void main(String argc[]){
|
||||
System.out.println(new Student().getType());
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package interfaces;
|
||||
|
||||
public interface AvailableByName {
|
||||
//todo:@mustBeOverride
|
||||
static String getClassPath(){
|
||||
return null;
|
||||
}
|
||||
static Object getObjectByName(String name) throws Exception {
|
||||
return Class.forName(getClassPath()+"."+name).getDeclaredConstructor().newInstance();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
|
||||
version="4.0">
|
||||
</web-app>
|
@ -0,0 +1,16 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: zhai_
|
||||
Date: 2018/11/30
|
||||
Time: 10:50
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>$Title$</title>
|
||||
</head>
|
||||
<body>
|
||||
$END$
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue