-/*
- * Copyright (C) 2007-2012 Argeo GmbH
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
package org.argeo.cms.ui.workbench.internal.useradmin.parts;
+import static org.argeo.api.NodeInstance.WORKGROUP;
import static org.argeo.cms.auth.UserAdminUtils.setProperty;
import static org.argeo.naming.LdapAttrs.businessCategory;
import static org.argeo.naming.LdapAttrs.description;
-import static org.argeo.node.NodeInstance.WORKGROUP;
import java.util.ArrayList;
import java.util.Iterator;
import javax.jcr.Session;
import javax.naming.InvalidNameException;
import javax.naming.ldap.LdapName;
-import javax.transaction.UserTransaction;
+import org.argeo.api.NodeInstance;
+import org.argeo.api.NodeUtils;
import org.argeo.cms.ArgeoNames;
import org.argeo.cms.CmsException;
+import org.argeo.cms.auth.UserAdminUtils;
+import org.argeo.cms.ui.util.CmsUiUtils;
import org.argeo.cms.ui.workbench.CmsWorkbenchStyles;
import org.argeo.cms.ui.workbench.internal.useradmin.SecurityAdminImages;
import org.argeo.cms.ui.workbench.internal.useradmin.UserAdminWrapper;
import org.argeo.cms.ui.workbench.internal.useradmin.providers.RoleIconLP;
import org.argeo.cms.ui.workbench.internal.useradmin.providers.UserFilter;
import org.argeo.cms.ui.workbench.internal.useradmin.providers.UserTableDefaultDClickListener;
-import org.argeo.cms.util.CmsUtils;
-import org.argeo.cms.auth.UserAdminUtils;
import org.argeo.eclipse.ui.ColumnDefinition;
import org.argeo.eclipse.ui.EclipseUiUtils;
import org.argeo.eclipse.ui.parts.LdifUsersTable;
import org.argeo.jcr.JcrUtils;
import org.argeo.naming.LdapAttrs;
-import org.argeo.node.NodeInstance;
-import org.argeo.node.NodeUtils;
+import org.argeo.osgi.transaction.WorkTransaction;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.dialogs.MessageDialog;
userAdminWrapper.notifyListeners(new UserAdminEvent(null, UserAdminEvent.ROLE_CHANGED, myGroup));
} else if (role.getType() == Role.USER) {
// TODO check if the group is already member of this group
- UserTransaction transaction = userAdminWrapper.beginTransactionIfNeeded();
+ WorkTransaction transaction = userAdminWrapper.beginTransactionIfNeeded();
User user = (User) role;
myGroup.addMember(user);
if (UserAdminWrapper.COMMIT_ON_SAVE)
// lbl.setFont(EclipseUiUtils.getBoldFont(parent));
// Text text = toolkit.createText(parent, value, SWT.BORDER);
// text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
- // CmsUtils.style(text, CmsWorkbenchStyles.WORKBENCH_FORM_TEXT);
+ // CmsUiUtils.style(text, CmsWorkbenchStyles.WORKBENCH_FORM_TEXT);
// return text;
// }
//
Text text = toolkit.createText(parent, value, SWT.NONE);
text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
text.setEditable(false);
- CmsUtils.style(text, CmsWorkbenchStyles.WORKBENCH_FORM_TEXT);
+ CmsUiUtils.style(text, CmsWorkbenchStyles.WORKBENCH_FORM_TEXT);
return text;
}