Interface Credential

    • 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 be null if 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 be null if 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 be null if 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 be null if 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 the getProtectedPassword() and SchedulerSession.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 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.
      • 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 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.
      • 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 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.
      • 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 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.
      • 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 the getProtectedPassword() and SchedulerSession.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 the SchedulerSession.unprotectPassword(String) method. This returns an encrypted version of the password that is valid for this server only. It can be passed to SchedulerSession.unprotectPassword(String) only. It can be called only on those credentials that have the ExternallyAvailable flag 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 ExternallyAvailable flag 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 is null, then the object cannot be persisted.
      • checkViewPrivilege

        RequiredPermission checkViewPrivilege()
        Check whether or not the view action can be performed on this object.
        Returns:
        a RequiredPermission instance 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 RequiredPermission instance 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 RequiredPermission instance 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 RequiredPermission instance indicating whether the current user has the privilege. To check this, use isAllowed() on the returned permission.