public class Users extends MMObjectBuilder
| Modifier and Type | Field and Description |
|---|---|
(package private) static String |
ADMIN_USERNAME
The user with rank administrator
|
(package private) static String |
ANONYMOUS_USERNAME
The user with rank anonymous
|
protected Function<String> |
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 Function<Rank> |
rankFunction |
static String |
STATUS_RESOURCE |
static long |
VALID_TO_DEFAULT |
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_INDICATOR, GUI_PARAMETERS, guiFunction, infoFunction, internalVersion, nodeCache, oType, pluralNames, searchAge, singularNames, SYSTEM_OWNER, TEMPNODE_DEFAULT_SIZE, temporaryNodes, TMP_FIELD_EXISTS, TMP_FIELD_NUMBER, virtual, WRAP_PARAMETERS, wrapFunctionmaxNodesFromQuery, mmb, storageConnector, tableNamefunctions| Constructor and Description |
|---|
Users() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
check()
Deprecated.
This returns true always, and is not used, nor do we know what it is supposed to mean
|
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) |
UserProvider |
getProvider() |
Rank |
getRank(MMObjectNode userNode)
Deprecated.
|
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) |
MMObjectBuilder |
getUserBuilder() |
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)
|
boolean |
isValid(MMObjectNode node) |
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
|
addEventListener, addField, addLocalObserver, addRemoteObserver, broadcastChanges, checkAddTmpField, clearBlobCache, commit, create, createAlias, createAlias, createIfNotExists, delete, equals, executeFunction, fieldLocalChanged, getAncestors, getBlobCache, getClassName, getConfigFile, getConfigResource, getDataTypeCollector, getDBState, getDBType, getDefaultTeaser, getDefaultUrl, getDescendants, getDescription, getDescription, getDescriptions, getEmptyNode, getField, getFieldNames, getFields, getFields, getFunction, getFunctionParameters, getFunctions, getGUIIndicator, getGUIIndicator, getGUIIndicator, getHTML, getInitParameter, getInitParameters, getInitParameters, getInternalVersion, getList, getLocaleGUIIndicator, getLocaleGUIIndicator, getMachineName, getMaintainer, getNewNode, getNewTmpNode, getNextField, getNextField, getNode, getNode, getNode, getNodeFromCache, getNodeGUIIndicator, getNumber, getObjectType, getObjectValue, getParentBuilder, getPluralName, getPluralName, getPluralNames, getRelations_main, getSearchAge, getShort, getShortedByte, getShortedInputStream, getShortedText, getSingularName, getSingularName, getSingularNames, getSmartPath, getTmpNode, getURLEncode, getValue, getVersion, getWAP, getXMLPath, hasField, hashCode, hashCode, hostname_function, insert, isExtensionOf, isNodeCached, isNull, isVirtual, loadInitParameters, newFunctionInstance, nodeLocalChanged, nodeRemoteChanged, notify, notify, preCommit, process, removeEventListener, removeField, removeLocalObserver, removeNode, removeRelations, removeRemoteObserver, removeSyncNodes, replace, safeCache, sendFieldChangeSignal, setDescription, setDescriptions, setFields, setInitParameter, setMaintainer, setPluralNames, setSearchAge, setSingularNames, setUniqueValue, setUniqueValue, setValue, setVersion, setXMLPath, shutdown, testValidData, toString, update, updateFields, wrapcount, count, created, getFullTableName, getMMBase, getNode, getNodes, getNodes, getNodes, getNodeType, getStorageConnector, getTableName, search, searchVector, setMMBase, setTableName, sizeaddFunction, createParameters, getFunction, getFunctions, getFunctionValuepublic 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
static final String ADMIN_USERNAME
static final String ANONYMOUS_USERNAME
public boolean init()
MMObjectBuilderinit in class MMObjectBuilderMMObjectBuilder.create()public static Users getBuilder()
public UserProvider getProvider()
public Rank getRank(MMObjectNode userNode)
public boolean setValue(MMObjectNode node, String field, Object originalValue)
MMObjectBuildersetValue in class MMObjectBuildernode - The node on which to change the field (the new value is in this node)field - the name of the field to changeoriginalValue - the value which was original in the fieldtrue When an update is required(when changed),
false if original value was set back into the field.public MMObjectNode getAnonymousUser() throws SecurityException
SecurityExceptionpublic MMObjectNode getUser(String userName, String password)
SecurityExceptionpublic 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 nullpublic 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 boolean check()
public boolean isValid(MMObjectNode node)
public void setDefaults(MMObjectNode node)
setDefaults in class MMObjectBuildernode - The node to set the defaults of.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.public boolean equals(MMObjectNode o1, MMObjectNode o2)
MMObjectBuilderequals in class MMObjectBuilderpublic String toString(MMObjectNode n)
MMObjectBuildertoString in class MMObjectBuilderpublic MMObjectBuilder getUserBuilder()
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}