本文整理汇总了Java中framework.commons.DataType.getDataType方法的典型用法代码示例。如果您正苦于以下问题:Java DataType.getDataType方法的具体用法?Java DataType.getDataType怎么用?Java DataType.getDataType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类framework.commons.DataType
的用法示例。
在下文中一共展示了DataType.getDataType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addSystemLevelRoleType
import framework.commons.DataType; //导入方法依赖的package包/类
@Override
public void addSystemLevelRoleType(String uid, String systemLevelRoleTypeName) throws AccountManagementException {
if (log.isDebugEnabled()) {
log.debug("Adding role " + systemLevelRoleTypeName + " for user account with uid " + uid);
}
invalidateUserAccountCache(uid);
Principal userPrincipal = findPrincipalAndCheckForAuthenticationBackEndConsistency(uid);
if (!userPrincipal.getAccountTypeAsObject().isRolesEditable())
return;
userPrincipal.addSystemLevelRole(getAllRoles().get(systemLevelRoleTypeName));
// Notify the MAF modules
UserEventMessage eventMessage = new UserEventMessage(userPrincipal.id, DataType.getDataType(IFrameworkConstants.User),
UserEventMessage.MessageType.OBJECT_UPDATED);
postToPlugginManagerService(eventMessage);
log.info(String.format("Group %s added for uid %s", systemLevelRoleTypeName, uid));
}
示例2: updateBasicUserData
import framework.commons.DataType; //导入方法依赖的package包/类
@Override
public void updateBasicUserData(String uid, String firstName, String lastName) throws AccountManagementException {
if (log.isDebugEnabled()) {
log.debug("Updating the user basic data for account uid " + uid + " with " + firstName + " " + lastName);
}
invalidateUserAccountCache(uid);
getAuthenticationAccountWriterPlugin().updateUserProfile(uid, firstName, lastName, null);
Principal principal = findPrincipalFromUid(uid);
// Notify the MAF modules
UserEventMessage eventMessage = new UserEventMessage(principal.id, DataType.getDataType(IFrameworkConstants.User),
UserEventMessage.MessageType.OBJECT_UPDATED);
postToPlugginManagerService(eventMessage);
log.info(String.format("User basic data updated with uid %s", uid));
}
示例3: updateUserAccountType
import framework.commons.DataType; //导入方法依赖的package包/类
@Override
public void updateUserAccountType(String uid, AccountType accountType) throws AccountManagementException {
if (log.isDebugEnabled()) {
log.debug("Changing the user account type for account uid " + uid + " with account type " + accountType);
}
invalidateUserAccountCache(uid);
Principal userPrincipal = findPrincipalAndCheckForAuthenticationBackEndConsistency(uid);
userPrincipal.accountType = accountType.name();
userPrincipal.removeAllSystemLevelRoles();
addingRolesToPrincipalForAccountType(userPrincipal, accountType, null);
userPrincipal.save();
// Notify the MAF modules
UserEventMessage eventMessage = new UserEventMessage(userPrincipal.id, DataType.getDataType(IFrameworkConstants.User),
UserEventMessage.MessageType.OBJECT_UPDATED);
postToPlugginManagerService(eventMessage);
log.info(String.format("User account type updated with uid %s and account type %s", uid, accountType.name()));
}
示例4: manageGroup
import framework.commons.DataType; //导入方法依赖的package包/类
/**
* Displays the form for creating or editing a group
*
* @param dataTypeName the custom attribute associated {@link DataType}
* @param id the id of the group (0 if it is a creation)
*/
public Result manageGroup(String dataTypeName, Long id) {
DataType dataType = DataType.getDataType(dataTypeName);
Form<CustomAttributeGroupFormData> form = groupFormTemplate;
if (!id.equals(0L)) {
CustomAttributeGroup customAttributeGroup = CustomAttributeGroup.getById(id);
form = groupFormTemplate.fill(new CustomAttributeGroupFormData(customAttributeGroup, getI18nMessagesPlugin()));
}
return ok(views.html.admin.config.customattribute.group_manage.render(dataType, form));
}
示例5: addSystemLevelRoleTypes
import framework.commons.DataType; //导入方法依赖的package包/类
@Override
public void addSystemLevelRoleTypes(String uid, List<String> systemLevelRoleTypeNames) throws AccountManagementException {
if (log.isDebugEnabled()) {
log.debug("Adding roles " + systemLevelRoleTypeNames + " for user account with uid " + uid);
}
invalidateUserAccountCache(uid);
Ebean.beginTransaction();
try {
Principal userPrincipal = findPrincipalAndCheckForAuthenticationBackEndConsistency(uid);
if (!userPrincipal.getAccountTypeAsObject().isRolesEditable())
return;
for (String systemLevelRoleTypeName : systemLevelRoleTypeNames) {
userPrincipal.addSystemLevelRole(getAllRoles().get(systemLevelRoleTypeName));
}
// Notify the MAF modules
UserEventMessage eventMessage = new UserEventMessage(userPrincipal.id, DataType.getDataType(IFrameworkConstants.User),
UserEventMessage.MessageType.OBJECT_UPDATED);
postToPlugginManagerService(eventMessage);
Ebean.commitTransaction();
} catch (Exception e) {
Ebean.rollbackTransaction();
String message = String.format("Error during the addition of a set of groups for uid=%s", uid);
log.error(message, e);
throw new AccountManagementException(message, e);
} finally {
Ebean.endTransaction();
}
log.info(String.format("User groups added for uid %s with groups", uid));
}
示例6: getRegistrationConfiguratorControllerClassNames
import framework.commons.DataType; //导入方法依赖的package包/类
@Override
public Map<DataType, String> getRegistrationConfiguratorControllerClassNames() {
if (registrationControllers == null) {
registrationControllers = Collections.synchronizedMap(new HashMap<>());
if (getPluginDescriptor().getRegistrationConfigurationControllerDescriptors() != null) {
for (PluginRegistrationConfiguratorControllerDescriptor desc : getPluginDescriptor().getRegistrationConfigurationControllerDescriptors()) {
DataType dataType = DataType.getDataType(desc.getDataType());
registrationControllers.put(dataType, desc.getControllerClass());
}
registrationControllers = Collections.unmodifiableMap(registrationControllers);
}
}
return registrationControllers;
}
示例7: updateActivationStatus
import framework.commons.DataType; //导入方法依赖的package包/类
@Override
public void updateActivationStatus(String uid, boolean isActive) throws AccountManagementException {
if (log.isDebugEnabled()) {
log.debug("Updating the activation status for account uid " + uid + " with " + isActive);
}
invalidateUserAccountCache(uid);
Ebean.beginTransaction();
try {
// Create the entry in the database
Principal userPrincipal = findPrincipalAndCheckForAuthenticationBackEndConsistency(uid);
userPrincipal.isActive = isActive;
userPrincipal.save();
getAuthenticationAccountWriterPlugin().changeActivationStatus(uid, isActive);
// Notify the MAF modules
UserEventMessage eventMessage = new UserEventMessage(userPrincipal.id, DataType.getDataType(IFrameworkConstants.User),
UserEventMessage.MessageType.OBJECT_STATUS_CHANGED);
postToPlugginManagerService(eventMessage);
Ebean.commitTransaction();
} catch (Exception e) {
Ebean.rollbackTransaction();
String message = String.format("Error during the update of the activation status of account uid=%s", uid);
log.error(message, e);
throw new AccountManagementException(message, e);
} finally {
Ebean.endTransaction();
}
log.info(String.format("Activation status changed for user %s with %s", uid, isActive));
}
示例8: removeSystemLevelRoleTypes
import framework.commons.DataType; //导入方法依赖的package包/类
@Override
public void removeSystemLevelRoleTypes(String uid, List<String> systemLevelRoleTypeNames) throws AccountManagementException {
if (log.isDebugEnabled()) {
log.debug("Removing roles " + systemLevelRoleTypeNames + " for user account with uid " + uid);
}
invalidateUserAccountCache(uid);
try {
Principal userPrincipal = findPrincipalAndCheckForAuthenticationBackEndConsistency(uid);
if (!userPrincipal.getAccountTypeAsObject().isRolesEditable())
return;
for (String groupName : systemLevelRoleTypeNames) {
userPrincipal.removeSystemLevelRole(getAllRoles().get(groupName));
}
// Notify the MAF modules
UserEventMessage eventMessage = new UserEventMessage(userPrincipal.id, DataType.getDataType(IFrameworkConstants.User),
UserEventMessage.MessageType.OBJECT_UPDATED);
postToPlugginManagerService(eventMessage);
} catch (Exception e) {
Ebean.rollbackTransaction();
String message = String.format("Error during the removal of a set of groups for uid=%s", uid);
log.error(message, e);
throw new AccountManagementException(message, e);
} finally {
Ebean.endTransaction();
}
log.info(String.format("User groups removed for uid %s with groups", uid));
}
示例9: getBudgetBucket
import framework.commons.DataType; //导入方法依赖的package包/类
public static DataType getBudgetBucket() {
return DataType.getDataType(IMafConstants.BudgetBucket);
}
示例10: getDeliverable
import framework.commons.DataType; //导入方法依赖的package包/类
public static DataType getDeliverable() {
return DataType.getDataType(IMafConstants.Deliverable);
}
示例11: getRequirement
import framework.commons.DataType; //导入方法依赖的package包/类
public static DataType getRequirement() {
return DataType.getDataType(IMafConstants.Requirement);
}
示例12: getPortfolioEntryBudgetLine
import framework.commons.DataType; //导入方法依赖的package包/类
public static DataType getPortfolioEntryBudgetLine() {
return DataType.getDataType(IMafConstants.PortfolioEntryBudgetLine);
}
示例13: getPortfolioEntryEvent
import framework.commons.DataType; //导入方法依赖的package包/类
public static DataType getPortfolioEntryEvent() {
return DataType.getDataType(IMafConstants.PortfolioEntryEvent);
}
示例14: getPurchaseOrderLineItem
import framework.commons.DataType; //导入方法依赖的package包/类
public static DataType getPurchaseOrderLineItem() {
return DataType.getDataType(IMafConstants.PurchaseOrderLineItem);
}
示例15: getLifeCycleMilestoneInstance
import framework.commons.DataType; //导入方法依赖的package包/类
public static DataType getLifeCycleMilestoneInstance() {
return DataType.getDataType(IMafConstants.LifeCycleMilestoneInstance);
}