org.riotfamily.pages.model
Class Site

java.lang.Object
  extended by org.riotfamily.pages.model.Site

public class Site
extends Object

Since:
6.5
Author:
Felix Gnass [fgnass at neteye dot de]

Constructor Summary
Site()
           
 
Method Summary
 boolean equals(Object obj)
           
 Set<String> getAliases()
           
 Set<Site> getDerivedSites()
           
 String getHostName()
           
 Long getId()
           
 Locale getLocale()
           
 Map<String,Object> getLocalPropertiesMap()
           
 Site getMasterSite()
           
 String getName()
           
 String getPathPrefix()
           
 long getPosition()
           
 Content getProperties()
           
 Map<String,Object> getPropertiesMap()
           
 Object getProperty(String key)
           
 int hashCode()
           
 boolean hostNameMatches(String hostName)
          Returns whether the given hostName matches the configured one.
 boolean hostNameMatches(String hostName, boolean greedy)
          Returns whether the given hostName matches the configured one.
 boolean isEnabled()
           
 String makeAbsolute(boolean secure, String defaultHost, String contextPath, String path)
           
 boolean matches(String hostName, String path)
           
 boolean prefixMatches(String path)
           
 void setAliases(Set<String> aliases)
           
 void setDerivedSites(Set<Site> derivedSites)
           
 void setEnabled(boolean enabled)
           
 void setHostName(String hostName)
           
 void setId(Long id)
           
 void setLocale(Locale locale)
           
 void setMasterSite(Site masterSite)
           
 void setName(String name)
           
 void setPathPrefix(String pathPrefix)
           
 void setPosition(long position)
           
 void setProperties(Content properties)
           
 String stripPrefix(String path)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Site

public Site()
Method Detail

isEnabled

public boolean isEnabled()

setEnabled

public void setEnabled(boolean enabled)

getId

public Long getId()

setId

public void setId(Long id)

getName

public String getName()

setName

public void setName(String name)

getLocale

public Locale getLocale()

setLocale

public void setLocale(Locale locale)

getHostName

public String getHostName()

setHostName

public void setHostName(String hostName)

getPathPrefix

public String getPathPrefix()

setPathPrefix

public void setPathPrefix(String pathPrefix)

stripPrefix

public String stripPrefix(String path)

hostNameMatches

public boolean hostNameMatches(String hostName)
Returns whether the given hostName matches the configured one. Sites without a hostName will match any host.


hostNameMatches

public boolean hostNameMatches(String hostName,
                               boolean greedy)
Returns whether the given hostName matches the configured one.

Parameters:
hostName - The hostName to match
greedy - Whether a null hostName should match any host
Returns:
true if the hostName matches, false otherwise

prefixMatches

public boolean prefixMatches(String path)

matches

public boolean matches(String hostName,
                       String path)

getMasterSite

public Site getMasterSite()

setMasterSite

public void setMasterSite(Site masterSite)

getDerivedSites

public Set<Site> getDerivedSites()

setDerivedSites

public void setDerivedSites(Set<Site> derivedSites)

getPosition

public long getPosition()

setPosition

public void setPosition(long position)

getAliases

public Set<String> getAliases()

setAliases

public void setAliases(Set<String> aliases)

getProperties

public Content getProperties()

setProperties

public void setProperties(Content properties)

getProperty

public Object getProperty(String key)

getLocalPropertiesMap

public Map<String,Object> getLocalPropertiesMap()

getPropertiesMap

public Map<String,Object> getPropertiesMap()

makeAbsolute

public String makeAbsolute(boolean secure,
                           String defaultHost,
                           String contextPath,
                           String path)

toString

public String toString()
Overrides:
toString in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object