Package de.xima.fc.dao.interfaces
Interface ITextbausteinDao
-
- All Superinterfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<Textbaustein,Long,IEntityContext>,IGenericDao<Textbaustein>,IMandantDependentBaseDao<Textbaustein>
- All Known Implementing Classes:
TextbausteinDao
public interface ITextbausteinDao extends IMandantDependentBaseDao<Textbaustein>
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<String>findAllKeywords(IEntityContext ec, Mandant mandant, ETextbausteinKategorie kategorie)Collects all currently existing keywords for the provided client and template type.StringfindUniqueName(IEntityContext ec, Mandant client, String candidate)Returns a name that is not taken by anotherTextbausteinin the given client.StringfindUniqueName(IEntityContext ec, Mandant client, String candidate, Textbaustein exclude)Returns a name that is not taken by anotherTextbausteinin the given client other than the excluded template.List<Textbaustein>getAll(IEntityContext ec, Mandant client)List<Textbaustein>getAllByKat(IEntityContext ec, Mandant client, ETextbausteinKategorie category)Returns the templates matching the providedMandantandETextbausteinKategorie.List<Textbaustein>getAllByProject(IEntityContext ec, Projekt project)Returns all templates that are being used by the given projectTextbausteingetByKatAndName(IEntityContext ec, Mandant client, ETextbausteinKategorie category, String name)TextbausteingetByMsgCode(IEntityContext ec, Mandant client, ETextbausteinMsgCode messageCode, ETextbausteinKategorie category)TextbausteingetByMsgCode(IEntityContext ec, Mandant client, String messageCode)TextbausteingetByMsgCode(IEntityContext ec, Mandant client, String messageCode, ETextbausteinKategorie category)TextbausteingetByName(IEntityContext ec, Mandant client, String name)TextbausteingetByUUID(IEntityContext ec, Mandant client, String uuid)Returns the template with the given UUID stringTextbausteingetByUUID(IEntityContext ec, Mandant client, UUID uuid)Returns the template with the given UUIDstatic ITextbausteinDaogetInstance()Returns the instance of this DAO via CDI.TextbausteingetTextbausteinByMsgCode(IEntityContext ec, Mandant client, ETextbausteinMsgCode messageCode)TenantTemplateLocalizedFilegetUserPortalTenantTemplateLocalizedFile(IEntityContext ec, UUID portalUuid, UUID tenantUuid, UUID tenantTemplateUuid, UUID fileUuid)Returns the tenant template localized file for the given UUIDs.booleanisNameExisiting(IEntityContext ec, Mandant client, String name)Checks whether the given template name exists within the given client-
Methods inherited from interface de.xima.cmn.dao.interfaces.IAbstractDao
all, bulkDelete, bulkUpdate, checkLockingVersion, create, create, delete, delete, deleteAll, executePagedDaoAction, getAttributes, getAttributes, getSingleAttributes, getSingleAttributes, getTransactionHandler, read, registerListener, registerListener, registerListener, resultTotalCount, setTransactionHandler, singleElement, unregisterListener, unregisterListener, unregisterListener, update, update
-
Methods inherited from interface de.xima.fc.dao.interfaces.IGenericDao
count, createOrUpdate, findAll, findSingle, getEntityRefs, read
-
-
-
-
Method Detail
-
getInstance
static ITextbausteinDao getInstance()
Returns the instance of this DAO via CDI.- Returns:
- The instance of this DAO.
-
getByMsgCode
Textbaustein getByMsgCode(IEntityContext ec, Mandant client, String messageCode)
-
getByMsgCode
Textbaustein getByMsgCode(IEntityContext ec, Mandant client, String messageCode, ETextbausteinKategorie category)
-
getByMsgCode
Textbaustein getByMsgCode(IEntityContext ec, Mandant client, ETextbausteinMsgCode messageCode, ETextbausteinKategorie category)
-
getTextbausteinByMsgCode
Textbaustein getTextbausteinByMsgCode(IEntityContext ec, Mandant client, ETextbausteinMsgCode messageCode)
-
getAll
List<Textbaustein> getAll(IEntityContext ec, Mandant client)
-
getByName
Textbaustein getByName(IEntityContext ec, Mandant client, String name)
-
getAllByKat
List<Textbaustein> getAllByKat(IEntityContext ec, Mandant client, ETextbausteinKategorie category)
Returns the templates matching the providedMandantandETextbausteinKategorie.- Parameters:
ec-IEntityContextto useclient-Mandantcontext in which to look for templatecategory-ETextbausteinKategorieto filter the templates by- Returns:
- the resulting list of templates, ordered by template name (ASC)
-
getByKatAndName
Textbaustein getByKatAndName(IEntityContext ec, Mandant client, ETextbausteinKategorie category, String name)
-
getByUUID
Textbaustein getByUUID(IEntityContext ec, Mandant client, String uuid)
Returns the template with the given UUID string- Parameters:
ec-IEntityContextto useclient-Mandantcontext in which to look for templateuuid-StringUUID of the template- Returns:
Textbausteinfor the given UUID and client- Since:
- 6.1.0
-
getByUUID
Textbaustein getByUUID(IEntityContext ec, Mandant client, UUID uuid)
Returns the template with the given UUID- Parameters:
ec-IEntityContextto useclient-Mandantcontext in which to look for templateuuid-UUIDUUID of the template- Returns:
Textbausteinfor the given UUID and client- Since:
- 6.1.0
-
getAllByProject
List<Textbaustein> getAllByProject(IEntityContext ec, Projekt project)
Returns all templates that are being used by the given project- Parameters:
ec-IEntityContextto be usedproject-Projektproject to search for templates- Returns:
ListofTextbausteins that are being used by the project- Since:
- 6.1.0
-
findUniqueName
String findUniqueName(IEntityContext ec, Mandant client, String candidate)
Returns a name that is not taken by anotherTextbausteinin the given client. An index will be added to the candidate if necessary.- Parameters:
ec-IEntityContextto be usedclient-Mandantfor which a unique template name should be generatedcandidate- Candidate name for the template. This name is used when it does not exist, otherwise a unique name is derived based on this name.- Returns:
- unique template name in the context of the given client
- Since:
- 6.4.0
-
findUniqueName
String findUniqueName(IEntityContext ec, Mandant client, String candidate, Textbaustein exclude)
Returns a name that is not taken by anotherTextbausteinin the given client other than the excluded template. An index will be added to the candidate if necessary.- Parameters:
ec-IEntityContextto be usedclient-Mandantfor which a unique template name should be generatedcandidate- Candidate name for the template. This name is used when it does not exist, otherwise a unique name is derived based on this name.exclude-Textbausteintemplate to be excluded from search- Returns:
- unique template name in the context of the given client
- Since:
- 6.6.0
-
isNameExisiting
boolean isNameExisiting(IEntityContext ec, Mandant client, String name)
Checks whether the given template name exists within the given client- Parameters:
ec-IEntityContextto be usedclient-Mandantfor which to check uniquenessname-Stringtemplate name to check- Returns:
- Whether the given name is unique
- Since:
- 6.4.0
-
findAllKeywords
Set<String> findAllKeywords(IEntityContext ec, Mandant mandant, ETextbausteinKategorie kategorie)
Collects all currently existing keywords for the provided client and template type.- Parameters:
ec-IEntityContextto be usedmandant-Mandantto filter the templates bykategorie-ETextbausteinKategorieto filter the templates by- Returns:
- the resulting (unordered) set of keywords
-
getUserPortalTenantTemplateLocalizedFile
TenantTemplateLocalizedFile getUserPortalTenantTemplateLocalizedFile(IEntityContext ec, UUID portalUuid, UUID tenantUuid, UUID tenantTemplateUuid, UUID fileUuid)
Returns the tenant template localized file for the given UUIDs.- Parameters:
ec- Entity context for accessing the database.portalUuid- UUID of the user portal (context).tenantUuid- UUID of the tenant (context).tenantTemplateUuid- UUID of the tenant template (context).fileUuid- UUID of the project file.- Returns:
- The project file with the given UUID, or
nullif no such project file exists. - Throws:
de.xima.cmn.http.exception.NotFoundException- if no portal with the given UUID exists, if no client with the given UUID exists, or if no tenant template with the given UUID exists.- Since:
- 8.6.0
-
-