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, DestinationAlreadyAssignedException, DestinationAlreadyRemovedException, EmbeddedGroupApplicationSubmissionError, EntityAlreadyAssignedException, EntityExistsException, EntityNotAssignedException, EntityNotExistsException, ExtendMembershipException, ExternallyManagedException, ExtSourceAlreadyRemovedException, ExtSourceUnsupportedOperationException, FacilityAlreadyAssigned, FacilityAlreadyRemovedException, GroupAlreadyAssignedException, GroupAlreadyRemovedException, GroupAlreadyRemovedFromResourceException, GroupMoveNotAllowedException, GroupNotAdminException, GroupNotAllowedToAutoRegistrationException, GroupNotDefinedOnResourceException, GroupNotEmbeddedException, GroupRelationAlreadyExists, GroupRelationCannotBeRemoved, GroupRelationDoesNotExist, GroupRelationNotAllowed, GroupResourceMismatchException, GroupResourceStatusException, GroupStructureSynchronizationAlreadyRunningException, GroupSynchronizationAlreadyRunningException, GroupSynchronizationNotEnabledException, HostAlreadyRemovedException, InvalidCertificateException, InvalidConsentStatusException, InvalidLoginException, InvalidSponsoredUserDataException, LoginExistsException, LoginNotExistsException, MemberAlreadyRemovedException, MemberGroupMismatchException, MemberLifecycleAlteringForbiddenException, MemberNotSponsoredException, MemberNotSuspendedException, MemberNotValidYetException, MemberResourceMismatchException, MultipleApplicationFormItemsException, NamespaceRulesNotExistsException, NotGroupMemberException, NotSpecificUserExpectedException, OwnerAlreadyAssignedException, OwnerAlreadyRemovedException, PasswordChangeFailedException, PasswordCreationFailedException, PasswordDeletionFailedException, PasswordDoesntMatchException, PasswordOperationTimeoutException, PasswordResetLinkExpiredException, PasswordResetLinkNotValidException, PasswordResetMailNotExistsException, PasswordStrengthException, PasswordStrengthFailedException, PerunBeanNotSupportedException, PolicyNotExistsException, PrivilegeException, RelationExistsException, RelationNotExistsException, ResourceAlreadyRemovedException, ResourceExistsException, RoleAlreadySetException, RoleCannotBeManagedException, RoleManagementRulesNotExistsException, RoleNotSetException, RoleNotSupportedException, ServiceAlreadyBannedException, ServiceAlreadyRemovedException, ServiceAlreadyRemovedFromServicePackageException, ServiceAttributesCannotExtend, SpecificUserAlreadyRemovedException, SpecificUserExpectedException, SpecificUserMustHaveOwnerException, SpecificUserOwnerAlreadyRemovedException, SponsorshipDoesNotExistException, 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

    • 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
    • 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
    • getName

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