Professional Documents
Culture Documents
SFDC 001
SFDC 001
pattern Pattern object Returns the Pattern object from which this Matcher
object was created.
region Integer start Matcher object Sets the limits of this Matcher object's region. The
region is the part of the input sequence that is
Integer end
searched to find a match. This method first resets
the Matcher object, then sets the region to start at
the index specified by start and end at the index
specified by end.
Depending on the transparency boundaries being
used, certain constructs such as anchors may behave
differently at or around the boundaries of the region.
See Using Regions and Using Bounds.
647
Reference Apex Classes
replaceFirst String s String Replaces the first subsequence of the input sequence
that matches the pattern with the replacement string
s.
648
Reference Apex Classes
reset String s Matcher Resets this Matcher object with the new input
sequence s. Resetting a Matcher object discards all
of its explicit state information.
start Integer Returns the start index of the first character of the
previous match.
start Integer groupIndex Integer Returns the start index of the subsequence captured
by the group specified by groupIndex during the
previous match operation. Captured groups are
indexed from left to right, starting at one. Group
zero denotes the entire pattern, so the expression
m.start(0) is equivalent to m.start().
useAnchoringBounds Boolean b Matcher object Sets the anchoring bounds of the region for the
Matcher object. By default, a Matcher object uses
anchoring bounds regions.
If you specify true for this method, the Matcher
object uses anchoring bounds. If you specify false,
non-anchoring bounds are used.
If a Matcher object uses anchoring bounds, the
boundaries of this Matcher object's region match
start and end of line anchors such as ^ and $.
For more information, see Using Bounds on page
641.
usePattern Pattern pattern Matcher object Changes the Pattern object that the Matcher object
uses to find matches. This method causes the
Matcher object to lose information about the groups
of the last match that occurred. The Matcher object's
position in the input is maintained.
649
Reference Publisher Action Classes
The publisher actions feature lets you create actions and add them to the Chatter publisher on the home page, the Chatter
tab, and record detail pages. It also allows you to customize the order in which the standard Chatter actions appear, including
Post, File, Link, and Poll.
There are two general types of actions: create actions and custom actions.
• Create actions let users create records. They’re different from the New button on object tabs and the Quick Create and
Create New features on the home page. Create actions respect your validation rules and field requiredness, and you can
choose each action’s fields.
• Custom actions are Visualforce pages with functionality you define. For example, you might create a custom action to let
users write comments longer than 1000 characters.
For both types of actions, you can create either object-specific actions or global actions.
This section contains information about the Apex classes for creating these actions—referred to as QuickActions in Apex.
For more information on publisher actions, see the online help.
See Also:
QuickAction Class
QuickAction.QuickActionRequest Class
QuickAction.QuickActionResult Class
QuickAction Class
Use Apex to request and process publisher actions on objects that allow custom fields, on objects that appear in a Chatter feed,
or are available globally.
Methods
The following are static methods of the QuickAction class.
650
Reference Apex Classes
Samples
In this sample, the trigger determines if the new contacts to be inserted are created by a quick action. If so, it sets the
WhereFrom__c custom field to a value that depends on whether the quick action is global or local to the contact. Otherwise,
if the inserted contacts don’t originate from a quick action, the WhereFrom__c field is set to 'NoAction'.
651