@Override public String getNameInNamespace() throws NamingException { return context.getNameInNamespace(); } }
@Override public String getNameInNamespace() throws NamingException { return CNCtxFactory.INSTANCE.getInitialContext(environment).getNameInNamespace(); } }
/** * Gets the full dn of a name by prepending the name of the context it is relative to. * If the name already contains the base name, it is returned unaltered. */ public static DistinguishedName getFullDn(DistinguishedName dn, Context baseCtx) throws NamingException { DistinguishedName baseDn = new DistinguishedName(baseCtx.getNameInNamespace()); if (dn.contains(baseDn)) { return dn; } baseDn.append(dn); return baseDn; }
/** * Obtains the part of a DN relative to a supplied base context. * <p> * If the DN is "cn=bob,ou=people,dc=springframework,dc=org" and the base context name * is "ou=people,dc=springframework,dc=org" it would return "cn=bob". * </p> * * @param fullDn the DN * @param baseCtx the context to work out the name relative to. * * @return the * * @throws NamingException any exceptions thrown by the context are propagated. */ public static String getRelativeName(String fullDn, Context baseCtx) throws NamingException { String baseDn = baseCtx.getNameInNamespace(); if (baseDn.length() == 0) { return fullDn; } DistinguishedName base = new DistinguishedName(baseDn); DistinguishedName full = new DistinguishedName(fullDn); if (base.equals(full)) { return ""; } Assert.isTrue(full.startsWith(base), "Full DN does not start with base DN"); full.removeFirst(base); return full.toString(); }
public String getNameInNamespace() throws NamingException { return delegate.getNameInNamespace(); }
@Override public String getNameInNamespace() throws NamingException { return context.getNameInNamespace(); } }
/** * @see javax.naming.Context#getNameInNamespace() */ public String getNameInNamespace() throws NamingException { return _ctx.getNameInNamespace(); }
@Override public String getNameInNamespace() throws NamingException { return context.getNameInNamespace(); } }
@Override public Object operation() throws NamingException { return getDelegate().getNameInNamespace(); } }.perform();
@Override public String getNameInNamespace() throws NamingException { return CNCtxFactory.INSTANCE.getInitialContext(environment).getNameInNamespace(); } }
@Override public String getNameInNamespace() throws NamingException { String out; if (this.initialContext == null) { out = this.defaultInitCtx.getNameInNamespace(); } else { out = this.initialContext.getNameInNamespace(); } return out; }
public String getNameInNamespace() throws NamingException { if(serverModeEnabled) { return localContext.getNameInNamespace(); } else { LOGGER.warn("Cannot getNameInNamespace because server mode is not activated."); return null; } }
@Override public Object operation() throws NamingException { return getDelegate().getNameInNamespace(); } }.perform();
protected Name createBindingName(AbstractName abstractName, Object value) throws NamingException { if (value instanceof Context) { // don't bind yourself if (value == this) return null; Context context = (Context) value; String nameInNamespace = context.getNameInNamespace(); return getNameParser().parse(nameInNamespace); } throw new NamingException("value is not a context: abstractName=" + abstractName + " valueType=" + value.getClass().getName()); }
@Override protected Name createBindingName(AbstractName abstractName, Object value) throws NamingException { if (value instanceof Context) { // don't bind yourself if (value == this) return null; Context context = (Context) value; String nameInNamespace = context.getNameInNamespace(); return getContext().getNameParser("").parse(nameInNamespace); } throw new NamingException("value is not a context: abstractName=" + abstractName + " valueType=" + value.getClass().getName()); }
/** * @see javax.naming.Context#getNameInNamespace() */ public String getNameInNamespace() throws NamingException { this.assertOpen(); return this.getDelegateContext().getNameInNamespace(); }
/** * @see Context#getNameInNamespace() */ public String getNameInNamespace() throws NamingException { this.assertOpen(); return this.getDelegateContext().getNameInNamespace(); }
/** * @see Context#getNameInNamespace() */ public String getNameInNamespace() throws NamingException { this.assertOpen(); return this.getDelegateContext().getNameInNamespace(); }
/** * @see Context#getNameInNamespace() */ public String getNameInNamespace() throws NamingException { this.assertOpen(); return this.getDelegateContext().getNameInNamespace(); }
public String getNameInNamespace() throws NamingException { Name parsedNameInNamespace = context.getNameParser("").parse(context.getNameInNamespace()); return context.composeName(parsedNameInNamespace, nameInContext).toString(); } }