Package org.codelibs.fess.auth.chain
Class CommandChain
- java.lang.Object
-
- org.codelibs.fess.auth.chain.CommandChain
-
- All Implemented Interfaces:
AuthenticationChain
public class CommandChain extends java.lang.Object implements AuthenticationChain
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classCommandChain.InputStreamThreadprotected static classCommandChain.MonitorThread
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringcommandOutputEncodingprotected java.lang.String[]deleteCommandprotected longexecutionTimeoutprotected intmaxOutputLineprotected java.lang.String[]targetUsersprotected java.lang.String[]updateCommandprotected java.io.FileworkingDirectory
-
Constructor Summary
Constructors Constructor Description CommandChain()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanchangePassword(java.lang.String username, java.lang.String password)voiddelete(User user)protected intexecuteCommand(java.lang.String[] commands, java.lang.String username, java.lang.String password)protected booleanisTargetUser(java.lang.String username)Userload(User user)voidsetCommandOutputEncoding(java.lang.String commandOutputEncoding)voidsetDeleteCommand(java.lang.String[] deleteCommand)voidsetExecutionTimeout(long executionTimeout)voidsetMaxOutputLine(int maxOutputLine)voidsetTargetUsers(java.lang.String[] targetUsers)voidsetUpdateCommand(java.lang.String[] updateCommand)voidsetWorkingDirectory(java.io.File workingDirectory)voidupdate(User user)
-
-
-
Field Detail
-
workingDirectory
protected java.io.File workingDirectory
-
maxOutputLine
protected int maxOutputLine
-
executionTimeout
protected long executionTimeout
-
commandOutputEncoding
protected java.lang.String commandOutputEncoding
-
updateCommand
protected java.lang.String[] updateCommand
-
deleteCommand
protected java.lang.String[] deleteCommand
-
targetUsers
protected java.lang.String[] targetUsers
-
-
Method Detail
-
update
public void update(User user)
- Specified by:
updatein interfaceAuthenticationChain
-
delete
public void delete(User user)
- Specified by:
deletein interfaceAuthenticationChain
-
changePassword
public boolean changePassword(java.lang.String username, java.lang.String password)- Specified by:
changePasswordin interfaceAuthenticationChain
-
load
public User load(User user)
- Specified by:
loadin interfaceAuthenticationChain
-
isTargetUser
protected boolean isTargetUser(java.lang.String username)
-
executeCommand
protected int executeCommand(java.lang.String[] commands, java.lang.String username, java.lang.String password)
-
setWorkingDirectory
public void setWorkingDirectory(java.io.File workingDirectory)
-
setMaxOutputLine
public void setMaxOutputLine(int maxOutputLine)
-
setExecutionTimeout
public void setExecutionTimeout(long executionTimeout)
-
setCommandOutputEncoding
public void setCommandOutputEncoding(java.lang.String commandOutputEncoding)
-
setUpdateCommand
public void setUpdateCommand(java.lang.String[] updateCommand)
-
setDeleteCommand
public void setDeleteCommand(java.lang.String[] deleteCommand)
-
setTargetUsers
public void setTargetUsers(java.lang.String[] targetUsers)
-
-