userId = user.getUserId();
Group group = null;
if (targetClassName.equals(LayoutSetPrototype.class.getName())) {
LayoutSetPrototype layoutSetPrototype = getLayoutSetPrototype(
companyId, targetValue);
if (layoutSetPrototype != null) {
existing = true;
}
else {
layoutSetPrototype =
LayoutSetPrototypeLocalServiceUtil.addLayoutSetPrototype(
userId, companyId, getTargetValueMap(),
StringPool.BLANK, true, true, new ServiceContext());
}
group = layoutSetPrototype.getGroup();
targetClassPK = layoutSetPrototype.getLayoutSetPrototypeId();
}
else if (targetClassName.equals(Group.class.getName())) {
if (targetValue.equals(GroupConstants.GUEST)) {
group = GroupLocalServiceUtil.getGroup(
companyId, GroupConstants.GUEST);