提交 acb6270e 编写于 作者: R roo00

delete personDetail class

上级 f863e866
...@@ -43,7 +43,6 @@ import com.x.server.console.action.ActionEraseContentBbs; ...@@ -43,7 +43,6 @@ import com.x.server.console.action.ActionEraseContentBbs;
import com.x.server.console.action.ActionEraseContentCms; import com.x.server.console.action.ActionEraseContentCms;
import com.x.server.console.action.ActionEraseContentLog; import com.x.server.console.action.ActionEraseContentLog;
import com.x.server.console.action.ActionEraseContentProcessPlatform; import com.x.server.console.action.ActionEraseContentProcessPlatform;
import com.x.server.console.action.ActionEraseContentReport;
import com.x.server.console.action.ActionRestoreData; import com.x.server.console.action.ActionRestoreData;
import com.x.server.console.action.ActionRestoreStorage; import com.x.server.console.action.ActionRestoreStorage;
import com.x.server.console.action.ActionSetPassword; import com.x.server.console.action.ActionSetPassword;
...@@ -52,6 +51,7 @@ import com.x.server.console.action.ActionShowMemory; ...@@ -52,6 +51,7 @@ import com.x.server.console.action.ActionShowMemory;
import com.x.server.console.action.ActionShowOs; import com.x.server.console.action.ActionShowOs;
import com.x.server.console.action.ActionShowThread; import com.x.server.console.action.ActionShowThread;
import com.x.server.console.action.ActionUpdate; import com.x.server.console.action.ActionUpdate;
import com.x.server.console.action.ActionUpdateFile;
import com.x.server.console.action.ActionVersion; import com.x.server.console.action.ActionVersion;
import com.x.server.console.log.LogTools; import com.x.server.console.log.LogTools;
import com.x.server.console.server.Servers; import com.x.server.console.server.Servers;
...@@ -275,7 +275,7 @@ public class Main { ...@@ -275,7 +275,7 @@ public class Main {
matcher = CommandFactory.update_pattern.matcher(cmd); matcher = CommandFactory.update_pattern.matcher(cmd);
if (matcher.find()) { if (matcher.find()) {
if (update(matcher.group(1))) { if (update(matcher.group(1), matcher.group(2), matcher.group(3))) {
stopAll(); stopAll();
System.exit(0); System.exit(0);
} else { } else {
...@@ -283,9 +283,9 @@ public class Main { ...@@ -283,9 +283,9 @@ public class Main {
} }
} }
matcher = CommandFactory.fastUpdate_pattern.matcher(cmd); matcher = CommandFactory.updateFile_pattern.matcher(cmd);
if (matcher.find()) { if (matcher.find()) {
if (fastUpdate(matcher.group(1))) { if (updateFile(matcher.group(1), matcher.group(2), matcher.group(3))) {
stopAll(); stopAll();
System.exit(0); System.exit(0);
} else { } else {
...@@ -315,9 +315,6 @@ public class Main { ...@@ -315,9 +315,6 @@ public class Main {
case "log": case "log":
eraseContentLog(matcher.group(2)); eraseContentLog(matcher.group(2));
break; break;
case "report":
eraseContentReport(matcher.group(2));
break;
case "bbs": case "bbs":
eraseContentBbs(matcher.group(2)); eraseContentBbs(matcher.group(2));
break; break;
...@@ -421,18 +418,19 @@ public class Main { ...@@ -421,18 +418,19 @@ public class Main {
return true; return true;
} }
private static boolean fastUpdate(String password) { private static boolean update(String password, String backup, String latest) {
try { try {
return new ActionUpdate().execute(password, false, true); return new ActionUpdate().execute(password, BooleanUtils.toBoolean(backup),
BooleanUtils.toBoolean(latest));
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
return true; return true;
} }
private static boolean update(String password) { private static boolean updateFile(String path, String backup, String password) {
try { try {
return new ActionUpdate().execute(password, true, false); return new ActionUpdateFile().execute(path, BooleanUtils.toBoolean(backup), password);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
...@@ -885,13 +883,4 @@ public class Main { ...@@ -885,13 +883,4 @@ public class Main {
return false; return false;
} }
private static boolean eraseContentReport(String password) throws Exception {
try {
return new ActionEraseContentReport().execute(password);
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
} }
\ No newline at end of file
...@@ -216,15 +216,27 @@ public class Organization { ...@@ -216,15 +216,27 @@ public class Organization {
} }
public Detail detail(EffectivePerson effectivePerson) throws Exception { // public PersonDetail detail(EffectivePerson effectivePerson) throws Exception {
Detail o = new Detail(); // PersonDetail o = new PersonDetail();
o.setPerson(effectivePerson.getDistinguishedName()); // o.setPerson(effectivePerson.getDistinguishedName());
o.setIdentityList(identity().listWithPerson(effectivePerson)); // o.setIdentityList(identity().listWithPerson(effectivePerson));
o.setUnitList(unit().listWithPerson(effectivePerson)); // o.setUnitList(unit().listWithPerson(effectivePerson));
o.setUnitAllList(unit().listWithPersonSupNested(effectivePerson)); // o.setUnitAllList(unit().listWithPersonSupNested(effectivePerson));
o.setGroupList(group().listWithPerson(effectivePerson.getDistinguishedName())); // o.setGroupList(group().listWithPerson(effectivePerson.getDistinguishedName()));
o.setRoleList(role().listWithPerson(effectivePerson)); // o.setRoleList(role().listWithPerson(effectivePerson));
return o; // return o;
} // }
//
// public PersonDetail detail(String name) throws Exception {
// PersonDetail o = new PersonDetail();
// String person = this.person().get(name);
// o.setPerson(person);
// o.setIdentityList(identity().listWithPerson(person));
// o.setUnitList(unit().listWithPerson(person));
// o.setUnitAllList(unit().listWithPersonSupNested(person));
// o.setGroupList(group().listWithPerson(person));
// o.setRoleList(role().listWithPerson(person));
// return o;
// }
} }
...@@ -6,7 +6,7 @@ import org.apache.commons.collections4.list.TreeList; ...@@ -6,7 +6,7 @@ import org.apache.commons.collections4.list.TreeList;
import com.x.base.core.project.annotation.FieldDescribe; import com.x.base.core.project.annotation.FieldDescribe;
public class Detail { public class PersonDetail {
@FieldDescribe("当前用户") @FieldDescribe("当前用户")
private String person = ""; private String person = "";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册