cmsproject.java
来自「找了很久才找到到源代码」· Java 代码 · 共 583 行 · 第 1/2 页
JAVA
583 行
*/
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof CmsProject) {
return ((CmsProject)obj).m_id.equals(m_id);
}
return false;
}
/**
* Returns the creation date of this project.<p>
*
* @return the creation date of this project
*/
public long getDateCreated() {
return m_dateCreated;
}
/**
* Returns the description of this project.
*
* @return the description of this project
*/
public String getDescription() {
return m_description;
}
/**
* Returns the state of this project.<p>
*
* @return the state of this project
*/
public int getFlags() {
return m_flags;
}
/**
* Returns the user group id of this project.<p>
*
* @return the user group id of this project
*/
public CmsUUID getGroupId() {
return m_groupUsersId;
}
/**
* Returns the id of this project.<p>
*
* @return the id of this project
*
* @deprecated Use {@link #getUuid()} instead
*/
public int getId() {
return getUuid().hashCode();
}
/**
* Returns the manager group id of this project.<p>
*
* @return the manager group id of this project
*/
public CmsUUID getManagerGroupId() {
return m_groupManagersId;
}
/**
* Returns the name of this project.<p>
*
* @return the name of this project
*/
public String getName() {
return m_name;
}
/**
* Returns the fully qualified name of the associated organizational unit.<p>
*
* @return the fully qualified name of the associated organizational unit
*/
public String getOuFqn() {
return CmsOrganizationalUnit.getParentFqn(m_name);
}
/**
* Returns the user id of the project owner.<p>
*
* @return the user id of the project owner
*/
public CmsUUID getOwnerId() {
return m_ownerId;
}
/**
* Returns the simple name of this organizational unit.
*
* @return the simple name of this organizational unit.
*/
public String getSimpleName() {
return CmsOrganizationalUnit.getSimpleName(m_name);
}
/**
* Returns the type of this project.<p>
*
* @return the type of this project
*/
public CmsProjectType getType() {
return m_type;
}
/**
* Returns the id of this project.<p>
*
* @return the id of this project
*/
public CmsUUID getUuid() {
return m_id;
}
/**
* @see java.lang.Object#hashCode()
*/
public int hashCode() {
if (m_name != null) {
return m_name.hashCode();
}
return 0;
}
/**
* Returns the delete After Publishing flag.<p>
*
* @return the delete After Publishing flag
*
* @see #getType()
*/
public boolean isDeleteAfterPublishing() {
return (m_type == CmsProject.PROJECT_TYPE_TEMPORARY);
}
/**
* Returns the 'hidden' flag.<p>
*
* @return the 'hidden' flag
*
* @see #getFlags()
*/
public boolean isHidden() {
return (getFlags() & PROJECT_FLAG_HIDDEN) == PROJECT_FLAG_HIDDEN;
}
/**
* Returns <code>true</code> if this project is the Online project.<p>
*
* @return <code>true</code> if this project is the Online project
*/
public boolean isOnlineProject() {
return isOnlineProject(m_id);
}
/**
* Sets the delete After Publishing flag.<p>
*
* @param deleteAfterPublishing the delete After Publishing flag to set
*/
public void setDeleteAfterPublishing(boolean deleteAfterPublishing) {
m_type = deleteAfterPublishing ? CmsProject.PROJECT_TYPE_TEMPORARY : CmsProject.PROJECT_TYPE_NORMAL;
}
/**
* Sets the description of this project.<p>
*
* @param description the description to set
*/
public void setDescription(String description) {
m_description = description;
}
/**
* Sets the flags of this project.<p>
*
* @param flags the flag to set
*/
public void setFlags(int flags) {
m_flags = flags;
}
/**
* Sets the user group id of this project.<p>
*
* @param id the user group id of this project
*/
public void setGroupId(CmsUUID id) {
CmsUUID.checkId(id, false);
m_groupUsersId = id;
}
/**
* Sets the 'hidden' flag.<p>
*
* @param value the value to set
*/
public void setHidden(boolean value) {
if (isHidden() != value) {
setFlags(getFlags() ^ PROJECT_FLAG_HIDDEN);
}
}
/**
* Sets the manager group id of this project.<p>
*
* @param id the manager group id of this project
*/
public void setManagerGroupId(CmsUUID id) {
CmsUUID.checkId(id, false);
m_groupManagersId = id;
}
/**
* Sets the name.<p>
*
* @param name the name to set
*/
public void setName(String name) {
checkProjectName(name);
m_name = name;
}
/**
* Sets the owner id of this project.<p>
*
* @param id the id of the new owner
*/
public void setOwnerId(CmsUUID id) {
CmsUUID.checkId(id, false);
m_ownerId = id;
}
/**
* @see java.lang.Object#toString()
*/
public String toString() {
StringBuffer result = new StringBuffer();
result.append("[Project]:");
result.append(m_name);
result.append(" , Id=");
result.append(m_id);
result.append(", Desc=");
result.append(m_description);
return result.toString();
}
/**
* Sets the type of this project.<p>
*
* @param type the type to set
*/
void setType(CmsProjectType type) {
m_type = type;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?