import { DataObject, Filter, FilterExcludingWhere, Options, Where } from '@loopback/repository';
import { ObjectNodeRelations } from '../../models/object-node.model';
import { ObjectType } from '../../models/object-type.model';
import { ObjectNodeRepository } from '../../repositories';
import { CurrentContext } from '../application.service';
import { ContentEntityService } from '../content-entity/content-entity.service';
import { ObjectTypeService } from '../object-type.service';
import { ObjectNode } from './../../models/object-node.model';
import { ApplicationService, NodeContext } from './../application.service';
export declare enum ParentNodeType {
    node = "node",
    tree = "tree",
    owner = "owner",
    namespace = "namespace"
}
export declare class ObjectNodeService {
    private objectNodeRepository;
    private objectTypeService;
    private contentEntityService;
    private applicationService;
    constructor(objectNodeRepository: ObjectNodeRepository, objectTypeService: ObjectTypeService, contentEntityService: ContentEntityService, applicationService: ApplicationService);
    migrateType(parentType: string, previousType: string, newType: string): Promise<void>;
    migrateName(previousName: string, newName: string, type?: string, parentType?: string): Promise<void>;
    findOrderedNodes(filter: Filter<ObjectNode>): Promise<ObjectNode[]>;
    searchByParentTreeId(treeId: string, options?: {
        objectTypeId?: string;
        name?: string;
        objectTypeIds?: string[];
    }, ctx?: CurrentContext): Promise<ObjectNode[]>;
    searchByParentNamespaceId(treeId: string, options?: {
        objectTypeId?: string;
        name?: string;
        objectTypeIds?: string[];
    }): Promise<ObjectNode[]>;
    searchByOneParentId(parentType: 'Tree' | 'Namespace' | 'Node' | 'Owner', parentId: string, options?: {
        objectTypeId?: string;
        name?: string;
        objectTypeIds?: string[];
    }, ctx?: CurrentContext): Promise<ObjectNode[]>;
    searchByTreeIds(treeIds: string[]): Promise<ObjectNode[]>;
    searchByParentNodeId(parentNodeId: string, options?: {
        objectTypeId?: string;
        name?: string;
        objectTypeIds?: string[];
    }): Promise<ObjectNode[]>;
    searchByParentIdsAndObjectTypeId(parentNodeIds: string[], objectTypeId: string): Promise<ObjectNode[]>;
    searchOwner(ownerType: string, ownerName: string): Promise<ObjectNode>;
    searchNamespace(ownerType: string, ownerName: string, namespaceType: string, namespaceName: string): Promise<ObjectNode>;
    searchNamespaceOfOwnerId(ownerId: string, namespaceType: string, namespaceName: string, errorContext?: {}): Promise<ObjectNode>;
    searchTreeOfNamespaceId(namespaceId: string, treeType: string, treeName: string, errorContext?: {}): Promise<ObjectNode>;
    getOrCreateChildren(parentId: string, objectTypeId: string, defaultValue?: DataObject<ObjectNode>, min?: number, ctx?: CurrentContext): Promise<ObjectNode[]>;
    searchTreesOfNamespaceId(namespaceId: string, treeType: string, errorContext?: {}): Promise<ObjectNode[]>;
    searchTree(ownerType: string, ownerName: string, namespaceType: string, namespaceName: string, treeType: string, treeName: string): Promise<ObjectNode>;
    getNode(id: string, ctx: CurrentContext): Promise<ObjectNode>;
    getOwner(ownerType: string, ownerName: string, ctx: CurrentContext): Promise<ObjectNode>;
    getNamespace(ownerType: string, ownerName: string, namespaceType: string, namespaceName: string, ctx: CurrentContext): Promise<ObjectNode>;
    getTree(ownerType: string, ownerName: string, namespaceType: string, namespaceName: string, treeType: string, treeName: string, ctx: CurrentContext): Promise<ObjectNode>;
    getANodeOfTree(ownerType: string, ownerName: string, namespaceType: string, namespaceName: string, treeType: string, treeName: string, nodeType: string, nodeName: string, ctx: CurrentContext): Promise<ObjectNode>;
    getTreeNodes(ownerType: string, ownerName: string, namespaceType: string, namespaceName: string, treeType: string, treeName: string, ctx: CurrentContext): Promise<ObjectNode[]>;
    getTreeNode(objectNode: ObjectNode, ctx: CurrentContext): Promise<ObjectNode>;
    searchById(id: string, filter?: FilterExcludingWhere<ObjectNode>, options?: Options, ctx?: CurrentContext): Promise<ObjectNode & ObjectNodeRelations>;
    protected checkNameAvailability(objectNode: DataObject<ObjectNode>, name: string, generate?: boolean): Promise<void>;
    private resolveConflictName;
    checkBrothersCondition(parentNodeId: string, nodeContext: NodeContext): Promise<void>;
    private checkSubTypesCondition;
    add(objectNode: DataObject<ObjectNode>, ctx: CurrentContext, byPassCheck?: boolean, autoGenerateChildren?: boolean, resolveNameConflict?: boolean): Promise<ObjectNode>;
    protected getPropertiesKeys(objectType: ObjectType, objectKeys?: string[]): string[];
    modifyById(id: string, objectNode: DataObject<ObjectNode>, ctx: CurrentContext, byPassCheck?: boolean): Promise<ObjectNode>;
    protected getParentIdKey(parentType: ParentNodeType): string;
    deleteContentNodes(where: Where, ctx: CurrentContext): Promise<void>;
    removeByParent(parentType: ParentNodeType, id: string, ctx: CurrentContext): Promise<void>;
    removeById(id: string, ctx: CurrentContext): Promise<void>;
    moveTo(child: ObjectNode, parent: ObjectNode): Promise<void>;
    loadChildrenNodes(rootTreeNode: ObjectNode): Promise<ObjectNode[]>;
    private selectChildrenFromCandidatesList;
}
