Sequenceablepublic class MatchingSkills extends Object implements Sequenceable
MatchingSkills includes the following filters: event as an intent action standing for
a common event, entity as a category, scheme as a filter for matching certain common events
such as bundle installation and uninstallation, and IntentParams as extra parameters.
You can use addEvent(java.lang.String), addEntity(java.lang.String), addScheme(java.lang.String),
and setIntentParams(ohos.aafwk.content.IntentParams) to set these filters.
MatchingSkills information is defined in the <skills></skills> tag of config.json.
An Intent matches a MatchingSkills object only when the action and all entities
defined in the Intent match the event and all entities in the MatchingSkills object.
Match of event -- Events match only if the action attribute of an Intent matches an
event specified in the MatchingSkills object.
Match of entities -- Entities match only if all entity attributes of an Intent match
all entities specified in the MatchingSkills object.
SystemCapability.Notification#CESSequenceable.Producer<T>| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static Sequenceable.Producer<MatchingSkills> |
PRODUCER |
Creates a
MatchingSkills instance from a Parcel. |
| 构造器 | 说明 |
|---|---|
MatchingSkills() |
A constructor used to create an empty
MatchingSkills instance. |
MatchingSkills(MatchingSkills matchingSkills) |
A constructor used to create a
MatchingSkills instance by using the parameters of an existing
MatchingSkills object. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
void |
addEntity(String entity) |
Adds an entity to this
MatchingSkills object. |
void |
addEvent(String event) |
Adds an event to this
MatchingSkills object. |
void |
addScheme(String scheme) |
Adds a scheme to the scheme list if the scheme is not included.
|
boolean |
marshalling(Parcel out) |
Marshals this
MatchingSkills object into a Parcel. |
void |
setIntentParams(IntentParams intentParams) |
Sets an
IntentParams object in this MatchingSkills object. |
boolean |
unmarshalling(Parcel in) |
Unmarshals this
MatchingSkills object from a Parcel. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasFileDescriptorpublic static final Sequenceable.Producer<MatchingSkills> PRODUCER
MatchingSkills instance from a Parcel.public MatchingSkills()
MatchingSkills instance.public MatchingSkills(MatchingSkills matchingSkills)
MatchingSkills instance by using the parameters of an existing
MatchingSkills object.matchingSkills - Indicates the existing MatchingSkills object.public void addEntity(String entity)
MatchingSkills object.
If the entity list is null, this method will initialize the entity list first.
Note: Entities are case sensitive. Maintain consistency when specifying the entity.
entity - Indicates the entity to add.public void addEvent(String event)
MatchingSkills object.
If the event list is null, this method will initialize the event list first.
Note: Events are case sensitive. Maintain consistency when specifying the event.
event - Indicates the event to add.public void addScheme(String scheme)
If no scheme has been added to the scheme list, scheme matching will be skipped during URI matching. If the scheme list is null, this method will initialize the list first.
Note: Scheme names are case sensitive. Maintain consistency when specifying the scheme name.
scheme - Indicates the scheme to add.public void setIntentParams(IntentParams intentParams)
IntentParams object in this MatchingSkills object.intentParams - Indicates the IntentParams object.public boolean marshalling(Parcel out)
MatchingSkills object into a Parcel.
Fields in the MatchingSkills object are marshalled separately. If any field fails to be marshalled,
false is returned.
marshalling 在接口中 Sequenceableout - Indicates the Parcel object for marshalling.true if the marshalling is successful; returns false otherwise.public boolean unmarshalling(Parcel in)
MatchingSkills object from a Parcel.
Fields in the MatchingSkills object are unmarshalled separately.
If any field fails to be unmarshalled, false is returned.
unmarshalling 在接口中 Sequenceablein - Indicates the Parcel object for unmarshalling.true if the unmarshalling is successful; returns false otherwise.