|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.util.functions.FunctionProvider
org.mmbase.module.core.MMTable
org.mmbase.module.core.MMObjectBuilder
org.mmbase.security.implementation.cloudcontext.builders.Users
This MMObjectBuilder implementation belongs to the object type 'mmbaseusers' It contains functionality to MD5 encode passwords, and so on.
| Field Summary | |
protected Function |
encodeFunction
|
static String |
FIELD_DEFAULTCONTEXT
|
static String |
FIELD_LAST_LOGON
|
static String |
FIELD_PASSWORD
|
static String |
FIELD_STATUS
|
static String |
FIELD_USERNAME
|
static String |
FIELD_VALID_FROM
|
static String |
FIELD_VALID_TO
|
protected static Cache |
rankCache
|
protected Function |
rankFunction
|
static String |
STATUS_RESOURCE
|
protected static Cache |
userCache
|
static long |
VALID_TO_DEFAULT
|
| Fields inherited from class org.mmbase.module.core.MMObjectBuilder |
AGE_PARAMETERS, broadCastChanges, DEFAULT_ALINEA, DEFAULT_EOL, description, descriptions, EVENT_TYPE_LOCAL, EVENT_TYPE_REMOTE, FIELD_NUMBER, FIELD_OBJECT_TYPE, FIELD_OWNER, fields, genericBlobCache, getFunctions, GUI_PARAMETERS, guiFunction, infoFunction, internalVersion, nodeCache, oType, searchAge, SYSTEM_OWNER, TEMPNODE_DEFAULT_SIZE, temporaryNodes, TMP_FIELD_NUMBER, virtual, WRAP_PARAMETERS, wrapFunction |
| Fields inherited from class org.mmbase.module.core.MMTable |
maxNodesFromQuery, mmb, storageConnector, tableName |
| Fields inherited from class org.mmbase.util.functions.FunctionProvider |
functions |
| Constructor Summary | |
Users()
|
|
| Method Summary | |
boolean |
check()
|
String |
encode(String s)
Encodes a password for storage (to avoid plain text passwords). |
boolean |
equals(MMObjectNode o1,
MMObjectNode o2)
Implements equals for nodes (this is in MMObjectBuilder because you cannot override MMObjectNode) |
protected Object |
executeFunction(MMObjectNode node,
String function,
List args)
Executes a function on the field of a node, and returns the result. |
MMObjectNode |
getAnonymousUser()
|
static Users |
getBuilder()
|
String |
getDefaultContext(MMObjectNode node)
|
Rank |
getRank(MMObjectNode userNode)
|
MMObjectNode |
getUser(String userName)
Gets the usernode by userName (the 'identifier'). |
MMObjectNode |
getUser(String userName,
String password)
Gets the usernode and check its credential (password only, currently) |
MMObjectNode |
getUser(String userName,
String password,
boolean encode)
|
MMObjectNode |
getUserByRank(String rank,
String userName)
|
String |
getUserName(MMObjectNode node)
|
boolean |
init()
Initializes this builder The property 'mmb' needs to be set for the builder before this method can be called. |
int |
insert(String owner,
MMObjectNode node)
UserName must be unique, check it also here (to throw nicer exceptions) |
protected void |
invalidateCaches(int nodeNumber)
|
boolean |
isValid(MMObjectNode node)
|
boolean |
nodeChanged(String machine,
String number,
String builder,
String ctype)
|
boolean |
nodeLocalChanged(String machine,
String number,
String builder,
String ctype)
Called when a local node is changed. |
boolean |
nodeRemoteChanged(String machine,
String number,
String builder,
String ctype)
Called when a remote node is changed. |
void |
setDefaults(MMObjectNode node)
Makes sure unique values and not-null's are filed |
boolean |
setValue(MMObjectNode node,
String field,
Object originalValue)
Sets a key/value pair in the main values of this node. |
String |
toString(MMObjectNode n)
Implements for MMObjectNode |
| Methods inherited from class org.mmbase.module.core.MMTable |
count, count, created, getFullTableName, getMMBase, getNode, getNodes, getNodes, getNodes, getNodeType, getStorageConnector, getTableName, search, searchVector, setMMBase, setTableName, size |
| Methods inherited from class org.mmbase.util.functions.FunctionProvider |
addFunction, createParameters, getFunction, getFunctions, getFunctionValue |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final String FIELD_STATUS
public static final String FIELD_USERNAME
public static final String FIELD_PASSWORD
public static final String FIELD_DEFAULTCONTEXT
public static final String FIELD_VALID_FROM
public static final String FIELD_VALID_TO
public static final String FIELD_LAST_LOGON
public static final long VALID_TO_DEFAULT
public static final String STATUS_RESOURCE
protected static Cache rankCache
protected static Cache userCache
protected Function encodeFunction
protected Function rankFunction
| Constructor Detail |
public Users()
| Method Detail |
public boolean init()
MMObjectBuilder
init in class MMObjectBuilderMMObjectBuilder.create()public static Users getBuilder()
public Rank getRank(MMObjectNode userNode)
public boolean setValue(MMObjectNode node,
String field,
Object originalValue)
MMObjectBuilder
setValue in class MMObjectBuilderfield - the name of the field to changenode - The node on which to change the field (the new value is in this node)originalValue - the value which was original in the field
true When an update is required(when changed),
false if original value was set back into the field.
public MMObjectNode getAnonymousUser()
throws SecurityException
SecurityException
public MMObjectNode getUser(String userName,
String password)
SecurityException
public MMObjectNode getUser(String userName,
String password,
boolean encode)
public MMObjectNode getUser(String userName)
public MMObjectNode getUserByRank(String rank,
String userName)
rank - Rank to be searched. Never null.userName - Username to match or null
public int insert(String owner,
MMObjectNode node)
insert in class MMObjectBuilderowner - The administrator creating the nodenode - The object to insert. The object need be of the same type as the current builder.
int value which is the new object's unique number, -1 if the insert failed.public String getDefaultContext(MMObjectNode node)
User.getOwnerField()public String getUserName(MMObjectNode node)
public String encode(String s)
public boolean isValid(MMObjectNode node)
public void setDefaults(MMObjectNode node)
setDefaults in class MMObjectBuildernode - The node to set the defaults of.public boolean check()
protected Object executeFunction(MMObjectNode node,
String function,
List args)
MMObjectBuilderMMObjectBuilder.getValue(org.mmbase.module.core.MMObjectNode, java.lang.String) method.
Derived builders should override this method to provide additional functions.
executeFunction in class MMObjectBuilderMMObjectBuilder.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.util.List)
public boolean equals(MMObjectNode o1,
MMObjectNode o2)
MMObjectBuilder
equals in class MMObjectBuilderpublic String toString(MMObjectNode n)
MMObjectBuilder
toString in class MMObjectBuilder
public boolean nodeLocalChanged(String machine,
String number,
String builder,
String ctype)
MMObjectBuilder
nodeLocalChanged in class MMObjectBuildermachine - Name of the machine that changed the node.number - Number of the changed node as a Stringbuilder - type of the changed nodectype - command type, 'c'=changed, 'd'=deleted', 'r'=relations changed, 'n'=new
true
public boolean nodeRemoteChanged(String machine,
String number,
String builder,
String ctype)
MMObjectBuilder
nodeRemoteChanged in class MMObjectBuildermachine - Name of the machine that changed the node.number - Number of the changed node as a Stringbuilder - type of the changed nodectype - command type, 'c'=changed, 'd'=deleted', 'r'=relations changed, 'n'=new
trueprotected void invalidateCaches(int nodeNumber)
public boolean nodeChanged(String machine,
String number,
String builder,
String ctype)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||