com.highdeal.hci
Class UserModel

java.lang.Object
  extended by com.highdeal.hci.UserModel
All Implemented Interfaces:
XMLMarshallable

public class UserModel
extends java.lang.Object
implements XMLMarshallable

This Java class represents a user of SAP Convergent Charging software; A user is any person (individual) or machine (service) allowed to work with SAP CC according to his assigned roles and resulting authorizations. Each message sent via HCI must include a header with the identifier of an SAP CC user as originator of the message.

A user is identified by a login/password.

If the advanced password management feature is enabled, each password has to conform to the complexity rules that have been defined by the administrator. Passwords may also have an expiration date after which they must be changed. A user can also be locked and thus prevented to do any operation if his password is wrongly entered several times.

SAP CC users are divided into two categories: individual (human) and service (non-human) users:

Caution

Consult the SAP CC Security Guide about the role and authorization concept of SAP Convergent Charging.

See Also:
AuthenticateUserOp, RoleModel, AuthorizationModel, CreateUserOp, SearchUserOp, ModifyUserOp, DeleteUserOp

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="user">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="permission" minOccurs="0" maxOccurs="unbounded"> <!-- i.e. a role -->
        <xs:complexType>
          <xs:attribute name="value" type="xs:string"/>
        </xs:complexType>
     </xs:element>
    </xs:sequence>
    <xs:attribute name="login" type="xs:string"/>
    <xs:attribute name="password" type="xs:string"/>
    <xs:attribute name="catalogName" type="xs:string"/>
    <xs:attribute name="locked" type="xs:boolean"/>
    <xs:attribute name="human" type="xs:boolean" use="optional" default="true" /> <!-- deprecated -->
    <xs:attribute name="technical" type="xs:boolean" use="optional" default="false" />
    <xs:attribute name="passwordRevoked" type="xs:boolean" use="optional" default="false" />
  </xs:complexType>
 </xs:element>


Field Summary
static java.lang.String PASSWORD_REVOKED_ATTRIBUTE_NAME
          The XML node tag name for the user model
static java.lang.String TAG_NAME
          The XML node tag name for the user model: "user"
 
Constructor Summary
UserModel()
          Constructs an empty user for SAP CC.
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 java.lang.String getCatalogName()
          Returns the name of the pricing catalog associated to this SAP CC user.
 java.lang.String getLoginID()
          Returns the login of this SAP CC user.
 java.lang.String getPassword()
          Returns the password of this SAP CC user.
 java.util.List<java.lang.String> getPermissions()
          Returns the list of role(s)/permission(s) assigned to this SAP CC user.
 boolean isHuman()
          Deprecated. Use isTechnical() instead.
 boolean isLocked()
          Returns whether the SAP CC user is locked.
 boolean isPasswordRevoked()
          Tells whether or not this SAP CC user must change his password on next login.
 boolean isTechnical()
          Gets whether the SAP CC user is a technical user (service user).
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setCatalogName(java.lang.String catalogName)
          Sets the name of the catalog associated to this SAP CC user.
 void setHuman(boolean human)
          Deprecated. Use setTechnical(boolean) instead.
 void setLocked(boolean locked)
          Sets whether the SAP CC user is locked.
 void setLoginID(java.lang.String id)
          Sets the login for this SAP CC user.
 void setPassword(java.lang.String pw)
          Sets the password for this SAP CC user.
 void setPasswordRevoked(boolean passwordRevoked)
          Sets the flag that force this SAP CC user to change his password.
 void setTechnical(boolean technical)
          Sets whether the SAP CC user is a technical user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_NAME

public static final java.lang.String TAG_NAME
The XML node tag name for the user model: "user"

See Also:
Constant Field Values

PASSWORD_REVOKED_ATTRIBUTE_NAME

public static final java.lang.String PASSWORD_REVOKED_ATTRIBUTE_NAME
The XML node tag name for the user model

See Also:
Constant Field Values
Constructor Detail

UserModel

public UserModel()
Constructs an empty user for SAP CC.

Method Detail

getLoginID

public java.lang.String getLoginID()
Returns the login of this SAP CC user.

Returns:
The login of this SAP CC user

setLoginID

public void setLoginID(java.lang.String id)
Sets the login for this SAP CC user.

Parameters:
id - The login for this SAP CC user

getPassword

public java.lang.String getPassword()
Returns the password of this SAP CC user.

Returns:
The password of this SAP CC user

setPassword

public void setPassword(java.lang.String pw)
Sets the password for this SAP CC user.

Parameters:
pw - The password for this SAP CC user

getPermissions

public java.util.List<java.lang.String> getPermissions()
Returns the list of role(s)/permission(s) assigned to this SAP CC user.

Returns:
A list of String representing existing role names

getCatalogName

public java.lang.String getCatalogName()
Returns the name of the pricing catalog associated to this SAP CC user.

Returns:
The name of the catalog associated to this user, or null if the user is not associated to a catalog

setCatalogName

public void setCatalogName(java.lang.String catalogName)
Sets the name of the catalog associated to this SAP CC user.

Parameters:
catalogName - The name of the catalog associated to this SAP CC user, or null if the user is not associated to a catalog

isLocked

public boolean isLocked()
Returns whether the SAP CC user is locked.

Returns:
Whether the SAP CC user is locked

setLocked

public void setLocked(boolean locked)
Sets whether the SAP CC user is locked.

Parameters:
locked - Whether the SAP CC user is locked

isHuman

@Deprecated
public boolean isHuman()
Deprecated. Use isTechnical() instead.

Gets whether the SAP CC user is not a technical user.

Returns:
true if the user is not a technical user, false otherwise

setHuman

@Deprecated
public void setHuman(boolean human)
Deprecated. Use setTechnical(boolean) instead.

Sets whether the user is not a technical user.

Parameters:
human - Whether the user is not a technical user

isTechnical

public boolean isTechnical()
Gets whether the SAP CC user is a technical user (service user).

Returns:
true if the user is a technical user, false otherwise

setTechnical

public void setTechnical(boolean technical)
Sets whether the SAP CC user is a technical user.

Parameters:
technical - Whether the SAP CC user is a technical user

isPasswordRevoked

public boolean isPasswordRevoked()
Tells whether or not this SAP CC user must change his password on next login.

Returns:
true if this SAP CC user must change his password

setPasswordRevoked

public void setPasswordRevoked(boolean passwordRevoked)
Sets the flag that force this SAP CC user to change his password.

Parameters:
passwordRevoked - true if this user must change his password

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - The XML attributes of the current element

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - The name of tag for the child
child - The child to be added

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - The character data to be added

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - The XML output to marshal the object into

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)