本文整理匯總了Java中javax.naming.Name.addAll方法的典型用法代碼示例。如果您正苦於以下問題:Java Name.addAll方法的具體用法?Java Name.addAll怎麽用?Java Name.addAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.naming.Name
的用法示例。
在下文中一共展示了Name.addAll方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getDistinguishedName
import javax.naming.Name; //導入方法依賴的package包/類
/**
* Returns the distinguished name of a search result.
*
* @param context Our DirContext
* @param base The base DN
* @param result The search result
* @return String containing the distinguished name
*/
protected String getDistinguishedName(DirContext context, String base, SearchResult result)
throws NamingException {
// Get the entry's distinguished name
NameParser parser = context.getNameParser("");
Name contextName = parser.parse(context.getNameInNamespace());
Name baseName = parser.parse(base);
// Bugzilla 32269
Name entryName = parser.parse(new CompositeName(result.getName()).get(0));
Name name = contextName.addAll(baseName);
name = name.addAll(entryName);
return name.toString();
}
示例2: composeName
import javax.naming.Name; //導入方法依賴的package包/類
/**
* Returns composition of prefix and name .
*
* @param name name relative to this context
* @param prefix name of this context Example: composeName("a","b") : b/a composeName("a","") : a
*
*/
public Name composeName(Name name, Name prefix) throws NamingException {
checkIsDestroyed();
// We do not want to modify any of the parameters (JNDI requirement).
// Clone <code> prefix </code> to satisfy the requirement.
Name parsedPrefix = getParsedName((Name) prefix.clone());
Name parsedName = getParsedName(name);
return parsedPrefix.addAll(parsedName);
}
示例3: composeName
import javax.naming.Name; //導入方法依賴的package包/類
/**
* Composes the name of this context with a name relative to this context.
* <p>
* Given a name (name) relative to this context, and the name (prefix)
* of this context relative to one of its ancestors, this method returns
* the composition of the two names using the syntax appropriate for the
* naming system(s) involved. That is, if name names an object relative
* to this context, the result is the name of the same object, but
* relative to the ancestor context. None of the names may be null.
*
* @param name a name relative to this context
* @param prefix the name of this context relative to one of its ancestors
* @return the composition of prefix and name
* @exception NamingException if a naming exception is encountered
*/
@Override
public Name composeName(Name name, Name prefix)
throws NamingException {
Name prefixClone = (Name) prefix.clone();
return prefixClone.addAll(name);
}
示例4: composeName
import javax.naming.Name; //導入方法依賴的package包/類
/**
* Composes the name of this context with a name relative to this context.
* <p>
* Given a name (name) relative to this context, and the name (prefix)
* of this context relative to one of its ancestors, this method returns
* the composition of the two names using the syntax appropriate for the
* naming system(s) involved. That is, if name names an object relative
* to this context, the result is the name of the same object, but
* relative to the ancestor context. None of the names may be null.
*
* @param name a name relative to this context
* @param prefix the name of this context relative to one of its ancestors
* @return the composition of prefix and name
* @exception NamingException if a naming exception is encountered
*/
@Override
public Name composeName(Name name, Name prefix)
throws NamingException {
Name clone = (Name) prefix.clone();
return clone.addAll(name);
}
示例5: composeName
import javax.naming.Name; //導入方法依賴的package包/類
/**
* Composes the name of this context with a name relative to this context.
* <p>
* Given a name (name) relative to this context, and the name (prefix)
* of this context relative to one of its ancestors, this method returns
* the composition of the two names using the syntax appropriate for the
* naming system(s) involved. That is, if name names an object relative
* to this context, the result is the name of the same object, but
* relative to the ancestor context. None of the names may be null.
*
* @param name a name relative to this context
* @param prefix the name of this context relative to one of its ancestors
* @return the composition of prefix and name
* @exception NamingException if a naming exception is encountered
*/
@Override
public Name composeName(Name name, Name prefix)
throws NamingException {
Name prefixClone = (Name) prefix.clone();
return prefixClone.addAll(name);
}
示例6: composeName
import javax.naming.Name; //導入方法依賴的package包/類
/**
* Composes the name of this context with a name relative to this context.
* <p>
* Given a name (name) relative to this context, and the name (prefix) of
* this context relative to one of its ancestors, this method returns the
* composition of the two names using the syntax appropriate for the naming
* system(s) involved. That is, if name names an object relative to this
* context, the result is the name of the same object, but relative to the
* ancestor context. None of the names may be null.
*
* @param name
* a name relative to this context
* @param prefix
* the name of this context relative to one of its ancestors
* @return the composition of prefix and name
* @exception NamingException
* if a naming exception is encountered
*/
@Override
public Name composeName(Name name, Name prefix) throws NamingException {
Name prefixClone = (Name) prefix.clone();
return prefixClone.addAll(name);
}
示例7: composeName
import javax.naming.Name; //導入方法依賴的package包/類
/**
* Composes the name of this context with a name relative to this context.
* <p>
* Given a name (name) relative to this context, and the name (prefix) of
* this context relative to one of its ancestors, this method returns the
* composition of the two names using the syntax appropriate for the naming
* system(s) involved. That is, if name names an object relative to this
* context, the result is the name of the same object, but relative to the
* ancestor context. None of the names may be null.
*
* @param name
* a name relative to this context
* @param prefix
* the name of this context relative to one of its ancestors
* @return the composition of prefix and name
* @exception NamingException
* if a naming exception is encountered
*/
@Override
public Name composeName(Name name, Name prefix) throws NamingException {
Name clone = (Name) prefix.clone();
return clone.addAll(name);
}
示例8: composeName
import javax.naming.Name; //導入方法依賴的package包/類
/**
* Composes the name of this context with a name relative to this context.
* <p>
* Given a name (name) relative to this context, and the name (prefix) of
* this context relative to one of its ancestors, this method returns the
* composition of the two names using the syntax appropriate for the naming
* system(s) involved. That is, if name names an object relative to this
* context, the result is the name of the same object, but relative to the
* ancestor context. None of the names may be null.
*
* @param name
* a name relative to this context
* @param prefix
* the name of this context relative to one of its ancestors
* @return the composition of prefix and name
* @exception NamingException
* if a naming exception is encountered
*/
@Override
public Name composeName(Name name, Name prefix) throws NamingException {
Name prefixClone = (Name) prefix.clone();
return prefixClone.addAll(name);
}