Apex: New and Changed Classes and Interfaces

These classes and interfaces are new or have changed.

New Apex Classes

These classes were introduced in this release.
Classes in the Metadata Namespace
AnalyticsCloudComponentLayoutItem Class
The new Metadata.AnalyticsCloudComponentLayoutItem class represents the settings for a Wave Analytics dashboard on a standard or custom layout page. Use this class when accessing org metadata via Apex.
ConsoleComponent Class
The new Metadata.ConsoleComponent class represents a custom console component on a section of a layout. Use this class when accessing org metadata via Apex.
Container Class
The new Metadata.Container class represents a location and style in which to display more than one custom console component in the sidebars of the console. Use this class when accessing org metadata via Apex.
CustomConsoleComponents Class
The new Metadata.ConsoleComponents class represents custom console components on a page layout. Use this class when accessing org metadata via Apex.
CustomMetadata Class
The new Metadata.CustomMetadata class represents records of custom metadata types. Use this class when accessing org metadata via Apex.
CustomMetadataValue Class
The new Metadata.CustomMetadataValue class represents custom metadata values for a custom metadata component. Use this class when accessing org metadata via Apex.
DeployCallbackContext Class
The new Metadata.DeployCallbackContext class represents context information for a deployment job. Use this class when accessing org metadata via Apex.
DeployContainer Class
The new Metadata.DeployContainer class represents a container for custom metadata components to be deployed. Use this class when accessing org metadata via Apex.
DeployDetails Class
The new Metadata.DeployDetails class contains detailed information for components after a deployment. Use this class when accessing org metadata via Apex.
DeployMessage Class
The new Metadata.DeployMessage class represents result information for the deployment of a metadata component. Use this class when accessing org metadata via Apex.
DeployResult Class
The new Metadata.DeployResult class represents overall result information for the deployment of a metadata component. Use this class when accessing org metadata via Apex.
FeedLayout Class
The new Metadata.FeedLayout class represents the values that define the feed view of a feed-based page layout. Use this class when accessing org metadata via Apex.
FeedLayoutComponent Class
The new Metadata.FeedLayoutComponent class represents a component in the feed view of a feed-based page layout. Use this class when accessing org metadata via Apex.
FeedLayoutFilter Class
The new Metadata.FeedLayoutFilter class represents a feed filter option in the feed view of a feed-based page layout. Use this class when accessing org metadata via Apex.
Layout Class
The new Metadata.Layout class represents the metadata associated with a page layout. Use this class when accessing org metadata via Apex.
LayoutColumn Class
The new Metadata.LayoutColumn class represents the items in a column within a layout section. Use this class when accessing org metadata via Apex.
LayoutItem Class
The new Metadata.LayoutItem class represents the valid values that define a layout item. Use this class when accessing org metadata via Apex.
LayoutSection Class
The new Metadata.LayoutSection class represents a section of a page layout. Use this class when accessing org metadata via Apex.
Metadata Class
The new Metadata.Metadata class is an abstract base class that represents a custom metadata component. Use this class when accessing org metadata via Apex.
MetadataValue Class
The new Metadata.MetadataValue class is an abstract base class that represents a custom metadata component field. Use this class when accessing org metadata via Apex.
MiniLayout Class
The new Metadata.MiniLayout class represents a mini view of a record in the Console tab, hover details, and event overlays. Use this class when accessing org metadata via Apex.
Operations Class
The new Metadata.Operations class represents a class used to execute metadata operations, such as retrieving or deploying custom metadata. Use this class when accessing org metadata via Apex.
PlatformActionList Class
The new Metadata.PlatformActionList class represents the list of actions, and their order, that display in the Salesforce1 action bar for the layout. Use this class when accessing org metadata via Apex.
PlatformActionListItem Class
The new Metadata.PlatformActionListItem class represents an action in the platform action list for a layout. Use this class when accessing org metadata via Apex.
PrimaryTabComponents Class
The new Metadata.PrimaryTabComponents class represents custom console components on primary tabs. Use this class when accessing org metadata via Apex.
ProjectionNode Class
The new Wave.ProjectionNode class is used with the QueryBuilder class to construct well-formed SAQL queries. Use this class when querying data in Wave Analytics via Apex.
QueryBuilder Class
The new Wave.QueryBuilder class provides methods for building SAQL queries. Use this class when querying data in Wave Analytics via Apex.
QueryNode Class
The new Wave.QueryNode class is used with the QueryBuilder class to construct well-formed SAQL queries. Use this class when querying data in Wave Analytics via Apex.
QuickActionList Class
The new Metadata.QuickActionList class represents the list of actions associated with the page layout. Use this class when accessing org metadata via Apex.
QuickActionListItem Class
The new Metadata.QuickActionListItem class represents an action in QuickActionList. Use this class when accessing org metadata via Apex.
RelatedContent Class
The new Metadata.RelatedContent class represents the Mobile Cards section of the page layout. Use this class when accessing org metadata via Apex.
RelatedContentItem Class
The new Metadata.RelatedContentItem class represents an individual item in RelatedContent. Use this class when accessing org metadata via Apex.
RelatedList Class
The new Metadata.RelatedList class represents related list custom components on the sidebars of the Salesforce console. Use this class when accessing org metadata via Apex.
RelatedListItem Class
The new Metadata.RelatedListItem class represents an item in the related list in a page layout. Use this class when accessing org metadata via Apex.
ReportChartComponentLayoutItem Class
The new Metadata.ReportChartComponentLayoutItem class represents the settings for a report chart on a standard or custom page. Use this class when accessing org metadata via Apex.
SidebarComponent Class
The new Metadata.SidebarComponent class represents a specific custom console component to display in a container that hosts multiple components in one of the sidebars of the Salesforce console. Use this class when accessing org metadata via Apex.
SubtabComponents Class
The new Metadata.SubtabComponents class represents custom console components on subtabs in the Salesforce console. Use this class when accessing org metadata via Apex.
SummaryLayout Class
The new Metadata.SummaryLayout class controls the appearance of the highlights panel in a page layout. Use this class when accessing org metadata via Apex.
SummaryLayoutItem Class
The new Metadata.SummaryLayoutItem class controls the appearance of an individual field and its column and row position within the highlights panel grid. Use this class when accessing org metadata via Apex.

Changed Apex Classes

These existing classes have new or changed methods or constants.
Messaging.EmailFileAttachment Class
New Property
id
Read-Only. Gets the attachment ID.
Schema.DescribeFieldResult Class
New Method
isSearchPrefilterable()
Returns true if a foreign key can be included in prefiltering when used in a SOSL WHERE clause, false otherwise.
Cache.Org Class
New Methods
get(cacheBuilder, key)
Returns the cached value corresponding to the specified key from the org cache. Use this method if your cached value is a class that implements the CacheBuilder interface.
remove(cacheBuilder, key)
Deletes the cached value corresponding to the specified key from the org cache. Use this method if your cached value is a class that implements the CacheBuilder interface.
Cache.Partition Class
New Methods
get(cacheBuilder, key)
Returns the cached value corresponding to the specified key from the partition cache. Use this method if your cached value is a class that implements the CacheBuilder interface.
remove(cacheBuilder, key)
Deletes the cached value corresponding to the specified key from the partition cache. Use this method if your cached value is a class that implements the CacheBuilder interface.
validateCacheBuilder(cacheBuilder)

Validates that the specified class implements the CacheBuilder interface.

Cache.Session Class
New Methods
get(cacheBuilder, key)
Returns the cached value corresponding to the specified key from the session cache. Use this method if your cached value is a class that implements the CacheBuilder interface.
remove(cacheBuilder, key)
Deletes the cached value corresponding to the specified key from the session cache. Use this method if your cached value is a class that implements the CacheBuilder interface.
System.Messaging Class
New Methods
extractInboundEmail(source, includeForwardedAttachments)
Use this method in your email service code to control how to parse and process forwarded or attached emails. Returns an instance of Messaging.InboundEmail from a stream of data that is in RFC822 format. The data stream can be a forwarded email in an attachment to an existing InboundEmail, or a stream from another source.
renderStoredEmailTemplate(templateId, whoId, whatId, attachmentRetrievalOption)
Renders a text, custom, HTML, or Visualforce email template that exists in the database into an instance of Messaging.SingleEmailMessage. Provides options for including attachment metadata only, attachment metadata and content, or excluding attachments.
System.PageReference Class
New Methods
forResource(resourceName, path)
Create a PageReference for nested content inside a zip static resource, by name and path.
forResource(resourceName)
Create a PageReference for a static resource, by name.
System.Site Class
New Method
getExperienceId()
Returns the value of the experience ID (expid). This expid value comes from a cookie in the user's web browser.

New Apex Enums

These enumerations were introduced in this release.
Messaging.AttachmentRetrievalOptionEnum Enum
Provides options for including attachment metadata only, attachment metadata and content, or excluding attachments.
Metadata.DeployProblemType Enum
Describes the problem type for an unsuccessful component deploy. Use this enum when accessing org metadata via Apex.
Metadata.DeployStatus Enum
The result status values for a deployment. Use this enum when accessing org metadata via Apex.
Metadata.FeedItemTypeEnum Enum
The type of feed item in a feed-based page layout. Use this enum when accessing org metadata via Apex.
Metadata.FeedLayoutComponentType Enum
The type of feed layout component. Use this enum when accessing org metadata via Apex.
Metadata.FeedLayoutFilterPosition Enum
Describes where the feed filters list is included in the layout. Use this enum when accessing org metadata via Apex.
Metadata.FeedLayoutFilterType Enum
The type of feed layout filter. Use this enum when accessing org metadata via Apex.
Metadata.LayoutHeader Enum
Represents tagging types used for Metadata.Layout.headers. Use this enum when accessing org metadata via Apex.
Metadata.LayoutSectionStyle Enum
Describes the possible styles for a layout section. Use this enum when accessing org metadata via Apex.
Metadata.MetadataType Enum
Represents the custom metadata components available in Apex. Use this enum when accessing org metadata via Apex.
Metadata.PlatformActionListContextEnum Enum
Describes the different contexts of action lists. Use this enum when accessing org metadata via Apex.
Metadata.PlatformActionTypeEnum Enum
The type of action for a PlatformActionListItem. Use this enum when accessing org metadata via Apex.
Metadata.ReportChartComponentSize Enum
Describes the size of the displayed report chart component. Use this enum when accessing org metadata via Apex.
Metadata.SortOrder Enum
Describes the sort order of a related list. Use this enum when accessing org metadata via Apex.
Metadata.SummaryLayoutStyleEnum Enum
Describes the highlights panel style for a SummaryLayout. Use this enum when accessing org metadata via Apex.
Metadata.UiBehavior Enum
Describes the behavior for a layout item on a layout page. Use this enum when accessing org metadata via Apex.
Metadata.PlatformActionTypeEnum Enum
The type of action for a PlatformActionListItem. Use this enum when accessing org metadata via Apex.

New Apex Interfaces

These interfaces are introduced in this release.
Metadata.DeployCallback Interface
An interface for metadata deployment callback classes. Use this interface when accessing org metadata via Apex.
Cache.CacheBuilder Interface
An interface for safely retrieving and removing values from a session or org cache. Use the interface to generate a value that you want to store in the cache. The interface checks for cache misses, which means you no longer need to execute puts because Platform Cache handles them for you.

Changed Apex Interface

These classes and interfaces were changed in this release.
TxnSecurity.Event class
Changed Property
data
The data field now includes PolicyId, the ID of the current policy.