Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CSCWebsocketBean
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TongZuu
CSCWebsocketBean
Commits
d2e9ce34
Commit
d2e9ce34
authored
Jun 02, 2016
by
TongZuu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
load XML command factory
parent
93ec0159
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletions
+14
-1
CMDModeFactory.java
com/csc/library/factory/CMDModeFactory.java
+14
-1
No files found.
com/csc/library/factory/CMDModeFactory.java
View file @
d2e9ce34
...
...
@@ -16,6 +16,7 @@ import com.csc.library.session.InitialEnvironment;
public
class
CMDModeFactory
{
private
static
CMDModeFactory
instance
;
private
Map
<
CMDMode
,
AbsModeManagement
>
mapMode
=
new
HashMap
<
CMDMode
,
AbsModeManagement
>();
private
String
path
=
new
InitialEnvironment
().
getValue
(
"COMMAND_CONFIG-dir"
);
private
CMDModeFactory
(){
init
();
}
...
...
@@ -29,7 +30,7 @@ public class CMDModeFactory {
if
(
CMDMode
.
values
().
length
==
mapMode
.
size
()){
mapMode
=
Collections
.
unmodifiableMap
(
mapMode
);
String
path
=
new
InitialEnvironment
().
getValue
(
"COMMAND_CONFIG-dir"
);
for
(
AbsModeManagement
manager
:
mapMode
.
values
()){
manager
.
load
(
path
);
}
...
...
@@ -51,4 +52,16 @@ public class CMDModeFactory {
public
CMDModeManagement
.
ModeBuilder
getModeBuilder
(
CMDMode
mode
){
return
this
.
mapMode
.
get
(
mode
);
}
public
void
load
(){
for
(
AbsModeManagement
manager
:
mapMode
.
values
()){
manager
.
load
(
path
);
}
}
public
void
load
(
CMDMode
mode
){
if
(
mapMode
.
containsKey
(
mode
)){
mapMode
.
get
(
mode
).
load
(
path
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment