<%@page language="java"%> <%@page import="com.ptc.windchill.pdmlink.repository.common.*"%> <%@page import="com.infoengine.util.Base64"%> <%@taglib uri="http://www.ptc.com/infoengine/taglib/core"; prefix="ie"%> <%! String INSTANCE="local.danbury.pdmlink.Windchill";%> <% String description = request.getParameter("description"); if ( description==null || description.trim().length()==0) description = null; String showForm = request.getParameter("form"); if ( showForm == null ) {%>

Rename Existing Product or Repository

This tool is unsupported by PTC and should be only used by Administrators. Enter the name of the Product or Repository without slashes exactly as it appears on screen. The database should be backed up BEFORE running this tool. In addition, each successful run of this tool will result in restarting of the Method Server. It should therefore be run off hours.
Old Name:
New Name:
New Description: (to leave Description unchanged, leave this field blank)
<%} else {%> <% if (description != null ) {%> <%}%> Updated The Cabinet
Updated The Product Master
<% if (description != null ) {%> <%}%> Updated The Templates Cabinet
<% if (description != null ) {%> <%}%> Updated The Administrative Domain
<% String authHeader = request.getHeader ("Authorization"); String authUser = null; String authPass = null; try { if ( authHeader != null && authHeader.substring (0,6).equalsIgnoreCase ("Basic ") ) { String decoded =Base64.decode (authHeader.substring (6).trim()); if ( decoded != null ) { int i = decoded.indexOf (":"); if ( i != -1 ) { authUser = decoded.substring (0, i); authPass = decoded.substring (i + 1); } } } wt.util.WTContext.init((String[])null); if(authUser!=null) wt.method.RemoteMethodServer.getDefault().setUserName(authUser); if(authPass!=null) wt.method.RemoteMethodServer.getDefault().setPassword(authPass); wt.method.RemoteMethodServer.getDefault().stopAllServers(); out.println("Killed The Method Server
"); wt.manager.RemoteServerManager.getDefault().reportDeadServer("MethodServer", wt.manager.RemoteServerManager.getDefault().getServer("MethodServer"), new Exception("changed Repository Name by Admin Portal")); out.println("Restarted The Method Server"); wt.manager.ServerLauncher.start(); } catch( Exception e ) { e.printStackTrace(); } %>
Done with updates!
<%}%>