public boolean profileExist(ProfileID profileID) throws SystemException { Object profileFound = findProfileMBean(profileID.getProfileTableName(), profileID.getProfileName()); if (profileFound == null) return false; else return true; }
/** * 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); }
public MProfileSpecRef(org.mobicents.slee.container.component.deployment.jaxb.slee11.ra.ProfileSpecRef profileSpecRef11) { String profileSpecName = profileSpecRef11.getProfileSpecName().getvalue(); String profileSpecVendor = profileSpecRef11.getProfileSpecVendor().getvalue(); String profileSpecVersion = profileSpecRef11.getProfileSpecVersion().getvalue(); this.profileSpecificationID = new ProfileSpecificationID(profileSpecName, profileSpecVendor, profileSpecVersion); }
public void verifyAddress(Address address) throws ProfileVerificationException { // Check address plan if (address.getAddressPlan() != AddressPlan.SIP) throw new ProfileVerificationException("Address \"" + address + "\" is not a SIP address"); // Check URI scheme - must be sip: or sips: String uri = address.getAddressString().toLowerCase(); if (!(uri.startsWith("sip:") || uri.startsWith("sips:"))) throw new ProfileVerificationException("Address \"" + address + "\" is not a SIP address"); }
public Object getProfileAttributeValue(ProfileID profileID, String attributeName) throws SystemException { return getTransactionManager().getObject( tcache, this.generateProfileKey(profileID.getProfileName(), profileID .getProfileName()), attributeName); }
profileTableName = "CallControl"; ProfileTable table = getProfileFacility().getProfileTable(profileTableName); ProfileLocalObject plo=table.findProfileByAttribute("userAddress", address); profile = (CallControlProfileCMP) plo;
/** * * @param other * @return */ private boolean _equals(javax.slee.profile.ProfileLocalObject other) { if (!this.getProfileTableName().equals(other.getProfileTableName())) { return false; } if (this.getProfileName() == null) { if (other.getProfileName() == null) { return true; } else { return false; } } else { return this.getProfileName().equals(other.getProfileName()); } } /*
public ProfileTable getProfileTable(String profileTableName) throws NullPointerException, UnrecognizedProfileTableNameException, SLEEException { return sleeContainer.getSleeProfileTableManager().getProfileFacility().getProfileTable(profileTableName); }
/** * * @param profileEntityAfterAction */ AbstractProfileEvent(ProfileEntity profileEntityAfterAction, ProfileManagementImpl profileManagement) { this.profileManagement = profileManagement; this.profileAfterAction = profileEntityAfterAction; this.profileAddress = new Address(AddressPlan.SLEE_PROFILE, profileEntityAfterAction.getTableName() + "/" + profileEntityAfterAction.getProfileName()); this.profileID = new ProfileID(this.profileAddress); }
/** * * @param profileTableName * @param component * @return * @throws ProfileTableAlreadyExistsException * @throws SLEEException */ public ProfileTableImpl addProfileTable(final String profileTableName, ProfileSpecificationComponent component) throws ProfileTableAlreadyExistsException, SLEEException { try { getProfileTable(profileTableName); throw new ProfileTableAlreadyExistsException("there is already a profile table named "+profileTableName); } catch (UnrecognizedProfileTableNameException e) { // expected } return addProfileTableLocally(createProfileTableInstance(profileTableName, component),true,true); }
/** * * @param id * @return * @throws UnrecognizedProfileSpecificationException */ public Collection<String> getDeclaredProfileTableNames(ProfileSpecificationID id) throws UnrecognizedProfileSpecificationException { if (this.sleeContainer.getComponentRepository().getComponentByID(id) == null) { throw new UnrecognizedProfileSpecificationException("No such profile specification: " + id); } return profileTableFramework.getProfileTableNames(id); }
public ProfileSpecificationID getProfileSpecification( String profileTableName) throws NullPointerException, UnrecognizedProfileTableNameException, ManagementException { logger.debug("trying to get the profile specification for " + profileTableName + " ..."); if(profileTableName==null) throw new NullPointerException(); SleeProfileManager profileManager = SleeProfileManager .getInstance(); ProfileSpecificationID profileSpecificationID; try { profileSpecificationID = profileManager .findProfileSpecId(profileTableName); } catch (SystemException e) { throw new ManagementException("System-level failure",e); } if(profileSpecificationID==null) throw new UnrecognizedProfileTableNameException(); logger.debug("profile specification for " + profileTableName + " found :" + profileSpecificationID); return profileSpecificationID; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; MProfileSpecRef other = (MProfileSpecRef) obj; if (profileSpecAlias == null) { if (other.profileSpecAlias != null) return false; } else if (!profileSpecAlias.equals(other.profileSpecAlias)) return false; if (profileSpecificationID == null) { if (other.profileSpecificationID != null) return false; } else if (!profileSpecificationID.equals(other.profileSpecificationID)) return false; return true; }
public ObjectName getDefaultProfile(String profileTableName) throws NullPointerException, UnrecognizedProfileTableNameException, ManagementException { if (logger.isDebugEnabled()) { logger.debug("getDefaultProfile( profileTable = "+profileTableName+" )"); } try { return _getProfile(profileTableName,null); } catch (UnrecognizedProfileNameException e) { // can't happen throw new ManagementException(e.getMessage(),e); } }
/** * * @throws ReadOnlyProfileException */ private void checkProfileSpecIsNotReadOnly() throws ReadOnlyProfileException { if (component.getDescriptor().getReadOnly()) { throw new ReadOnlyProfileException(component.toString()); } }
public void reconfig() { for (String key : pools.keySet()) { ProfileTableImpl profileTable; try { profileTable = (ProfileTableImpl) sleeContainer.getSleeProfileTableManager().getProfileTable(key); } catch (UnrecognizedProfileTableNameException e) { throw new SLEEException(e.getMessage(),e); } createObjectPool(profileTable); } }
public MProfileSpecRef(org.mobicents.slee.container.component.deployment.jaxb.slee11.profile.ProfileSpecRef profileSpecRef11) { String profileSpecName = profileSpecRef11.getProfileSpecName().getvalue(); String profileSpecVendor = profileSpecRef11.getProfileSpecVendor().getvalue(); String profileSpecVersion = profileSpecRef11.getProfileSpecVersion().getvalue(); this.profileSpecificationID = new ProfileSpecificationID(profileSpecName, profileSpecVendor, profileSpecVersion); }
public MProfileSpecRef(org.mobicents.slee.container.component.deployment.jaxb.slee.sbb.ProfileSpecRef profileSpecRef10) { String profileSpecName = profileSpecRef10.getProfileSpecName().getvalue(); String profileSpecVendor = profileSpecRef10.getProfileSpecVendor().getvalue(); String profileSpecVersion = profileSpecRef10.getProfileSpecVersion().getvalue(); // Mandatory in JAIN SLEE 1.0 this.profileSpecAlias = profileSpecRef10.getProfileSpecAlias().getvalue(); this.profileSpecificationID = new ProfileSpecificationID(profileSpecName, profileSpecVendor, profileSpecVersion); }
public MProfileSpecRef(org.mobicents.slee.container.component.deployment.jaxb.slee11.sbb.ProfileSpecRef profileSpecRef11) { String profileSpecName = profileSpecRef11.getProfileSpecName().getvalue(); String profileSpecVendor = profileSpecRef11.getProfileSpecVendor().getvalue(); String profileSpecVersion = profileSpecRef11.getProfileSpecVersion().getvalue(); // Optional (deprecated) in JAIN SLEE 1.1 this.profileSpecAlias = profileSpecRef11.getProfileSpecAlias() == null ? null : profileSpecRef11.getProfileSpecAlias().getvalue(); this.profileSpecificationID = new ProfileSpecificationID(profileSpecName, profileSpecVendor, profileSpecVersion); }