Class PerunException

java.lang.Object
java.lang.Throwable
java.lang.Exception
cz.metacentrum.perun.core.api.exceptions.PerunException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AlreadyAdminException, AlreadyMemberException, AlreadyReservedLoginException, AlreadySponsoredMemberException, AlreadySponsorException, AnonymizationNotSupportedException, AttributeAlreadyMarkedUniqueException, AttributeNotMarkedUniqueException, AttributeValueException, ConsentExistsException, ConsentHubAlreadyRemovedException, DeletionNotSupportedException, DestinationAlreadyAssignedException, DestinationAlreadyRemovedException, EmbeddedGroupApplicationSubmissionError, EntityAlreadyAssignedException, EntityExistsException, EntityNotAssignedException, EntityNotExistsException, ExpiredTokenException, ExtendMembershipException, ExternallyManagedException, ExtSourceAlreadyRemovedException, ExtSourceUnsupportedOperationException, FacilityAlreadyAssigned, FacilityAlreadyRemovedException, FacilityMismatchException, ForceServicePropagationDisabledException, FormItemNotExistsException, GroupAlreadyAssignedException, GroupAlreadyRemovedException, GroupAlreadyRemovedFromResourceException, GroupGroupMismatchException, GroupIsNotASubgroupException, GroupMoveNotAllowedException, GroupNotAdminException, GroupNotAllowedToAutoRegistrationException, GroupNotDefinedOnResourceException, GroupNotEmbeddedException, GroupRelationAlreadyExists, GroupRelationCannotBeRemoved, GroupRelationDoesNotExist, GroupRelationNotAllowed, GroupResourceMismatchException, GroupResourceStatusException, GroupStructureSynchronizationAlreadyRunningException, GroupSynchronizationAlreadyRunningException, GroupSynchronizationNotEnabledException, HostAlreadyRemovedException, InvalidCertificateException, InvalidConsentStatusException, InvalidLoginException, InvalidSponsoredUserDataException, LoginExistsException, LoginIsAlreadyBlockedException, LoginIsNotBlockedException, LoginNotExistsException, MemberAlreadyRemovedException, MemberGroupMismatchException, MemberLifecycleAlteringForbiddenException, MemberNotSponsoredException, MemberNotSuspendedException, MemberNotValidYetException, MemberResourceMismatchException, MFAuthenticationException, MultipleApplicationFormItemsException, NamespaceRulesNotExistsException, NotGroupMemberException, NotificationMemberMailNotExistsException, NotSpecificUserExpectedException, ObjectIDMismatchException, OidcConfigFileNotExistsException, OidcConfigNotExistsException, OpenApplicationExistsException, OwnerAlreadyAssignedException, OwnerAlreadyRemovedException, PasswordChangeFailedException, PasswordCreationFailedException, PasswordDeletionFailedException, PasswordDoesntMatchException, PasswordOperationTimeoutException, PasswordResetLinkExpiredException, PasswordResetLinkNotValidException, PasswordStrengthException, PasswordStrengthFailedException, PerunBeanNotSupportedException, PolicyNotExistsException, PrivilegeException, RelationExistsException, RelationNotExistsException, ResourceAlreadyRemovedException, ResourceExistsException, RoleAlreadySetException, RoleCannotBeManagedException, RoleCannotBeSetException, RoleManagementRulesNotExistsException, RoleNotSetException, RoleNotSupportedException, RoleObjectCombinationInvalidException, ServiceAlreadyBannedException, ServiceAlreadyRemovedException, ServiceAlreadyRemovedFromServicePackageException, ServiceAttributesCannotExtend, ServiceIsNotBannedException, SpecificUserAlreadyRemovedException, SpecificUserExpectedException, SpecificUserMustHaveOwnerException, SpecificUserOwnerAlreadyRemovedException, SponsorshipDoesNotExistException, SSHKeyNotValidException, SubGroupCannotBeRemovedException, TaskStoreException, UserAlreadyBlacklistedException, UserAlreadyRemovedException, UserExtSourceAlreadyRemovedException, UserNotAdminException, UserNotInRoleException, WrongAttributeAssignmentException, WrongPatternException

public abstract class PerunException extends Exception
The base of Perun checked exceptions.
Author:
Martin Kuba
See Also:
  • Constructor Details

    • PerunException

      public PerunException()
      Constructor with no parameters
    • PerunException

      public PerunException(String message)
      Simple constructor with a message
      Parameters:
      message - message with details about the cause
    • PerunException

      public PerunException(String message, Throwable cause)
      Constructor with a message and Throwable object
      Parameters:
      message - message with details about the cause
      cause - Throwable that caused throwing of this exception
    • PerunException

      public PerunException(Throwable cause)
      Constructor with a Throwable object
      Parameters:
      cause - Throwable that caused throwing of this exception
  • Method Details

    • getErrorId

      public String getErrorId()
      Getter for the errorId
      Returns:
      id of the error
    • setErrorId

      public void setErrorId(String errorId)
      Setter for the errorId
      Parameters:
      errorId - id of the error
    • getFriendlyMessageTemplate

      public String getFriendlyMessageTemplate()
      Return template of a message that is more user friendly and can be displayed in GUI. If an exception doesn't implement this message, returns null as default.

      There can be used placeholder in the template, using format '%{field}%' (e.g.: '%{invalidGroup}%') where the 'group' should be a field of the given exception, that can be accessed.

      Returns:
      template of a friendly message or null, if no template is defined for given exception
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • getName

      public String getName()
      Getter for the class name
      Returns:
      class simpleName