Interface Adaptable

All Known Subinterfaces:
AdapterResource, ComponentInstance, ModuleResource, RenderingContext, RenderingResult, Resource, WebContext
All Known Implementing Classes:
AbstractLayoutManager, AbstractResource, AbstractResourceService, AbstractResourceService, AbstractUMObject, AbstractUMRootObject, AbstractWebContext, ACLAdapter, ActionService, AnnotationAdapter, AnnotationServiceImpl, APIRoot, AsyncOperationAdapter, AuditAdapter, AuditService, AuthenticationTokensObject, AutomationComponent, AutomationResource, AutomationScriptingComponent, AutomationServerComponent, AvroComponent, AWSConfigurationServiceImpl, BaseUMObject, BatchManagerComponent, BatchUploadObject, BinariesObject, BinaryMetadataComponent, BlobAdapter, BlobHolderAdapterComponent, BlobManagerComponent, BlobObject, BlobsObject, BOAdapter, BulkActionFrameworkObject, BulkActionObject, BulkComponent, BulkDocumentsObject, BulkObject, CacheServiceImpl, CapabilitiesObject, CapabilitiesServiceImpl, CertServiceImpl, CharacterFilteringServiceImpl, ChildrenAdapter, ClusterActionServiceImpl, ClusterServiceImpl, CodecServiceImpl, CollectionManagerImpl, CommandLineExecutorComponent, CommentAdapter, CommentService, CommentService, ComponentInstanceImpl, ComputedGroupsServiceImpl, ConfigEndPoint, ConfigurationObject, ConfigurationServiceImpl, ConnectClientComponent, ConnectClientRoot, ContentTemplateServiceImpl, ContributionPersistenceComponent, ConversionRootObject, ConversionServiceImpl, ConvertAdapter, CoreDirectoryFactory, CoreManagementComponent, CoreService, CoreSessionServiceImpl, CounterManagerImpl, CUserServiceImpl, DataSourceComponent, DBSRepositoryService, DefaultAdapter, DefaultComponent, DefaultContext, DefaultDirectoryFactory, DefaultImporterComponent, DefaultMonitorComponent, DefaultObject, DefaultRenderingContext, DefaultRenderingResult, DeputyManagementService, DirectoryEntryObject, DirectoryObject, DirectoryRootObject, DirectoryServiceImpl, DistributionObject, DmkComponent, DocTypeEndPoint, DocumentAdapterService, DocumentBlobManagerComponent, DocumentModelListPaginableAdapter, DocumentObject, DocumentRenderingContext, DocumentResolverService, DocumentRoot, DocumentRoutingEngineServiceImpl, DocumentRoutingServiceImpl, DocumentValidationServiceImpl, DocumentViewCodecService, DownloadHandler, DownloadServiceImpl, DublinCoreStorageServiceImpl, EasyShare, ElasticSearchComponent, ElasticsearchObject, ELServiceComponent, EmptyDocumentAdapter, EventService, EventServiceComponent, ExceptionHandlingComponent, ExecutableResource, ExtractBinaryFulltextObject, FacetEndPoint, FavoritesManagerImpl, FileEventTracker, FileManagerService, FilesEndpoint, FileService, FileSystemItemAdapterServiceImpl, FreemarkerComponent, FSExporter, GenericDirectoryComponent, GroupMemberGroupsAdapter, GroupMemberUsersAdapter, GroupObject, GroupRootObject, HtmlSanitizerServiceImpl, ImagingComponent, InstallHandler, IOComponent, IOManagerComponent, JSONDocumentObject, JtaActivator, JWTServiceImpl, KafkaConfigServiceImpl, KeyManagerImpl, KeyValueServiceImpl, LayoutStoreImpl, LDAPDirectoryFactory, LibrarySelectorService, LifeCycleServiceImpl, LocalConfigurationServiceImpl, LocaleComponent, LocationManagerService, LockManagerService, LockService, LoginAsComponent, LoginComponent, MailServiceImpl, MailServiceImpl, Main, Main, ManagedComponent, ManagementObject, MarshallerRegistryImpl, MemRepositoryService, MeObject, MetricComponent, MetricsServiceImpl, MigrationObject, MigrationServiceImpl, MimetypeRegistryService, ModuleRoot, MongoDBComponent, MongoDBDirectoryFactory, MongoDBRepositoryService, MultiDirectoryFactory, MultiTenantServiceImpl, NotificationService, NuxeoAdobeConnectorServiceImpl, NuxeoCmisServiceFactoryManager, NuxeoDriveManagerImpl, NuxeoDriveObject, NuxeoRepositories, NXAuditEventsService, OAuth2Callback, OAuth2ClientServiceImpl, OAuth2Object, OAuth2ServiceProviderRegistryImpl, OAuth2TokenServiceImpl, OAuthConsumerRegistryImpl, OAuthServerKeyManagerImpl, OAuthServiceProviderRegistryImpl, OAuthTokenStoreImpl, ObjectResolverServiceImpl, OpenIDConnectProviderRegistryImpl, OperationAdapter, OperationResource, PackageListingProvider, PackageUpdateComponent, PageProviderAdapter, PageProviderServiceImpl, PageProvidersObject, PaginableAdapter, PaginableObject, PathSegmentComponent, PDFTransformationServiceImpl, PermissionService, PersistenceComponent, PicturesObject, PlatformManagementComponent, PluggableAuthenticationService, PreviewAdapter, PreviewAdapterManagerComponent, ProbesObject, PropertiesMappingComponent, PublisherServiceImpl, PubSubServiceImpl, QueryExecutor, QueryMakerServiceImpl, QueryObject, QuotaSizeServiceImpl, QuotaStatsServiceImpl, RelationService, ReloadComponent, RemoveHandler, RenderingServiceImpl, RenditionAdapter, RenditionObject, RenditionServiceImpl, RepositoryManagerImpl, RepositoryObject, RepositoryService, RequestControllerService, RequestFilterService, ResourceBundleEndpoint, ResourcePublisherService, ResourceService, ResourceService, ResourceService, RestAPIServiceImpl, RootResource, RootResource, RootServiceImpl, RuntimeComponent, ScannedFileMapperComponent, SchedulerObject, SchedulerServiceImpl, SchemaEndPoint, SCIMGroupWebObject, SCIMRoot, SCIMUserWebObject, ScimV2MappingServiceImpl, ScrollComponent, SearchAdapter, SearchObject, SecurityService, ServerComponent, ServerLocatorService, ServletRegistryComponent, ShibbolethAuthenticationServiceImpl, SignatureServiceImpl, SQLDirectoryFactory, SQLRepositoryCompatService, SQLRepositoryService, StandbyComponent, StreamObject, StreamServiceImpl, StreamWorkManager, SuggestionServiceImpl, TagServiceImpl, TargetPlatformObject, TargetPlatformServiceImpl, TaskAdapter, TaskObject, TaskServiceImpl, TemplateBasedResource, TemplateProcessorComponent, TemplateResource, TemplateSerializerServiceImpl, Test, ThemeStylingServiceImpl, ThreeDServiceImpl, ThumbnailServiceImpl, ThumbnailsObject, TransientStorageComponent, TrashServiceImpl, TypeService, TypeService, UIDGeneratorComponent, UninstallHandler, UserInvitationComponent, UserInvitationObject, UserMapperComponent, UserObject, UserPreferencesServiceImpl, UserProfileServiceImpl, UserRootObject, UserService, UserToGroupObject, UserWorkspaceServiceImplComponent, VersioningComponent, VersioningManagerImpl, VersionService, VersionsObject, VideoServiceImpl, VideosObject, VideoToolsServiceImpl, ViewService, WebDavService, WebEngineComponent, WebForm, WebResourceManagerImpl, Wizard, WOPIRoot, WOPIServiceImpl, WorkflowAdapter, WorkflowModelObject, WorkflowObject, WorkflowsObject, WorkManagerImpl, WorkManagerObject, XDocReportResourceService, XMLImporterComponent

public interface Adaptable
An interface for an adaptable object.

Adaptable objects can be dynamically extended to provide different interfaces (or "adapters"). Adapters are created by adapter factories, which are in turn managed by type by adapter managers.

For example,

     IAdaptable a = [some adaptable];
     IFoo x = a.getAdapter(IFoo.class);
     if (x != null)
         [do IFoo things with x]
 

This interface can be used without OSGi running.

Clients may implement this interface, or obtain a default implementation of this interface by subclassing PlatformObject.

  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    getAdapter(Class<T> adapter)
    Returns an object which is an instance of the given class associated with this object.
  • Method Details

    • getAdapter

      <T> T getAdapter(Class<T> adapter)
      Returns an object which is an instance of the given class associated with this object. Returns null if no such object can be found.
      Parameters:
      adapter - the adapter class to look up
      Returns:
      a object castable to the given class, or null if this object does not have an adapter for the given class