Class ProfileProvider
java.lang.Object
com._1c.g5.v8.dt.internal.platform.services.core.profiles.ProfileProvider
- All Implemented Interfaces:
IProfileProvider
- Direct Known Subclasses:
ProfileDependenciesModule.TestableProfileProvider
Implementation of
IProfileProvider
.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected IProfile
createProfile
(Path profilePath) Create profile for the given profile path.protected IProfile
getOrCreateProfile
(Path profilePath, boolean createIfAbsent) Get or create profile for the given profile path.getProfile
(InfobaseReference infobase, String nodeName, boolean createIfAbsent) Returns profile, associated with the given infobase with the given node name.getProfile
(Path nodePath, boolean createIfAbsent) Returns profile with the given node path.protected Path
Returns path to the root of the profile hierarchy.Returns root profile with the given node name.
-
Constructor Details
-
ProfileProvider
public ProfileProvider()
-
-
Method Details
-
getRoot
Description copied from interface:IProfileProvider
Returns root profile with the given node name.- Specified by:
getRoot
in interfaceIProfileProvider
- Parameters:
nodeName
- the target profile node name, cannot benull
createIfAbsent
- whether need to create profile if it does not exist- Returns:
- loaded or created profile or
null
, if profile does not exist andcreateIfAbsent
isfalse
- Throws:
IOException
- if I/O error occurred during profile load
-
getProfile
Description copied from interface:IProfileProvider
Returns profile with the given node path. The given node path must be realite to the root profie. Node path must contain entire relative path including tail node name.- Specified by:
getProfile
in interfaceIProfileProvider
- Parameters:
nodePath
- the entire path to the profire, cannot benull
createIfAbsent
- whether need to create profile if it does not exist- Returns:
- loaded or created profile or
null
, if profile does not exist andcreateIfAbsent
isfalse
- Throws:
IOException
- if I/O error occurred during profile load
-
getProfile
public IProfile getProfile(InfobaseReference infobase, String nodeName, boolean createIfAbsent) throws IOException Description copied from interface:IProfileProvider
Returns profile, associated with the given infobase with the given node name.- Specified by:
getProfile
in interfaceIProfileProvider
- Parameters:
infobase
- the infobase to get associated profile for, cannot benull
nodeName
- the target profile node name, cannot benull
createIfAbsent
- whether need to create profile if it does not exist- Returns:
- loaded or created profile or
null
, if profile does not exist andcreateIfAbsent
isfalse
- Throws:
IOException
- if I/O error occurred during profile load
-
getOrCreateProfile
Get or create profile for the given profile path. Profile will be synced after creation.- Parameters:
profilePath
- the profile path to create profile with, cannot benull
createIfAbsent
- whether need to create profile if it does not exist- Returns:
- loaded or created profile or
null
, if profile does not exist andcreateIfAbsent
isfalse
- Throws:
IOException
-
createProfile
Create profile for the given profile path.- Parameters:
profilePath
- the profile path to create profile with, cannot benull
- Returns:
- loaded or created profile, never
null
-
getProfileRoot
Returns path to the root of the profile hierarchy. Contains all profile files and nodes. This path is OS-dependant.- Returns:
- the path to the root of the profile hierarchy, never
null
-