Class GPTPermissionInfo
- java.lang.Object
-
- com.composum.ai.backend.slingbase.model.GPTPermissionInfo
-
public class GPTPermissionInfo extends Object
Permission information that can be used to determine whether a page or component permits services as the side panel AI or the content creation assistant. Is used as a JSON return object - thus we are mutable and have getters / setters.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GPTPermissionInfo.GPTPermissionInfoItem
One set of permissions.
-
Field Summary
Fields Modifier and Type Field Description static String
SERVICE_CATEGORIZE
Only for composum: service name for categorization.static String
SERVICE_CREATE
Service name for Content Creation Dialogstatic String
SERVICE_SIDEPANEL
Service name for Side Panel AIstatic String
SERVICE_TRANSLATE
Only for Composum: service name for translation.
-
Constructor Summary
Constructors Constructor Description GPTPermissionInfo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allows(String service, String resourceType)
Checks whether this allows the given service for the given resourceTypestatic GPTPermissionInfo
from(GPTPermissionConfiguration configuration)
List<GPTPermissionInfo.GPTPermissionInfoItem>
getServicePermissions()
List of service permissions.static GPTPermissionInfo
mergeAdditively(GPTPermissionInfo info1, GPTPermissionInfo info2)
Joins the permission informations additively.void
setServicePermissions(List<GPTPermissionInfo.GPTPermissionInfoItem> servicePermissions)
String
toString()
-
-
-
Field Detail
-
SERVICE_CREATE
public static final String SERVICE_CREATE
Service name for Content Creation Dialog- See Also:
- Constant Field Values
-
SERVICE_SIDEPANEL
public static final String SERVICE_SIDEPANEL
Service name for Side Panel AI- See Also:
- Constant Field Values
-
SERVICE_TRANSLATE
public static final String SERVICE_TRANSLATE
Only for Composum: service name for translation.- See Also:
- Constant Field Values
-
SERVICE_CATEGORIZE
public static final String SERVICE_CATEGORIZE
Only for composum: service name for categorization.- See Also:
- Constant Field Values
-
-
Method Detail
-
getServicePermissions
public List<GPTPermissionInfo.GPTPermissionInfoItem> getServicePermissions()
List of service permissions.
-
setServicePermissions
public void setServicePermissions(List<GPTPermissionInfo.GPTPermissionInfoItem> servicePermissions)
-
allows
public boolean allows(@Nullable String service, @Nullable String resourceType)
Checks whether this allows the given service for the given resourceType
-
mergeAdditively
@Nullable public static GPTPermissionInfo mergeAdditively(@Nullable GPTPermissionInfo info1, @Nullable GPTPermissionInfo info2)
Joins the permission informations additively.
-
from
@Nullable public static GPTPermissionInfo from(@Nullable GPTPermissionConfiguration configuration)
-
-