Package org.jenkinsci.plugins.pubsub
Class JobChannelMessage<T extends JobChannelMessage>
- java.lang.Object
-
- java.util.Dictionary<K,V>
-
- java.util.Hashtable<Object,Object>
-
- java.util.Properties
-
- org.jenkinsci.plugins.pubsub.Message
-
- org.jenkinsci.plugins.pubsub.JobChannelMessage<T>
-
- All Implemented Interfaces:
AccessControlled
,Serializable
,Cloneable
,Map
- Direct Known Subclasses:
JobMessage
,QueueTaskMessage
,RunMessage
public abstract class JobChannelMessage<T extends JobChannelMessage> extends Message
- Author:
- tom.fennelly@gmail.com
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.Properties
defaults
-
-
Constructor Summary
Constructors Constructor Description JobChannelMessage(Item jobChannelItem)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
checkPermission(Permission permission)
protected AccessControlled
getAccessControlled()
Get the JenkinsAccessControlled
object associated with this message.ACL
getACL()
String
getChannelName()
Get the channel name for the message.ParameterizedJobMixIn.ParameterizedJob
getJob()
Deprecated.Use #getJobChannelItem.Item
getJobChannelItem()
Get the JenkinsItem
associated with this message.String
getJobName()
protected Permission
getRequiredPermission()
Get the permission required to see the message.boolean
hasPermission(Permission permission)
Message
setChannelName(String name)
Set the channel name for the message.-
Methods inherited from class org.jenkinsci.plugins.pubsub.Message
clone, containsAll, get, get, getEventName, getEventUUID, getJenkinsInstanceId, getJenkinsInstanceUrl, getObjectId, getObjectName, getObjectType, getTimestamp, getTimestampMillis, set, set, setEventName, setEventName, setItemProps, setJenkinsInstanceId, toJSON, toJSON, toString
-
Methods inherited from class java.util.Properties
clear, compute, computeIfAbsent, computeIfPresent, contains, containsKey, containsValue, elements, entrySet, equals, forEach, get, getOrDefault, getProperty, getProperty, hashCode, isEmpty, keys, keySet, list, list, load, load, loadFromXML, merge, propertyNames, put, putAll, putIfAbsent, rehash, remove, remove, replace, replace, replaceAll, save, setProperty, size, store, store, storeToXML, storeToXML, storeToXML, stringPropertyNames, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, hasAnyPermission, hasPermission, hasPermission2
-
-
-
-
Constructor Detail
-
JobChannelMessage
public JobChannelMessage(@NonNull Item jobChannelItem)
-
-
Method Detail
-
getChannelName
public final String getChannelName()
Description copied from class:Message
Get the channel name for the message.- Overrides:
getChannelName
in classMessage
- Returns:
- The channel name for the message, or
null
if none set.
-
setChannelName
public final Message setChannelName(String name)
Description copied from class:Message
Set the channel name for the message.- Overrides:
setChannelName
in classMessage
- Parameters:
name
- The channel name for the message.
-
getJobName
public String getJobName()
-
getJobChannelItem
@CheckForNull public Item getJobChannelItem()
Get the JenkinsItem
associated with this message.
-
getJob
@Deprecated @CheckForNull public ParameterizedJobMixIn.ParameterizedJob getJob()
Deprecated.Use #getJobChannelItem.Get the JenkinsJob
associated with this message.
-
getAccessControlled
protected AccessControlled getAccessControlled()
Get the JenkinsAccessControlled
object associated with this message.- Returns:
- The Jenkins
AccessControlled
object associated with this message, or {code null} if the message is not associated with a JenkinsAccessControlled
.
-
getRequiredPermission
@NonNull protected Permission getRequiredPermission()
Get the permission required to see the message.- Returns:
- The permission required to see the message.
-
getACL
@NonNull public ACL getACL()
- Specified by:
getACL
in interfaceAccessControlled
-
checkPermission
public void checkPermission(@NonNull Permission permission) throws org.springframework.security.access.AccessDeniedException
- Specified by:
checkPermission
in interfaceAccessControlled
- Throws:
org.springframework.security.access.AccessDeniedException
-
hasPermission
public boolean hasPermission(@NonNull Permission permission)
- Specified by:
hasPermission
in interfaceAccessControlled
-
-