@Override public void rename(Name oldName, Name newName) throws NamingException { context.rename(oldName, newName); }
@Override public void rename(String oldName, String newName) throws NamingException { context.rename(oldName, newName); }
@Override public void rename(final String oldName, final String newName) throws NamingException { CNCtxFactory.INSTANCE.getInitialContext(environment).rename(oldName, newName); }
@Override public void rename(final Name oldName, final Name newName) throws NamingException { CNCtxFactory.INSTANCE.getInitialContext(environment).rename(oldName, newName); }
@Override protected Object doOperation(HttpServerExchange exchange, String name) throws NamingException { Deque<String> newName = exchange.getQueryParameters().get("new"); if (newName == null || newName.isEmpty()) { exchange.setStatusCode(StatusCodes.BAD_REQUEST); exchange.endExchange(); return null; } try { String nn = URLDecoder.decode(newName.getFirst(), UTF_8); localContext.rename(name, nn); return null; } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } } }
@Override public void rename(final Name oldName, final Name newName) throws NamingException { Assert.checkNotNullParam("oldName", oldName); Assert.checkNotNullParam("newName", newName); final ReparsedName oldReparsedName = reparse(oldName); final ReparsedName newReparsedName = reparse(newName); ContextResult result = getProviderContext(oldReparsedName.getUrlScheme()); if(result.oldStyle) { result.context.rename(oldName, newName); } else { result.context.rename(oldReparsedName.getName(), newReparsedName.getName()); } }
@Override public void rename(final String oldName, final String newName) throws NamingException { Assert.checkNotNullParam("oldName", oldName); Assert.checkNotNullParam("newName", newName); final ReparsedName oldReparsedName = reparse(getNameParser().parse(oldName)); final ReparsedName newReparsedName = reparse(getNameParser().parse(newName)); ContextResult result = getProviderContext(oldReparsedName.getUrlScheme()); if(result.oldStyle) { result.context.rename(oldName, newName); } else { result.context.rename(oldReparsedName.getName(), newReparsedName.getName()); } }
void handleRename(final MessageInputStream message, final int messageId, final int id) throws IOException { try (MessageInputStream mis = message) { if (version == 1) { try (Unmarshaller unmarshaller = createUnmarshaller(mis, configuration)) { int parameterType = unmarshaller.readUnsignedByte(); if (parameterType != Protocol.P_NAME) { Messages.log.unexpectedParameterType(Protocol.P_NAME, parameterType); } final Name oldName = unmarshaller.readObject(Name.class); parameterType = unmarshaller.readUnsignedByte(); if (parameterType != Protocol.P_NAME) { Messages.log.unexpectedParameterType(Protocol.P_NAME, parameterType); } final Name newName = unmarshaller.readObject(Name.class); localContext.rename(oldName, newName); } catch (ClassNotFoundException e) { throw new IOException(e); } } else { mis.readInt(); // consume authId final String oldName = mis.readUTF(); final String newName = mis.readUTF(); localContext.rename(oldName, newName); } } catch (NamingException e) { writeExceptionResponse(e, messageId, id); return; } writeSuccessResponse(messageId, id); }
context3.rename("java:comp/env/jdbc/myds", "jdbc/myds"); context3.unbind("myobject");
final Context context = (Context) next; try { context.rename(oldName.getSuffix(1), newName.getSuffix(1)); } finally { NamingUtils.safeClose(context);
@Override public Object operation() throws NamingException { getDelegate().rename(oldName, newName); return null; } }.perform();
@Override public Object operation() throws NamingException { getDelegate().rename(oldName, newName); return null; } }.perform();
/** * @see javax.naming.Context#rename(java.lang.String, java.lang.String) */ public void rename(String oldName, String newName) throws NamingException { this.assertOpen(); this.getDelegateContext().rename(oldName, newName); }
/** * @see Context#rename(String, String) */ public void rename(String oldName, String newName) throws NamingException { this.assertOpen(); this.getDelegateContext().rename(oldName, newName); }
/** * @see javax.naming.Context#rename(javax.naming.Name, javax.naming.Name) */ public void rename(Name oldName, Name newName) throws NamingException { this.assertOpen(); this.getDelegateContext().rename(oldName, newName); }
/** * @see Context#rename(Name, Name) */ public void rename(Name oldName, Name newName) throws NamingException { this.assertOpen(); this.getDelegateContext().rename(oldName, newName); }
protected Object executeLast() throws Exception { getContext().rename((String) getParameters()[0], (String) getParameters()[1]); return null; }
protected Object executeLast() throws Exception { getContext().rename((Name) getParameters()[0], (Name) getParameters()[1]); return null; }
/** * Binds a new name to the object bound to an old name, and unbinds the old * name. This operation is not supported (read only env.) * @param oldName the name of the existing binding; may not be empty * @param newName the name of the new binding; may not be empty * @throws NamingException if a naming exception is encountered */ public void rename(Name oldName, Name newName) throws NamingException { findContext().rename(getRelativeName(oldName), getRelativeName(newName)); }
/** * Binds a new name to the object bound to an old name, and unbinds the old * name. Not supported. * @param oldName the name of the existing binding; may not be empty * @param newName the name of the new binding; may not be empty * @throws NamingException if a naming exception is encountered */ public void rename(String oldName, String newName) throws NamingException { findContext().rename(getRelativeName(oldName), getRelativeName(newName)); }