Codota Logo
Principal
Code IndexAdd Codota to your IDE (free)

How to use
Principal
in
com.sun.enterprise.deployment.runtime.connector

Best Java code snippets using com.sun.enterprise.deployment.runtime.connector.Principal (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: org.glassfish.main.deployment/dol

  /**
   * write the descriptor class to a DOM tree and return it
   *
   * @param parent node for the DOM tree
   * @param node name for the descriptor
   * @param the descriptor to write
   * @return the DOM tree top node
   */    
  public Node writeDescriptor(Node parent, String nodeName, Principal descriptor) {
  Element principalNode = (Element) super.writeDescriptor(parent, nodeName, descriptor);
  appendTextChild(principalNode, RuntimeTagNames.DESCRIPTION, descriptor.getDescription());
  setAttribute(principalNode, RuntimeTagNames.USER_NAME, (String) descriptor.getValue(Principal.USER_NAME));
  setAttribute(principalNode, RuntimeTagNames.PASSWORD, (String) descriptor.getValue(Principal.PASSWORD));
  setAttribute(principalNode, RuntimeTagNames.CREDENTIAL, (String) descriptor.getValue(Principal.CREDENTIAL));
  return principalNode;
  }
}
origin: org.glassfish.deployment/dol

/**
 * Adds  a new DOL descriptor instance to the descriptor instance associated with 
 * this XMLNode
 *
 * @param descriptor the new descriptor
 */
public void addDescriptor(Object newDescriptor) {
MapElement descriptor = (MapElement) getDescriptor();
if (descriptor==null) {
  throw new RuntimeException("Cannot set info on null descriptor");
}
if (newDescriptor instanceof Principal) {
  Principal principal = (Principal) newDescriptor;
  if (principal.getValue(Principal.CREDENTIAL)==null) {
  descriptor.addPrincipal(principal);
  } else {
  descriptor.setBackendPrincipal(true);
  descriptor.setAttributeValue(MapElement.BACKEND_PRINCIPAL, Principal.USER_NAME, principal.getValue(Principal.USER_NAME));
  descriptor.setAttributeValue(MapElement.BACKEND_PRINCIPAL, Principal.PASSWORD, principal.getValue(Principal.PASSWORD));
  descriptor.setAttributeValue(MapElement.BACKEND_PRINCIPAL, Principal.CREDENTIAL, principal.getValue(Principal.CREDENTIAL));
  
  }
}
}

origin: org.glassfish.main.deployment/dol

/**
 * Adds  a new DOL descriptor instance to the descriptor instance associated with 
 * this XMLNode
 *
 * @param descriptor the new descriptor
 */
public void addDescriptor(Object newDescriptor) {
MapElement descriptor = (MapElement) getDescriptor();
if (descriptor==null) {
  throw new RuntimeException("Cannot set info on null descriptor");
}
if (newDescriptor instanceof Principal) {
  Principal principal = (Principal) newDescriptor;
  if (principal.getValue(Principal.CREDENTIAL)==null) {
  descriptor.addPrincipal(principal);
  } else {
  descriptor.setBackendPrincipal(true);
  descriptor.setAttributeValue(MapElement.BACKEND_PRINCIPAL, Principal.USER_NAME, principal.getValue(Principal.USER_NAME));
  descriptor.setAttributeValue(MapElement.BACKEND_PRINCIPAL, Principal.PASSWORD, principal.getValue(Principal.PASSWORD));
  descriptor.setAttributeValue(MapElement.BACKEND_PRINCIPAL, Principal.CREDENTIAL, principal.getValue(Principal.CREDENTIAL));
  
  }
}
}

origin: org.glassfish.deployment/dol

  /**
   * write the descriptor class to a DOM tree and return it
   *
   * @param parent node for the DOM tree
   * @param node name for the descriptor
   * @param the descriptor to write
   * @return the DOM tree top node
   */    
  public Node writeDescriptor(Node parent, String nodeName, Principal descriptor) {
  Element principalNode = (Element) super.writeDescriptor(parent, nodeName, descriptor);
  appendTextChild(principalNode, RuntimeTagNames.DESCRIPTION, descriptor.getDescription());
  setAttribute(principalNode, RuntimeTagNames.USER_NAME, (String) descriptor.getValue(Principal.USER_NAME));
  setAttribute(principalNode, RuntimeTagNames.PASSWORD, (String) descriptor.getValue(Principal.PASSWORD));
  setAttribute(principalNode, RuntimeTagNames.CREDENTIAL, (String) descriptor.getValue(Principal.CREDENTIAL));
  return principalNode;
  }
}
com.sun.enterprise.deployment.runtime.connectorPrincipal

Javadoc

This class was based on the schema2beans generated one modified to remove its dependencies on schema2beans libraries.

Most used methods

  • getDescription
  • getValue

Popular in Java

  • Creating JSON documents from java classes using gson
  • getSharedPreferences (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JPanel (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now