Package com.emc.d2fs.interfaces

# Interface IRelationService

All Superinterfaces:
  `ID2fsService`

public interface IRelationService extends ID2fsService
Document relation management.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `childId(Context context, String relationId)`
  Get child id for specified relation
  `List<String>`
  `childRelations(Context context, String parentId)`
  Get child relation list for specified parent document
  `List<String>`
  `childrenId(Context context, String relationId)`
  Get children ids for specified relation
  `String`
  `createRelation(Context context, String relationName, String linkType, String childId, String parentId, String description)`
  Create parent/child relation between documents
  `boolean`
  `destroyRelation(Context context, String relationId)`
  Destroy relation between documents
  `default List<RelationTypeConfig>`
  `getRelationTypesConfig(Context context)`
  `String`
  `parentId(Context context, String relationId)`
  Get parent id for specified relation
  `List<String>`
  `parentRelations(Context context, String childId)`
  Get parent relations list for specified child document

  ### Methods inherited from interface com.emc.d2fs.interfaces.ID2fsService

  `isRemote, setRemote`

- ## Method Details

  - ### createRelation

    String createRelation(Context context, String relationName, String linkType, String childId, String parentId, String description) throws Exception
    Create parent/child relation between documents
    Parameters:
      `context` - `Context` object containing informations about client/session
      `relationName` - : the config name of the relation
      `linkType` - : "relation" , "vd" , "both"
      `childId` - String value of child document id
      `parentId` - String value of parent document id
    Returns:
      String value of relation id
    Throws:
      `Exception`
    Since:
      4.1.0

  - ### destroyRelation

    boolean destroyRelation(Context context, String relationId) throws Exception
    Destroy relation between documents
    Parameters:
      `context` - `Context` object containing informations about client/session
      `relationId` - String value of relation id
    Returns:
      true if process performs without error
    Throws:
      `Exception`
    Since:
      4.0.1

  - ### childId

    String childId(Context context, String relationId) throws D2fsException
    Get child id for specified relation
    Parameters:
      `context` - `Context` object containing informations about client/session
      `relationId` - String value of relation id
    Returns:
      String value of document id
    Throws:
      `D2fsException`

  - ### childrenId

    List<String> childrenId(Context context, String relationId) throws D2fsException
    Get children ids for specified relation
    Parameters:
      `context` - `Context` object containing informations about client/session
      `relationId` - String value of relation id
    Returns:
      String list of children ids
    Throws:
      `D2fsException`
    Since:
      4.0.1

  - ### parentId

    String parentId(Context context, String relationId) throws D2fsException
    Get parent id for specified relation
    Parameters:
      `context` - `Context` object containing informations about client/session
      `relationId` - String value of relation id
    Returns:
      String value of parent id
    Throws:
      `D2fsException`

  - ### childRelations

    List<String> childRelations(Context context, String parentId) throws D2fsException
    Get child relation list for specified parent document
    Parameters:
      `context` - `Context` object containing informations about client/session
      `parentId` - String value of parent id
    Returns:
      String list of relation ids
    Throws:
      `D2fsException`

  - ### parentRelations

    List<String> parentRelations(Context context, String childId) throws D2fsException
    Get parent relations list for specified child document
    Parameters:
      `context` - `Context` object containing informations about client/session
      `childId` - String value of child document
    Returns:
      String list of relations ids
    Throws:
      `D2fsException`
    Since:
      4.0.1

  - ### getRelationTypesConfig

    default List<RelationTypeConfig> getRelationTypesConfig(Context context) throws Exception
    Throws:
      `Exception`