Class MonitorEvent

    • Field Detail

      • id

        protected java.lang.String id
    • Constructor Detail

    • Method Detail

      • validateLocalId

        protected void validateLocalId​(java.lang.String localId)
                                throws PortalException
        Validates the part of the identifier without the service instance identifier prefix, when the element belongs to a service instance.
        Parameters:
        localId - the part of the identifier without the service instance identifier prefix.
        Throws:
        PortalException - if the validation fails.
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: IMonitorEvent
        Returns if the monitoring for this event is enabled.
        Specified by:
        isEnabled in interface IMonitorEvent
        Returns:
        true if enabled or false if disabled.
      • setEnabled

        public IMonitorEventSPI setEnabled​(boolean enabled)
        Description copied from interface: IMonitorEventSPI
        Enables or disables the monitoring of this event.
        Specified by:
        setEnabled in interface IMonitorEventSPI
        Parameters:
        enabled - true to enable or false to disable.
        Returns:
        this event for chaining.
      • getStringResourcePath

        public java.lang.String getStringResourcePath()
        Description copied from interface: IMonitorEvent
        The string resource path for localizing this event's strings.
        Specified by:
        getStringResourcePath in interface IMonitorEvent
        Returns:
        the string resource path.
      • getFields

        public java.util.Collection<IMonitorFieldInstance> getFields()
        Description copied from interface: IMonitorEvent
        Returns an unmodifiable collection of the fields that should be collected for this event.
        Specified by:
        getFields in interface IMonitorEvent
        Returns:
        an unmodifiable collection of the fields that should be collected for this event.
      • addField

        public IMonitorEventSPI addField​(IMonitorField field,
                                         boolean required)
        Description copied from interface: IMonitorEventSPI
        Adds the given field in this event.
        Specified by:
        addField in interface IMonitorEventSPI
        Parameters:
        field - the field.
        required - indicates whether the given field is required.
        Returns:
        this event for chaining.
      • addFieldGroup

        public IMonitorEventSPI addFieldGroup​(IMonitorFieldGroup fieldGroup,
                                              boolean required)
        Description copied from interface: IMonitorEventSPI
        Adds the given field group in this event.
        Specified by:
        addFieldGroup in interface IMonitorEventSPI
        Parameters:
        fieldGroup - the field group
        required - indicates whether the fields of the given field group are required.
        Returns:
        this event for chaining.
      • setStandard

        public IMonitorEventSPI setStandard​(boolean isStandard)
        Description copied from interface: IMonitorEventSPI
        Sets this event either as standard or custom (non-standard).
        Specified by:
        setStandard in interface IMonitorEventSPI
        Parameters:
        isStandard - true to mark this event as standard, false to custom.
        Returns:
        this event for chaining.
      • setProcessActionEvent

        public IMonitorEventSPI setProcessActionEvent​(boolean isProcessActionEvent)
        Description copied from interface: IMonitorEventSPI
        Sets this event either as process action event or a normal one.
        Specified by:
        setProcessActionEvent in interface IMonitorEventSPI
        Parameters:
        isProcessActionEvent - true to mark this event as a process action one.
        Returns:
        this event for chaining.
      • isProcessActionEvent

        public boolean isProcessActionEvent()
        Description copied from interface: IMonitorEventSPI
        Returns if the event is a process action event.
        Specified by:
        isProcessActionEvent in interface IMonitorEventSPI
        Returns:
        if the event is a process action event
      • getDirectFields

        public java.util.Collection<IMonitorFieldInstance> getDirectFields()
        Description copied from interface: IMonitorEventSPI
        Returns the fields that are associated with this event directly (not through a field group).
        Specified by:
        getDirectFields in interface IMonitorEventSPI
        Returns:
        the fields that are associated with this event directly (not through a field group).
      • removeDirectFields

        public IMonitorEventSPI removeDirectFields​(java.util.Collection<java.lang.String> fieldsIds)
        Removes the direct fields that has their ids in the given ids collection.
        Parameters:
        fieldsIds - the identifiers of the fields to be removed
        Returns:
        this event for chaining
        Since:
        14.0.0
      • removeFieldsGroups

        public IMonitorEventSPI removeFieldsGroups​(java.util.Collection<java.lang.String> fieldsGroupsIds)
        Removes the fields groups that has their ids in the given ids collection.
        Parameters:
        fieldsGroupsIds - the identifiers of the fields groups to be removed
        Returns:
        this event for chaining
        Since:
        14.0.0
      • getLocalizedDescription

        public java.lang.String getLocalizedDescription()
        Description copied from interface: IMonitorEvent
        Returns the localized description of this event.
        Specified by:
        getLocalizedDescription in interface IMonitorEvent
        Returns:
        the description of this event.
      • getLocalizedName

        public java.lang.String getLocalizedName()
        Description copied from interface: IMonitorEvent
        Returns the localized name of this event.
        Specified by:
        getLocalizedName in interface IMonitorEvent
        Returns:
        the name for this event.
      • getImage

        public java.lang.String getImage()
        Description copied from interface: IMonitorEvent
        Returns the image.
        Specified by:
        getImage in interface IMonitorEvent
        Returns:
        the image
      • getVerb

        public java.lang.String getVerb()
        Description copied from interface: IMonitorEvent
        Returns the verb.
        Specified by:
        getVerb in interface IMonitorEvent
        Returns:
        the verb.
      • getLocalizedVerb

        public java.lang.String getLocalizedVerb()
        Description copied from interface: IMonitorEvent
        Returns the localized verb of this event.
        Specified by:
        getLocalizedVerb in interface IMonitorEvent
        Returns:
        the verb for this event.
      • getId

        public java.lang.String getId()
        Returns the identifier of this element.
        Returns:
        the identifier.
        Since:
        14.0.0
      • getServiceInstanceId

        public java.lang.String getServiceInstanceId()
        Returns the identifier of the service instance this element belongs to.
        Returns:
        the identifier of the service instance this element belongs to or null if this element is global.
        Since:
        14.0.0