public class RoomCreationValidationErrors extends Object
To create a new room an instance of IRoomInfo is needed.
Some of the fields in the IRoomInfo object are mandatory or need to have a
specific value to ensure integrity before a new room is created based on the
IRoomInfo object (using method IRooms.createRoom(IRoomInfo, boolean)). All these integrity checks are done
by the method IRoomInfo.validate(). If this method
returns false, some of the constraints are violated in your instance of IRoomInfo.
In this case a call to IRoomInfo.getValidationErrors()
returns you one or more instances of RoomCreationValidationErrors. This means
that you get all errors in your IRoomInfo object at the same time with one
single call to getValidationErrors(). You can simply iterate over the errors
and for example display them in the UI.
The class provides static final instances of itself. Each of these instances represent one possible error situation and can be matched against the actual errors returned by IRoomInfo.getValidationErrors().
This allows a separation between the application creating a room and the room backend. The room backend knows about all data constraints in the IRoomInfo object and checks them for the application. The application gets an error object for each violated constraint containing also a shorttext describing the violation. In the future this description will be more detailed and internationalizable.
| Modifier and Type | Field and Description |
|---|---|
static RoomCreationValidationErrors |
BAD_USER_ID |
static RoomCreationValidationErrors |
CATEGORIES_MISSING |
static RoomCreationValidationErrors |
DESC_MISSING |
static RoomCreationValidationErrors |
INVALID_INITIAL_ROLE |
static RoomCreationValidationErrors |
INVALID_USER_ROLE |
static RoomCreationValidationErrors |
NAME_MISSING |
static RoomCreationValidationErrors |
NO_SUCH_PRIVACY |
static RoomCreationValidationErrors |
NO_SUCH_TEMPLATE |
static RoomCreationValidationErrors |
OWNER_MISSING |
static RoomCreationValidationErrors |
OWNER_ROLE_MISSING |
static RoomCreationValidationErrors |
PRIVACY_MISSING |
static RoomCreationValidationErrors |
STRICT_PRIVACY_VIOLATION |
static RoomCreationValidationErrors |
TEMPLATENAME_MISSING |
static RoomCreationValidationErrors |
WRITE_PROTECT_MODE_ENABLED
static final members: instances of RoomCreationValidationErrors
representing the different errors.
|
| Modifier and Type | Method and Description |
|---|---|
static RoomCreationValidationErrors[] |
getErrors()
Get a list of all possible errors
|
String |
getShortText()
Get the shorttext of the error
|
String |
toString()
toString method -> getShortText()
|
public static final RoomCreationValidationErrors WRITE_PROTECT_MODE_ENABLED
public static final RoomCreationValidationErrors NAME_MISSING
public static final RoomCreationValidationErrors DESC_MISSING
public static final RoomCreationValidationErrors TEMPLATENAME_MISSING
public static final RoomCreationValidationErrors NO_SUCH_TEMPLATE
public static final RoomCreationValidationErrors CATEGORIES_MISSING
public static final RoomCreationValidationErrors OWNER_MISSING
public static final RoomCreationValidationErrors PRIVACY_MISSING
public static final RoomCreationValidationErrors NO_SUCH_PRIVACY
public static final RoomCreationValidationErrors STRICT_PRIVACY_VIOLATION
public static final RoomCreationValidationErrors INVALID_INITIAL_ROLE
public static final RoomCreationValidationErrors INVALID_USER_ROLE
public static final RoomCreationValidationErrors OWNER_ROLE_MISSING
public static final RoomCreationValidationErrors BAD_USER_ID
public static RoomCreationValidationErrors[] getErrors()
public String getShortText()
| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] KMC-COLL
|
[sap.com] tc/kmc/coll/room
|
api
|
EP-KM-CRS
|
Copyright 2021 SAP SE Complete Copyright Notice