Interface IProfileProvider
-
- All Known Implementing Classes:
ProfileDependenciesModule.TestableProfileProvider
,com._1c.g5.v8.dt.internal.platform.services.core.profiles.ProfileProvider
public interface IProfileProvider
Provider of 1C:Enterprise runtime settings profiles. Profiles are stored in tree file-system folder structure and can have many profile nodes in a single profile folder. If requested profie does not exists, new profile underlying resource may be created during methods execution. Example of usage:// get infobase profile for thick client, and we dont want to create new if it is absent IProfile profile = profileProvider.getProfile(importedInfobase, "1cv8.pfl", false); if (profile != null) { // get string value of version of published 1C:Enteprise Runtime by this infobase // it is stored in folder with name "Config" with key "DeploymentVersion" String publishedRuntimeVersion = profile.getStringValue(ProfileKeys.of("Config", "DeploymentVersion")); ... }
- See Also:
IProfile
,IProfileNodes
- Restriction:
- This interface is not intended to be extended by clients.
- Restriction:
- This interface is not intended to be implemented by clients.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IProfile
getProfile(InfobaseReference infobase, String nodeName, boolean createIfAbsent)
Returns profile, associated with the given infobase with the given node name.IProfile
getProfile(Path nodePath, boolean createIfAbsent)
Returns profile with the given node path.IProfile
getRoot(String nodeName, boolean createIfAbsent)
Returns root profile with the given node name.
-
-
-
Method Detail
-
getRoot
IProfile getRoot(String nodeName, boolean createIfAbsent) throws IOException
Returns root profile with the given node name.- 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
IProfile getProfile(Path nodePath, boolean createIfAbsent) throws IOException
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.- 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
IProfile getProfile(InfobaseReference infobase, String nodeName, boolean createIfAbsent) throws IOException
Returns profile, associated with the given infobase with the given node name.- 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
-
-