Package com.redwood.scheduler.api.model
Interface Credential
-
- All Superinterfaces:
BusinessKeyObject,PartitionableRootObject,Root,SchedulerEntity,SchedulerEntityComp
public interface Credential extends PartitionableRootObject, BusinessKeyObject
A Credential for a given protocol, endpoint and user to enable access to an external system.
-
-
Field Summary
Fields Modifier and Type Field Description static StringOBJECT_TYPEString that will be returned fromSchedulerEntity.getObjectType()for "Credential" objects.static StringSEC_PRIV_CREATEThis privilege can be granted at a group level.static StringSEC_PRIV_DELETEThis privilege can be granted at a group level.static StringSEC_PRIV_EDITThis privilege can be granted at a group level.static StringSEC_PRIV_VIEWThis privilege can be granted at a group level.static StringSEC_RANK_ALLThis rank is made of the following privileges: view , create , edit , deletestatic StringSEC_RANK_CREATEThis rank is made of the following privileges: createstatic StringSEC_RANK_DELETEThis rank is made of the following privileges: create , view , deletestatic StringSEC_RANK_EDITThis rank is made of the following privileges: create , view , editstatic StringSEC_RANK_NONEThis rank has no privileges assigned to it.static StringSEC_RANK_VIEWThis rank is made of the following privileges: viewstatic QueryObjectType<Credential>TYPEType that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...).-
Fields inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
ACTION_AUDIT, ACTION_EXPORT, ACTION_READ, BEHAVIOR_DEPRECATED, BEHAVIOR_NONE, BEHAVIOR_SYSTEM
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RequiredPermissioncheckCreatePrivilege()Check whether or not the create action can be performed on this object.RequiredPermissioncheckDeletePrivilege()Check whether or not the delete action can be performed on this object.RequiredPermissioncheckEditPrivilege()Check whether or not the edit action can be performed on this object.RequiredPermissioncheckViewPrivilege()Check whether or not the view action can be performed on this object.StringgetComment()Get the value for Comment.CredentialProtocolgetCredentialProtocol()Get the CredentialProtocol.StringgetDescription()Get the value for Description.StringgetEndpoint()Get the value for Endpoint.StringgetName()Get the value for Name.StringgetPassword()Get the value for Password.StringgetProtectedPassword()Get a version of the password that can be decrypted using theSchedulerSession.unprotectPassword(String)method.StringgetRealUser()Get the value for RealUser.StringgetVirtualUser()Get the value for VirtualUser.booleanisExternallyAvailable()Get the value for ExternallyAvailable.voidsetComment(String newComment)Set the value for Comment.voidsetCredentialProtocol(CredentialProtocol newCredentialProtocol)Set the value for CredentialProtocol.voidsetDescription(String newDescription)Set the value for Description.voidsetEndpoint(String newEndpoint)Set the value for Endpoint.voidsetExternallyAvailable(boolean newExternallyAvailable)Set the value for ExternallyAvailable.voidsetName(String newName)Set the value for Name.voidsetPassword(String newPassword)Set the value for Password.voidsetRealUser(String newRealUser)Set the value for RealUser.voidsetVirtualUser(String newVirtualUser)Set the value for VirtualUser.-
Methods inherited from interface com.redwood.scheduler.api.model.BusinessKeyObject
getBusinessKey
-
Methods inherited from interface com.redwood.scheduler.api.model.PartitionableRootObject
getPartition, setPartition
-
Methods inherited from interface com.redwood.scheduler.api.model.Root
getCreationTime, getLastModificationTime, getLastModifierSubject
-
Methods inherited from interface com.redwood.scheduler.api.model.SchedulerEntity
canPerform, createSubjectObjectPrivilegeGrant, deleteObject, getAuditTrail, getAuditTrailSize, getBehavior, getEffectiveBehavior, getErrorNameEN, getErrorNameKey, getLLPVersion, getLOV, getLOVSupport, getObjectType, getParentSchedulerEntities, getRuntime, getSubjectObjectPrivilegeGrantBySubject, getSubjectObjectPrivilegeGrants, getUniqueId, getUrl, getUrl, isCreated, isDeletable, isDeleted, isModifiable, isModified, isSelectVersioned, processRelatedObjects, processRelatedObjects, processRelatedObjects, refreshObject, resetObject, resetObject, resetValuesToDefault, selectForRead
-
-
-
-
Field Detail
-
OBJECT_TYPE
static final String OBJECT_TYPE
String that will be returned fromSchedulerEntity.getObjectType()for "Credential" objects.- See Also:
- Constant Field Values
-
TYPE
static final QueryObjectType<Credential> TYPE
Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...).
-
SEC_PRIV_VIEW
static final String SEC_PRIV_VIEW
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_PRIV_CREATE
static final String SEC_PRIV_CREATE
This privilege can be granted at a group level.- See Also:
- Constant Field Values
-
SEC_PRIV_EDIT
static final String SEC_PRIV_EDIT
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_PRIV_DELETE
static final String SEC_PRIV_DELETE
This privilege can be granted at a group level. This privilege can be granted at an instance level.- See Also:
- Constant Field Values
-
SEC_RANK_NONE
static final String SEC_RANK_NONE
This rank has no privileges assigned to it.- See Also:
- Constant Field Values
-
SEC_RANK_CREATE
static final String SEC_RANK_CREATE
This rank is made of the following privileges: create- See Also:
- Constant Field Values
-
SEC_RANK_VIEW
static final String SEC_RANK_VIEW
This rank is made of the following privileges: view- See Also:
- Constant Field Values
-
SEC_RANK_EDIT
static final String SEC_RANK_EDIT
This rank is made of the following privileges: create , view , edit- See Also:
- Constant Field Values
-
SEC_RANK_DELETE
static final String SEC_RANK_DELETE
This rank is made of the following privileges: create , view , delete- See Also:
- Constant Field Values
-
SEC_RANK_ALL
static final String SEC_RANK_ALL
This rank is made of the following privileges: view , create , edit , delete- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
String getName()
Get the value for Name. (Returns the concatenation of RealUser-EndPoint-CredentialProtocol.Name) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
getComment
String getComment()
Get the value for Comment. (Optional comment)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
getDescription
String getDescription()
Get the value for Description. (Optional description)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
getEndpoint
String getEndpoint()
Get the value for Endpoint. (Endpoint is the target for the connection.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
getRealUser
String getRealUser()
Get the value for RealUser. (The real user name.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
getVirtualUser
String getVirtualUser()
Get the value for VirtualUser. (The virtual user name.)- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
getPassword
String getPassword()
Get the value for Password. (The password for a connection. Encrypted when stored.) This value is mandatory, and therefore will not benullif this object has been retrieved from the database.- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
isExternallyAvailable
boolean isExternallyAvailable()
Get the value for ExternallyAvailable. ( Whether this credential can be requested using API calls. If this flag is not set or false the credentials are only available to internal mechanisms such as 'RunAs' fields. If this flag is true the credentials can be used by customer code that can request the (encrypted) privileged information, through a combination of thegetProtectedPassword()andSchedulerSession.unprotectPassword(String)methods. )- Returns:
- the field
- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
setName
void setName(String newName)
Set the value for Name. (Returns the concatenation of RealUser-EndPoint-CredentialProtocol.Name) This value is mandatory.- Parameters:
newName- the new value for Name. If this isnull, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
setComment
void setComment(String newComment)
Set the value for Comment. (Optional comment) This value is optional.- Parameters:
newComment- the new value for Comment.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
setDescription
void setDescription(String newDescription)
Set the value for Description. (Optional description) This value is optional.- Parameters:
newDescription- the new value for Description.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
setEndpoint
void setEndpoint(String newEndpoint)
Set the value for Endpoint. (Endpoint is the target for the connection.) This value is mandatory.- Parameters:
newEndpoint- the new value for Endpoint. If this isnull, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
setRealUser
void setRealUser(String newRealUser)
Set the value for RealUser. (The real user name.) This value is mandatory.- Parameters:
newRealUser- the new value for RealUser. If this isnull, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
setVirtualUser
void setVirtualUser(String newVirtualUser)
Set the value for VirtualUser. (The virtual user name.) This value is optional.- Parameters:
newVirtualUser- the new value for VirtualUser.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
setPassword
void setPassword(String newPassword)
Set the value for Password. (The password for a connection. Encrypted when stored.) This value is mandatory.- Parameters:
newPassword- the new value for Password. If this isnull, then the object cannot be persisted.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
setExternallyAvailable
void setExternallyAvailable(boolean newExternallyAvailable)
Set the value for ExternallyAvailable. ( Whether this credential can be requested using API calls. If this flag is not set or false the credentials are only available to internal mechanisms such as 'RunAs' fields. If this flag is true the credentials can be used by customer code that can request the (encrypted) privileged information, through a combination of thegetProtectedPassword()andSchedulerSession.unprotectPassword(String)methods. )- Parameters:
newExternallyAvailable- the new value for ExternallyAvailable.- Throws:
com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- This will be thrown if this method is called while the object is not attached to a session.
-
getProtectedPassword
String getProtectedPassword() throws com.redwood.scheduler.api.exception.CredentialNotExternallyAvailableException, com.redwood.scheduler.api.exception.CredentialEncodingException
Get a version of the password that can be decrypted using theSchedulerSession.unprotectPassword(String)method. This returns an encrypted version of the password that is valid for this server only. It can be passed toSchedulerSession.unprotectPassword(String)only. It can be called only on those credentials that have theExternallyAvailableflag set.- Returns:
- The protected (encrypted) version of the password
- Throws:
com.redwood.scheduler.api.exception.CredentialNotExternallyAvailableException-Credential.getProtectedPassword()may only called for credentials with theExternallyAvailableflag set.com.redwood.scheduler.api.exception.CredentialEncodingException- Failed to encode/decode the credentials.
-
getCredentialProtocol
CredentialProtocol getCredentialProtocol()
Get the CredentialProtocol.- Returns:
- CredentialProtocol
- Throws:
com.redwood.scheduler.api.exception.ObjectDeletedException- If this method is called when the object has been marked for deletion.com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException- If this method is called when the object has been removed from it's session.
-
setCredentialProtocol
void setCredentialProtocol(CredentialProtocol newCredentialProtocol)
Set the value for CredentialProtocol. This value is mandatory.- Parameters:
newCredentialProtocol- is the object to set CredentialProtocol to. What protocol is used for the credential? If this isnull, then the object cannot be persisted.
-
checkViewPrivilege
RequiredPermission checkViewPrivilege()
Check whether or not the view action can be performed on this object.- Returns:
- a
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkCreatePrivilege
RequiredPermission checkCreatePrivilege()
Check whether or not the create action can be performed on this object.- Returns:
- a
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkEditPrivilege
RequiredPermission checkEditPrivilege()
Check whether or not the edit action can be performed on this object.- Returns:
- a
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
checkDeletePrivilege
RequiredPermission checkDeletePrivilege()
Check whether or not the delete action can be performed on this object.- Returns:
- a
RequiredPermissioninstance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.
-
-