Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ dependency_tree.txt
itests/snapshots_repository/
itests/archives/
.env.local
.venv*
javadoc_*
1 change: 1 addition & 0 deletions api/src/main/java/org/apache/unomi/api/ClusterNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class ClusterNode extends Item {

private static final long serialVersionUID = 1281422346318230514L;

// Item type identifier for cluster nodes.
public static final String ITEM_TYPE = "clusterNode";

private double cpuLoad;
Expand Down
3 changes: 3 additions & 0 deletions api/src/main/java/org/apache/unomi/api/ConsentStatus.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
* remove a consent for a profile.
*/
public enum ConsentStatus {
// Consent has been granted.
GRANTED,
// Consent has been denied.
DENIED,
// Consent has been revoked.
REVOKED
}
20 changes: 20 additions & 0 deletions api/src/main/java/org/apache/unomi/api/ContextRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,20 @@ public void setFilters(List<PersonalizationService.PersonalizedContent> filters)
this.filters = filters;
}

/**
* Returns the list of personalization requests.
*
* @return the list of personalization requests
*/
public List<PersonalizationService.PersonalizationRequest> getPersonalizations() {
return personalizations;
}

/**
* Sets the list of personalization requests.
*
* @param personalizations the list of personalization requests
*/
public void setPersonalizations(List<PersonalizationService.PersonalizationRequest> personalizations) {
this.personalizations = personalizations;
}
Expand Down Expand Up @@ -292,10 +302,20 @@ public void setProfileId(String profileId) {
this.profileId = profileId;
}

/**
* Returns the client ID for this request.
*
* @return the client ID
*/
public String getClientId() {
return clientId;
}

/**
* Sets the client ID for this request.
*
* @param clientId the client ID
*/
public void setClientId(String clientId) {
this.clientId = clientId;
}
Expand Down
27 changes: 27 additions & 0 deletions api/src/main/java/org/apache/unomi/api/ContextResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,27 @@ public void setFilteringResults(Map<String, Boolean> filteringResults) {
}


/**
* Returns the number of events processed in this request.
*
* @return the number of events processed in this request
*/
public int getProcessedEvents() {
return processedEvents;
}

/**
* Sets the number of processed events.
*
* @param processedEvents the count
*/
public void setProcessedEvents(int processedEvents) {
this.processedEvents = processedEvents;
}

/**
* @deprecated personalizations results are more complex since 2.1.0 and they are now available under: getPersonalizationResults()
* @return the personalization results map
*/
@Deprecated
public Map<String, List<String>> getPersonalizations() {
Expand All @@ -210,6 +221,7 @@ public Map<String, List<String>> getPersonalizations() {

/**
* @deprecated personalizations results are more complex since 2.1.0 and they are now available under: setPersonalizationResults()
* @param personalizations the personalization results
*/
@Deprecated
public void setPersonalizations(Map<String, List<String>> personalizations) {
Expand All @@ -224,6 +236,11 @@ public Map<String, PersonalizationResult> getPersonalizationResults() {
return personalizationResults;
}

/**
* Sets the personalization results.
*
* @param personalizationResults the results map
*/
public void setPersonalizationResults(Map<String, PersonalizationResult> personalizationResults) {
this.personalizationResults = personalizationResults;
}
Expand Down Expand Up @@ -289,10 +306,20 @@ public void setConsents(Map<String, Consent> consents) {
this.consents = consents;
}

/**
* Returns the request tracing data.
*
* @return the request tracing data
*/
public TraceNode getRequestTracing() {
return requestTracing;
}

/**
* Sets the request tracing data.
*
* @param requestTracing the tracing node
*/
public void setRequestTracing(TraceNode requestTracing) {
this.requestTracing = requestTracing;
}
Expand Down
10 changes: 10 additions & 0 deletions api/src/main/java/org/apache/unomi/api/CustomItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,20 @@ public void setProperties(Map<String, Object> properties) {
this.properties = properties;
}

/**
* Returns the custom item type identifier.
*
* @return the custom item type identifier
*/
public String getCustomItemType() {
return customItemType;
}

/**
* Sets the custom item type identifier.
*
* @param customItemType the custom item type identifier
*/
public void setCustomItemType(String customItemType) {
this.customItemType = customItemType;
}
Expand Down
77 changes: 77 additions & 0 deletions api/src/main/java/org/apache/unomi/api/Item.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ public String getItemType() {
return itemType;
}

/**
* Sets the Item's type.
*
* @param itemType the Item's type
*/
public void setItemType(String itemType) {
this.itemType = itemType;
}
Expand All @@ -137,6 +142,11 @@ public String getScope() {
return scope;
}

/**
* Sets the Item's scope.
*
* @param scope the Item's scope
*/
public void setScope(String scope) {
this.scope = scope;
}
Expand Down Expand Up @@ -164,10 +174,22 @@ public void setVersion(Long version) {
this.version = version;
}

/**
* Returns the system metadata for the given key.
*
* @param key the key
* @return the system metadata for the given key
*/
public Object getSystemMetadata(String key) {
return systemMetadata.get(key);
}

/**
* Sets the system metadata for the given key.
*
* @param key the key
* @param value the value
*/
public void setSystemMetadata(String key, Object value) {
systemMetadata.put(key, value);
}
Expand All @@ -176,6 +198,11 @@ public String getTenantId() {
return tenantId;
}

/**
* Sets the tenant ID.
*
* @param tenantId the tenant ID
*/
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
Expand All @@ -185,6 +212,11 @@ public String getCreatedBy() {
return createdBy;
}

/**
* Sets the created by.
*
* @param createdBy the created by
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
Expand All @@ -193,38 +225,83 @@ public String getLastModifiedBy() {
return lastModifiedBy;
}

/**
* Sets the last modified by.
*
* @param lastModifiedBy the last modified by
*/
public void setLastModifiedBy(String lastModifiedBy) {
this.lastModifiedBy = lastModifiedBy;
}

/**
* Returns the date when this item was created.
*
* @return the date when this item was created
*/
public Date getCreationDate() {
return creationDate;
}

/**
* Sets the date when this item was created.
*
* @param creationDate the creation date
*/
public void setCreationDate(Date creationDate) {
this.creationDate = creationDate;
}

/**
* Returns the date when this item was last modified.
*
* @return the date when this item was last modified
*/
public Date getLastModificationDate() {
return lastModificationDate;
}

/**
* Sets the date when this item was last modified.
*
* @param lastModificationDate the last modification date
*/
public void setLastModificationDate(Date lastModificationDate) {
this.lastModificationDate = lastModificationDate;
}

/**
* Returns the source instance ID.
*
* @return the source instance ID
*/
public String getSourceInstanceId() {
return sourceInstanceId;
}

/**
* Sets the source instance ID.
*
* @param sourceInstanceId the source instance ID
*/
public void setSourceInstanceId(String sourceInstanceId) {
this.sourceInstanceId = sourceInstanceId;
}

/**
* Returns the last synchronization date.
*
* @return the last synchronization date
*/
public Date getLastSyncDate() {
return lastSyncDate;
}

/**
* Sets the last synchronization date.
*
* @param lastSyncDate the last synchronization date
*/
public void setLastSyncDate(Date lastSyncDate) {
this.lastSyncDate = lastSyncDate;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
* A type definition for {@link Action}s.
*/
public class ActionType extends MetadataItem implements PluginType, YamlConvertible {
/** Item type identifier for action types. */
public static final String ITEM_TYPE = "actionType";

private static final long serialVersionUID = -3522958600710010935L;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
* parameters may test whether a given property has a specific value: “User property x has value y”.
*/
public class ConditionType extends MetadataItem implements PluginType, YamlConvertible {
/** Item type identifier for condition types. */
public static final String ITEM_TYPE = "conditionType";

private static final long serialVersionUID = -6965481691241954969L;
Expand Down
Loading
Loading