| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_92) on Mon Sep 12 21:42:52 EDT 2016 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>DefaultHashFormatFactory (Apache Shiro 1.3.2 API)</title> |
| <meta name="date" content="2016-09-12"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="DefaultHashFormatFactory (Apache Shiro 1.3.2 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/DefaultHashFormatFactory.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/apache/shiro/crypto/hash/format/Base64Format.html" title="class in org.apache.shiro.crypto.hash.format"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html" target="_top">Frames</a></li> |
| <li><a href="DefaultHashFormatFactory.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.shiro.crypto.hash.format</div> |
| <h2 title="Class DefaultHashFormatFactory" class="title">Class DefaultHashFormatFactory</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.shiro.crypto.hash.format.DefaultHashFormatFactory</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><a href="../../../../../../org/apache/shiro/crypto/hash/format/HashFormatFactory.html" title="interface in org.apache.shiro.crypto.hash.format">HashFormatFactory</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre>public class <a href="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.37">DefaultHashFormatFactory</a> |
| extends <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> |
| implements <a href="../../../../../../org/apache/shiro/crypto/hash/format/HashFormatFactory.html" title="interface in org.apache.shiro.crypto.hash.format">HashFormatFactory</a></pre> |
| <div class="block">This default <code>HashFormatFactory</code> implementation heuristically determines a <code>HashFormat</code> class to |
| instantiate based on the input argument and returns a new instance of the discovered class. The heuristics are |
| detailed in the <a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getInstance-java.lang.String-"><code>getInstance</code></a> method documentation.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>1.2</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#DefaultHashFormatFactory--">DefaultHashFormatFactory</a></span>()</code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#assertHashFormatImpl-java.lang.Class-">assertHashFormatImpl</a></span>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> clazz)</code> </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getFormatClassNames--">getFormatClassNames</a></span>()</code> |
| <div class="block">Returns a <code>hashFormatAlias</code>-to-<code>fullyQualifiedHashFormatClassNameImplementation</code> map.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>protected <a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getHashFormatClass-java.lang.String-">getHashFormatClass</a></span>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> token)</code> |
| <div class="block">Heuristically determine the fully qualified HashFormat implementation class name based on the specified |
| token.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getHashFormatClass-java.lang.String-java.lang.String-">getHashFormatClass</a></span>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> packageName, |
| <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> token)</code> |
| <div class="block">Heuristically determine the fully qualified <code>HashFormat</code> implementation class name in the specified |
| package based on the provided token.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format">HashFormat</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getInstance-java.lang.String-">getInstance</a></span>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> in)</code> </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getSearchPackages--">getSearchPackages</a></span>()</code> |
| <div class="block">Returns a set of package names that can be searched for <a href="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format"><code>HashFormat</code></a> implementations according to |
| heuristics defined in the <a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getHashFormatClass-java.lang.String-java.lang.String-"><code>getHashFormat(packageName, token)</code></a> JavaDoc.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>protected <a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#lookupHashFormatClass-java.lang.String-">lookupHashFormatClass</a></span>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</code> </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format">HashFormat</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#newHashFormatInstance-java.lang.Class-">newHashFormatInstance</a></span>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> clazz)</code> </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#setFormatClassNames-java.util.Map-">setFormatClassNames</a></span>(<a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> formatClassNames)</code> |
| <div class="block">Sets the <code>hash-format-alias</code>-to-<code>fullyQualifiedHashFormatClassNameImplementation</code> map to be used in |
| the <a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getInstance-java.lang.String-"><code>getInstance(String)</code></a> implementation.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#setSearchPackages-java.util.Set-">setSearchPackages</a></span>(<a href="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> searchPackages)</code> |
| <div class="block">Sets a set of package names that can be searched for <a href="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format"><code>HashFormat</code></a> implementations according to |
| heuristics defined in the <a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getHashFormatClass-java.lang.String-java.lang.String-"><code>getHashFormat(packageName, token)</code></a> JavaDoc.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="DefaultHashFormatFactory--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>DefaultHashFormatFactory</h4> |
| <pre>public <a href="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.43">DefaultHashFormatFactory</a>()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getFormatClassNames--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFormatClassNames</h4> |
| <pre>public <a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> <a href="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.65">getFormatClassNames</a>()</pre> |
| <div class="block">Returns a <code>hashFormatAlias</code>-to-<code>fullyQualifiedHashFormatClassNameImplementation</code> map. |
| <p/> |
| This map will be used by the <a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getInstance-java.lang.String-"><code>getInstance</code></a> implementation: that method's argument |
| will be used as a lookup key to this map. If the map returns a value, that value will be used to instantiate |
| and return a new <code>HashFormat</code> instance. |
| <h3>Defaults</h3> |
| Shiro's default HashFormat implementations (as listed by the <a href="../../../../../../org/apache/shiro/crypto/hash/format/ProvidedHashFormat.html" title="enum in org.apache.shiro.crypto.hash.format"><code>ProvidedHashFormat</code></a> enum) will |
| be searched automatically independently of this map. You only need to populate this map with custom |
| <code>HashFormat</code> implementations that are <em>not</em> already represented by a <code>ProvidedHashFormat</code>. |
| <h3>Efficiency</h3> |
| Populating this map will be more efficient than configuring <a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getSearchPackages--"><code>searchPackages</code></a>, |
| but search packages may be more convenient depending on the number of <code>HashFormat</code> implementations that |
| need to be supported by this factory.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a <code>hashFormatAlias</code>-to-<code>fullyQualifiedHashFormatClassNameImplementation</code> map.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setFormatClassNames-java.util.Map-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setFormatClassNames</h4> |
| <pre>public void <a href="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.81">setFormatClassNames</a>(<a href="http://java.sun.com/javase/6/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> formatClassNames)</pre> |
| <div class="block">Sets the <code>hash-format-alias</code>-to-<code>fullyQualifiedHashFormatClassNameImplementation</code> map to be used in |
| the <a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getInstance-java.lang.String-"><code>getInstance(String)</code></a> implementation. See the <a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getFormatClassNames--"><code>getFormatClassNames()</code></a> JavaDoc for more |
| information. |
| <h3>Efficiency</h3> |
| Populating this map will be more efficient than configuring <a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getSearchPackages--"><code>searchPackages</code></a>, |
| but search packages may be more convenient depending on the number of <code>HashFormat</code> implementations that |
| need to be supported by this factory.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>formatClassNames</code> - the <code>hash-format-alias</code>-to-<code>fullyQualifiedHashFormatClassNameImplementation</code> |
| map to be used in the <a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getInstance-java.lang.String-"><code>getInstance(String)</code></a> implementation.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getSearchPackages--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSearchPackages</h4> |
| <pre>public <a href="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> <a href="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.96">getSearchPackages</a>()</pre> |
| <div class="block">Returns a set of package names that can be searched for <a href="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format"><code>HashFormat</code></a> implementations according to |
| heuristics defined in the <a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getHashFormatClass-java.lang.String-java.lang.String-"><code>getHashFormat(packageName, token)</code></a> JavaDoc. |
| <h3>Efficiency</h3> |
| Configuring this property is not as efficient as configuring a <a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getFormatClassNames--"><code>formatClassNames</code></a> |
| map, but it may be more convenient depending on the number of <code>HashFormat</code> implementations that |
| need to be supported by this factory.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a set of package names that can be searched for <a href="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format"><code>HashFormat</code></a> implementations</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getHashFormatClass-java.lang.String-java.lang.String-"><code>getHashFormatClass(String, String)</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setSearchPackages-java.util.Set-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setSearchPackages</h4> |
| <pre>public void <a href="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.110">setSearchPackages</a>(<a href="http://java.sun.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> searchPackages)</pre> |
| <div class="block">Sets a set of package names that can be searched for <a href="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format"><code>HashFormat</code></a> implementations according to |
| heuristics defined in the <a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getHashFormatClass-java.lang.String-java.lang.String-"><code>getHashFormat(packageName, token)</code></a> JavaDoc. |
| <h3>Efficiency</h3> |
| Configuring this property is not as efficient as configuring a <a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getFormatClassNames--"><code>formatClassNames</code></a> |
| map, but it may be more convenient depending on the number of <code>HashFormat</code> implementations that |
| need to be supported by this factory.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>searchPackages</code> - a set of package names that can be searched for <a href="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format"><code>HashFormat</code></a> implementations</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getInstance-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInstance</h4> |
| <pre>public <a href="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format">HashFormat</a> <a href="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.114">getInstance</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> in)</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/shiro/crypto/hash/format/HashFormatFactory.html#getInstance-java.lang.String-">getInstance</a></code> in interface <code><a href="../../../../../../org/apache/shiro/crypto/hash/format/HashFormatFactory.html" title="interface in org.apache.shiro.crypto.hash.format">HashFormatFactory</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getHashFormatClass-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getHashFormatClass</h4> |
| <pre>protected <a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> <a href="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.182">getHashFormatClass</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> token)</pre> |
| <div class="block">Heuristically determine the fully qualified HashFormat implementation class name based on the specified |
| token. |
| <p/> |
| This implementation functions as follows (in order): |
| <ol> |
| <li>See if the argument can be used as a lookup key in the <a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getFormatClassNames--"><code>formatClassNames</code></a> |
| map. If a value (a fully qualified class name <a href="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format"><code>HashFormat</code></a> implementation) is found, |
| <a href="../../../../../../org/apache/shiro/util/ClassUtils.html#forName-java.lang.String-"><code>lookup</code></a> the class and return it.</li> |
| <li> |
| Check to see if the token argument is a |
| <a href="../../../../../../org/apache/shiro/crypto/hash/format/ProvidedHashFormat.html" title="enum in org.apache.shiro.crypto.hash.format"><code>ProvidedHashFormat</code></a> enum value. If so, acquire the corresponding <code>HashFormat</code> class and |
| return it. |
| </li> |
| <li> |
| Check to see if the token argument is itself a fully qualified class name. If so, try to load the class |
| and return it. |
| </li> |
| <li>If the above options do not result in a discovered class, search all all configured |
| <a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getSearchPackages--"><code>searchPackages</code></a> using heuristics defined in the |
| <a href="../../../../../../org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#getHashFormatClass-java.lang.String-java.lang.String-"><code>getHashFormatClass(packageName, token)</code></a> method documentation |
| (relaying the <code>token</code> argument to that method for each configured package). |
| </li> |
| </ol> |
| <p/> |
| If a class is not discovered via any of the above means, <code>null</code> is returned to indicate the class |
| could not be found.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>token</code> - the string token from which a class name will be heuristically determined.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the discovered HashFormat class implementation or <code>null</code> if no class could be heuristically determined.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getHashFormatClass-java.lang.String-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getHashFormatClass</h4> |
| <pre>protected <a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> <a href="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.281">getHashFormatClass</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> packageName, |
| <a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> token)</pre> |
| <div class="block">Heuristically determine the fully qualified <code>HashFormat</code> implementation class name in the specified |
| package based on the provided token. |
| <p/> |
| The token is expected to be a relevant fragment of an unqualified class name in the specified package. |
| A 'relevant fragment' can be one of the following: |
| <ul> |
| <li>The <code>HashFormat</code> implementation unqualified class name</li> |
| <li>The prefix of an unqualified class name ending with the text <code>Format</code>. The first character of |
| this prefix can be upper or lower case and both options will be tried.</li> |
| <li>The prefix of an unqualified class name ending with the text <code>HashFormat</code>. The first character of |
| this prefix can be upper or lower case and both options will be tried.</li> |
| <li>The prefix of an unqualified class name ending with the text <code>CryptoFormat</code>. The first character |
| of this prefix can be upper or lower case and both options will be tried.</li> |
| </ul> |
| <p/> |
| Some examples: |
| <table> |
| <tr> |
| <th>Package Name</th> |
| <th>Token</th> |
| <th>Expected Output Class</th> |
| <th>Notes</th> |
| </tr> |
| <tr> |
| <td><code>com.foo.whatever</code></td> |
| <td><code>MyBarFormat</code></td> |
| <td><code>com.foo.whatever.MyBarFormat</code></td> |
| <td>Token is a complete unqualified class name</td> |
| </tr> |
| <tr> |
| <td><code>com.foo.whatever</code></td> |
| <td><code>Bar</code></td> |
| <td><code>com.foo.whatever.BarFormat</code> <em>or</em> <code>com.foo.whatever.BarHashFormat</code> <em>or</em> |
| <code>com.foo.whatever.BarCryptFormat</code></td> |
| <td>The token is only part of the unqualified class name - i.e. all characters in front of the <code>*Format</code> |
| <code>*HashFormat</code> or <code>*CryptFormat</code> suffix. Note that the <code>*Format</code> variant will be tried before |
| <code>*HashFormat</code> and then finally <code>*CryptFormat</code></td> |
| </tr> |
| <tr> |
| <td><code>com.foo.whatever</code></td> |
| <td><code>bar</code></td> |
| <td><code>com.foo.whatever.BarFormat</code> <em>or</em> <code>com.foo.whatever.BarHashFormat</code> <em>or</em> |
| <code>com.foo.whatever.BarCryptFormat</code></td> |
| <td>Exact same output as the above <code>Bar</code> input example. (The token differs only by the first character)</td> |
| </tr> |
| </table></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>packageName</code> - the package to search for matching <code>HashFormat</code> implementations.</dd> |
| <dd><code>token</code> - the string token from which a class name will be heuristically determined.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the discovered HashFormat class implementation or <code>null</code> if no class could be heuristically determined.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="lookupHashFormatClass-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>lookupHashFormatClass</h4> |
| <pre>protected <a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> <a href="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.333">lookupHashFormatClass</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name)</pre> |
| </li> |
| </ul> |
| <a name="assertHashFormatImpl-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>assertHashFormatImpl</h4> |
| <pre>protected final void <a href="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.342">assertHashFormatImpl</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> clazz)</pre> |
| </li> |
| </ul> |
| <a name="newHashFormatInstance-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>newHashFormatInstance</h4> |
| <pre>protected final <a href="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format">HashFormat</a> <a href="../../../../../../src-html/org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html#line.350">newHashFormatInstance</a>(<a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> clazz)</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/DefaultHashFormatFactory.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../../org/apache/shiro/crypto/hash/format/Base64Format.html" title="class in org.apache.shiro.crypto.hash.format"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../../org/apache/shiro/crypto/hash/format/HashFormat.html" title="interface in org.apache.shiro.crypto.hash.format"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/shiro/crypto/hash/format/DefaultHashFormatFactory.html" target="_top">Frames</a></li> |
| <li><a href="DefaultHashFormatFactory.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2004-2016 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.</small></p> |
| </body> |
| </html> |