public class ArchiveProfileFactoryProvider extends AbstractProfileFactoryProvider
ArchiveProfile
.
This class serves as an example of how a ProfileFactory
provider may
be written from scratch and registered as a Toolkit provider.
Most profiles that are declaratively registered will not need individual
factory like this. This is only for use in cases where an extension may want
to override the default behavior of a factory registered by another extension.AbstractProfileFactoryProvider.DefaultProfileFactory
tkClass_
Constructor and Description |
---|
ArchiveProfileFactoryProvider() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canCreate(ToolkitContext tkContext,
Cookie cookie)
Check quickly if a
Profile of given type can be constructed. |
protected Profile |
createProfile(java.lang.String name,
Cookie cookie)
Called to create a Profile of type
profileClass . |
protected java.lang.String |
getArchiveExtension(ArchiveProfile profile,
Cookie cookie) |
protected DataContainer |
getDataContainer(Cookie cookie) |
protected java.net.URL |
getDefaultDeployDirUrl(ArchiveProfile profile,
Cookie cookie) |
protected Context |
getIdeContext(Cookie cookie) |
protected java.net.URL |
getJarUrl(ArchiveProfile profile,
Cookie cookie) |
protected ToolkitContext |
getToolkitContext(Cookie cookie) |
protected ArchiveProfile |
newProfile(java.lang.String name,
Cookie cookie) |
create, createProfileFactory
buildDelegate, create, getToolkitClass, recognize
protected boolean canCreate(ToolkitContext tkContext, Cookie cookie)
AbstractProfileFactoryProvider
Profile
of given type can be constructed.
If yes, return non-null value.canCreate
in class AbstractProfileFactoryProvider
cookie
- a temporary map that can be used to store intermediate
results. This will be passed to createProfile(...)
and discarded
when the factory is released.protected DataContainer getDataContainer(Cookie cookie)
protected ToolkitContext getToolkitContext(Cookie cookie)
protected Profile createProfile(java.lang.String name, Cookie cookie)
AbstractProfileFactoryProvider
profileClass
.createProfile
in class AbstractProfileFactoryProvider
name
- the name of the profile profile.getName()
should
return this name.cookie
- same object passed to canCreate(...)
protected ArchiveProfile newProfile(java.lang.String name, Cookie cookie)
protected java.net.URL getJarUrl(ArchiveProfile profile, Cookie cookie)
protected java.net.URL getDefaultDeployDirUrl(ArchiveProfile profile, Cookie cookie)
protected java.lang.String getArchiveExtension(ArchiveProfile profile, Cookie cookie)