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 SummaryFields 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.SchedulerEntityACTION_AUDIT, ACTION_EXPORT, ACTION_READ, BEHAVIOR_DEPRECATED, BEHAVIOR_NONE, BEHAVIOR_SYSTEM
 
- 
 - 
Method SummaryAll 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.BusinessKeyObjectgetBusinessKey
 - 
Methods inherited from interface com.redwood.scheduler.api.model.PartitionableRootObjectgetPartition, setPartition
 - 
Methods inherited from interface com.redwood.scheduler.api.model.RootgetCreationTime, getLastModificationTime, getLastModifierSubject
 - 
Methods inherited from interface com.redwood.scheduler.api.model.SchedulerEntitycanPerform, 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_TYPEstatic final String OBJECT_TYPE String that will be returned fromSchedulerEntity.getObjectType()for "Credential" objects.- See Also:
- Constant Field Values
 
 - 
TYPEstatic final QueryObjectType<Credential> TYPE Type that can be used inSchedulerSession.executeObjectQuery(QueryObjectType, String, Object...).
 - 
SEC_PRIV_VIEWstatic 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_CREATEstatic final String SEC_PRIV_CREATE This privilege can be granted at a group level.- See Also:
- Constant Field Values
 
 - 
SEC_PRIV_EDITstatic 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_DELETEstatic 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_NONEstatic final String SEC_RANK_NONE This rank has no privileges assigned to it.- See Also:
- Constant Field Values
 
 - 
SEC_RANK_CREATEstatic final String SEC_RANK_CREATE This rank is made of the following privileges: create- See Also:
- Constant Field Values
 
 - 
SEC_RANK_VIEWstatic final String SEC_RANK_VIEW This rank is made of the following privileges: view- See Also:
- Constant Field Values
 
 - 
SEC_RANK_EDITstatic final String SEC_RANK_EDIT This rank is made of the following privileges: create , view , edit- See Also:
- Constant Field Values
 
 - 
SEC_RANK_DELETEstatic final String SEC_RANK_DELETE This rank is made of the following privileges: create , view , delete- See Also:
- Constant Field Values
 
 - 
SEC_RANK_ALLstatic final String SEC_RANK_ALL This rank is made of the following privileges: view , create , edit , delete- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getNameString 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.
 
 - 
getCommentString 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.
 
 - 
getDescriptionString 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.
 
 - 
getEndpointString 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.
 
 - 
getRealUserString 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.
 
 - 
getVirtualUserString 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.
 
 - 
getPasswordString 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.
 
 - 
isExternallyAvailableboolean 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.
 
 - 
setNamevoid 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 is- null, 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.
 
 - 
setCommentvoid 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.
 
 - 
setDescriptionvoid 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.
 
 - 
setEndpointvoid 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 is- null, 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.
 
 - 
setRealUservoid 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 is- null, 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.
 
 - 
setVirtualUservoid 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.
 
 - 
setPasswordvoid 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 is- null, 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.
 
 - 
setExternallyAvailablevoid 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.
 
 - 
getProtectedPasswordString 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 the- ExternallyAvailableflag set.
- com.redwood.scheduler.api.exception.CredentialEncodingException- Failed to encode/decode the credentials.
 
 - 
getCredentialProtocolCredentialProtocol 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.
 
 - 
setCredentialProtocolvoid 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 is- null, then the object cannot be persisted.
 
 - 
checkViewPrivilegeRequiredPermission 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.
 
 - 
checkCreatePrivilegeRequiredPermission 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.
 
 - 
checkEditPrivilegeRequiredPermission 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.
 
 - 
checkDeletePrivilegeRequiredPermission 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.
 
 
- 
 
-