public Object getProfileAttributeValue(ProfileID profileID, String attributeName) throws SystemException { return getTransactionManager().getObject( tcache, this.generateProfileKey(profileID.getProfileName(), profileID .getProfileName()), attributeName); }
public boolean profileExist(ProfileID profileID) throws SystemException { Object profileFound = findProfileMBean(profileID.getProfileTableName(), profileID.getProfileName()); if (profileFound == null) return false; else return true; }
profiles.add(((ProfileID) obj).getProfileName());
/** * This method renames Profile Table in backend storage. NOTE: It should not be called directly, use SleeProfileTableManager instead! * @param newProfileTableName */ public void rename(String newProfileTableName) { //we have to do this like that cause once JPA is done, those profiles wont exist, since we do UPDATE of a table name, not a copy //thus no profiles will be returned on this call later on. ouch :) Collection<ProfileID> profileIDs = this.getProfiles(); component.getProfileEntityFramework().renameProfileTable(this.profileTableName, newProfileTableName); //here we remove beans. for(ProfileID pid: profileIDs) { try{ AbstractProfileMBeanImpl.close(pid.getProfileTableName(), pid.getProfileName()); }catch(Exception e) { if(logger.isEnabledFor(Level.WARN)) { logger.warn("Unexpected behaviour on MBean deregistration.", e); } } } }
try { ProfileTableImpl profileTable = ((ProfileManagementImpl)sleeContainer.getSleeProfileTableManager()).getProfileTable(profileId.getProfileTableName()); return profileTable.profileExists(profileId.getProfileName());
profileID.getProfileName()); String profileTableKey = this.generateProfileTableKey(profileID .getProfileTableName());
/** * Retrieves a profile given the cmp method name and profile id */ public static Object getProfileCMPMethod(SbbEntity sbbEntity, String getProfileCMPMethodName, ProfileID profileID) throws UnrecognizedProfileTableNameException, UnrecognizedProfileNameException { GetProfileCMPMethodDescriptor mGetProfileCMPMethod = sbbEntity.getSbbComponent() .getDescriptor().getGetProfileCMPMethods().get( getProfileCMPMethodName); if (mGetProfileCMPMethod == null) throw new AbstractMethodError("Profile CMP Method not found"); if (sbbEntity.getSbbObject().getState() != SbbObjectState.READY) { throw new IllegalStateException( "Could not invoke getProfileCMP Method, Sbb Object is not in the READY state!"); } ProfileManagement sleeProfileManager = sleeContainer .getSleeProfileTableManager(); ProfileTable profileTable = sleeProfileManager.getProfileTable(profileID.getProfileTableName()); if (!profileTable.profileExists(profileID.getProfileName())) { throw new UnrecognizedProfileNameException(profileID.toString()); } return profileTable.getProfile(profileID.getProfileName()).getProfileCmpSlee10Wrapper(); }
this.removeProfile(profileID.getProfileName(), false, isUninstall);
/** * Get an instance of a profile specified by the profileID given in parameter * @param method * @param profileID * @return * @throws SystemException */ private Object callGetProfileMethod(ProfileCMPMethod method, ProfileID profileID) throws UnrecognizedProfileTableNameException, UnrecognizedProfileNameException, SystemException{ SleeProfileManager sleeProfileManager=SleeProfileManager.getInstance(); try { if(sleeProfileManager.findProfileSpecId(profileID.getProfileTableName())==null) throw new UnrecognizedProfileTableNameException(); } catch (SystemException e) { throw new SLEEException("low-level failure"); } if(sleeProfileManager.findProfileMBean(profileID.getProfileTableName(),profileID.getProfileName())==null) throw new UnrecognizedProfileNameException(); //TODO call this method under a valid transaction context as defined in the spec return sleeProfileManager.getSbbCMPProfile(profileID); }