Interface DocumentClassService

All Superinterfaces:
BaseFinder<DocumentClass,Long>

public interface DocumentClassService extends BaseFinder<DocumentClass,Long>
Umożliwia zarządzanie klasami dokumentów.
Author:
Paweł Rosolak 19-03-2013
  • Method Details

    • createDocumentClass

      void createDocumentClass(DocumentClass dc)
      Zapisuje klasa dokumentów w bazie danych. Tworzy tabele przechowującą indeksy dla utworzonej klasy
      Parameters:
      dc - Definicja klasy dokumentów
    • deleteDocumentClass

      void deleteDocumentClass(String name)
      Usuwa klasę dokumentów
      Parameters:
      name - Nazwa klasy dokumentów
    • deleteDocumentClass

      void deleteDocumentClass(Long documentClassId)
      Usuwa klasę dokumentów
      Parameters:
      documentClassId - Id klasy dokumentów
    • addIndexToDocumentClass

      void addIndexToDocumentClass(Long docClassId, DocumentClassIndex index)
      Dodaje indeks do klasy dokumentów
      Parameters:
      docClassId - Id klasy dokumentów
      index - Definicja indeksu
    • updateIndexInDocumentClass

      DocumentClassIndex updateIndexInDocumentClass(Long docClassId, DocumentClassIndex index)
      Aktualizuje indeks klasy dokumentów
      Parameters:
      docClassId - id klasy dokumentów
      index - definicja indeksu
    • removeIndexFromDocumentClass

      void removeIndexFromDocumentClass(Long docClassId, String indexName)
      Usuwa indeks z klasy dokumentów
      Parameters:
      docClassId - Id klasy dokumentów
      indexName - Nazwa indeksu
    • addActionToDocumentClass

      void addActionToDocumentClass(Long docClassId, DocumentClassAction action)
      Dodaje akcje do klasy dokumentów
      Parameters:
      docClassId - Id klasy dokumentów
      action - Definicja akcji
    • getDocumentClass

      DocumentClass getDocumentClass(String name, String... joins)
      Pobiera obiekt klasy dokumentów
      Parameters:
      name - Nazwa klasy dokumentów
      joins - Określa, które elementy mamy dołączyć do obiektu klasy dokumentów.
      Returns:
      Zwraca klasa dokumentów o podanej nazwie
    • getFullPathForDocClass

      String getFullPathForDocClass(Long docClassId)
      Pobiera ścieżkę do katalogu klasy dokumentów (dla dynamicznie tworzonych nazw katalogów nazwa generowana jest na podstawie aktualnej daty)
      Parameters:
      docClassId - Id klasy dokumentów
      Returns:
      Zwraca pełną ścieżkę do katalogu klasy dokumentów
    • getDocumentClassDirectory

      File getDocumentClassDirectory(Long docClassId)
      Pobiera katalog klasy dokumentów (dla dynamicznie tworzonych nazw katalogów nazwa generowana jest na podstawie aktualnej daty)
      Parameters:
      docClassId - Id klasy dokumentów
      Returns:
      Zwraca katalog klasy dokumentów
    • updateDocumentClass

      void updateDocumentClass(DocumentClass dc)
      Modyfikuje klasę dokumentów
      Parameters:
      dc - Obiekt klasy dokumentów
    • getDocumentClassesForUser

      List<DocumentClass> getDocumentClassesForUser(String userName)
      Pobiera listę klas dokumentów do których podany użytkownik może dodawać dokumenty
      Parameters:
      userName - Login użytkownika
      Returns:
      lista klas dokumentów
    • getDocumentClassesForUser

      List<DocumentClass> getDocumentClassesForUser(String userName, boolean withAddingRight)
      Pobiera listę klas dokumentów do których podany użytkownik ma uprawnienia do odczytu lub dodawania dokumentów (w zależności od parametru)
      Parameters:
      userName - Login użytkownika
      withAddingRight - określa, czy użytkownik musi mieć uprawnienia do dodawania dokumentów do tych klas
      Returns:
      lista klas dokumentów
    • getDocumentClassesForUserAndProcess

      List<DocumentClass> getDocumentClassesForUserAndProcess(String userName, String processDefId, boolean withAddingRight)
      Pobiera listę klas dokumentów do których podany użytkownik ma uprawnienia do odczytu lub dodawania dokumentów (w zależności od parametru) w konkretnym procesie
      Parameters:
      userName - login użytkownika
      processDefId - definicja procesu
      withAddingRight - określa, czy użytkownik musi mieć uprawnienia do dodawania dokumentów do tych klas
      Returns:
      lista klas dokumentów
    • getDocumentClassesForUser

      List<DocumentClass> getDocumentClassesForUser(String userName, DocumentUploadSource uploadSource)
      Pobiera listę klas dokumentów do których użytkownik może dodawać dokumentu na konkretnym poziomie (archiwum lub proces)
      Parameters:
      userName - login użytkownika
      uploadSource - poziom dodawania dokumentu
      Returns:
    • getDocumentClassesForProcess

      List<DocumentClass> getDocumentClassesForProcess(String processDefId)
      Pobiera klasy dokumentów przypisane do procesu
      Parameters:
      processDefId - Definicja procesu
      Returns:
      Lista klas dokumentów przypisanych do definicji procesu
    • getDocumentClassesForUserAndProcess

      List<DocumentClass> getDocumentClassesForUserAndProcess(String userName, String processDefId)
      Pobiera listę klas dokumentów do których użytkownik może dodawać dokument w konkretnym procesie
      Parameters:
      userName - login użytkownika
      processDefId - definicja procesu
      Returns:
      lista klas dokumentów
    • executePatterns

      Map<Long,Object> executePatterns(Map<Long,Object> indexes)
      Aktualizuje indeksy względem przypisanych wzorców.
      Parameters:
      indexes - mapa indeksów
      Returns:
      nowa mapa indeksów
    • moveUpDocumentClass

      void moveUpDocumentClass(Long documentClassId)
      Zmienia kolejność klasy dokumentów o podanym id
      Parameters:
      documentClassId - Id klasy dokumentów
    • deleteDocumentClassIndex

      void deleteDocumentClassIndex(Long id)
      Usuwa indeks klasy dokumentów o podanym id
      Parameters:
      id - Id indeksu klasy dokumentów
    • moveUpDocumentClassIndex

      void moveUpDocumentClassIndex(Long id)
      Zmienia kolejność indeksu klasy dokumentów o podanym id
      Parameters:
      id - Id indeksu klasy dokumentów
    • getDocumentClassTranslationsForLocale

      List<DocumentClassTranslation> getDocumentClassTranslationsForLocale(Locale locale, String... joins)
      Pobiera listę wszystkich tłumaczeń powiązanych z klasami dokumentów w podanym języku
      Parameters:
      locale - Język
      joins - Określa, które z powiązanych elementów chcemy dołączyć do pobieranych obiektów
      Returns:
    • deleteDocumentClassTranslationsForLocale

      void deleteDocumentClassTranslationsForLocale(Locale locale)
      Usuwa wszystkie nadpisane tłumaczenia klas dokumentów w podanym języku
      Parameters:
      locale - Język
    • deleteDocumentClassIndexTranslationsForLocale

      void deleteDocumentClassIndexTranslationsForLocale(Locale locale)
      Usuwa wszystkie nadpisane tłumaczenia indeksów klas dokumentów w podanym języku
      Parameters:
      locale - Język
    • addDocumentClassTranslation

      Long addDocumentClassTranslation(Long docClassId, DocumentClassTranslation docClassTranslation)
      Zapisuje tłumaczenie klasy dokumentów w bazie danych
      Parameters:
      docClassId - Id tłumaczonej klasy dokumentów
      docClassTranslation - Tłumaczenie do dodania
      Returns:
      Id utworzonego obiektu
    • addDocumentClassIndexTranslation

      Long addDocumentClassIndexTranslation(Long documentClassIndexId, DocumentClassIndexTranslation documentClassIndexTranslation)
      Zapisuje tłumaczenie indeksu klasy dokumentów w bazie danych
      Parameters:
      documentClassIndexId - Id tłumaczonego indeksu klasy dokumentów
      documentClassIndexTranslation - Tłumaczenie do dodania
      Returns:
      Id utworzonego obiektu
    • updateDocumentClassTranslation

      void updateDocumentClassTranslation(Long id, String newValue)
      Aktualizuje tekst tłumaczenia klasy dokumentów
      Parameters:
      id - Id tłumaczenia klasy dokumentów
      newValue - Nowy tekst tłumaczenia
    • updateDocumentClassIndexTranslation

      void updateDocumentClassIndexTranslation(Long id, String newValue)
      Aktualizuje tekst tłumaczenia indeksu klasy dokumentów
      Parameters:
      id - Id tłumaczenia indeksu klasy dokumentów
      newValue - Nowy tekst tłumaczenia
    • deleteDocumentClassTranslation

      void deleteDocumentClassTranslation(Long id)
      Usuwa tłumaczenie klasy dokumentów o podanym id
      Parameters:
      id - Id tłumaczenia
    • deleteDocumentClassIndexTranslation

      void deleteDocumentClassIndexTranslation(Long id)
      Usuwa tłumaczenie indeksu klasy dokumentów o podanym id
      Parameters:
      id - Id tłumaczenia
    • getDocumentClassTranslation

      String getDocumentClassTranslation(Long entityId, TranslatedFieldType fieldType)
      Zwraca tłumaczenie dla konkretnego pola klasy dokumentów o podanym id
      Parameters:
      entityId - Id elementu
      fieldType - Typ pola
      Returns:
      Tłumaczenie
    • getDocumentClassTranslation

      String getDocumentClassTranslation(Long entityId, TranslatedFieldType fieldType, Locale locale)
      Zwraca tłumaczenie dla konkretnego pola klasy dokumentów o podanym id
      Parameters:
      entityId - Id elementu
      fieldType - Typ pola
      locale - Język
      Returns:
      Tłumaczenie
    • getDocumentClassIndexTranslation

      String getDocumentClassIndexTranslation(Long entityId, TranslatedFieldType fieldType)
      Zwraca tłumaczenie dla konkretnego pola indeksu klasy dokumentów o podanym id
      Parameters:
      entityId - Id elementu
      fieldType - Typ pola
      Returns:
      Tłumaczenie
    • getDocumentClassIndexTranslation

      String getDocumentClassIndexTranslation(Long entityId, TranslatedFieldType fieldType, Locale locale)
      Zwraca tłumaczenie dla konkretnego pola indeksu klasy dokumentów o podanym id
      Parameters:
      entityId - Id elementu
      fieldType - Typ pola
      locale - Język
      Returns:
      Tłumaczenie
    • validateDocumentClassIndexCanBeEdited

      void validateDocumentClassIndexCanBeEdited(DocumentClassIndex documentClassIndex)
      Sprawdza, czy indeks klasy dokumentów może być edytowany
      Parameters:
      documentClassIndex - Obiekt indeksu klasy dokumentów
    • deleteDocumentClassAction

      void deleteDocumentClassAction(Long id)
      Usuwa akcję klasy dokumentów o podanym id
      Parameters:
      id - Id akcji klasy dokumentów
    • updateDocumentClassAction

      void updateDocumentClassAction(DocumentClassAction documentClassAction)
      Modyfikuje akcję klasy dokumentów
      Parameters:
      documentClassAction - Obiekt akcji klasy dokumentów
    • getAll

      CountedResult<DocumentClass> getAll(Integer start, Integer limit, String sortBy, SortDirection sortDirection)
      Pobiera stronnicowaną listę przetłumaczonych klas dokumentów
      Parameters:
      start - Przesunięcie w zbiorze wyników
      limit - Maksymalna liczba wyników
      sortBy - Nazwa kolumny, po której ma wystąpić sortowanie
      sortDirection - Kierunek sortowania
      Returns:
    • getAll

      CountedResult<DocumentClass> getAll(Locale locale, Integer start, Integer limit, String sortBy, SortDirection sortDirection)
      Pobiera stronnicowaną listę przetłumaczonych we wskazanym języku klas dokumentów
      Parameters:
      locale - Język tłumaczenia
      start - Przesunięcie w zbiorze wyników
      limit - Maksymalna liczba wyników
      sortBy - Nazwa kolumny, po której ma wystąpić sortowanie
      sortDirection - Kierunek sortowania
      Returns:
    • hasRightsToReadDocumentClass

      boolean hasRightsToReadDocumentClass(String username, DocumentClass documentClass)
      Sprawdza, czy użytkownika ma uprawnienia do odczytu klasy dokumentów
      Parameters:
      username - login użytkownika
      documentClass - klasa dokumentów