java.lang.Object
com._1c.g5.v8.dt.internal.platform.services.core.profiles.ProfileProvider
All Implemented Interfaces:
IProfileProvider
Direct Known Subclasses:
ProfileDependenciesModule.TestableProfileProvider

public class ProfileProvider extends Object implements IProfileProvider
Implementation of IProfileProvider.
  • Constructor Details

    • ProfileProvider

      public ProfileProvider()
  • Method Details

    • getRoot

      public IProfile getRoot(String nodeName, boolean createIfAbsent) throws IOException
      Description copied from interface: IProfileProvider
      Returns root profile with the given node name.
      Specified by:
      getRoot in interface IProfileProvider
      Parameters:
      nodeName - the target profile node name, cannot be null
      createIfAbsent - whether need to create profile if it does not exist
      Returns:
      loaded or created profile or null, if profile does not exist and createIfAbsent is false
      Throws:
      IOException - if I/O error occurred during profile load
    • getProfile

      public IProfile getProfile(Path nodePath, boolean createIfAbsent) throws IOException
      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 interface IProfileProvider
      Parameters:
      nodePath - the entire path to the profire, cannot be null
      createIfAbsent - whether need to create profile if it does not exist
      Returns:
      loaded or created profile or null, if profile does not exist and createIfAbsent is false
      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 interface IProfileProvider
      Parameters:
      infobase - the infobase to get associated profile for, cannot be null
      nodeName - the target profile node name, cannot be null
      createIfAbsent - whether need to create profile if it does not exist
      Returns:
      loaded or created profile or null, if profile does not exist and createIfAbsent is false
      Throws:
      IOException - if I/O error occurred during profile load
    • getOrCreateProfile

      protected IProfile getOrCreateProfile(Path profilePath, boolean createIfAbsent) throws IOException
      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 be null
      createIfAbsent - whether need to create profile if it does not exist
      Returns:
      loaded or created profile or null, if profile does not exist and createIfAbsent is false
      Throws:
      IOException
    • createProfile

      protected IProfile createProfile(Path profilePath)
      Create profile for the given profile path.
      Parameters:
      profilePath - the profile path to create profile with, cannot be null
      Returns:
      loaded or created profile, never null
    • getProfileRoot

      protected Path 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